Last active
July 25, 2022 11:40
-
-
Save nbnD/afed4adb8d5801a2a9f01e6887d29ab0 to your computer and use it in GitHub Desktop.
Snackbar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
showModalBottomSheet( | |
context: context, | |
builder: (context) { | |
return Scaffold( //scaffold provides us the ability to show snackbar in the modal bottom sheet | |
body: Column( | |
mainAxisSize: MainAxisSize.min, | |
children: [ | |
const ListTile( | |
leading: Icon(Icons.person), | |
title: Text("Profile"), | |
), | |
const ListTile( | |
leading: Icon(Icons.edit), | |
title: Text("Edit"), | |
), | |
const ListTile( | |
leading: Icon(Icons.exit_to_app), | |
title: Text("Exit"), | |
), | |
TextButton( | |
onPressed: () { | |
//We display the snack bar when on Pressed | |
}, | |
child: const Text("OK")), | |
], | |
), | |
); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment