onpressed flutter anonymous code example
Example: onpressed pass context flutter
FloatingActionButton(
onPressed: () => _showAddingDialog(context),
),
Future _showAddingDialog(BuildContext context) {
// ...
}
FloatingActionButton(
onPressed: () => _showAddingDialog(context),
),
Future _showAddingDialog(BuildContext context) {
// ...
}