FloatingActionButton( onPressed: () => _showAddingDialog(context), ), Future _showAddingDialog(BuildContext context) { // ... }