style(device_setup): redesign activation code dialog with icon and OK action
Replace the bare centered text with a rounded dialog that leads with a mail icon, keeps the activation-code message, and adds an explicit OK button to dismiss. Aligns the dialog with the rest of the legacy design system.
This commit is contained in:
@@ -6,7 +6,9 @@ void showActivationCodeDialog(BuildContext context) {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => Dialog(
|
||||
backgroundColor: Colors.transparent,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: _ActivationCodeDialog(),
|
||||
),
|
||||
);
|
||||
@@ -17,16 +19,46 @@ class _ActivationCodeDialog extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
return Padding(
|
||||
padding: SizeUtils.getByScreen(
|
||||
small: EdgeInsets.symmetric(horizontal: 14, vertical: 24),
|
||||
big: EdgeInsets.symmetric(horizontal: 12, vertical: 20),
|
||||
small: EdgeInsets.fromLTRB(24, 28, 24, 16),
|
||||
big: EdgeInsets.fromLTRB(20, 24, 20, 14),
|
||||
),
|
||||
color: Colors.white,
|
||||
child: Text(
|
||||
context.translate(I18n.activationCodeMessage),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontSize: SizeUtils.getByScreen(small: 16, big: 15)),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.email_outlined,
|
||||
size: SizeUtils.getByScreen(small: 48, big: 44),
|
||||
color: const Color(0xFF329E95),
|
||||
),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 16, big: 14)),
|
||||
Text(
|
||||
context.translate(I18n.activationCodeMessage),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: SizeUtils.getByScreen(small: 15, big: 14),
|
||||
height: 1.4,
|
||||
),
|
||||
),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 20, big: 16)),
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
child: TextButton(
|
||||
onPressed: () => Navigator.pop(context),
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor: const Color(0xFF329E95),
|
||||
),
|
||||
child: Text(
|
||||
context.translate(I18n.ok),
|
||||
style: TextStyle(
|
||||
fontSize: SizeUtils.getByScreen(small: 15, big: 14),
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user