From 1fc8c282bf054355ea310b3f5e9db5ba8ae3fa97 Mon Sep 17 00:00:00 2001 From: Erick Date: Tue, 1 Oct 2024 15:14:08 +0300 Subject: [PATCH 1/2] fix: color being unreadable in dark mode --- lib/tools/anki/pages/create_ankicard.dart | 19 ++++++++----------- .../pages/populated_anki_home_screen.dart | 9 ++------- lib/tools/anki/widgets/starred_topic.dart | 2 +- 3 files changed, 11 insertions(+), 19 deletions(-) diff --git a/lib/tools/anki/pages/create_ankicard.dart b/lib/tools/anki/pages/create_ankicard.dart index 9b96b14..c613e62 100644 --- a/lib/tools/anki/pages/create_ankicard.dart +++ b/lib/tools/anki/pages/create_ankicard.dart @@ -28,6 +28,7 @@ class CreateAnkicard extends StatelessWidget { controller: cardInfo, maxLines: 5, decoration: InputDecoration( + hintText: "Some question you want to remember", border: OutlineInputBorder( borderRadius: BorderRadius.circular(12), ), @@ -89,10 +90,10 @@ class CreateAnkicard extends StatelessWidget { ), ), ), - Padding( - padding: const EdgeInsets.symmetric(vertical: 12.0), - child: Center( - child: ElevatedButton( + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + OutlinedButton( onPressed: () { ansCardController.ansSwitch.value = !ansCardController.ansSwitch.value; @@ -107,12 +108,8 @@ class CreateAnkicard extends StatelessWidget { ), ), ), - ), - ), - Padding( - padding: const EdgeInsets.symmetric(vertical: 12.0), - child: Center( - child: ElevatedButton( + const SizedBox(width: 8), + FilledButton( onPressed: () async { // check for user inputs if (cardInfo.text.trim().isEmpty || @@ -172,7 +169,7 @@ class CreateAnkicard extends StatelessWidget { }, child: const Text("Create Card"), ), - ), + ], ), ], ), diff --git a/lib/tools/anki/pages/populated_anki_home_screen.dart b/lib/tools/anki/pages/populated_anki_home_screen.dart index e062c45..39da42f 100644 --- a/lib/tools/anki/pages/populated_anki_home_screen.dart +++ b/lib/tools/anki/pages/populated_anki_home_screen.dart @@ -16,17 +16,12 @@ class PopulatedAnkiHomeScreen extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, children: [ - const Padding( - padding: EdgeInsets.all(16.0), - child: Text( - "Starred Topics", - ), - ), Visibility( visible: topicController.allFavourites.isNotEmpty, child: Align( alignment: Alignment.center, - child: SizedBox( + child: Container( + padding: const EdgeInsets.symmetric(vertical: 8), height: MediaQuery.of(context).size.height * 0.27, width: MediaQuery.of(context).size.width * 0.87, child: ListView.builder( diff --git a/lib/tools/anki/widgets/starred_topic.dart b/lib/tools/anki/widgets/starred_topic.dart index 988ef25..2f0383a 100644 --- a/lib/tools/anki/widgets/starred_topic.dart +++ b/lib/tools/anki/widgets/starred_topic.dart @@ -44,7 +44,7 @@ class StarredTopics extends StatelessWidget { child: Container( height: MediaQuery.of(context).size.height * 0.267, decoration: BoxDecoration( - color: Theme.of(context).colorScheme.onTertiaryFixed, + color: Theme.of(context).colorScheme.tertiaryContainer, borderRadius: const BorderRadius.all( Radius.circular(16), ), From 90d6415b0e39492e85a429d8cb79b05279112a7c Mon Sep 17 00:00:00 2001 From: FIRST_NAME LAST_NAME Date: Wed, 2 Oct 2024 07:53:29 +0300 Subject: [PATCH 2/2] fix: partial fix on navigations issues --- lib/tools/ask_me/pages/modal_content.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tools/ask_me/pages/modal_content.dart b/lib/tools/ask_me/pages/modal_content.dart index df596a5..33616c8 100644 --- a/lib/tools/ask_me/pages/modal_content.dart +++ b/lib/tools/ask_me/pages/modal_content.dart @@ -430,7 +430,7 @@ class _ModalContentState extends State { isLoading = false; }); }, (success) { - Navigator.push( + Navigator.pushReplacement( // ignore: use_build_context_synchronously context, MaterialPageRoute(builder: (context) {