Add settings page #46
1 changed files with 5 additions and 5 deletions
fix system font logic
commit
1a2a59e0bc
|
|
@ -1,7 +1,7 @@
|
|||
import "package:flutter/material.dart";
|
||||
|
||||
extension SchemeToTheme on ColorScheme {
|
||||
ThemeData getTheme(bool useDefaultFont) => .from(colorScheme: this).copyWith(
|
||||
ThemeData getTheme(bool useSystemFont) => .from(colorScheme: this).copyWith(
|
||||
cardTheme: .new(color: primaryContainer),
|
||||
popupMenuTheme: .new(
|
||||
shape: RoundedRectangleBorder(borderRadius: .circular(16)),
|
||||
|
|
@ -11,12 +11,12 @@ extension SchemeToTheme on ColorScheme {
|
|||
titleSpacing: 0,
|
||||
backgroundColor: surfaceContainerLow,
|
||||
),
|
||||
textTheme: useDefaultFont
|
||||
? null
|
||||
: ThemeData(
|
||||
textTheme: useSystemFont
|
||||
? ThemeData(
|
||||
fontFamilyFallback: ["sans", "emoji"],
|
||||
brightness: brightness,
|
||||
).textTheme,
|
||||
).textTheme
|
||||
: null,
|
||||
inputDecorationTheme: const InputDecorationTheme(
|
||||
border: OutlineInputBorder(),
|
||||
),
|
||||
|
|
|
|||
Loading…
Reference in a new issue