File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -28,9 +28,10 @@ class FilteredElementList extends ListBase<Element> implements NodeListWrapper {
28
28
// with externally to this class.
29
29
//
30
30
// We can't use where directly because the types don't agree and there's
31
- // no way to cast it, so take advantage of being in the SDK.
31
+ // no way to cast it, so take advantage of being in the SDK to construct
32
+ // a WhereIterable directly. Even so it has to be of dynamic.
32
33
Iterable <Element > get _iterable =>
33
- new WhereIterable < Element > (_childNodes, (n) => n is Element );
34
+ new WhereIterable (_childNodes, (n) => n is Element );
34
35
List <Element > get _filtered =>
35
36
new List <Element >.from (_iterable, growable: false );
36
37
@@ -136,7 +137,7 @@ class FilteredElementList extends ListBase<Element> implements NodeListWrapper {
136
137
bool remove (Object element) {
137
138
if (element is ! Element ) return false ;
138
139
if (contains (element)) {
139
- element.remove ();
140
+ ( element as Element ) .remove (); // Placate the type checker
140
141
return true ;
141
142
} else {
142
143
return false ;
You can’t perform that action at this time.
0 commit comments