popupChangeUsername function
Implementation
Object popupChangeUsername(BuildContext context) {
return showDialog(
context: context,
barrierDismissible: false,
builder: (BuildContext context) => WillPopScope(
onWillPop: () async => false,
child: AlertDialog(
backgroundColor: Theme.of(context).colorScheme.tertiary,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(15)),
),
contentPadding: EdgeInsets.all(defaultWidth * 0.05),
content: SizedBox(
width: defaultWidth * 0.85,
child: Column(mainAxisSize: MainAxisSize.min, children: [
Text(
"Para terminar de cambiar de forma satisfactoria el nombre de usuario debe volver a iniciar sesiĆ³n.",
style: TextStyle(
fontSize: 19,
color: Theme.of(context).colorScheme.primary,
),
),
SizedBox(height: defaultWidth * 0.05),
playButton(context, "Ok", () {
Navigator.pop(context);
Navigator.pop(context);
apiSignOut();
Navigator.pop(context);
}),
]),
),
),
),
);
}