Skip to content

Commit

Permalink
Merge pull request #92 from CodexRodney/anki
Browse files Browse the repository at this point in the history
Fix
  • Loading branch information
IamMuuo authored Oct 3, 2024
2 parents 175cb20 + 90d6415 commit 6a2783c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 20 deletions.
19 changes: 8 additions & 11 deletions lib/tools/anki/pages/create_ankicard.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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),
),
Expand Down Expand Up @@ -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;
Expand All @@ -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 ||
Expand Down Expand Up @@ -172,7 +169,7 @@ class CreateAnkicard extends StatelessWidget {
},
child: const Text("Create Card"),
),
),
],
),
],
),
Expand Down
9 changes: 2 additions & 7 deletions lib/tools/anki/pages/populated_anki_home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion lib/tools/anki/widgets/starred_topic.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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),
),
Expand Down
2 changes: 1 addition & 1 deletion lib/tools/ask_me/pages/modal_content.dart
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ class _ModalContentState extends State<ModalContent> {
isLoading = false;
});
}, (success) {
Navigator.push(
Navigator.pushReplacement(
// ignore: use_build_context_synchronously
context,
MaterialPageRoute(builder: (context) {
Expand Down

0 comments on commit 6a2783c

Please sign in to comment.