Closed NTMS2017 closed 3 years ago
ScaffoldMessenger is in the code that displays the toast when a value changes. You can probably delete any references to that and your code should work.
void showSnackBar(String label, dynamic value) {
ScaffoldMessenger.of(context).removeCurrentSnackBar();
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
duration: Duration(seconds: 1),
content: Text(label + ' = ' + value.toString()),
),
);
}
I created a empty flutter project and replace your example data and I am getting error on:
error: Undefined name 'ScaffoldMessenger'. (undefined_identifier at [flutter_form] lib/plumbing/scaffold.dart:66)
But couldn't find anything related to ScaffoldMessenger in your code. Please help.