fix system font logic

This commit is contained in:
Henry Hiles 2026-07-17 00:57:51 -04:00
commit 1a2a59e0bc
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -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(),
),