Created
August 13, 2019 12:51
-
-
Save webianks/7a8d82de0179d024cd60b7e9acce11e0 to your computer and use it in GitHub Desktop.
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
showActionSheet( | |
context: context, | |
child: CupertinoActionSheet( | |
message: const Text('Select image from'), | |
actions: <Widget>[ | |
CupertinoActionSheetAction( | |
child: Padding( | |
padding: const EdgeInsets.only(right: 16.0), | |
child: Text( | |
'Camera', | |
style: TextStyle(color: Color(Const.colorPrimary)), | |
), | |
), | |
onPressed: () { | |
Navigator.pop(context, "0"); | |
}, | |
), | |
CupertinoActionSheetAction( | |
child: Padding( | |
padding: const EdgeInsets.only(right: 16.0), | |
child: Text('Gallery', | |
style: TextStyle(color: Color(Const.colorPrimary))), | |
), | |
onPressed: () { | |
Navigator.pop(context, "1"); | |
}, | |
), | |
], | |
cancelButton: CupertinoActionSheetAction( | |
child: const Text('Cancel', | |
style: TextStyle(color: Color(Const.colorPrimary))), | |
isDefaultAction: true, | |
onPressed: () { | |
Navigator.pop(context, '2'); | |
}, | |
), | |
), | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment