A new array can be created by using the literal constructor [] :
Read moreWhat is toList () in Flutter?
toList method Null safety Future<List<T>> toList() Collects all elements of this stream in a List . Creates a List<T> and adds all elements of this stream to the list in the order they arrive. When this stream ends, the returned future is completed with that list.
Read more