Skip to content

Commit 196aecf

Browse files
committed
fix: IconButtonTheme iconSize
1 parent 4e6aebc commit 196aecf

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

lib/src/theme.dart

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ final _kButtonHeight = isDesktop ? kDesktopButtonHeight : kMobileButtonHeight;
1818
final _kButtonRadius = _kButtonHeight / 2;
1919
const _kMenuRadius = 8.0;
2020
const _kInputDecorationRadius = 6.0;
21+
const _kDesktopIconSize = 20.0;
22+
const _kMobileIconSize = 24.0;
23+
final _iconSize = isMobile ? _kMobileIconSize : _kDesktopIconSize;
2124

2225
ThemePair phoenixTheme({
2326
required Color color,
@@ -54,12 +57,10 @@ ThemeData _phoenixTheme({
5457
Size(buttonHeight ?? _kButtonHeight, buttonHeight ?? _kButtonHeight);
5558

5659
return ThemeData(
57-
iconTheme: isMobile
58-
? null
59-
: IconThemeData(
60-
size: 20,
61-
color: colorScheme.onSurface,
62-
),
60+
iconTheme: IconThemeData(
61+
size: _iconSize,
62+
color: colorScheme.onSurface,
63+
),
6364
colorScheme: colorScheme,
6465
scaffoldBackgroundColor: colorScheme.surface,
6566
splashFactory: NoSplash.splashFactory,
@@ -449,6 +450,7 @@ IconButtonThemeData _iconButtonTheme({
449450
? VisualDensity.compact
450451
: null,
451452
).copyWith(
453+
iconSize: WidgetStatePropertyAll(_iconSize),
452454
iconColor: WidgetStateProperty.resolveWith(
453455
(s) => s.contains(WidgetState.disabled)
454456
? colorScheme.onSurface.withOpacity(0.7)

0 commit comments

Comments
 (0)