Skip to content

Instantly share code, notes, and snippets.

@xinthink
Created March 5, 2020 10:05
Show Gist options
  • Save xinthink/50d2e408173bd08c6fe3c0d5c1dc72ba to your computer and use it in GitHub Desktop.
Save xinthink/50d2e408173bd08c6fe3c0d5c1dc72ba to your computer and use it in GitHub Desktop.
class _HomeScreenState extends State<HomeScreen> with CommandHandler {
Widget _fab(BuildContext context) => FloatingActionButton(
child: const Icon(Icons.add),
onPressed: () async {
final command = await Navigator.pushNamed(context, '/note');
processNoteCommand(_scaffoldKey.currentState, command);
},
);
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment