I have my code written like this but it gives an error saying:
Error: A value of type \'List\' can\'t be assigned to a variable of type \'Widget\'.
Dart 2.3 introduce Spread operator (…)
Reference link : https://medium.com/flutter-community/whats-new-in-dart-2-3-1a7050e2408d
var a = [0,1,2,3,4]; var b = [6,7,8,9]; var c = [...a,5,...b]; print(c); // prints: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]