Skip to content

Commit

Permalink
πŸ’„ Fix style mismatch after Flutter upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpham committed Dec 7, 2023
1 parent 7c7d487 commit 4765f8d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions apps/ff_desktop/lib/ui/frames/address_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class _AddressBarState extends State<AddressBar> {
focusNode: focusNode,
controller: controller,
onSubmitted: _handleSubmitted,
style: context.theme.textTheme.bodyLarge?.copyWith(
style: context.theme.textTheme.bodyMedium?.copyWith(
color: context.theme.colorScheme.onSurfaceVariant,
),
onTapOutside: _disableEditMode,
Expand Down Expand Up @@ -124,7 +124,7 @@ class _AddressBarState extends State<AddressBar> {
alignment: Alignment.center,
child: Text(
displaySegment,
style: context.theme.textTheme.bodyLarge
style: context.theme.textTheme.bodyMedium
?.copyWith(
color: isLast
? context.theme.colorScheme
Expand Down
4 changes: 2 additions & 2 deletions apps/ff_desktop/lib/ui/frames/side_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class SideBar extends StatelessWidget {
selectedIcon:
entry.key.getSelectedIcon(context),
textStyle: context
.theme.textTheme.bodyLarge
.theme.textTheme.bodyMedium
?.copyWith(
fontWeight: FontWeight.bold,
),
Expand Down Expand Up @@ -139,7 +139,7 @@ class SideBarSection extends StatelessWidget {
: null,
icon: section.getIcon(context),
selectedIcon: section.getSelectedIcon(context),
textStyle: context.theme.textTheme.bodyLarge?.copyWith(
textStyle: context.theme.textTheme.bodyMedium?.copyWith(
fontWeight: FontWeight.bold,
),
),
Expand Down
2 changes: 1 addition & 1 deletion apps/ff_desktop/lib/ui/widgets/side_bar_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class SideBarItem extends StatelessWidget {
final text =
title ?? uri?.lastNonEmptySegment ?? '';
final textStyle = this.textStyle ??
(context.theme.textTheme.bodyLarge ??
(context.theme.textTheme.bodyMedium ??
const TextStyle())
.copyWith(
color: selected
Expand Down
13 changes: 7 additions & 6 deletions apps/ff_desktop/lib/ui/widgets/theme_toggle.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ class ThemeToggle extends StatelessWidget {
final bool isCollapsed;

const ThemeToggle({
Key? key,
super.key,
this.isCollapsed = false,
}) : super(key: key);
});

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -75,8 +75,9 @@ class ThemeToggle extends StatelessWidget {
ThemeMode.light.name.capitalize(),
style: context.theme.textTheme.bodySmall
?.copyWith(
color:
context.theme.colorScheme.onPrimary,
color: themeMode == ThemeMode.light
? context.theme.colorScheme.onPrimary
: context.theme.colorScheme.onBackground,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
Expand All @@ -99,7 +100,7 @@ class ThemeToggle extends StatelessWidget {
size: Spacing.d16,
color: themeMode == ThemeMode.light
? context.theme.colorScheme.onSurface
: context.theme.colorScheme.onPrimary,
: context.theme.colorScheme.onBackground,
),
Flexible(
child: Padding(
Expand All @@ -110,7 +111,7 @@ class ThemeToggle extends StatelessWidget {
?.copyWith(
color: themeMode == ThemeMode.light
? context.theme.colorScheme.onSurface
: context.theme.colorScheme.onPrimary,
: context.theme.colorScheme.onBackground,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
Expand Down

0 comments on commit 4765f8d

Please sign in to comment.