diff --git a/app/integration_test/Future_Questions_test.dart b/app/integration_test/Future_Questions_test.dart index 8e3d321..fdab2fc 100644 --- a/app/integration_test/Future_Questions_test.dart +++ b/app/integration_test/Future_Questions_test.dart @@ -1,4 +1,3 @@ -import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:pohnpeian_language_app/screens/pages/result_page.dart'; diff --git a/app/integration_test/LearnScreen_test.dart b/app/integration_test/LearnScreen_test.dart index 255707e..9445e92 100644 --- a/app/integration_test/LearnScreen_test.dart +++ b/app/integration_test/LearnScreen_test.dart @@ -1,4 +1,3 @@ -import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:pohnpeian_language_app/screens/LearnScreen.dart'; diff --git a/app/integration_test/Log_in_Page_test.dart b/app/integration_test/Log_in_Page_test.dart index a73cce2..c89c7d5 100644 --- a/app/integration_test/Log_in_Page_test.dart +++ b/app/integration_test/Log_in_Page_test.dart @@ -1,6 +1,4 @@ -import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pohnpeian_language_app/screens/loginPage.dart'; import 'package:pohnpeian_language_app/screens/pages/result_page.dart'; void main() { diff --git a/app/integration_test/Questions2_test.dart b/app/integration_test/Questions2_test.dart index 044e143..c0c7e0d 100644 --- a/app/integration_test/Questions2_test.dart +++ b/app/integration_test/Questions2_test.dart @@ -1,4 +1,3 @@ -import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:pohnpeian_language_app/screens/pages/result_page.dart'; diff --git a/app/integration_test/Questions3_test.dart b/app/integration_test/Questions3_test.dart index 079dc97..512dd10 100644 --- a/app/integration_test/Questions3_test.dart +++ b/app/integration_test/Questions3_test.dart @@ -1,4 +1,3 @@ -import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:pohnpeian_language_app/screens/pages/result_page.dart'; diff --git a/app/integration_test/Questions4_test.dart b/app/integration_test/Questions4_test.dart index c3e81a6..bec1d8f 100644 --- a/app/integration_test/Questions4_test.dart +++ b/app/integration_test/Questions4_test.dart @@ -1,4 +1,3 @@ -import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:pohnpeian_language_app/screens/pages/result_page.dart'; diff --git a/app/integration_test/Questions5_test.dart b/app/integration_test/Questions5_test.dart index b9a0a97..07a13dd 100644 --- a/app/integration_test/Questions5_test.dart +++ b/app/integration_test/Questions5_test.dart @@ -1,4 +1,3 @@ -import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:pohnpeian_language_app/screens/pages/result_page.dart'; diff --git a/app/integration_test/Result_Page_test.dart b/app/integration_test/Result_Page_test.dart index a73cce2..c89c7d5 100644 --- a/app/integration_test/Result_Page_test.dart +++ b/app/integration_test/Result_Page_test.dart @@ -1,6 +1,4 @@ -import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pohnpeian_language_app/screens/loginPage.dart'; import 'package:pohnpeian_language_app/screens/pages/result_page.dart'; void main() { diff --git a/app/lib/data/catergories.dart b/app/lib/data/catergories.dart index ba622e3..f2963be 100644 --- a/app/lib/data/catergories.dart +++ b/app/lib/data/catergories.dart @@ -32,7 +32,7 @@ final categories = [ Category( questions: getQuestions4(), categoryName: 'Objects', - backgroundColor: Color.fromARGB(255, 216, 98, 137), + backgroundColor: const Color.fromARGB(255, 216, 98, 137), icon: FontAwesomeIcons.book, description: 'Test your knowledge on random objects', ), diff --git a/app/lib/data/futurequestions1.dart b/app/lib/data/futurequestions1.dart index 501bbe9..1ff3cd4 100644 --- a/app/lib/data/futurequestions1.dart +++ b/app/lib/data/futurequestions1.dart @@ -10,70 +10,70 @@ List getQuestions() { list.add(Question( text: 'Which of the following is "Kalahngan" ?', options: [ - Option(code: 'A', text: 'Please', isCorrect: false), - Option(code: 'B', text: 'Thank you (formal)', isCorrect: true), - Option(code: 'C', text: 'Help', isCorrect: false), - Option(code: 'D', text: 'Leave', isCorrect: false), + const Option(code: 'A', text: 'Please', isCorrect: false), + const Option(code: 'B', text: 'Thank you (formal)', isCorrect: true), + const Option(code: 'C', text: 'Help', isCorrect: false), + const Option(code: 'D', text: 'Leave', isCorrect: false), ], solution: 'The correct answer is "Thank You" ', )); list.add(Question( text: 'Which of the following is E-yung ?', options: [ - Option(code: 'A', text: 'Dog', isCorrect: false), - Option(code: 'B', text: 'Go', isCorrect: false), - Option(code: 'C', text: 'Beach', isCorrect: false), - Option(code: 'D', text: 'Thanks" (informal)', isCorrect: true), + const Option(code: 'A', text: 'Dog', isCorrect: false), + const Option(code: 'B', text: 'Go', isCorrect: false), + const Option(code: 'C', text: 'Beach', isCorrect: false), + const Option(code: 'D', text: 'Thanks" (informal)', isCorrect: true), ], solution: 'The correct answer is Thanks (informal)', )); list.add(Question( text: 'Which of the following is "Kaselehlie"?', options: [ - Option(code: 'A', text: 'Kidi', isCorrect: false), - Option(code: 'B', text: 'Malek', isCorrect: false), - Option(code: 'C', text: 'Waterfall', isCorrect: false), - Option(code: 'D', text: 'Hello', isCorrect: true), + const Option(code: 'A', text: 'Kidi', isCorrect: false), + const Option(code: 'B', text: 'Malek', isCorrect: false), + const Option(code: 'C', text: 'Waterfall', isCorrect: false), + const Option(code: 'D', text: 'Hello', isCorrect: true), ], solution: 'The correct answer is Hello', )); list.add(Question( text: 'Which of the following is "La iromw" ?', options: [ - Option(code: 'A', text: "How are you?", isCorrect: true), - Option(code: 'B', text: 'Where are you going?', isCorrect: false), - Option(code: 'C', text: "How old are you?", isCorrect: false), - Option(code: 'D', text: "How much?", isCorrect: false), + const Option(code: 'A', text: "How are you?", isCorrect: true), + const Option(code: 'B', text: 'Where are you going?', isCorrect: false), + const Option(code: 'C', text: "How old are you?", isCorrect: false), + const Option(code: 'D', text: "How much?", isCorrect: false), ], solution: 'The correct answer is "How are you?"', )); list.add(Question( text: 'Which of the following is Menseng mwahu?', options: [ - Option(code: 'A', text: 'Good day', isCorrect: false), - Option(code: 'B', text: 'Good night', isCorrect: false), - Option(code: 'C', text: 'Good morning', isCorrect: true), - Option(code: 'D', text: 'Good afternoon', isCorrect: false), + const Option(code: 'A', text: 'Good day', isCorrect: false), + const Option(code: 'B', text: 'Good night', isCorrect: false), + const Option(code: 'C', text: 'Good morning', isCorrect: true), + const Option(code: 'D', text: 'Good afternoon', isCorrect: false), ], solution: 'The correct answer is "Good morning"', )); list.add(Question( text: 'Which of the following is Menseng mwahu?', options: [ - Option(code: 'A', text: 'Good day', isCorrect: false), - Option(code: 'B', text: 'Good night', isCorrect: false), - Option(code: 'C', text: 'Good morning', isCorrect: true), - Option(code: 'D', text: 'Good afternoon', isCorrect: false), + const Option(code: 'A', text: 'Good day', isCorrect: false), + const Option(code: 'B', text: 'Good night', isCorrect: false), + const Option(code: 'C', text: 'Good morning', isCorrect: true), + const Option(code: 'D', text: 'Good afternoon', isCorrect: false), ], solution: 'The correct answer is "Good day"', )); list.add(Question( text: 'Which of the following is "Pwohng mwahu"?', options: [ - Option(code: 'A', text: 'Good afternoon', isCorrect: false), - Option(code: 'B', text: 'Good morning', isCorrect: false), - Option(code: 'C', text: 'Good day', isCorrect: false), - Option(code: 'D', text: 'Good night', isCorrect: true), + const Option(code: 'A', text: 'Good afternoon', isCorrect: false), + const Option(code: 'B', text: 'Good morning', isCorrect: false), + const Option(code: 'C', text: 'Good day', isCorrect: false), + const Option(code: 'D', text: 'Good night', isCorrect: true), ], solution: 'The correct answer is "Good night "', )); diff --git a/app/lib/data/questions.dart b/app/lib/data/questions.dart index 3fe8043..7d673fd 100644 --- a/app/lib/data/questions.dart +++ b/app/lib/data/questions.dart @@ -7,70 +7,70 @@ List getQuestions() { list.add(Question( text: 'Which of the following is "Thank you" (formal)?', options: [ - Option(code: 'A', text: 'Ehng', isCorrect: false), - Option(code: 'B', text: 'Kalahngan', isCorrect: true), - Option(code: 'C', text: 'Mwenge', isCorrect: false), - Option(code: 'D', text: 'Malek', isCorrect: false), + const Option(code: 'A', text: 'Ehng', isCorrect: false), + const Option(code: 'B', text: 'Kalahngan', isCorrect: true), + const Option(code: 'C', text: 'Mwenge', isCorrect: false), + const Option(code: 'D', text: 'Malek', isCorrect: false), ], solution: 'The correct answer is "Kalahngan" ', )); list.add(Question( text: 'Which of the following is "Thanks" (informal)?', options: [ - Option(code: 'A', text: 'Kahlail', isCorrect: false), - Option(code: 'B', text: 'Mwahu', isCorrect: false), - Option(code: 'C', text: 'Menlau', isCorrect: false), - Option(code: 'D', text: 'E-yung', isCorrect: true), + const Option(code: 'A', text: 'Kahlail', isCorrect: false), + const Option(code: 'B', text: 'Mwahu', isCorrect: false), + const Option(code: 'C', text: 'Menlau', isCorrect: false), + const Option(code: 'D', text: 'E-yung', isCorrect: true), ], solution: 'The correct answer is "E-yung" ', )); list.add(Question( text: 'Which of the following is "Hello"?', options: [ - Option(code: 'A', text: 'Kidi', isCorrect: false), - Option(code: 'B', text: 'Malek', isCorrect: false), - Option(code: 'C', text: 'A kis', isCorrect: false), - Option(code: 'D', text: 'Kaselehlie', isCorrect: true), + const Option(code: 'A', text: 'Kidi', isCorrect: false), + const Option(code: 'B', text: 'Malek', isCorrect: false), + const Option(code: 'C', text: 'A kis', isCorrect: false), + const Option(code: 'D', text: 'Kaselehlie', isCorrect: true), ], solution: 'The correct answer is Kaselehlie', )); list.add(Question( text: 'Which of the following is "How are you?" ?', options: [ - Option(code: 'A', text: 'La iromw', isCorrect: true), - Option(code: 'B', text: 'Pwohng mwahu', isCorrect: false), - Option(code: 'C', text: "A kis", isCorrect: false), - Option(code: 'D', text: "E-yung", isCorrect: false), + const Option(code: 'A', text: 'La iromw', isCorrect: true), + const Option(code: 'B', text: 'Pwohng mwahu', isCorrect: false), + const Option(code: 'C', text: "A kis", isCorrect: false), + const Option(code: 'D', text: "E-yung", isCorrect: false), ], solution: 'The correct answer is La iromw', )); list.add(Question( text: 'Which of the following is "Good morning"?', options: [ - Option(code: 'A', text: 'Soutik mwahu', isCorrect: false), - Option(code: 'B', text: 'Pwohng mwahu', isCorrect: false), - Option(code: 'C', text: 'Menseng mwahu', isCorrect: true), - Option(code: 'D', text: 'Souwas mwahu', isCorrect: false), + const Option(code: 'A', text: 'Soutik mwahu', isCorrect: false), + const Option(code: 'B', text: 'Pwohng mwahu', isCorrect: false), + const Option(code: 'C', text: 'Menseng mwahu', isCorrect: true), + const Option(code: 'D', text: 'Souwas mwahu', isCorrect: false), ], solution: 'The correct answer is "Menseng mwahu"', )); list.add(Question( text: ' Which of the following is "Good afternoon"?', options: [ - Option(code: 'A', text: 'Menseng mwahu', isCorrect: false), - Option(code: 'B', text: 'Pwohng mwahu', isCorrect: false), - Option(code: 'C', text: 'Souwas mwahu', isCorrect: true), - Option(code: 'D', text: 'Soutik mwahu', isCorrect: false), + const Option(code: 'A', text: 'Menseng mwahu', isCorrect: false), + const Option(code: 'B', text: 'Pwohng mwahu', isCorrect: false), + const Option(code: 'C', text: 'Souwas mwahu', isCorrect: true), + const Option(code: 'D', text: 'Soutik mwahu', isCorrect: false), ], solution: 'The correct answer is "Souwas mwahu"', )); list.add(Question( text: 'It\'s getting dark. It was nice meeting you. _______.', options: [ - Option(code: 'A', text: 'Soutik mwahu', isCorrect: false), - Option(code: 'B', text: 'Menseng mwahu', isCorrect: false), - Option(code: 'C', text: 'Souwas mwahu', isCorrect: false), - Option(code: 'D', text: 'Pwohng mwahu', isCorrect: true), + const Option(code: 'A', text: 'Soutik mwahu', isCorrect: false), + const Option(code: 'B', text: 'Menseng mwahu', isCorrect: false), + const Option(code: 'C', text: 'Souwas mwahu', isCorrect: false), + const Option(code: 'D', text: 'Pwohng mwahu', isCorrect: true), ], solution: 'The correct answer is "Pwohng mwahu"', )); diff --git a/app/lib/data/questions2.dart b/app/lib/data/questions2.dart index b466203..646219a 100644 --- a/app/lib/data/questions2.dart +++ b/app/lib/data/questions2.dart @@ -7,70 +7,70 @@ List getQuestions2() { list.add(Question( text: 'Which of the following is "Mother"?', options: [ - Option(code: 'A', text: 'Ehng', isCorrect: false), - Option(code: 'B', text: 'Mwenge', isCorrect: false), - Option(code: 'C', text: 'Nohno', isCorrect: true), - Option(code: 'D', text: 'Malek', isCorrect: false), + const Option(code: 'A', text: 'Ehng', isCorrect: false), + const Option(code: 'B', text: 'Mwenge', isCorrect: false), + const Option(code: 'C', text: 'Nohno', isCorrect: true), + const Option(code: 'D', text: 'Malek', isCorrect: false), ], solution: 'The correct answer is "Nohno" ', )); list.add(Question( text: 'Which of the following is "Father"?', options: [ - Option(code: 'A', text: 'Pahpa', isCorrect: true), - Option(code: 'B', text: 'Kahlail', isCorrect: false), - Option(code: 'C', text: 'Mwahu', isCorrect: false), - Option(code: 'D', text: 'E-yung', isCorrect: false), + const Option(code: 'A', text: 'Pahpa', isCorrect: true), + const Option(code: 'B', text: 'Kahlail', isCorrect: false), + const Option(code: 'C', text: 'Mwahu', isCorrect: false), + const Option(code: 'D', text: 'E-yung', isCorrect: false), ], solution: 'The correct answer is "Pahpa" ', )); list.add(Question( text: 'Which of the following is "My spouse"?', options: [ - Option(code: 'A', text: 'Kidi', isCorrect: false), - Option(code: 'B', text: 'Malek', isCorrect: false), - Option(code: 'C', text: 'A kis', isCorrect: false), - Option(code: 'D', text: 'Ahi pwoud', isCorrect: true), + const Option(code: 'A', text: 'Kidi', isCorrect: false), + const Option(code: 'B', text: 'Malek', isCorrect: false), + const Option(code: 'C', text: 'A kis', isCorrect: false), + const Option(code: 'D', text: 'Ahi pwoud', isCorrect: true), ], solution: 'The correct answer is "Ahi pwoud"', )); list.add(Question( text: 'Which of the following is "My child/children" ?', options: [ - Option(code: 'A', text: 'Pwohng mwahu', isCorrect: false), - Option(code: 'B', text: 'Nei seri', isCorrect: true), - Option(code: 'C', text: "A kis", isCorrect: false), - Option(code: 'D', text: "E-yung", isCorrect: false), + const Option(code: 'A', text: 'Pwohng mwahu', isCorrect: false), + const Option(code: 'B', text: 'Nei seri', isCorrect: true), + const Option(code: 'C', text: "A kis", isCorrect: false), + const Option(code: 'D', text: "E-yung", isCorrect: false), ], solution: 'The correct answer is "Nei seri"', )); list.add(Question( text: 'Which of the following is "My brother"?', options: [ - Option(code: 'A', text: 'Soutik mwahu', isCorrect: false), - Option(code: 'B', text: 'Pwohng mwahu', isCorrect: false), - Option(code: 'C', text: 'Riei pwutak', isCorrect: true), - Option(code: 'D', text: 'Souwas mwahu', isCorrect: false), + const Option(code: 'A', text: 'Soutik mwahu', isCorrect: false), + const Option(code: 'B', text: 'Pwohng mwahu', isCorrect: false), + const Option(code: 'C', text: 'Riei pwutak', isCorrect: true), + const Option(code: 'D', text: 'Souwas mwahu', isCorrect: false), ], solution: 'The correct answer is "Riei pwutak"', )); list.add(Question( text: ' Which of the following is "My sister"?', options: [ - Option(code: 'A', text: 'Menseng mwahu', isCorrect: false), - Option(code: 'B', text: 'Pwohng mwahu', isCorrect: false), - Option(code: 'C', text: 'Miei serepein', isCorrect: true), - Option(code: 'D', text: 'Soutik mwahu', isCorrect: false,), + const Option(code: 'A', text: 'Menseng mwahu', isCorrect: false), + const Option(code: 'B', text: 'Pwohng mwahu', isCorrect: false), + const Option(code: 'C', text: 'Miei serepein', isCorrect: true), + const Option(code: 'D', text: 'Soutik mwahu', isCorrect: false,), ], solution: 'The correct answer is "Miei serepein"', )); list.add(Question( text: 'Which of the following is "Grandmother"?', options: [ - Option(code: 'A', text: 'Soutik mwahu', isCorrect: false), - Option(code: 'B', text: 'Nohno kahlap', isCorrect: true), - Option(code: 'C', text: 'Menseng mwahu', isCorrect: false), - Option(code: 'D', text: 'Souwas mwahu', isCorrect: false), + const Option(code: 'A', text: 'Soutik mwahu', isCorrect: false), + const Option(code: 'B', text: 'Nohno kahlap', isCorrect: true), + const Option(code: 'C', text: 'Menseng mwahu', isCorrect: false), + const Option(code: 'D', text: 'Souwas mwahu', isCorrect: false), ], solution: 'The correct answer is "Nohno kahlap"', )); diff --git a/app/lib/data/questions3.dart b/app/lib/data/questions3.dart index 717b352..c7a5e5a 100644 --- a/app/lib/data/questions3.dart +++ b/app/lib/data/questions3.dart @@ -7,20 +7,20 @@ List getQuestions3() { list.add(Question( text: 'Which of the following is "Coconut"?', options: [ - Option(code: 'A', text: 'Mwenge', isCorrect: false), - Option(code: 'B', text: 'Kep', isCorrect: false), - Option(code: 'C', text: 'Rais', isCorrect: false), - Option(code: 'D', text: 'Mwangas', isCorrect: true), + const Option(code: 'A', text: 'Mwenge', isCorrect: false), + const Option(code: 'B', text: 'Kep', isCorrect: false), + const Option(code: 'C', text: 'Rais', isCorrect: false), + const Option(code: 'D', text: 'Mwangas', isCorrect: true), ], solution: 'The correct answer is "Mwangas" ', )); list.add(Question( text: 'Which of the following is "Pineapple"?', options: [ - Option(code: 'A', text: 'Mwahmw', isCorrect: false), - Option(code: 'B', text: 'Mahi', isCorrect: false), - Option(code: 'C', text: 'Pweinaper', isCorrect: true), - Option(code: 'D', text: 'Uht', isCorrect: false), + const Option(code: 'A', text: 'Mwahmw', isCorrect: false), + const Option(code: 'B', text: 'Mahi', isCorrect: false), + const Option(code: 'C', text: 'Pweinaper', isCorrect: true), + const Option(code: 'D', text: 'Uht', isCorrect: false), ], solution: 'The correct answer is "Pweinaper" ', @@ -28,10 +28,10 @@ List getQuestions3() { list.add(Question( text: 'Which of the following is "Banana"?', options: [ - Option(code: 'A', text: 'Pihl', isCorrect: false), - Option(code: 'B', text: 'Uht', isCorrect: true), - Option(code: 'C', text: 'Mwahmw', isCorrect: false), - Option(code: 'D', text: 'Pedede', isCorrect: false), + const Option(code: 'A', text: 'Pihl', isCorrect: false), + const Option(code: 'B', text: 'Uht', isCorrect: true), + const Option(code: 'C', text: 'Mwahmw', isCorrect: false), + const Option(code: 'D', text: 'Pedede', isCorrect: false), ], solution: 'The correct answer is "Uht"', @@ -39,40 +39,40 @@ List getQuestions3() { list.add(Question( text: 'Which of the following is "Fish" ?', options: [ - Option(code: 'A', text: 'Mwahmw', isCorrect: true), - Option(code: 'B', text: 'Duhna', isCorrect: false), - Option(code: 'C', text: "Makirehl", isCorrect: false), - Option(code: 'D', text: "Anien", isCorrect: false), + const Option(code: 'A', text: 'Mwahmw', isCorrect: true), + const Option(code: 'B', text: 'Duhna', isCorrect: false), + const Option(code: 'C', text: "Makirehl", isCorrect: false), + const Option(code: 'D', text: "Anien", isCorrect: false), ], solution: 'The correct answer is "Mwahmw"', )); list.add(Question( text: 'Which of the following is "Milk"?', options: [ - Option(code: 'A', text: 'Rais', isCorrect: false), - Option(code: 'B', text: 'Milik', isCorrect: true), - Option(code: 'C', text: 'Mahi', isCorrect: false), - Option(code: 'D', text: 'Pihl', isCorrect: false), + const Option(code: 'A', text: 'Rais', isCorrect: false), + const Option(code: 'B', text: 'Milik', isCorrect: true), + const Option(code: 'C', text: 'Mahi', isCorrect: false), + const Option(code: 'D', text: 'Pihl', isCorrect: false), ], solution: 'The correct answer is "Milik"', )); list.add(Question( text: ' Which of the following is "Fork"?', options: [ - Option(code: 'A', text: 'Ainpwaot', isCorrect: false), - Option(code: 'B', text: 'Supwuhm', isCorrect: false), - Option(code: 'C', text: 'Sidohp', isCorrect: false), - Option(code: 'D', text: 'Pwohk', isCorrect: true), + const Option(code: 'A', text: 'Ainpwaot', isCorrect: false), + const Option(code: 'B', text: 'Supwuhm', isCorrect: false), + const Option(code: 'C', text: 'Sidohp', isCorrect: false), + const Option(code: 'D', text: 'Pwohk', isCorrect: true), ], solution: 'The correct answer is "Pwohk"', )); list.add(Question( text: 'Which of the following is "Eat"?', options: [ - Option(code: 'A', text: 'Soutik', isCorrect: false), - Option(code: 'B', text: 'Menseng', isCorrect: false), - Option(code: 'C', text: 'Souwas', isCorrect: false), - Option(code: 'D', text: 'Mwenge', isCorrect: true), + const Option(code: 'A', text: 'Soutik', isCorrect: false), + const Option(code: 'B', text: 'Menseng', isCorrect: false), + const Option(code: 'C', text: 'Souwas', isCorrect: false), + const Option(code: 'D', text: 'Mwenge', isCorrect: true), ], solution: 'The correct answer is "Mwenge"', )); diff --git a/app/lib/data/questions4.dart b/app/lib/data/questions4.dart index 26f4189..83c1b5a 100644 --- a/app/lib/data/questions4.dart +++ b/app/lib/data/questions4.dart @@ -1,4 +1,3 @@ -import 'package:flutter/material.dart'; import 'package:pohnpeian_language_app/models/option.dart'; import 'package:pohnpeian_language_app/models/questions.dart'; @@ -8,60 +7,60 @@ List getQuestions4() { list.add(Question( text: 'What is "Pillow"?', options: [ - Option(code: 'A', text: 'Kahlail', isCorrect: false), - Option(code: 'B', text: 'Mwahu', isCorrect: false), - Option(code: 'C', text: 'E-yung', isCorrect: false), - Option(code: 'D', text: 'Uluhl', isCorrect: true), + const Option(code: 'A', text: 'Kahlail', isCorrect: false), + const Option(code: 'B', text: 'Mwahu', isCorrect: false), + const Option(code: 'C', text: 'E-yung', isCorrect: false), + const Option(code: 'D', text: 'Uluhl', isCorrect: true), ], solution: 'The correct answer is "Uluhl" ', )); list.add(Question( text: 'Which of the following is "Soap"?', options: [ - Option(code: 'A', text: 'Kahlail', isCorrect: false), - Option(code: 'B', text: 'Mwahu', isCorrect: false), - Option(code: 'C', text: 'E-yung', isCorrect: false), - Option(code: 'D', text: 'Sohpw', isCorrect: true), + const Option(code: 'A', text: 'Kahlail', isCorrect: false), + const Option(code: 'B', text: 'Mwahu', isCorrect: false), + const Option(code: 'C', text: 'E-yung', isCorrect: false), + const Option(code: 'D', text: 'Sohpw', isCorrect: true), ], solution: 'The correct answer is "Sohpw" ', )); list.add(Question( text: 'Which of the following is "Bed"?', options: [ - Option(code: 'A', text: 'Kidi', isCorrect: false), - Option(code: 'B', text: 'Malek', isCorrect: false), - Option(code: 'C', text: 'A kis', isCorrect: false), - Option(code: 'D', text: 'Peht', isCorrect: true), + const Option(code: 'A', text: 'Kidi', isCorrect: false), + const Option(code: 'B', text: 'Malek', isCorrect: false), + const Option(code: 'C', text: 'A kis', isCorrect: false), + const Option(code: 'D', text: 'Peht', isCorrect: true), ], solution: 'The correct answer is "Peht"', )); list.add(Question( text: 'Which of the following is "Table" ?', options: [ - Option(code: 'A', text: 'Tehpel', isCorrect: true), - Option(code: 'B', text: 'Pwohng mwahu', isCorrect: false), - Option(code: 'C', text: "A kis", isCorrect: false), - Option(code: 'D', text: "E-yung", isCorrect: false), + const Option(code: 'A', text: 'Tehpel', isCorrect: true), + const Option(code: 'B', text: 'Pwohng mwahu', isCorrect: false), + const Option(code: 'C', text: "A kis", isCorrect: false), + const Option(code: 'D', text: "E-yung", isCorrect: false), ], solution: 'The correct answer is "Tehpel"', )); list.add(Question( text: 'Which of the following is "Chair"?', options: [ - Option(code: 'A', text: 'Soutik', isCorrect: false), - Option(code: 'B', text: 'Pwohng', isCorrect: false), - Option(code: 'C', text: 'Sehr', isCorrect: true), - Option(code: 'D', text: 'Souwas', isCorrect: false), + const Option(code: 'A', text: 'Soutik', isCorrect: false), + const Option(code: 'B', text: 'Pwohng', isCorrect: false), + const Option(code: 'C', text: 'Sehr', isCorrect: true), + const Option(code: 'D', text: 'Souwas', isCorrect: false), ], solution: 'The correct answer is "Sehr"', )); list.add(Question( text: ' Which of the following is "Clock"?', options: [ - Option(code: 'A', text: 'Menseng', isCorrect: false), - Option(code: 'B', text: 'Pwohng', isCorrect: false), - Option(code: 'C', text: 'Kuloak', isCorrect: true), - Option( + const Option(code: 'A', text: 'Menseng', isCorrect: false), + const Option(code: 'B', text: 'Pwohng', isCorrect: false), + const Option(code: 'C', text: 'Kuloak', isCorrect: true), + const Option( code: 'D', text: 'Soutik', isCorrect: false, @@ -72,10 +71,10 @@ List getQuestions4() { list.add(Question( text: 'Which of the following is "Book"?', options: [ - Option(code: 'A', text: 'Soutik', isCorrect: false), - Option(code: 'B', text: 'Menseng', isCorrect: false), - Option(code: 'C', text: 'Souwas', isCorrect: false), - Option(code: 'D', text: 'Pwuhk', isCorrect: true), + const Option(code: 'A', text: 'Soutik', isCorrect: false), + const Option(code: 'B', text: 'Menseng', isCorrect: false), + const Option(code: 'C', text: 'Souwas', isCorrect: false), + const Option(code: 'D', text: 'Pwuhk', isCorrect: true), ], solution: 'The correct answer is "Pwuhk"', )); diff --git a/app/lib/data/questions5.dart b/app/lib/data/questions5.dart index 079e97f..7df652a 100644 --- a/app/lib/data/questions5.dart +++ b/app/lib/data/questions5.dart @@ -1,4 +1,3 @@ -import 'package:flutter/material.dart'; import 'package:pohnpeian_language_app/models/option.dart'; import 'package:pohnpeian_language_app/models/questions.dart'; @@ -8,70 +7,70 @@ List getQuestions5() { list.add(Question( text: 'Which of the following is "Health"?', options: [ - Option(code: 'A', text: 'Kahlail', isCorrect: false), - Option(code: 'B', text: 'Ipa', isCorrect: false), - Option(code: 'C', text: 'Ehd', isCorrect: false), - Option(code: 'D', text: 'Ire', isCorrect: true), + const Option(code: 'A', text: 'Kahlail', isCorrect: false), + const Option(code: 'B', text: 'Ipa', isCorrect: false), + const Option(code: 'C', text: 'Ehd', isCorrect: false), + const Option(code: 'D', text: 'Ire', isCorrect: true), ], solution: 'The correct answer is "Ire" ', )); list.add(Question( text: 'Which of the following is "Sick" (feeling)?', options: [ - Option(code: 'A', text: 'Oio', isCorrect: false), - Option(code: 'B', text: 'Mai', isCorrect: false), - Option(code: 'C', text: 'Uh', isCorrect: false), - Option(code: 'D', text: 'Oh', isCorrect: true), + const Option(code: 'A', text: 'Oio', isCorrect: false), + const Option(code: 'B', text: 'Mai', isCorrect: false), + const Option(code: 'C', text: 'Uh', isCorrect: false), + const Option(code: 'D', text: 'Oh', isCorrect: true), ], solution: 'The correct answer is "Oh" ', )); list.add(Question( text: 'Which of the following is "Fever"?', options: [ - Option(code: 'A', text: 'Nain', isCorrect: false), - Option(code: 'B', text: 'Kereniol', isCorrect: true), - Option(code: 'C', text: 'Rapwa', isCorrect: false), - Option(code: 'D', text: 'Malaulau', isCorrect: false), + const Option(code: 'A', text: 'Nain', isCorrect: false), + const Option(code: 'B', text: 'Kereniol', isCorrect: true), + const Option(code: 'C', text: 'Rapwa', isCorrect: false), + const Option(code: 'D', text: 'Malaulau', isCorrect: false), ], solution: 'The correct answer is "Kereniol"', )); list.add(Question( text: 'Which of the following is "Cold/Flu/Pneumonia" ?', options: [ - Option(code: 'A', text: 'Soumwahu en waii', isCorrect: true), - Option(code: 'B', text: 'Soumwahu en wol', isCorrect: false), - Option(code: 'C', text: 'Soumwahu karakar', isCorrect: false), - Option(code: 'D', text: "Soumwahu lusulus", isCorrect: false), + const Option(code: 'A', text: 'Soumwahu en waii', isCorrect: true), + const Option(code: 'B', text: 'Soumwahu en wol', isCorrect: false), + const Option(code: 'C', text: 'Soumwahu karakar', isCorrect: false), + const Option(code: 'D', text: "Soumwahu lusulus", isCorrect: false), ], solution: 'The correct answer is "Soumwahu en waii"', )); list.add(Question( text: 'Which of the following is "Sneeze"?', options: [ - Option(code: 'A', text: 'Ned', isCorrect: false), - Option(code: 'B', text: 'Waik', isCorrect: false), - Option(code: 'C', text: 'Asi', isCorrect: true), - Option(code: 'D', text: 'Memmen', isCorrect: false), + const Option(code: 'A', text: 'Ned', isCorrect: false), + const Option(code: 'B', text: 'Waik', isCorrect: false), + const Option(code: 'C', text: 'Asi', isCorrect: true), + const Option(code: 'D', text: 'Memmen', isCorrect: false), ], solution: 'The correct answer is "Asi"', )); list.add(Question( text: ' Which of the following is "Cough"?', options: [ - Option(code: 'A', text: 'Koatun', isCorrect: false), - Option(code: 'B', text: 'Kohpwa', isCorrect: false), - Option(code: 'C', text: 'Kohpek', isCorrect: true), - Option(code: 'D', text: 'Kopou', isCorrect: false,), + const Option(code: 'A', text: 'Koatun', isCorrect: false), + const Option(code: 'B', text: 'Kohpwa', isCorrect: false), + const Option(code: 'C', text: 'Kohpek', isCorrect: true), + const Option(code: 'D', text: 'Kopou', isCorrect: false,), ], solution: 'The correct answer is "Kohpek"', )); list.add(Question( text: 'Which of the following is "Vomit"?', options: [ - Option(code: 'A', text: 'Uk', isCorrect: false), - Option(code: 'B', text: 'Pein', isCorrect: false), - Option(code: 'C', text: 'Kahula', isCorrect: false), - Option(code: 'D', text: 'Kaluhlu', isCorrect: true), + const Option(code: 'A', text: 'Uk', isCorrect: false), + const Option(code: 'B', text: 'Pein', isCorrect: false), + const Option(code: 'C', text: 'Kahula', isCorrect: false), + const Option(code: 'D', text: 'Kaluhlu', isCorrect: true), ], solution: 'The correct answer is "Kaluhlu"', )); diff --git a/app/lib/main.dart b/app/lib/main.dart index 03c6d03..50e6bbf 100644 --- a/app/lib/main.dart +++ b/app/lib/main.dart @@ -4,12 +4,10 @@ import 'package:flutter/material.dart'; import 'package:pohnpeian_language_app/screens/loginPage.dart'; -import 'screens/SignUpScreen.dart'; //import 'screens/pages/result_page.dart'; import 'package:firebase_core/firebase_core.dart'; //imports google sign in authentication -import 'package:google_sign_in/google_sign_in.dart'; Future main() async { ErrorWidget.builder = (FlutterErrorDetails details) => Container(); diff --git a/app/lib/models/categories.dart b/app/lib/models/categories.dart index 39fad84..f860c4d 100644 --- a/app/lib/models/categories.dart +++ b/app/lib/models/categories.dart @@ -1,4 +1,3 @@ -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; diff --git a/app/lib/models/option.dart b/app/lib/models/option.dart index 85cfd46..173a248 100644 --- a/app/lib/models/option.dart +++ b/app/lib/models/option.dart @@ -1,5 +1,3 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/foundation.dart'; class Option { final String code; diff --git a/app/lib/models/questions.dart b/app/lib/models/questions.dart index 0949c19..4ae224f 100644 --- a/app/lib/models/questions.dart +++ b/app/lib/models/questions.dart @@ -1,4 +1,3 @@ -import 'package:flutter/cupertino.dart'; import 'option.dart'; diff --git a/app/lib/models/userModel.dart b/app/lib/models/userModel.dart index ba1bb75..f058206 100644 --- a/app/lib/models/userModel.dart +++ b/app/lib/models/userModel.dart @@ -1,5 +1,4 @@ import 'package:cloud_firestore/cloud_firestore.dart'; -import 'package:flutter/foundation.dart'; import 'package:pohnpeian_language_app/screens/LearnScreen.dart'; import 'package:pohnpeian_language_app/services/auth.dart'; diff --git a/app/lib/screens/Home.dart b/app/lib/screens/Home.dart index 3d8586f..e0e8170 100644 --- a/app/lib/screens/Home.dart +++ b/app/lib/screens/Home.dart @@ -6,8 +6,6 @@ import 'package:pohnpeian_language_app/screens/SearchScreen.dart'; import 'package:pohnpeian_language_app/screens/WelcomeScreen.dart'; import 'package:curved_navigation_bar/curved_navigation_bar.dart'; import 'package:pohnpeian_language_app/theme/style.dart' as customStyle; -import 'package:firebase_auth/firebase_auth.dart'; -import 'package:pohnpeian_language_app/services/auth.dart'; class Home extends StatefulWidget { const Home({Key? key}) : super(key: key); diff --git a/app/lib/screens/LearnScreen.dart b/app/lib/screens/LearnScreen.dart index b04aa5b..a9f99d5 100644 --- a/app/lib/screens/LearnScreen.dart +++ b/app/lib/screens/LearnScreen.dart @@ -4,7 +4,6 @@ import 'package:pohnpeian_language_app/screens/LessonScreen.dart'; import 'package:pohnpeian_language_app/widget/FrostedCard.dart'; import 'package:pohnpeian_language_app/theme/style.dart' as custom_style; import 'package:pohnpeian_language_app/data/lessons.dart' as lessons; -import 'dart:async'; /* Steps for adding a new lesson: @@ -44,7 +43,7 @@ final List subTitles = [ "Learn some terms for different foods", "Learn about the alphabet", "Learn about the alphabet, continuation of alphabet 1", - "Learn about the alphabet sounds that don\'t exist or are uncommon in the English language", + "Learn about the alphabet sounds that don't exist or are uncommon in the English language", "Learn the words for objects commonly found around the household", "Learn words that have to do with health and sickness", "Learn how to create basic sentences" diff --git a/app/lib/screens/LessonScreen.dart b/app/lib/screens/LessonScreen.dart index 8ee2abc..6c00510 100644 --- a/app/lib/screens/LessonScreen.dart +++ b/app/lib/screens/LessonScreen.dart @@ -35,7 +35,7 @@ class _LessonSlideDeckState extends State { backgroundColor: custom_style.light), body: Container( color: custom_style.primary, - padding: EdgeInsets.only(bottom: 90), + padding: const EdgeInsets.only(bottom: 90), child: IntroSlider( backgroundColorAllSlides: custom_style.primary, renderSkipBtn: const Text("Skip All"), diff --git a/app/lib/screens/ProfileScreen.dart b/app/lib/screens/ProfileScreen.dart index 996ead3..19b4f7a 100644 --- a/app/lib/screens/ProfileScreen.dart +++ b/app/lib/screens/ProfileScreen.dart @@ -1,4 +1,3 @@ -import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:flutter/material.dart'; import 'package:pohnpeian_language_app/models/userModel.dart' as usermodel; import 'package:pohnpeian_language_app/screens/loginPage.dart'; @@ -19,8 +18,8 @@ class _ProfileScreenState extends State { return Scaffold( appBar: AppBar( automaticallyImplyLeading: false, - title: Text("Profile"), - backgroundColor: Color.fromARGB(255, 117, 178, 221), + title: const Text("Profile"), + backgroundColor: const Color.fromARGB(255, 117, 178, 221), ), body: FutureBuilder( builder: (snap, ctx) { @@ -38,7 +37,7 @@ class _ProfileScreenState extends State { child: ListView( children: [ Container( - padding: EdgeInsets.fromLTRB(30, 40, 30, 15), + padding: const EdgeInsets.fromLTRB(30, 40, 30, 15), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -90,27 +89,27 @@ class _ProfileScreenState extends State { Text( usermodel .UserPreferences.myUser.name, - style: TextStyle( + style: const TextStyle( fontSize: 27, fontWeight: FontWeight.w600), ), - SizedBox( + const SizedBox( height: 10, ), - Text( + const Text( "Lesson Progress", style: TextStyle( fontSize: 25, fontWeight: FontWeight.w400, ), ), - SizedBox( + const SizedBox( height: 5, ), Text( // sum up lesson progress "${usermodel.UserPreferences.myUser.lessonProgress.reduce((a, b) => a + b)}", - style: TextStyle( + style: const TextStyle( fontSize: 30, fontWeight: FontWeight.w600, color: style.success), @@ -119,24 +118,24 @@ class _ProfileScreenState extends State { ) ], )), - Divider( + const Divider( thickness: 2, color: Colors.grey, ), Container( - padding: EdgeInsets.fromLTRB(30, 15, 30, 15), - child: Text( + padding: const EdgeInsets.fromLTRB(30, 15, 30, 15), + child: const Text( "About Me", style: TextStyle( fontSize: 20, fontWeight: FontWeight.w500), )), Container( - margin: EdgeInsets.fromLTRB(30, 0, 30, 0), + margin: const EdgeInsets.fromLTRB(30, 0, 30, 0), // ignore: prefer_const_constructors child: Text( usermodel.UserPreferences.myUser.about, - style: TextStyle(fontSize: 18), + style: const TextStyle(fontSize: 18), )), ], )), @@ -155,7 +154,7 @@ class _ProfileScreenState extends State { "Log Out", style: TextStyle(fontSize: 18), )), - SizedBox(height: 80) + const SizedBox(height: 80) ])); }, future: usermodel.UserPreferences.myUser.loadData(), diff --git a/app/lib/screens/SearchScreen.dart b/app/lib/screens/SearchScreen.dart index b7f7a82..bd318a5 100644 --- a/app/lib/screens/SearchScreen.dart +++ b/app/lib/screens/SearchScreen.dart @@ -65,7 +65,7 @@ class SearchScreen extends StatelessWidget { child: Column( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ - const Text("Press the search button to search"), + const Text("Use the magnifying glass to search for interesting articles!"), Image.asset( 'Assets/gif/lorikeet_idle.gif', height: 200, diff --git a/app/lib/screens/SignUpScreen.dart b/app/lib/screens/SignUpScreen.dart index 20b24c5..9639e68 100644 --- a/app/lib/screens/SignUpScreen.dart +++ b/app/lib/screens/SignUpScreen.dart @@ -1,34 +1,9 @@ import 'package:flutter/material.dart'; import 'package:pohnpeian_language_app/models/userModel.dart'; -import 'package:pohnpeian_language_app/screens/Home.dart'; import 'loginPage.dart'; -import 'package:cloud_firestore/cloud_firestore.dart'; -import 'package:google_sign_in/google_sign_in.dart'; import 'package:firebase_auth/firebase_auth.dart'; import 'package:pohnpeian_language_app/services/auth.dart'; -/*class User { - // Holds user data, just holds name as of right now - String id; - final String name; - final String pw; - final String email; - // final int progress - //This will hold the user's progress. Change to array. - User({ - this.id = 'userBase', - required this.name, - required this.pw, - required this.email, - }); - - Map toJson() => { - 'id': id, - 'name': name, - 'pw': pw, - 'email': email, - }; -}All Commented out code will be gone through by commitee to decide how to continue*/ class SignUpPage extends StatelessWidget { const SignUpPage({Key? key}) : super(key: key); diff --git a/app/lib/screens/WelcomeScreen.dart b/app/lib/screens/WelcomeScreen.dart index a45506a..d4616c2 100644 --- a/app/lib/screens/WelcomeScreen.dart +++ b/app/lib/screens/WelcomeScreen.dart @@ -25,7 +25,7 @@ class WelcomePage extends StatelessWidget { backgroundColor: custom_style.light, ), //maybe add a leading icon menu body: const WelcomeState(), - backgroundColor: (Color.fromARGB(255, 117, 178, 221)), + backgroundColor: (const Color.fromARGB(255, 117, 178, 221)), ), ); } diff --git a/app/lib/screens/loginPage.dart b/app/lib/screens/loginPage.dart index d57b639..d1b4b0f 100644 --- a/app/lib/screens/loginPage.dart +++ b/app/lib/screens/loginPage.dart @@ -2,9 +2,7 @@ import 'package:firebase_auth/firebase_auth.dart'; import 'package:flutter/material.dart'; import 'package:pohnpeian_language_app/screens/Home.dart'; import 'SignUpScreen.dart'; -import 'package:firebase_auth/firebase_auth.dart'; import 'package:pohnpeian_language_app/services/auth.dart'; -import 'package:cloud_firestore/cloud_firestore.dart'; /* Password Field Validator validates if the password is correctly formatted @@ -81,9 +79,9 @@ class _LoginPage extends State { @override Widget build(BuildContext context) { - /** - * Helper function takes what's in the email and password - * controller to sign the users in with Firebase + /* + Helper function takes what's in the email and password + controller to sign the users in with Firebase */ Future signIn() async { await FirebaseAuth.instance.signInWithEmailAndPassword( @@ -185,7 +183,7 @@ class _LoginPage extends State { style: ElevatedButton.styleFrom( backgroundColor: (b), ), - child: Text('Log In'), + child: const Text('Log In'), onPressed: () { signIn().then((value) => { // Signs the user in if fields are correct @@ -198,7 +196,7 @@ class _LoginPage extends State { ) }); // Doesn't really throw an error so the user is notified when it times out - Future.delayed(Duration(seconds: 4), () { + Future.delayed(const Duration(seconds: 4), () { //Usually times out if the password and username is incorrect if (Auth().currentUser == null) { ScaffoldMessenger.of(context).showSnackBar(const SnackBar( diff --git a/app/lib/screens/pages/category_page.dart b/app/lib/screens/pages/category_page.dart index 5cc496e..b785875 100644 --- a/app/lib/screens/pages/category_page.dart +++ b/app/lib/screens/pages/category_page.dart @@ -49,7 +49,7 @@ class _CategoryPageState extends State { SizedBox(width: 16), ],*/ flexibleSpace: Container( - decoration: BoxDecoration( + decoration: const BoxDecoration( gradient: LinearGradient( colors: [ Color.fromARGB(255, 69, 147, 179), @@ -61,9 +61,9 @@ class _CategoryPageState extends State { ), ), bottom: PreferredSize( - preferredSize: Size.fromHeight(80), + preferredSize: const Size.fromHeight(80), child: Container( - padding: EdgeInsets.symmetric(vertical: 16), + padding: const EdgeInsets.symmetric(vertical: 16), child: QuestionNumbersWidget( questions: widget.category.questions, question: question, diff --git a/app/lib/services/auth.dart b/app/lib/services/auth.dart index 2abecd6..680e187 100644 --- a/app/lib/services/auth.dart +++ b/app/lib/services/auth.dart @@ -1,6 +1,5 @@ import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:firebase_auth/firebase_auth.dart'; -import 'package:firebase_core/firebase_core.dart'; import 'package:pohnpeian_language_app/models/userModel.dart' as um; class Auth { diff --git a/app/lib/widget/EndLessonCheck.dart b/app/lib/widget/EndLessonCheck.dart index 63c8733..2f050f3 100644 --- a/app/lib/widget/EndLessonCheck.dart +++ b/app/lib/widget/EndLessonCheck.dart @@ -29,7 +29,7 @@ class _EndLessonCheckState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - iconTheme: IconThemeData(color: Colors.black), + iconTheme: const IconThemeData(color: Colors.black), title: Text(widget.title, style: custom_style.appBarText), backgroundColor: custom_style.light), backgroundColor: custom_style.primary, diff --git a/app/lib/widget/app_widget.dart b/app/lib/widget/app_widget.dart index 52fc5cd..e754791 100644 --- a/app/lib/widget/app_widget.dart +++ b/app/lib/widget/app_widget.dart @@ -8,20 +8,20 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget { @override Widget build(BuildContext context) { return AppBar( - leading: Icon(Icons.menu), + leading: const Icon(Icons.menu), backgroundColor: Colors.transparent, elevation: 0, - title: Text('Quiz'), + title: const Text('Quiz'), bottom: PreferredSize( - preferredSize: Size.fromHeight(80), + preferredSize: const Size.fromHeight(80), child: Container( - padding: EdgeInsets.all(16), + padding: const EdgeInsets.all(16), alignment: Alignment.centerLeft, child: buildWelcome(username), ), ), flexibleSpace: Container( - decoration: BoxDecoration( + decoration: const BoxDecoration( gradient: LinearGradient( colors: [Colors.blue, Colors.white], begin: Alignment.topRight, @@ -30,8 +30,8 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget { ), ), actions: [ - Icon(Icons.search), - SizedBox(width: 12), + const Icon(Icons.search), + const SizedBox(width: 12), ], ); } @@ -39,13 +39,13 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget { Widget buildWelcome(String username) => Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( + const Text( 'Hello', style: TextStyle(fontSize: 16, color: Colors.white), ), Text( username, - style: TextStyle( + style: const TextStyle( fontSize: 24, fontWeight: FontWeight.bold, color: Colors.white, diff --git a/app/lib/widget/category_detail.dart b/app/lib/widget/category_detail.dart index 17a7100..4ac31e1 100644 --- a/app/lib/widget/category_detail.dart +++ b/app/lib/widget/category_detail.dart @@ -15,21 +15,21 @@ class CategoryDetailWidget extends StatelessWidget { Widget build(BuildContext context) => GestureDetector( onTap: () => onSelectedCategory(category), child: Container( - padding: EdgeInsets.only(right: 10), + padding: const EdgeInsets.only(right: 10), width: MediaQuery.of(context).size.width * 0.65, child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ buildImage(), - SizedBox(height: 12), + const SizedBox(height: 12), Text( category.categoryName, - style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20), + style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 20), ), - SizedBox(height: 4), + const SizedBox(height: 4), Text( category.description, - style: TextStyle(fontSize: 16), + style: const TextStyle(fontSize: 16), ) ], ), diff --git a/app/lib/widget/category_header_widget.dart b/app/lib/widget/category_header_widget.dart index 94e9fdb..46974f0 100644 --- a/app/lib/widget/category_header_widget.dart +++ b/app/lib/widget/category_header_widget.dart @@ -18,7 +18,7 @@ class CategoryHeaderWidget extends StatelessWidget { builder: (context) => CategoryPage(category: category), )), child: Container( - padding: EdgeInsets.all(12), + padding: const EdgeInsets.all(12), decoration: BoxDecoration( color: category.backgroundColor, borderRadius: BorderRadius.circular(15), @@ -30,7 +30,7 @@ class CategoryHeaderWidget extends StatelessWidget { const SizedBox(height: 12), Text( category.categoryName, - style: TextStyle( + style: const TextStyle( color: Colors.white, fontWeight: FontWeight.bold, fontSize: 20, diff --git a/app/lib/widget/options.dart b/app/lib/widget/options.dart index b3b61bf..85df602 100644 --- a/app/lib/widget/options.dart +++ b/app/lib/widget/options.dart @@ -16,7 +16,7 @@ class OptionsWidget extends StatelessWidget { @override Widget build(BuildContext context) => ListView( - physics: BouncingScrollPhysics(), + physics: const BouncingScrollPhysics(), children: Utils.heightBetween( question.options .map((option) => buildOption(context, option)) @@ -31,7 +31,7 @@ class OptionsWidget extends StatelessWidget { return GestureDetector( onTap: () => onClickedOption(option), child: Container( - padding: EdgeInsets.all(12), + padding: const EdgeInsets.all(12), decoration: BoxDecoration( color: color, borderRadius: BorderRadius.circular(16), @@ -51,12 +51,12 @@ class OptionsWidget extends StatelessWidget { child: Row(children: [ Text( option.code, - style: TextStyle(fontWeight: FontWeight.bold, fontSize: 24), + style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 24), ), - SizedBox(width: 12), + const SizedBox(width: 12), Text( option.text, - style: TextStyle(fontSize: 20), + style: const TextStyle(fontSize: 20), ) ]), ); @@ -65,7 +65,7 @@ class OptionsWidget extends StatelessWidget { if (solution == answer) { return Text( question.solution, - style: TextStyle(fontSize: 16, fontStyle: FontStyle.italic), + style: const TextStyle(fontSize: 16, fontStyle: FontStyle.italic), ); } else { return Container(); diff --git a/app/lib/widget/question_number.dart b/app/lib/widget/question_number.dart index 5f234d6..3b4350e 100644 --- a/app/lib/widget/question_number.dart +++ b/app/lib/widget/question_number.dart @@ -16,13 +16,13 @@ class QuestionNumbersWidget extends StatelessWidget { @override Widget build(BuildContext context) { - final double padding = 16; + const double padding = 16; return Container( height: 50, child: ListView.separated( - physics: BouncingScrollPhysics(), - padding: EdgeInsets.symmetric(horizontal: padding), + physics: const BouncingScrollPhysics(), + padding: const EdgeInsets.symmetric(horizontal: padding), scrollDirection: Axis.horizontal, separatorBuilder: (context, index) => Container(width: padding), itemCount: questions.length, @@ -49,7 +49,7 @@ class QuestionNumbersWidget extends StatelessWidget { backgroundColor: color, child: Text( '${index + 1}', - style: TextStyle( + style: const TextStyle( color: Colors.black, fontWeight: FontWeight.bold, fontSize: 18, diff --git a/app/lib/widget/questions.dart b/app/lib/widget/questions.dart index d112691..d5a1bde 100644 --- a/app/lib/widget/questions.dart +++ b/app/lib/widget/questions.dart @@ -47,14 +47,14 @@ class QuestionsWidget extends StatelessWidget { const SizedBox(height: 32), Text( question.text, - style: TextStyle(fontWeight: FontWeight.bold, fontSize: 24), + style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 24), ), - SizedBox(height: 8), - Text( + const SizedBox(height: 8), + const Text( 'Choose your answer from below', style: TextStyle(fontStyle: FontStyle.italic, fontSize: 16), ), - SizedBox(height: 32), + const SizedBox(height: 32), Expanded( child: OptionsWidget( question: question, @@ -74,7 +74,7 @@ class QuestionsWidget extends StatelessWidget { ); print("nav to result"); }, - child: Text("Check Result"), + child: const Text("Check Result"), ), )), ], diff --git a/app/lib/widget/result_widget.dart b/app/lib/widget/result_widget.dart index 9a13f5c..9449787 100644 --- a/app/lib/widget/result_widget.dart +++ b/app/lib/widget/result_widget.dart @@ -7,7 +7,7 @@ class ShowResult extends StatelessWidget { @override Widget build(BuildContext context) { return Container( - child: Text("Final Score"), + child: const Text("Final Score"), ); } } \ No newline at end of file