Trying to create a list of 28*28.
final resultBytes = List(28 * 28);
Why am I getting this error
"The default 'List' constructor isn't available when null safety is enabled."
Trying to create a list of 28*28.
final resultBytes = List(28 * 28);
Why am I getting this error
"The default 'List' constructor isn't available when null safety is enabled."
'List' is deprecated and shouldn't be used. Use a list literal, [], or the List.filled constructor instead. -> this is before null safety
Now, They have removed it completely, now you can use List.filled
List.filled(28*28, 0);
Refer docs