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";
|
import "package:flutter/material.dart";
|
||||||
|
|
||||||
extension SchemeToTheme on ColorScheme {
|
extension SchemeToTheme on ColorScheme {
|
||||||
ThemeData getTheme(bool useDefaultFont) => .from(colorScheme: this).copyWith(
|
ThemeData getTheme(bool useSystemFont) => .from(colorScheme: this).copyWith(
|
||||||
cardTheme: .new(color: primaryContainer),
|
cardTheme: .new(color: primaryContainer),
|
||||||
popupMenuTheme: .new(
|
popupMenuTheme: .new(
|
||||||
shape: RoundedRectangleBorder(borderRadius: .circular(16)),
|
shape: RoundedRectangleBorder(borderRadius: .circular(16)),
|
||||||
|
|
@ -11,12 +11,12 @@ extension SchemeToTheme on ColorScheme {
|
||||||
titleSpacing: 0,
|
titleSpacing: 0,
|
||||||
backgroundColor: surfaceContainerLow,
|
backgroundColor: surfaceContainerLow,
|
||||||
),
|
),
|
||||||
textTheme: useDefaultFont
|
textTheme: useSystemFont
|
||||||
? null
|
? ThemeData(
|
||||||
: ThemeData(
|
|
||||||
fontFamilyFallback: ["sans", "emoji"],
|
fontFamilyFallback: ["sans", "emoji"],
|
||||||
brightness: brightness,
|
brightness: brightness,
|
||||||
).textTheme,
|
).textTheme
|
||||||
|
: null,
|
||||||
inputDecorationTheme: const InputDecorationTheme(
|
inputDecorationTheme: const InputDecorationTheme(
|
||||||
border: OutlineInputBorder(),
|
border: OutlineInputBorder(),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue