type 'List<List<dynamic>>' is not a subtype of type 'List<List<num>>' in type cast #36614
Labels
area-language
Dart language related items (some items might be better tracked at github.com/dart-lang/language).
What is correct way to cast
List<List<dynamic>>
toList<List<num>>
?As, if I cast using
.cast()
, I am getting followingCastError
-And if I also use
as List<List<num>>
, I am getting followingCastError
-Details -
I have function
List<Point> toListOfPoint(List<List<num>> list_of_list){...}
fromimport 'package:poly/poly.dart';
So, In order to pass dynamic list I'm casting
List<List<dynamic>>
toList<List<num>>
But, I'm getting following error(s)-
with code -
as List<List<num>>
I get following error -with following code -
2.2.0
)The text was updated successfully, but these errors were encountered: