Skip to content

Commit

Permalink
feat: update header flow in modals
Browse files Browse the repository at this point in the history
  • Loading branch information
Tommytrg committed Oct 28, 2024
1 parent bfce803 commit 7b16b36
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
"downloading": "Downloading...",
"drSolved": "Data requests solved",
"emptyStakeMessage": "Stake some $WIT! Secure the network, earn rewards, and be part of a censorship-resistant oracle.",
"emptyStakeTitle": "You don´t have balance to unstake",
"emptyStakeTitle": "You don't have balance to unstake",
"enableLoginWithBiometrics": "Enable login with biometrics",
"encryptWallet01": "This password encrypts your Witnet wallet only on this computer.",
"encryptWallet02": "This is not your backup and you cannot restore your wallet with this password.",
Expand Down
32 changes: 23 additions & 9 deletions lib/widgets/alert_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,33 @@ buildAlertDialog({
context: context,
barrierDismissible: closable,
builder: (BuildContext context) => AlertDialog(
title: Text(
textAlign: TextAlign.center,
title,
style: theme.textTheme.titleLarge,
title: Padding(
padding: const EdgeInsets.only(bottom: 16),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
if (icon != null)
Icon(
icon,
size: 24,
color: color ?? WitnetPallet.brightCyan,
),
const SizedBox(width: 8),
Align(
alignment: Alignment.centerLeft,
child: Text(
title,
style: theme.textTheme.titleLarge,
),
),
],
),
),
backgroundColor: theme.colorScheme.surface,
surfaceTintColor: theme.colorScheme.surface,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(extendedTheme.borderRadius!)),
icon: icon != null
? Icon(icon,
size: 24, color: color ?? WitnetPallet.brightCyan)
: null,
borderRadius: BorderRadius.all(extendedTheme.borderRadius!),
),
actionsPadding: EdgeInsets.only(bottom: 16, right: 16, top: 0),
content: ConstrainedBox(
constraints: BoxConstraints(maxWidth: 300), child: content),
Expand Down

0 comments on commit 7b16b36

Please sign in to comment.