Skip to content
This repository was archived by the owner on May 20, 2023. It is now read-only.

Commit 177f996

Browse files
committed
Remove the _AlwaysSelectable const constructor since it is always stored as a Selectable<T> and the generic type isn't available as a const.
Fix run time type error exposed by dart2js when compiling with Dart2 semantics. Does not yet appear in DDC because of a known issue. dart-lang/sdk#32918 PiperOrigin-RevId: 197071245
1 parent 10f69a7 commit 177f996

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/src/material_tree/material_tree_node.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class MaterialTreeNode<T> {
5555
if (_root.options is Selectable) {
5656
_selectable = _root.options as Selectable<T>;
5757
} else {
58-
_selectable = const _AlwaysSelectable();
58+
_selectable = new _AlwaysSelectable<T>();
5959
}
6060
}
6161

@@ -284,8 +284,6 @@ class MaterialTreeNode<T> {
284284

285285
// TODO(google): Remove once we switch over Selectable interfaces.
286286
class _AlwaysSelectable<T> implements Selectable<T> {
287-
const _AlwaysSelectable();
288-
289287
@override
290288
SelectableOption getSelectable(T item) => SelectableOption.Selectable;
291289
}

0 commit comments

Comments
 (0)