Skip to content

Commit 7ef04a1

Browse files
committed
fix(style): adjust logo to center in create wallet flow header
1 parent 34fca32 commit 7ef04a1

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

lib/theme/wallet_theme.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@ Widget witnetLogo(ThemeData theme) {
3131
);
3232
}
3333

34-
Widget witnetEyeIcon(ThemeData theme) {
34+
Widget witnetEyeIcon(ThemeData theme, {height = 100}) {
3535
return (theme.primaryColor == lightTheme.primaryColor)
3636
? Image.asset(
3737
'assets/img/witnet_light_icon.png',
3838
width: 100,
39-
height: 118.52,
39+
height: height,
4040
fit: BoxFit.fitWidth,
4141
filterQuality: FilterQuality.high,
4242
)
4343
: Image.asset(
4444
'assets/img/witnet_dark_icon.png',
4545
width: 100,
46-
height: 118.52,
46+
height: height,
4747
fit: BoxFit.fitWidth,
4848
filterQuality: FilterQuality.high,
4949
);

lib/widgets/layouts/headerLayout.dart

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ class HeaderLayout extends StatelessWidget {
3333
this.appBar,
3434
});
3535

36+
bool isCreateWalletFlow() =>
37+
dashboardActions == null && navigationActions.length == 1;
38+
39+
EdgeInsets navigationBarPadding() =>
40+
EdgeInsets.fromLTRB(16, 16, 16, isCreateWalletFlow() ? 0 : 16);
41+
42+
double witnetLogoHeight() => isCreateWalletFlow() ? 100 : 118;
43+
3644
Widget build(BuildContext context) {
3745
final extendedTheme = Theme.of(context).extension<ExtendedTheme>()!;
3846
final theme = Theme.of(context);
@@ -45,7 +53,7 @@ class HeaderLayout extends StatelessWidget {
4553
color: extendedTheme.headerBackgroundColor,
4654
child: Column(children: [
4755
Container(
48-
padding: EdgeInsets.fromLTRB(16, 16, 16, 16),
56+
padding: navigationBarPadding(),
4957
child: Row(
5058
crossAxisAlignment: CrossAxisAlignment.start,
5159
mainAxisAlignment: navigationActions.length > 1
@@ -68,7 +76,8 @@ class HeaderLayout extends StatelessWidget {
6876
children: [
6977
dashboardActions != null
7078
? dashboardActions!
71-
: witnetEyeIcon(theme)
79+
: witnetEyeIcon(theme,
80+
height: witnetLogoHeight())
7281
],
7382
),
7483
)),

0 commit comments

Comments
 (0)