I have created a function which will generate alpha numeric characters. I have also created a APPSTATE which I am trying to update in my function, but when I am add the line in it, it throws error.
I am getting this error:
The function 'FFAppState' isn't defined.
Try importing the library that defines 'FFAppState', correcting the name to the name of an existing function, or defining a function named 'FFAppState'.
FFAppState().appliRefNo = result;
String? applicationRefNum() {
/// MODIFY CODE ONLY BELOW THIS LINE
String chars =
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
String result = '';
final random = math.Random();
for (int i = 0; i < 5; i++) {
result += chars[random.nextInt(chars.length)];
}
// this is the to update appstate
FFAppState().appliRefNo = result;
return result;
/// MODIFY CODE ONLY ABOVE THIS LINE
}