Skip to content

Instantly share code, notes, and snippets.

@haashem
Created September 26, 2022 11:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haashem/404b9bcc1329641d23cdd7bf7458d3fe to your computer and use it in GitHub Desktop.
Save haashem/404b9bcc1329641d23cdd7bf7458d3fe to your computer and use it in GitHub Desktop.
Show dialog
void onCardPressed(SignInSecurityCardType type) {
showDialog(
context: context,
barrierColor: Colors.grey.withOpacity(0.8),
barrierDismissible: true,
builder: (context) {
switch (type) {
case SignInSecurityCardType.appleId:
break;
case SignInSecurityCardType.password:
break;
case SignInSecurityCardType.accountSecurity:
return Modal(
icon: Icons.security,
title: 'Account Security',
child: AccountSecurity(
onDevicePressed: () {},
),
onCloseButtonPressed: () => Navigator.of(context).pop(),
);
}
return Container();
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment