From ca56000667aa0bb2bdb4e8a688c9d41442893c29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maty=C3=A1=C5=A1=20Caras?= Date: Mon, 29 Jan 2024 23:38:49 +0100 Subject: [PATCH] fix: iOS wrong text color --- lib/main.dart | 15 +++------------ lib/views/home.dart | 10 ++++++++++ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 99c71bc..d6791ea 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -78,23 +78,14 @@ class MyApp extends StatelessWidget { ? darkColorScheme : lightColorScheme, ), - child: CupertinoApp( - localizationsDelegates: const [ + child: const CupertinoApp( + localizationsDelegates: [ AppLocalizations.delegate, ...GlobalMaterialLocalizations.delegates, ...GlobalCupertinoLocalizations.delegates, ], title: 'PraĊĦule', - home: DefaultTextStyle( - style: TextStyle( - color: ((MediaQuery.of(context).platformBrightness == - Brightness.dark) - ? darkColorScheme - : lightColorScheme) - .onPrimary, - ), - child: const HomeView(), - ), + home: HomeView(), ), ); } diff --git a/lib/views/home.dart b/lib/views/home.dart index 222ac1c..0b6078b 100644 --- a/lib/views/home.dart +++ b/lib/views/home.dart @@ -318,6 +318,11 @@ class _HomeViewState extends State { TextSpan( text: AppLocalizations.of(context) .balanceStatusA, + style: TextStyle( + color: Theme.of(context) + .colorScheme + .onBackground, + ), ), TextSpan( style: TextStyle( @@ -363,6 +368,11 @@ class _HomeViewState extends State { TextSpan( text: AppLocalizations.of(context) .balanceStatusB, + style: TextStyle( + color: Theme.of(context) + .colorScheme + .onBackground, + ), ), ], ),