feat: Android TV support (#503)

Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
PartyDonut 2025-09-28 21:07:49 +02:00 committed by GitHub
parent 7ab8c015b9
commit c299492d6d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
168 changed files with 12019 additions and 3073 deletions

View file

@ -37,6 +37,15 @@ class FladderTheme {
static ThemeData theme(ColorScheme? colorScheme, DynamicSchemeVariant dynamicSchemeVariant) {
final ColorScheme? scheme = generateDynamicColourSchemes(colorScheme, dynamicSchemeVariant);
final buttonState = WidgetStateProperty.resolveWith(
(states) {
return BorderSide(
width: 2,
color: states.contains(WidgetState.focused) ? Colors.white.withValues(alpha: 0.65) : Colors.transparent,
);
},
);
final textTheme = FladderFonts.rubikTextTheme(
const TextTheme(),
);
@ -61,7 +70,6 @@ class FladderTheme {
floatingActionButtonTheme: FloatingActionButtonThemeData(
backgroundColor: scheme?.secondaryContainer,
foregroundColor: scheme?.onSecondaryContainer,
shape: defaultShape,
),
snackBarTheme: SnackBarThemeData(
backgroundColor: scheme?.secondary,
@ -90,11 +98,6 @@ class FladderTheme {
}),
trackOutlineWidth: const WidgetStatePropertyAll(1),
),
iconButtonTheme: IconButtonThemeData(
style: ButtonStyle(
shape: WidgetStatePropertyAll(defaultShape),
),
),
navigationBarTheme: const NavigationBarThemeData(),
dialogTheme: DialogThemeData(shape: defaultShape),
scrollbarTheme: ScrollbarThemeData(
@ -130,7 +133,7 @@ class FladderTheme {
dividerTheme: DividerThemeData(
indent: 6,
endIndent: 6,
color: scheme?.onSurface.withAlpha(125),
color: scheme?.onSurface.withAlpha(30),
),
segmentedButtonTheme: SegmentedButtonThemeData(
style: ButtonStyle(
@ -145,9 +148,36 @@ class FladderTheme {
side: const WidgetStatePropertyAll(BorderSide.none),
),
),
elevatedButtonTheme: ElevatedButtonThemeData(style: ButtonStyle(shape: WidgetStatePropertyAll(defaultShape))),
filledButtonTheme: FilledButtonThemeData(style: ButtonStyle(shape: WidgetStatePropertyAll(defaultShape))),
outlinedButtonTheme: OutlinedButtonThemeData(style: ButtonStyle(shape: WidgetStatePropertyAll(defaultShape))),
iconButtonTheme: IconButtonThemeData(
style: ButtonStyle(
shape: WidgetStatePropertyAll(smallShape),
side: buttonState,
),
),
elevatedButtonTheme: ElevatedButtonThemeData(
style: ButtonStyle(
shape: WidgetStatePropertyAll(smallShape),
side: buttonState,
),
),
filledButtonTheme: FilledButtonThemeData(
style: ButtonStyle(
shape: WidgetStatePropertyAll(smallShape),
side: buttonState,
),
),
outlinedButtonTheme: OutlinedButtonThemeData(
style: ButtonStyle(
shape: WidgetStatePropertyAll(smallShape),
side: buttonState,
),
),
textButtonTheme: TextButtonThemeData(
style: ButtonStyle(
shape: WidgetStatePropertyAll(smallShape),
side: buttonState,
),
),
textTheme: textTheme.copyWith(
titleMedium: textTheme.titleMedium?.copyWith(
fontWeight: FontWeight.w600,