void main() {
// Fixed length list
var myList = List(3);
myList[0] = 10;
myList[1] = 20;
myList[2] = 30;
print(myList);
}
The default 'List' constructor isn't available when null safety is enabled.
Try using a list literal, 'List.filled' or 'List.generate'.dartdefault_list_constructor