error: Non-nullable instance field ‘pickedImage’ must be initialized.
error: Non-nullable instance field ‘textResult’ must be initialized.
error: The non-nullable variable ‘hasilScan’ must be initialized.
File pickedImage;
String textResult;
static String hasilScan;
2
Answers
In flutter after null safety was enabled, you can’t leave a variable without assiging a value to it.
you can either use
late
modifier, but you have to assign a value to it lateror make it nullable using null check operator
or just assign a value to it :
Thats simple either assign a value to variable or make variable type Nullablae using ?.
Like File? File;
String? string;