Skip to content

Instantly share code, notes, and snippets.

@xinthink
Created March 5, 2020 09:27
Show Gist options
  • Save xinthink/16e0fc34f115ac91b2fad5b685a5444e to your computer and use it in GitHub Desktop.
Save xinthink/16e0fc34f115ac91b2fad5b685a5444e to your computer and use it in GitHub Desktop.
/// Presses the FAB to create a new note
Widget _fab(BuildContext context) => FloatingActionButton(
...
onPressed: () => Navigator.pushNamed(context, '/note'),
);
/// Starts editing a note when tapped
void _onNoteTap(Note note) =>
Navigator.pushNamed(context, '/note', arguments: { 'note': note });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment