cast<R> method Null safety List<R> cast<R>() Returns a view of this list as a list of R instances . If this list contains only instances of R , all read operations will work correctly. If any operation tries to read an element that is not an instance of R , the access will throw instead.
What is cast in flutter?
cast<R> method Null safety List<R> cast<R>() Returns a view of this list as a list of R instances . If this list contains only instances of R , all read operations will work correctly. If any operation tries to read an element that is not an instance of R , the access will throw instead.