From e71943f6e2f09f3203ff1220c12f6974f4120b1c Mon Sep 17 00:00:00 2001 From: Felix Kirchner Date: Tue, 24 Feb 2026 18:01:10 +0100 Subject: [PATCH] Implemented Radio Theme --- lib/main.dart | 15 ++++++++++----- .../widgets/tiles/custom_radio_list_tile.dart | 6 +----- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 8818444..ab0f34d 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -40,14 +40,19 @@ class GameTracker extends StatelessWidget { primaryColor: CustomTheme.primaryColor, scaffoldBackgroundColor: CustomTheme.backgroundColor, appBarTheme: CustomTheme.appBarTheme, - colorScheme: const ColorScheme( + radioTheme: RadioThemeData( + fillColor: WidgetStateProperty.resolveWith((states) { + if (states.contains(WidgetState.selected)) { + return CustomTheme.primaryColor; + } + return CustomTheme.textColor; + }), + ), + colorScheme: ColorScheme.fromSeed( + seedColor: CustomTheme.primaryColor, brightness: Brightness.dark, primary: CustomTheme.primaryColor, onPrimary: CustomTheme.textColor, - secondary: CustomTheme.textColor, - onSecondary: Color(0xFF000000), - error: Color(0xFFFF0000), - onError: CustomTheme.textColor, surface: CustomTheme.backgroundColor, onSurface: CustomTheme.textColor, ), diff --git a/lib/presentation/widgets/tiles/custom_radio_list_tile.dart b/lib/presentation/widgets/tiles/custom_radio_list_tile.dart index 53d0a03..5559d10 100644 --- a/lib/presentation/widgets/tiles/custom_radio_list_tile.dart +++ b/lib/presentation/widgets/tiles/custom_radio_list_tile.dart @@ -36,11 +36,7 @@ class CustomRadioListTile extends StatelessWidget { ), child: Row( children: [ - Radio( - value: value, - activeColor: CustomTheme.primaryColor, - toggleable: true, - ), + Radio(value: value, toggleable: true), Expanded( child: Text( text,