From d6ba7905a165e62a26357ef543cf8129bb8b8bbd Mon Sep 17 00:00:00 2001 From: Mehul Date: Mon, 20 Dec 2021 16:36:30 +0530 Subject: [PATCH] remove stacked package from dashboard and home --- .gitignore | 0 .metadata | 0 LICENSE | 0 README.md | 0 android/.gitignore | 0 android/app/build.gradle | 0 android/app/src/debug/AndroidManifest.xml | 0 android/app/src/main/AndroidManifest.xml | 0 .../com/nividata/mathmatrix/MainActivity.kt | 0 .../main/res/drawable/launch_background.xml | 0 .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin .../res/mipmap-hdpi/ic_launcher_round.png | Bin .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin .../res/mipmap-mdpi/ic_launcher_round.png | Bin .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin .../res/mipmap-xhdpi/ic_launcher_round.png | Bin .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin .../res/mipmap-xxhdpi/ic_launcher_round.png | Bin .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin .../res/mipmap-xxxhdpi/ic_launcher_round.png | Bin android/app/src/main/res/values/styles.xml | 0 android/app/src/profile/AndroidManifest.xml | 0 android/build.gradle | 0 android/gradle.properties | 0 .../gradle/wrapper/gradle-wrapper.properties | 0 android/settings.gradle | 0 assets/calculator-intro.gif | Bin assets/correct-answer.gif | Bin assets/fonts/Montserrat-Light.ttf | Bin assets/fonts/Montserrat-Medium.ttf | Bin assets/fonts/Montserrat-Regular.ttf | Bin assets/fonts/Montserrat-SemiBold.ttf | Bin assets/images/banner.png | Bin assets/images/calculator.svg | 0 assets/images/goal.svg | 0 assets/images/money.svg | 0 assets/magic-triangle-intro.gif | Bin assets/math-machine-intro.gif | Bin assets/math-pair-intro.gif | Bin assets/mental-arith-intro.gif | Bin assets/num-pyramid.gif | Bin assets/picture-puzzle-intro.gif | Bin assets/quick-calculation-intro.gif | Bin assets/sqroot-intro.gif | Bin assets/whats-the-sign-intro.gif | Bin ios/.gitignore | 0 ios/Flutter/AppFrameworkInfo.plist | 0 ios/Flutter/Debug.xcconfig | 0 ios/Flutter/Release.xcconfig | 0 ios/Podfile | 0 ios/Runner.xcodeproj/project.pbxproj | 0 .../contents.xcworkspacedata | 0 .../xcshareddata/xcschemes/Runner.xcscheme | 0 .../contents.xcworkspacedata | 0 .../xcshareddata/IDEWorkspaceChecks.plist | 0 ios/Runner/AppDelegate.swift | 0 .../AppIcon.appiconset/Contents.json | 0 .../Icon-App-1024x1024@1x.png | Bin .../AppIcon.appiconset/Icon-App-20x20@1x.png | Bin .../AppIcon.appiconset/Icon-App-20x20@2x.png | Bin .../AppIcon.appiconset/Icon-App-20x20@3x.png | Bin .../AppIcon.appiconset/Icon-App-29x29@1x.png | Bin .../AppIcon.appiconset/Icon-App-29x29@2x.png | Bin .../AppIcon.appiconset/Icon-App-29x29@3x.png | Bin .../AppIcon.appiconset/Icon-App-40x40@1x.png | Bin .../AppIcon.appiconset/Icon-App-40x40@2x.png | Bin .../AppIcon.appiconset/Icon-App-40x40@3x.png | Bin .../AppIcon.appiconset/Icon-App-60x60@2x.png | Bin .../AppIcon.appiconset/Icon-App-60x60@3x.png | Bin .../AppIcon.appiconset/Icon-App-76x76@1x.png | Bin .../AppIcon.appiconset/Icon-App-76x76@2x.png | Bin .../Icon-App-83.5x83.5@2x.png | Bin .../LaunchImage.imageset/Contents.json | 0 .../LaunchImage.imageset/LaunchImage.png | Bin .../LaunchImage.imageset/LaunchImage@2x.png | Bin .../LaunchImage.imageset/LaunchImage@3x.png | Bin .../LaunchImage.imageset/README.md | 0 ios/Runner/Base.lproj/LaunchScreen.storyboard | 0 ios/Runner/Base.lproj/Main.storyboard | 0 ios/Runner/Info.plist | 0 ios/Runner/Runner-Bridging-Header.h | 0 lib/main.dart | 112 ++++--- lib/src/core/app_constant.dart | 0 lib/src/core/coin_constant.dart | 0 lib/src/core/router.dart | 0 lib/src/core/score_constant.dart | 0 lib/src/core/size_config.dart | 0 lib/src/core/time_constant.dart | 0 lib/src/data/models/alert_request.dart | 0 lib/src/data/models/alert_response.dart | 0 lib/src/data/models/calculator.dart | 0 lib/src/data/models/correct_answer.dart | 0 lib/src/data/models/game_category.dart | 0 lib/src/data/models/game_info_dialog.dart | 0 lib/src/data/models/magic_triangle.dart | 0 lib/src/data/models/math_grid.dart | 0 lib/src/data/models/math_pairs.dart | 0 lib/src/data/models/mental_arithmetic.dart | 0 lib/src/data/models/number_pyramid.dart | 0 lib/src/data/models/picture_puzzle.dart | 0 lib/src/data/models/quick_calculation.dart | 0 lib/src/data/models/score_board.dart | 0 lib/src/data/models/sign.dart | 0 lib/src/data/models/square_root.dart | 0 .../repository/calculator_repository.dart | 0 .../repository/correct_answer_repository.dart | 0 .../repository/magic_triangle_repository.dart | 0 .../data/repository/math_grid_repository.dart | 0 .../repository/math_pairs_repository.dart | 0 .../mental_arithmetic_repository.dart | 0 .../repository/number_pyramid_repository.dart | 0 .../repository/picture_puzzle_repository.dart | 0 .../quick_calculation_repository.dart | 0 lib/src/data/repository/sign_repository.dart | 0 .../repository/square_root_repository.dart | 0 lib/src/service/dialog_service.dart | 0 lib/src/service/navigation_service.dart | 0 lib/src/ui/calculator/calculator_button.dart | 2 +- lib/src/ui/calculator/calculator_view.dart | 4 +- .../ui/calculator/calculator_view_model.dart | 6 +- lib/src/ui/common/dialog_manager.dart | 4 +- lib/src/ui/common/game_view_model.dart | 12 +- lib/src/ui/common/timer.dart | 8 +- lib/src/ui/common/timer_view_model.dart | 31 +- .../correctAnswer/correct_answer_button.dart | 2 +- .../ui/correctAnswer/correct_answer_view.dart | 2 +- .../correct_answer_view_model.dart | 0 lib/src/ui/dashboard/dashboard_view.dart | 292 ++++++++---------- .../ui/dashboard/dashboard_view_model.dart | 27 +- lib/src/ui/home.dart | 274 ++++++++-------- .../ui/magicTriangle/magic_triangle_view.dart | 2 +- .../magic_triangle_view_model.dart | 0 lib/src/ui/magicTriangle/triangle_3x3.dart | 0 lib/src/ui/magicTriangle/triangle_4x4.dart | 0 lib/src/ui/magicTriangle/triangle_button.dart | 2 +- .../ui/magicTriangle/triangle_input_3x3.dart | 0 .../ui/magicTriangle/triangle_input_4x4.dart | 0 .../magicTriangle/triangle_input_button.dart | 2 +- .../ui/magicTriangle/triangle_painter.dart | 0 lib/src/ui/mathGrid/math_grid_button.dart | 2 +- lib/src/ui/mathGrid/math_grid_view.dart | 2 +- lib/src/ui/mathGrid/math_grid_view_model.dart | 0 lib/src/ui/mathPairs/math_pairs_button.dart | 2 +- lib/src/ui/mathPairs/math_pairs_view.dart | 0 .../ui/mathPairs/math_pairs_view_model.dart | 0 .../mental_arithmetic_button.dart | 0 .../mental_arithmetic_view.dart | 2 +- .../mental_arithmetic_view_model.dart | 0 .../ui/numberPyramid/number_pyramid_box.dart | 2 +- .../numberPyramid/number_pyramid_button.dart | 2 +- .../ui/numberPyramid/number_pyramid_view.dart | 0 .../number_pyramid_view_model.dart | 0 lib/src/ui/picturePuzzle/circle_shape.dart | 0 .../picture_puzzle_answer_button.dart | 2 +- .../picturePuzzle/picture_puzzle_button.dart | 2 +- .../ui/picturePuzzle/picture_puzzle_view.dart | 2 +- .../picture_puzzle_view_model.dart | 0 lib/src/ui/picturePuzzle/square_shape.dart | 0 lib/src/ui/picturePuzzle/triangle_shape.dart | 0 .../quick_calculation_button.dart | 4 +- .../quick_calculation_view.dart | 6 +- .../quick_calculation_view_model.dart | 0 lib/src/ui/squareRoot/square_root_button.dart | 2 +- lib/src/ui/squareRoot/square_root_view.dart | 2 +- .../ui/squareRoot/square_root_view_model.dart | 0 lib/src/ui/whatsTheSign/sign_button.dart | 2 +- lib/src/ui/whatsTheSign/sign_view.dart | 10 +- lib/src/ui/whatsTheSign/sign_view_model.dart | 0 lib/src/utility/dialog_info_util.dart | 0 lib/src/utility/math_util.dart | 0 pubspec.yaml | 11 +- test/widget_test.dart | 0 172 files changed, 393 insertions(+), 444 deletions(-) mode change 100644 => 100755 .gitignore mode change 100644 => 100755 .metadata mode change 100644 => 100755 LICENSE mode change 100644 => 100755 README.md mode change 100644 => 100755 android/.gitignore mode change 100644 => 100755 android/app/build.gradle mode change 100644 => 100755 android/app/src/debug/AndroidManifest.xml mode change 100644 => 100755 android/app/src/main/AndroidManifest.xml mode change 100644 => 100755 android/app/src/main/kotlin/com/nividata/mathmatrix/MainActivity.kt mode change 100644 => 100755 android/app/src/main/res/drawable/launch_background.xml mode change 100644 => 100755 android/app/src/main/res/mipmap-hdpi/ic_launcher.png mode change 100644 => 100755 android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png mode change 100644 => 100755 android/app/src/main/res/mipmap-mdpi/ic_launcher.png mode change 100644 => 100755 android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png mode change 100644 => 100755 android/app/src/main/res/mipmap-xhdpi/ic_launcher.png mode change 100644 => 100755 android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png mode change 100644 => 100755 android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png mode change 100644 => 100755 android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png mode change 100644 => 100755 android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png mode change 100644 => 100755 android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png mode change 100644 => 100755 android/app/src/main/res/values/styles.xml mode change 100644 => 100755 android/app/src/profile/AndroidManifest.xml mode change 100644 => 100755 android/build.gradle mode change 100644 => 100755 android/gradle.properties mode change 100644 => 100755 android/gradle/wrapper/gradle-wrapper.properties mode change 100644 => 100755 android/settings.gradle mode change 100644 => 100755 assets/calculator-intro.gif mode change 100644 => 100755 assets/correct-answer.gif mode change 100644 => 100755 assets/fonts/Montserrat-Light.ttf mode change 100644 => 100755 assets/fonts/Montserrat-Medium.ttf mode change 100644 => 100755 assets/fonts/Montserrat-Regular.ttf mode change 100644 => 100755 assets/fonts/Montserrat-SemiBold.ttf mode change 100644 => 100755 assets/images/banner.png mode change 100644 => 100755 assets/images/calculator.svg mode change 100644 => 100755 assets/images/goal.svg mode change 100644 => 100755 assets/images/money.svg mode change 100644 => 100755 assets/magic-triangle-intro.gif mode change 100644 => 100755 assets/math-machine-intro.gif mode change 100644 => 100755 assets/math-pair-intro.gif mode change 100644 => 100755 assets/mental-arith-intro.gif mode change 100644 => 100755 assets/num-pyramid.gif mode change 100644 => 100755 assets/picture-puzzle-intro.gif mode change 100644 => 100755 assets/quick-calculation-intro.gif mode change 100644 => 100755 assets/sqroot-intro.gif mode change 100644 => 100755 assets/whats-the-sign-intro.gif mode change 100644 => 100755 ios/.gitignore mode change 100644 => 100755 ios/Flutter/AppFrameworkInfo.plist mode change 100644 => 100755 ios/Flutter/Debug.xcconfig mode change 100644 => 100755 ios/Flutter/Release.xcconfig mode change 100644 => 100755 ios/Podfile mode change 100644 => 100755 ios/Runner.xcodeproj/project.pbxproj mode change 100644 => 100755 ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata mode change 100644 => 100755 ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme mode change 100644 => 100755 ios/Runner.xcworkspace/contents.xcworkspacedata mode change 100644 => 100755 ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist mode change 100644 => 100755 ios/Runner/AppDelegate.swift mode change 100644 => 100755 ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json mode change 100644 => 100755 ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png mode change 100644 => 100755 ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png mode change 100644 => 100755 ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png mode change 100644 => 100755 ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png mode change 100644 => 100755 ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png mode change 100644 => 100755 ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png mode change 100644 => 100755 ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png mode change 100644 => 100755 ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png mode change 100644 => 100755 ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png mode change 100644 => 100755 ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png mode change 100644 => 100755 ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png mode change 100644 => 100755 ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png mode change 100644 => 100755 ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png mode change 100644 => 100755 ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png mode change 100644 => 100755 ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png mode change 100644 => 100755 ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json mode change 100644 => 100755 ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png mode change 100644 => 100755 ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png mode change 100644 => 100755 ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png mode change 100644 => 100755 ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md mode change 100644 => 100755 ios/Runner/Base.lproj/LaunchScreen.storyboard mode change 100644 => 100755 ios/Runner/Base.lproj/Main.storyboard mode change 100644 => 100755 ios/Runner/Info.plist mode change 100644 => 100755 ios/Runner/Runner-Bridging-Header.h mode change 100644 => 100755 lib/main.dart mode change 100644 => 100755 lib/src/core/app_constant.dart mode change 100644 => 100755 lib/src/core/coin_constant.dart mode change 100644 => 100755 lib/src/core/router.dart mode change 100644 => 100755 lib/src/core/score_constant.dart mode change 100644 => 100755 lib/src/core/size_config.dart mode change 100644 => 100755 lib/src/core/time_constant.dart mode change 100644 => 100755 lib/src/data/models/alert_request.dart mode change 100644 => 100755 lib/src/data/models/alert_response.dart mode change 100644 => 100755 lib/src/data/models/calculator.dart mode change 100644 => 100755 lib/src/data/models/correct_answer.dart mode change 100644 => 100755 lib/src/data/models/game_category.dart mode change 100644 => 100755 lib/src/data/models/game_info_dialog.dart mode change 100644 => 100755 lib/src/data/models/magic_triangle.dart mode change 100644 => 100755 lib/src/data/models/math_grid.dart mode change 100644 => 100755 lib/src/data/models/math_pairs.dart mode change 100644 => 100755 lib/src/data/models/mental_arithmetic.dart mode change 100644 => 100755 lib/src/data/models/number_pyramid.dart mode change 100644 => 100755 lib/src/data/models/picture_puzzle.dart mode change 100644 => 100755 lib/src/data/models/quick_calculation.dart mode change 100644 => 100755 lib/src/data/models/score_board.dart mode change 100644 => 100755 lib/src/data/models/sign.dart mode change 100644 => 100755 lib/src/data/models/square_root.dart mode change 100644 => 100755 lib/src/data/repository/calculator_repository.dart mode change 100644 => 100755 lib/src/data/repository/correct_answer_repository.dart mode change 100644 => 100755 lib/src/data/repository/magic_triangle_repository.dart mode change 100644 => 100755 lib/src/data/repository/math_grid_repository.dart mode change 100644 => 100755 lib/src/data/repository/math_pairs_repository.dart mode change 100644 => 100755 lib/src/data/repository/mental_arithmetic_repository.dart mode change 100644 => 100755 lib/src/data/repository/number_pyramid_repository.dart mode change 100644 => 100755 lib/src/data/repository/picture_puzzle_repository.dart mode change 100644 => 100755 lib/src/data/repository/quick_calculation_repository.dart mode change 100644 => 100755 lib/src/data/repository/sign_repository.dart mode change 100644 => 100755 lib/src/data/repository/square_root_repository.dart mode change 100644 => 100755 lib/src/service/dialog_service.dart mode change 100644 => 100755 lib/src/service/navigation_service.dart mode change 100644 => 100755 lib/src/ui/calculator/calculator_button.dart mode change 100644 => 100755 lib/src/ui/calculator/calculator_view.dart mode change 100644 => 100755 lib/src/ui/calculator/calculator_view_model.dart mode change 100644 => 100755 lib/src/ui/common/dialog_manager.dart mode change 100644 => 100755 lib/src/ui/common/game_view_model.dart mode change 100644 => 100755 lib/src/ui/common/timer.dart mode change 100644 => 100755 lib/src/ui/common/timer_view_model.dart mode change 100644 => 100755 lib/src/ui/correctAnswer/correct_answer_button.dart mode change 100644 => 100755 lib/src/ui/correctAnswer/correct_answer_view.dart mode change 100644 => 100755 lib/src/ui/correctAnswer/correct_answer_view_model.dart mode change 100644 => 100755 lib/src/ui/dashboard/dashboard_view.dart mode change 100644 => 100755 lib/src/ui/dashboard/dashboard_view_model.dart mode change 100644 => 100755 lib/src/ui/home.dart mode change 100644 => 100755 lib/src/ui/magicTriangle/magic_triangle_view.dart mode change 100644 => 100755 lib/src/ui/magicTriangle/magic_triangle_view_model.dart mode change 100644 => 100755 lib/src/ui/magicTriangle/triangle_3x3.dart mode change 100644 => 100755 lib/src/ui/magicTriangle/triangle_4x4.dart mode change 100644 => 100755 lib/src/ui/magicTriangle/triangle_button.dart mode change 100644 => 100755 lib/src/ui/magicTriangle/triangle_input_3x3.dart mode change 100644 => 100755 lib/src/ui/magicTriangle/triangle_input_4x4.dart mode change 100644 => 100755 lib/src/ui/magicTriangle/triangle_input_button.dart mode change 100644 => 100755 lib/src/ui/magicTriangle/triangle_painter.dart mode change 100644 => 100755 lib/src/ui/mathGrid/math_grid_button.dart mode change 100644 => 100755 lib/src/ui/mathGrid/math_grid_view.dart mode change 100644 => 100755 lib/src/ui/mathGrid/math_grid_view_model.dart mode change 100644 => 100755 lib/src/ui/mathPairs/math_pairs_button.dart mode change 100644 => 100755 lib/src/ui/mathPairs/math_pairs_view.dart mode change 100644 => 100755 lib/src/ui/mathPairs/math_pairs_view_model.dart mode change 100644 => 100755 lib/src/ui/mentalArithmetic/mental_arithmetic_button.dart mode change 100644 => 100755 lib/src/ui/mentalArithmetic/mental_arithmetic_view.dart mode change 100644 => 100755 lib/src/ui/mentalArithmetic/mental_arithmetic_view_model.dart mode change 100644 => 100755 lib/src/ui/numberPyramid/number_pyramid_box.dart mode change 100644 => 100755 lib/src/ui/numberPyramid/number_pyramid_button.dart mode change 100644 => 100755 lib/src/ui/numberPyramid/number_pyramid_view.dart mode change 100644 => 100755 lib/src/ui/numberPyramid/number_pyramid_view_model.dart mode change 100644 => 100755 lib/src/ui/picturePuzzle/circle_shape.dart mode change 100644 => 100755 lib/src/ui/picturePuzzle/picture_puzzle_answer_button.dart mode change 100644 => 100755 lib/src/ui/picturePuzzle/picture_puzzle_button.dart mode change 100644 => 100755 lib/src/ui/picturePuzzle/picture_puzzle_view.dart mode change 100644 => 100755 lib/src/ui/picturePuzzle/picture_puzzle_view_model.dart mode change 100644 => 100755 lib/src/ui/picturePuzzle/square_shape.dart mode change 100644 => 100755 lib/src/ui/picturePuzzle/triangle_shape.dart mode change 100644 => 100755 lib/src/ui/quickCalculation/quick_calculation_button.dart mode change 100644 => 100755 lib/src/ui/quickCalculation/quick_calculation_view.dart mode change 100644 => 100755 lib/src/ui/quickCalculation/quick_calculation_view_model.dart mode change 100644 => 100755 lib/src/ui/squareRoot/square_root_button.dart mode change 100644 => 100755 lib/src/ui/squareRoot/square_root_view.dart mode change 100644 => 100755 lib/src/ui/squareRoot/square_root_view_model.dart mode change 100644 => 100755 lib/src/ui/whatsTheSign/sign_button.dart mode change 100644 => 100755 lib/src/ui/whatsTheSign/sign_view.dart mode change 100644 => 100755 lib/src/ui/whatsTheSign/sign_view_model.dart mode change 100644 => 100755 lib/src/utility/dialog_info_util.dart mode change 100644 => 100755 lib/src/utility/math_util.dart mode change 100644 => 100755 pubspec.yaml mode change 100644 => 100755 test/widget_test.dart diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/.metadata b/.metadata old mode 100644 new mode 100755 diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/android/.gitignore b/android/.gitignore old mode 100644 new mode 100755 diff --git a/android/app/build.gradle b/android/app/build.gradle old mode 100644 new mode 100755 diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml old mode 100644 new mode 100755 diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml old mode 100644 new mode 100755 diff --git a/android/app/src/main/kotlin/com/nividata/mathmatrix/MainActivity.kt b/android/app/src/main/kotlin/com/nividata/mathmatrix/MainActivity.kt old mode 100644 new mode 100755 diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml old mode 100644 new mode 100755 diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png old mode 100644 new mode 100755 diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png old mode 100644 new mode 100755 diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png old mode 100644 new mode 100755 diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png old mode 100644 new mode 100755 diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png old mode 100644 new mode 100755 diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png old mode 100644 new mode 100755 diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png old mode 100644 new mode 100755 diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png old mode 100644 new mode 100755 diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png old mode 100644 new mode 100755 diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png old mode 100644 new mode 100755 diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml old mode 100644 new mode 100755 diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml old mode 100644 new mode 100755 diff --git a/android/build.gradle b/android/build.gradle old mode 100644 new mode 100755 diff --git a/android/gradle.properties b/android/gradle.properties old mode 100644 new mode 100755 diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties old mode 100644 new mode 100755 diff --git a/android/settings.gradle b/android/settings.gradle old mode 100644 new mode 100755 diff --git a/assets/calculator-intro.gif b/assets/calculator-intro.gif old mode 100644 new mode 100755 diff --git a/assets/correct-answer.gif b/assets/correct-answer.gif old mode 100644 new mode 100755 diff --git a/assets/fonts/Montserrat-Light.ttf b/assets/fonts/Montserrat-Light.ttf old mode 100644 new mode 100755 diff --git a/assets/fonts/Montserrat-Medium.ttf b/assets/fonts/Montserrat-Medium.ttf old mode 100644 new mode 100755 diff --git a/assets/fonts/Montserrat-Regular.ttf b/assets/fonts/Montserrat-Regular.ttf old mode 100644 new mode 100755 diff --git a/assets/fonts/Montserrat-SemiBold.ttf b/assets/fonts/Montserrat-SemiBold.ttf old mode 100644 new mode 100755 diff --git a/assets/images/banner.png b/assets/images/banner.png old mode 100644 new mode 100755 diff --git a/assets/images/calculator.svg b/assets/images/calculator.svg old mode 100644 new mode 100755 diff --git a/assets/images/goal.svg b/assets/images/goal.svg old mode 100644 new mode 100755 diff --git a/assets/images/money.svg b/assets/images/money.svg old mode 100644 new mode 100755 diff --git a/assets/magic-triangle-intro.gif b/assets/magic-triangle-intro.gif old mode 100644 new mode 100755 diff --git a/assets/math-machine-intro.gif b/assets/math-machine-intro.gif old mode 100644 new mode 100755 diff --git a/assets/math-pair-intro.gif b/assets/math-pair-intro.gif old mode 100644 new mode 100755 diff --git a/assets/mental-arith-intro.gif b/assets/mental-arith-intro.gif old mode 100644 new mode 100755 diff --git a/assets/num-pyramid.gif b/assets/num-pyramid.gif old mode 100644 new mode 100755 diff --git a/assets/picture-puzzle-intro.gif b/assets/picture-puzzle-intro.gif old mode 100644 new mode 100755 diff --git a/assets/quick-calculation-intro.gif b/assets/quick-calculation-intro.gif old mode 100644 new mode 100755 diff --git a/assets/sqroot-intro.gif b/assets/sqroot-intro.gif old mode 100644 new mode 100755 diff --git a/assets/whats-the-sign-intro.gif b/assets/whats-the-sign-intro.gif old mode 100644 new mode 100755 diff --git a/ios/.gitignore b/ios/.gitignore old mode 100644 new mode 100755 diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist old mode 100644 new mode 100755 diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig old mode 100644 new mode 100755 diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig old mode 100644 new mode 100755 diff --git a/ios/Podfile b/ios/Podfile old mode 100644 new mode 100755 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj old mode 100644 new mode 100755 diff --git a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata old mode 100644 new mode 100755 diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme old mode 100644 new mode 100755 diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcworkspace/contents.xcworkspacedata old mode 100644 new mode 100755 diff --git a/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist old mode 100644 new mode 100755 diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift old mode 100644 new mode 100755 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json old mode 100644 new mode 100755 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png old mode 100644 new mode 100755 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png old mode 100644 new mode 100755 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png old mode 100644 new mode 100755 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png old mode 100644 new mode 100755 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png old mode 100644 new mode 100755 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png old mode 100644 new mode 100755 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png old mode 100644 new mode 100755 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png old mode 100644 new mode 100755 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png old mode 100644 new mode 100755 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png old mode 100644 new mode 100755 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png old mode 100644 new mode 100755 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png old mode 100644 new mode 100755 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png old mode 100644 new mode 100755 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png old mode 100644 new mode 100755 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png old mode 100644 new mode 100755 diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json old mode 100644 new mode 100755 diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png old mode 100644 new mode 100755 diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png old mode 100644 new mode 100755 diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png old mode 100644 new mode 100755 diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md old mode 100644 new mode 100755 diff --git a/ios/Runner/Base.lproj/LaunchScreen.storyboard b/ios/Runner/Base.lproj/LaunchScreen.storyboard old mode 100644 new mode 100755 diff --git a/ios/Runner/Base.lproj/Main.storyboard b/ios/Runner/Base.lproj/Main.storyboard old mode 100644 new mode 100755 diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist old mode 100644 new mode 100755 diff --git a/ios/Runner/Runner-Bridging-Header.h b/ios/Runner/Runner-Bridging-Header.h old mode 100644 new mode 100755 diff --git a/lib/main.dart b/lib/main.dart old mode 100644 new mode 100755 index 2e5e3e6..841fd0a --- a/lib/main.dart +++ b/lib/main.dart @@ -8,15 +8,26 @@ import 'package:mathgame/src/core/router.dart'; import 'package:mathgame/src/ui/dashboard/dashboard_view.dart'; import 'package:mathgame/src/ui/common/dialog_manager.dart'; import 'package:mathgame/src/core/app_constant.dart'; +import 'package:provider/provider.dart'; +import 'package:shared_preferences/shared_preferences.dart'; -void main() { +Future main() async { + WidgetsFlutterBinding.ensureInitialized(); setupServiceLocator(); - runApp(MyApp()); + final sharedPreferences = await SharedPreferences.getInstance(); + runApp(MultiProvider(providers: [ + Provider(create: (context) => sharedPreferences), + ChangeNotifierProxyProvider( + create: (context) => DashboardViewModel(preferences: sharedPreferences), + update: (context, value, previous) => + DashboardViewModel(preferences: value), + ) + ], child: MyApp())); } setupServiceLocator() { GetIt.I.registerLazySingleton(() => NavigationService()); - GetIt.I.registerSingleton(DashboardViewModel()); + // GetIt.I.registerSingleton(DashboardViewModel()); GetIt.I.registerLazySingleton(() => DialogService()); } @@ -35,56 +46,57 @@ class MyApp extends StatelessWidget { title: 'Math Matrix', debugShowCheckedModeBanner: false, theme: ThemeData( - backgroundColor: Color(0xFFaa0000), - brightness: Brightness.dark, - primaryColor: Colors.deepPurple, - primaryColorDark: Colors.deepPurple[700], - primaryColorLight: Colors.deepPurple[300], - /*primaryColorDark: Color(0x673ab7), + backgroundColor: Color(0xFFaa0000), + brightness: Brightness.dark, + primaryColor: Colors.deepPurple, + primaryColorDark: Colors.deepPurple[700], + primaryColorLight: Colors.deepPurple[300], + /*primaryColorDark: Color(0x673ab7), primaryColorLight: Color(0x8561c5),*/ - primarySwatch: Colors.yellow, - accentColor: Colors.deepOrange[300], - scaffoldBackgroundColor: Color(0xFF121212), - dialogBackgroundColor: Colors.blueGrey[900], - splashColor: Colors.grey, - highlightColor: Colors.white60, - dividerColor: Colors.grey[900], - applyElevationOverlayColor: true, - /*cardTheme: CardTheme( + primarySwatch: Colors.yellow, + accentColor: Colors.deepOrange[300], + scaffoldBackgroundColor: Color(0xFF121212), + dialogBackgroundColor: Colors.blueGrey[900], + splashColor: Colors.grey, + highlightColor: Colors.white60, + dividerColor: Colors.grey[900], + applyElevationOverlayColor: true, + /*cardTheme: CardTheme( ),*/ - textTheme: TextTheme( - display4: - TextStyle(fontFamily: fontFamily, fontWeight: FontWeight.w300), - display3: TextStyle( - fontFamily: fontFamily, - fontWeight: FontWeight.w500, - color: Colors.white), - display2: TextStyle( - fontFamily: fontFamily, - fontWeight: FontWeight.w400, - color: Colors.white), - display1: TextStyle( - fontFamily: fontFamily, - fontWeight: FontWeight.w400, - color: Colors.white), - headline: - TextStyle(fontFamily: fontFamily, fontWeight: FontWeight.w400), - title: - TextStyle(fontFamily: fontFamily, fontWeight: FontWeight.w500), - subhead: - TextStyle(fontFamily: fontFamily, fontWeight: FontWeight.w400), - body2: - TextStyle(fontFamily: fontFamily, fontWeight: FontWeight.w500), - body1: - TextStyle(fontFamily: fontFamily, fontWeight: FontWeight.w400), - caption: - TextStyle(fontFamily: fontFamily, fontWeight: FontWeight.w400), - subtitle: - TextStyle(fontFamily: fontFamily, fontWeight: FontWeight.w500), - button: - TextStyle(fontFamily: fontFamily, fontWeight: FontWeight.w500), - )), + // textTheme: TextTheme( + // headline4: TextStyle( + // fontFamily: fontFamily, fontWeight: FontWeight.w300), + // headline3: TextStyle( + // fontFamily: fontFamily, + // fontWeight: FontWeight.w500, + // color: Colors.white), + // headline2: TextStyle( + // fontFamily: fontFamily, + // fontWeight: FontWeight.w400, + // color: Colors.white), + // headline1: TextStyle( + // fontFamily: fontFamily, + // fontWeight: FontWeight.w400, + // color: Colors.white), + // headline: TextStyle( + // fontFamily: fontFamily, fontWeight: FontWeight.w400), + // title: TextStyle( + // fontFamily: fontFamily, fontWeight: FontWeight.w500), + // subhead: TextStyle( + // fontFamily: fontFamily, fontWeight: FontWeight.w400), + // body2: TextStyle( + // fontFamily: fontFamily, fontWeight: FontWeight.w500), + // body1: TextStyle( + // fontFamily: fontFamily, fontWeight: FontWeight.w400), + // caption: TextStyle( + // fontFamily: fontFamily, fontWeight: FontWeight.w400), + // subtitle: TextStyle( + // fontFamily: fontFamily, fontWeight: FontWeight.w500), + // button: TextStyle( + // fontFamily: fontFamily, fontWeight: FontWeight.w500), + // ), + ), builder: (context, widget) => Navigator( onGenerateRoute: (settings) => MaterialPageRoute( builder: (context) => DialogManager( diff --git a/lib/src/core/app_constant.dart b/lib/src/core/app_constant.dart old mode 100644 new mode 100755 diff --git a/lib/src/core/coin_constant.dart b/lib/src/core/coin_constant.dart old mode 100644 new mode 100755 diff --git a/lib/src/core/router.dart b/lib/src/core/router.dart old mode 100644 new mode 100755 diff --git a/lib/src/core/score_constant.dart b/lib/src/core/score_constant.dart old mode 100644 new mode 100755 diff --git a/lib/src/core/size_config.dart b/lib/src/core/size_config.dart old mode 100644 new mode 100755 diff --git a/lib/src/core/time_constant.dart b/lib/src/core/time_constant.dart old mode 100644 new mode 100755 diff --git a/lib/src/data/models/alert_request.dart b/lib/src/data/models/alert_request.dart old mode 100644 new mode 100755 diff --git a/lib/src/data/models/alert_response.dart b/lib/src/data/models/alert_response.dart old mode 100644 new mode 100755 diff --git a/lib/src/data/models/calculator.dart b/lib/src/data/models/calculator.dart old mode 100644 new mode 100755 diff --git a/lib/src/data/models/correct_answer.dart b/lib/src/data/models/correct_answer.dart old mode 100644 new mode 100755 diff --git a/lib/src/data/models/game_category.dart b/lib/src/data/models/game_category.dart old mode 100644 new mode 100755 diff --git a/lib/src/data/models/game_info_dialog.dart b/lib/src/data/models/game_info_dialog.dart old mode 100644 new mode 100755 diff --git a/lib/src/data/models/magic_triangle.dart b/lib/src/data/models/magic_triangle.dart old mode 100644 new mode 100755 diff --git a/lib/src/data/models/math_grid.dart b/lib/src/data/models/math_grid.dart old mode 100644 new mode 100755 diff --git a/lib/src/data/models/math_pairs.dart b/lib/src/data/models/math_pairs.dart old mode 100644 new mode 100755 diff --git a/lib/src/data/models/mental_arithmetic.dart b/lib/src/data/models/mental_arithmetic.dart old mode 100644 new mode 100755 diff --git a/lib/src/data/models/number_pyramid.dart b/lib/src/data/models/number_pyramid.dart old mode 100644 new mode 100755 diff --git a/lib/src/data/models/picture_puzzle.dart b/lib/src/data/models/picture_puzzle.dart old mode 100644 new mode 100755 diff --git a/lib/src/data/models/quick_calculation.dart b/lib/src/data/models/quick_calculation.dart old mode 100644 new mode 100755 diff --git a/lib/src/data/models/score_board.dart b/lib/src/data/models/score_board.dart old mode 100644 new mode 100755 diff --git a/lib/src/data/models/sign.dart b/lib/src/data/models/sign.dart old mode 100644 new mode 100755 diff --git a/lib/src/data/models/square_root.dart b/lib/src/data/models/square_root.dart old mode 100644 new mode 100755 diff --git a/lib/src/data/repository/calculator_repository.dart b/lib/src/data/repository/calculator_repository.dart old mode 100644 new mode 100755 diff --git a/lib/src/data/repository/correct_answer_repository.dart b/lib/src/data/repository/correct_answer_repository.dart old mode 100644 new mode 100755 diff --git a/lib/src/data/repository/magic_triangle_repository.dart b/lib/src/data/repository/magic_triangle_repository.dart old mode 100644 new mode 100755 diff --git a/lib/src/data/repository/math_grid_repository.dart b/lib/src/data/repository/math_grid_repository.dart old mode 100644 new mode 100755 diff --git a/lib/src/data/repository/math_pairs_repository.dart b/lib/src/data/repository/math_pairs_repository.dart old mode 100644 new mode 100755 diff --git a/lib/src/data/repository/mental_arithmetic_repository.dart b/lib/src/data/repository/mental_arithmetic_repository.dart old mode 100644 new mode 100755 diff --git a/lib/src/data/repository/number_pyramid_repository.dart b/lib/src/data/repository/number_pyramid_repository.dart old mode 100644 new mode 100755 diff --git a/lib/src/data/repository/picture_puzzle_repository.dart b/lib/src/data/repository/picture_puzzle_repository.dart old mode 100644 new mode 100755 diff --git a/lib/src/data/repository/quick_calculation_repository.dart b/lib/src/data/repository/quick_calculation_repository.dart old mode 100644 new mode 100755 diff --git a/lib/src/data/repository/sign_repository.dart b/lib/src/data/repository/sign_repository.dart old mode 100644 new mode 100755 diff --git a/lib/src/data/repository/square_root_repository.dart b/lib/src/data/repository/square_root_repository.dart old mode 100644 new mode 100755 diff --git a/lib/src/service/dialog_service.dart b/lib/src/service/dialog_service.dart old mode 100644 new mode 100755 diff --git a/lib/src/service/navigation_service.dart b/lib/src/service/navigation_service.dart old mode 100644 new mode 100755 diff --git a/lib/src/ui/calculator/calculator_button.dart b/lib/src/ui/calculator/calculator_button.dart old mode 100644 new mode 100755 index 83f7cce..d940cb4 --- a/lib/src/ui/calculator/calculator_button.dart +++ b/lib/src/ui/calculator/calculator_button.dart @@ -34,7 +34,7 @@ class CalculatorButton extends StatelessWidget { child: Center( child: Text( text, - style: Theme.of(context).textTheme.headline, + style: Theme.of(context).textTheme.headline1, ), ), ), diff --git a/lib/src/ui/calculator/calculator_view.dart b/lib/src/ui/calculator/calculator_view.dart old mode 100644 new mode 100755 index 5f9a514..2401cfd --- a/lib/src/ui/calculator/calculator_view.dart +++ b/lib/src/ui/calculator/calculator_view.dart @@ -55,7 +55,7 @@ class _CalculatorViewState extends State with WidgetsBindingObse visible: !calculatorProvider.pause, child: Text( calculatorProvider.currentState.question, - style: Theme.of(context).textTheme.headline, + style: Theme.of(context).textTheme.headline1, ), ); }), @@ -76,7 +76,7 @@ class _CalculatorViewState extends State with WidgetsBindingObse builder: (context, calculatorProvider, child) { return Text( calculatorProvider.result, - style: Theme.of(context).textTheme.display1, + style: Theme.of(context).textTheme.headline1, ); }, ), diff --git a/lib/src/ui/calculator/calculator_view_model.dart b/lib/src/ui/calculator/calculator_view_model.dart old mode 100644 new mode 100755 index e3ecfa4..18e9e7c --- a/lib/src/ui/calculator/calculator_view_model.dart +++ b/lib/src/ui/calculator/calculator_view_model.dart @@ -7,9 +7,7 @@ import 'package:mathgame/src/core/time_constant.dart'; import '../common/game_view_model.dart'; -class CalculatorProvider - with ChangeNotifier - implements GameAccess { +class CalculatorProvider with ChangeNotifier implements GameAccess { GameViewModelImp gameViewModel; String _result; @@ -114,8 +112,6 @@ class CalculatorProvider gameViewModel.showInfoDialog(); } - - void dispose() { super.dispose(); gameViewModel.exitGame(); diff --git a/lib/src/ui/common/dialog_manager.dart b/lib/src/ui/common/dialog_manager.dart old mode 100644 new mode 100755 index 0189304..df335c3 --- a/lib/src/ui/common/dialog_manager.dart +++ b/lib/src/ui/common/dialog_manager.dart @@ -145,7 +145,7 @@ class _DialogManagerState extends State { color: Colors.grey, ), ), - titleStyle: Theme.of(context).textTheme.headline + titleStyle: Theme.of(context).textTheme.headline1 ); GameInfoDialog dialog = @@ -179,7 +179,7 @@ class _DialogManagerState extends State { child: Text( dialog.dec, textAlign: TextAlign.center, - style: Theme.of(context).textTheme.body1 + style: Theme.of(context).textTheme.bodyText1 ), ), RaisedButton( diff --git a/lib/src/ui/common/game_view_model.dart b/lib/src/ui/common/game_view_model.dart old mode 100644 new mode 100755 index b09fd3c..5d52e36 --- a/lib/src/ui/common/game_view_model.dart +++ b/lib/src/ui/common/game_view_model.dart @@ -75,7 +75,7 @@ class GameViewModelImp extends GameViewModel implements TimerAccess { } @override - void timeOutNew() { + void timeOut() { showGameOverDialog(); gameAccess.onGameTimeOut(); } @@ -92,7 +92,7 @@ class GameViewModelImp extends GameViewModel implements TimerAccess { _currentScore = 0; currentState = _list[_index]; gameAccess.onCurrentStateUpdate(currentState); - timerViewModel.startTimerNew(); + timerViewModel.startTimer(); if (_homeViewModel.isFirstTime(gameCategoryType)) { await Future.delayed(Duration(milliseconds: 500)); pauseGame(); @@ -132,22 +132,22 @@ class GameViewModelImp extends GameViewModel implements TimerAccess { @override void restartGame() { - timerViewModel.startTimerNew(); + timerViewModel.startTimer(); } @override void pauseGame() { - timerViewModel.pauseTimerNew(); + timerViewModel.pauseTimer(); } @override void resumeGame() { - timerViewModel.resumeTimerNew(); + timerViewModel.resumeTimer(); } @override void exitGame() { - timerViewModel.cancelTimerNew(); + timerViewModel.cancelTimer(); } @override diff --git a/lib/src/ui/common/timer.dart b/lib/src/ui/common/timer.dart old mode 100644 new mode 100755 index b01410f..fbaa435 --- a/lib/src/ui/common/timer.dart +++ b/lib/src/ui/common/timer.dart @@ -64,9 +64,9 @@ class Timer extends StatelessWidget { children: [ Column( children: [ - Text("Score", style: Theme.of(context).textTheme.subhead), + Text("Score", style: Theme.of(context).textTheme.subtitle2), Text(provider.currentScore.toInt().toString(), - style: Theme.of(context).textTheme.headline) + style: Theme.of(context).textTheme.headline1) ], ), /* Visibility( @@ -87,9 +87,9 @@ class Timer extends StatelessWidget { visible: !(type == GameCategoryType.QUICK_CALCULATION) ? true : false, child: Column(children: [ - Text("Timer", style: Theme.of(context).textTheme.subhead), + Text("Timer", style: Theme.of(context).textTheme.subtitle2), Text(provider.time.toString(), - style: Theme.of(context).textTheme.headline), + style: Theme.of(context).textTheme.headline1), /* AnimatedSwitcher( duration: Duration(milliseconds: 700), child: provider.time % 2 == 1 diff --git a/lib/src/ui/common/timer_view_model.dart b/lib/src/ui/common/timer_view_model.dart old mode 100644 new mode 100755 index bc67375..c22be9f --- a/lib/src/ui/common/timer_view_model.dart +++ b/lib/src/ui/common/timer_view_model.dart @@ -3,19 +3,18 @@ import 'dart:async'; import 'package:flutter/material.dart'; abstract class TimerViewModel { - bool get timeOutNew; - void startTimerNew(); + void startTimer(); - void pauseTimerNew(); + void pauseTimer(); - void resumeTimerNew(); + void resumeTimer(); - void cancelTimerNew(); + void cancelTimer(); } abstract class TimerAccess { - void timeOutNew(); + void timeOut(); void timeUpdate(int time); } @@ -26,7 +25,6 @@ class TimerViewModelImpl extends TimerViewModel { TimerAccess timerAccess; Stream _timer; - bool _timeOutNew; StreamSubscription _timeSubscription; TimerViewModelImpl({@required this.timerAccess, @required this.totalTime}); @@ -71,43 +69,36 @@ class TimerViewModelImpl extends TimerViewModel { } void _handleTimerEnd() { - timerAccess.timeOutNew(); - _timeOutNew = true; + timerAccess.timeOut(); _timeSubscription = null; } @override - void startTimerNew() { - cancelTimerNew(); + void startTimer() { + cancelTimer(); _timer = timedCounter(oneSec, totalTime); - _timeOutNew = false; _timeSubscription = _timer.listen(_onTimeChange); _timeSubscription.onDone(_handleTimerEnd); } @override - void pauseTimerNew() { + void pauseTimer() { if (_timeSubscription != null) { _timeSubscription.pause(); } } @override - void resumeTimerNew() { + void resumeTimer() { if (_timeSubscription != null) { _timeSubscription.resume(); } } @override - void cancelTimerNew() { + void cancelTimer() { if (_timeSubscription != null) { _timeSubscription.cancel(); } } - - @override - bool get timeOutNew { - return _timeOutNew; - } } diff --git a/lib/src/ui/correctAnswer/correct_answer_button.dart b/lib/src/ui/correctAnswer/correct_answer_button.dart old mode 100644 new mode 100755 index 51899d7..b0767cb --- a/lib/src/ui/correctAnswer/correct_answer_button.dart +++ b/lib/src/ui/correctAnswer/correct_answer_button.dart @@ -31,7 +31,7 @@ class CorrectAnswerButton extends StatelessWidget { child: Center( child: Text( text, - style: Theme.of(context).textTheme.display1, + style: Theme.of(context).textTheme.headline1, ), ), ), diff --git a/lib/src/ui/correctAnswer/correct_answer_view.dart b/lib/src/ui/correctAnswer/correct_answer_view.dart old mode 100644 new mode 100755 index c915c8c..6bc7ebe --- a/lib/src/ui/correctAnswer/correct_answer_view.dart +++ b/lib/src/ui/correctAnswer/correct_answer_view.dart @@ -39,7 +39,7 @@ class CorrectAnswerView extends StatelessWidget { visible: !correctAnswerProvider.pause, child: Text( correctAnswerProvider.currentState.question, - style: Theme.of(context).textTheme.display1, + style: Theme.of(context).textTheme.headline1, ), ), )), diff --git a/lib/src/ui/correctAnswer/correct_answer_view_model.dart b/lib/src/ui/correctAnswer/correct_answer_view_model.dart old mode 100644 new mode 100755 diff --git a/lib/src/ui/dashboard/dashboard_view.dart b/lib/src/ui/dashboard/dashboard_view.dart old mode 100644 new mode 100755 index 7660e8f..5a408fc --- a/lib/src/ui/dashboard/dashboard_view.dart +++ b/lib/src/ui/dashboard/dashboard_view.dart @@ -4,11 +4,9 @@ import 'package:get_it/get_it.dart'; import 'package:mathgame/src/ui/dashboard/dashboard_view_model.dart'; import 'package:mathgame/src/core/app_constant.dart'; import 'package:mathgame/src/service/navigation_service.dart'; -import 'package:mathgame/src/core/app_constant.dart'; import 'package:mathgame/src/core/size_config.dart'; - -import 'package:provider_architecture/provider_architecture.dart'; +import 'package:provider/provider.dart'; class DashboardView extends StatefulWidget { @override @@ -17,7 +15,6 @@ class DashboardView extends StatefulWidget { class _DashboardViewState extends State with SingleTickerProviderStateMixin { - double _scale; AnimationController _controller; Animation _offsetLeftEnter; Animation _offsetRightEnter; @@ -38,183 +35,160 @@ class _DashboardViewState extends State begin: Offset(-2.0, 0.0), end: Offset.zero, ).animate(_controller); - - /*_offsetLeftEnter.addListener(() { - setState(() {}); - });*/ _controller.forward(); } @override void dispose() { - // TODO: implement dispose super.dispose(); _controller.dispose(); } - void _onTapDown(TapDownDetails details) { - print("hello"); - _controller.forward(); - } - - void _onTapUp(TapUpDetails details) { - _controller.reverse(); - } - @override Widget build(BuildContext context) { SizeConfig().init(context); - _scale = 1 - _controller.value; - return Scaffold( body: SafeArea( top: true, bottom: true, - child: ViewModelProvider.withConsumer( - reuseExisting: true, - viewModel: GetIt.I(), - onModelReady: (model) => model.initialise(), - builder: (context, DashboardViewModel model, child) => Container( - constraints: BoxConstraints.expand(), - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( + child: Container( + constraints: BoxConstraints.expand(), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Expanded( + flex: 1, + child: Container( + constraints: BoxConstraints.expand(), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( flex: 1, + child: Container(), + ), + Expanded( + flex: 1, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SvgPicture.asset( + "assets/images/goal.svg", + width: 18, + height: 18, + ), + SizedBox(width: 5), + Consumer( + builder: (context, model, child) => Text( + model.overallScore.toString(), + style: + Theme.of(context).textTheme.subtitle1), + ), + SizedBox(width: 30), + SvgPicture.asset( + "assets/images/money.svg", + width: 18, + height: 18, + ), + SizedBox(width: 5), + Consumer( + builder: (context, model, child) => Text( + model.totalCoin.toString(), + style: + Theme.of(context).textTheme.subtitle1), + ) + ], + ), + ) + ], + ), + )), + Expanded( + flex: 2, + child: Container( + constraints: BoxConstraints.expand(), + alignment: Alignment.center, + child: Text("Math Matrix", + style: Theme.of(context).textTheme.headline4))), + Expanded( + flex: 7, + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + SizedBox( + height: (SizeConfig.screenHeight / 20), + ), + GestureDetector( + onTapDown: (tapDownDetails) { + GetIt.I().navigateTo(KeyUtil.Home, + arguments: PuzzleType.MATH_PUZZLE); + }, + child: SlideTransition( + position: _offsetLeftEnter, + child: Card( + color: Color(0xFF363636), + elevation: 10, + margin: EdgeInsets.all(10), child: Container( - constraints: BoxConstraints.expand(), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Expanded( - flex: 1, - child: Container(), - ), - Expanded( - flex: 1, - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - SvgPicture.asset( - "assets/images/goal.svg", - width: 18, - height: 18, - ), - SizedBox(width: 5), - Text(model.overallScore.toString(), - style: Theme.of(context) - .textTheme - .subhead), - SizedBox(width: 30), - SvgPicture.asset( - "assets/images/money.svg", - width: 18, - height: 18, - ), - SizedBox(width: 5), - Text(model.totalCoin.toString(), - style: Theme.of(context) - .textTheme - .subhead) - ], - ), - ) - ], - ), - )), - Expanded( - flex: 2, - child: Container( - constraints: BoxConstraints.expand(), alignment: Alignment.center, - child: Text("Math Matrix", + width: (SizeConfig.screenWidth / 10) * 6, + margin: EdgeInsets.all(20), + child: Text("Math Puzzle", style: - Theme.of(context).textTheme.display2))), - Expanded( - flex: 7, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - SizedBox( - height: (SizeConfig.screenHeight / 20), - ), - GestureDetector( - onTapDown: (tapDownDetails) { - GetIt.I().navigateTo( - KeyUtil.Home, - arguments: PuzzleType.MATH_PUZZLE); - }, - child: SlideTransition( - position: _offsetLeftEnter, - child: Card( - color: Color(0xFF363636), - elevation: 10, - margin: EdgeInsets.all(10), - child: Container( - alignment: Alignment.center, - width: (SizeConfig.screenWidth / 10) * 6, - margin: EdgeInsets.all(20), - child: Text("Math Puzzle", - style: Theme.of(context) - .textTheme - .headline)), - ), - ), - ), - GestureDetector( - onTapDown: (tapDownDetails) { - GetIt.I().navigateTo( - KeyUtil.Home, - arguments: PuzzleType.MEMORY_PUZZLE); - }, - child: SlideTransition( - position: _offsetRightEnter, - child: Card( - color: Color(0xFF363636), - elevation: 10, - margin: EdgeInsets.all(10), - child: Container( - alignment: Alignment.center, - width: (SizeConfig.screenWidth / 10) * 6, - margin: EdgeInsets.all(20), - child: Text("Memory Puzzle", - style: Theme.of(context) - .textTheme - .headline)), - ), - ), - ), - GestureDetector( - onTapDown: (tapDownDetails) { - GetIt.I().navigateTo( - KeyUtil.Home, - arguments: PuzzleType.BRAIN_PUZZLE); - }, - child: SlideTransition( - position: _offsetLeftEnter, - child: Card( - color: Color(0xFF363636), - elevation: 10, - margin: EdgeInsets.all(10), - child: Container( - alignment: Alignment.center, - width: (SizeConfig.screenWidth / 10) * 6, - margin: EdgeInsets.all(20), - child: Text("Train Your Brain", - style: Theme.of(context) - .textTheme - .headline)), - ), - ), - ) - ], + Theme.of(context).textTheme.headline4)), ), ), - ], - ), - )), + ), + GestureDetector( + onTapDown: (tapDownDetails) { + GetIt.I().navigateTo(KeyUtil.Home, + arguments: PuzzleType.MEMORY_PUZZLE); + }, + child: SlideTransition( + position: _offsetRightEnter, + child: Card( + color: Color(0xFF363636), + elevation: 10, + margin: EdgeInsets.all(10), + child: Container( + alignment: Alignment.center, + width: (SizeConfig.screenWidth / 10) * 6, + margin: EdgeInsets.all(20), + child: Text("Memory Puzzle", + style: + Theme.of(context).textTheme.headline4)), + ), + ), + ), + GestureDetector( + onTapDown: (tapDownDetails) { + GetIt.I().navigateTo(KeyUtil.Home, + arguments: PuzzleType.BRAIN_PUZZLE); + }, + child: SlideTransition( + position: _offsetLeftEnter, + child: Card( + color: Color(0xFF363636), + elevation: 10, + margin: EdgeInsets.all(10), + child: Container( + alignment: Alignment.center, + width: (SizeConfig.screenWidth / 10) * 6, + margin: EdgeInsets.all(20), + child: Text("Train Your Brain", + style: + Theme.of(context).textTheme.headline4)), + ), + ), + ) + ], + ), + ), + ], + ), + ), ), ); } diff --git a/lib/src/ui/dashboard/dashboard_view_model.dart b/lib/src/ui/dashboard/dashboard_view_model.dart old mode 100644 new mode 100755 index a1581f1..3bed677 --- a/lib/src/ui/dashboard/dashboard_view_model.dart +++ b/lib/src/ui/dashboard/dashboard_view_model.dart @@ -3,7 +3,6 @@ import 'dart:convert'; import 'package:flutter/widgets.dart'; import 'package:mathgame/src/data/models/score_board.dart'; import 'package:mathgame/src/core/app_constant.dart'; -import 'package:mathgame/src/core/app_constant.dart'; import 'package:shared_preferences/shared_preferences.dart'; import '../../data/models/game_category.dart'; @@ -12,26 +11,21 @@ class DashboardViewModel extends ChangeNotifier { int _overallScore = 0; int _totalCoin = 0; List _list; - SharedPreferences _preferences; + final SharedPreferences preferences; int get overallScore => _overallScore; int get totalCoin => _totalCoin; List get list => _list; - - SharedPreferences get preferences => _preferences; - - Future initialise() async { - _preferences = await SharedPreferences.getInstance(); + + DashboardViewModel({@required this.preferences}){ _overallScore = getOverallScore(); _totalCoin = getTotalCoin(); - notifyListeners(); } - Future getGameByPuzzleType(PuzzleType puzzleType) async { + List getGameByPuzzleType(PuzzleType puzzleType) { _list = List(); - switch (puzzleType) { case PuzzleType.MATH_PUZZLE: list.add(GameCategory( @@ -112,15 +106,16 @@ class DashboardViewModel extends ChangeNotifier { getScoreboard("number_pyramid"))); break; } + return _list; } ScoreBoard getScoreboard(String gameCategoryType) { return ScoreBoard.fromJson( - json.decode(_preferences.getString(gameCategoryType) ?? "{}")); + json.decode(preferences.getString(gameCategoryType) ?? "{}")); } void setScoreboard(String gameCategoryType, ScoreBoard scoreboard) { - _preferences.setString(gameCategoryType, json.encode(scoreboard.toJson())); + preferences.setString(gameCategoryType, json.encode(scoreboard.toJson())); } void updateScoreboard( @@ -141,21 +136,21 @@ class DashboardViewModel extends ChangeNotifier { } int getOverallScore() { - return _preferences.getInt("overall_score") ?? 0; + return preferences.getInt("overall_score") ?? 0; } void setOverallScore(int highestScore, int newScore) { _overallScore = getOverallScore() - highestScore + newScore; - _preferences.setInt("overall_score", _overallScore); + preferences.setInt("overall_score", _overallScore); } int getTotalCoin() { - return _preferences.getInt("total_coin") ?? 0; + return preferences.getInt("total_coin") ?? 0; } void setTotalCoin(int coin) { _totalCoin = getTotalCoin() + coin; - _preferences.setInt("total_coin", _totalCoin); + preferences.setInt("total_coin", _totalCoin); } bool isFirstTime(GameCategoryType gameCategoryType) { diff --git a/lib/src/ui/home.dart b/lib/src/ui/home.dart old mode 100644 new mode 100755 index 2e7f75b..e4b0ee4 --- a/lib/src/ui/home.dart +++ b/lib/src/ui/home.dart @@ -3,10 +3,10 @@ import 'package:flutter/material.dart'; import 'package:get_it/get_it.dart'; import 'package:mathgame/src/core/app_constant.dart'; import 'package:mathgame/src/service/navigation_service.dart'; -import 'package:provider_architecture/provider_architecture.dart'; - import 'package:mathgame/src/ui/dashboard/dashboard_view_model.dart'; +import 'package:provider/provider.dart'; + class MyHomePage extends StatelessWidget { final PuzzleType puzzleType; final String title; @@ -40,164 +40,146 @@ class MyHomePage extends StatelessWidget { alignment: Alignment.center, child: FittedBox( child: Text(title, - style: Theme.of(context).textTheme.display2), + style: Theme.of(context).textTheme.headline2), )), ), Expanded( flex: 70, - child: ViewModelProvider.withConsumer( - onModelReady: (model) => - model.getGameByPuzzleType(puzzleType), - disposeViewModel: false, - viewModelBuilder: () => GetIt.I(), - builder: (context, model, child) => GridView.builder( - padding: EdgeInsets.only(bottom: 20.0), - itemBuilder: (BuildContext context, int index) { - return GestureDetector( - onTap: () { - GetIt.I().navigateTo( - model.list[index].routePath); - }, - child: Container( - margin: EdgeInsets.fromLTRB(40, 5, 40, 5), - child: Card( - color: Color(0xFF363636), - elevation: 10, - shape: RoundedRectangleBorder( - borderRadius: - BorderRadius.circular(5), - ), - child: Container( - decoration: BoxDecoration( - borderRadius: - BorderRadius.circular(5)), - child: Column( - children: [ - Expanded( - flex: 4, - child: Container( - decoration: BoxDecoration( + child: GridView( + padding: EdgeInsets.only(bottom: 20.0), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + childAspectRatio: 3.3, crossAxisCount: 1), + children: Provider.of(context) + .getGameByPuzzleType(puzzleType) + .map((e) => GestureDetector( + onTap: () { + GetIt.I() + .navigateTo(e.routePath); + }, + child: Container( + margin: EdgeInsets.fromLTRB(40, 5, 40, 5), + child: Card( + color: Color(0xFF363636), + elevation: 10, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(5), + ), + child: Container( + decoration: BoxDecoration( + borderRadius: + BorderRadius.circular(5)), + child: Column( + children: [ + Expanded( + flex: 4, + child: Container( + decoration: BoxDecoration( // color: Colors.pink[300], - borderRadius: - BorderRadius.only( - topLeft: Radius - .circular( - 20), - topRight: Radius - .circular( - 20), - bottomLeft: - Radius.zero, - bottomRight: - Radius - .zero)), - alignment: Alignment.center, - constraints: - BoxConstraints.expand(), - child: Text( - model.list[index].name, - style: Theme.of(context) - .textTheme - .title, - )), - ), - Expanded( - flex: 6, - child: Container( + borderRadius: + BorderRadius.only( + topLeft: Radius + .circular(20), + topRight: Radius + .circular(20), + bottomLeft: + Radius.zero, + bottomRight: + Radius.zero)), + alignment: Alignment.center, constraints: BoxConstraints.expand(), - child: Column( - mainAxisAlignment: - MainAxisAlignment - .center, - mainAxisSize: - MainAxisSize.max, - children: [ - Expanded( - flex: 1, - child: Row( - children: [ - Expanded( - flex: 1, - child: Center( - child: Text( - "Score", - style: Theme.of( - context) - .textTheme - .subhead), - ), + child: Text( + e.name, + style: Theme.of(context) + .textTheme + .subtitle1, + )), + ), + Expanded( + flex: 6, + child: Container( + constraints: + BoxConstraints.expand(), + child: Column( + mainAxisAlignment: + MainAxisAlignment.center, + mainAxisSize: + MainAxisSize.max, + children: [ + Expanded( + flex: 1, + child: Row( + children: [ + Expanded( + flex: 1, + child: Center( + child: Text( + "Score", + style: Theme.of( + context) + .textTheme + .subtitle2), ), - Expanded( - flex: 1, - child: Center( - child: Text( - model - .list[ - index] - .scoreboard - .highestScore - .toString(), - style: Theme.of( - context) - .textTheme - .subhead), - ), - ) - ], - ), - ), - Expanded( - flex: 1, - child: Row( - children: [ - Expanded( - flex: 1, - child: Center( - child: Text( - "Coin", - style: Theme.of( - context) - .textTheme - .subhead), - ), + ), + Expanded( + flex: 1, + child: Center( + child: Text( + e.scoreboard + .highestScore + .toString(), + style: Theme.of( + context) + .textTheme + .subtitle2), ), - Expanded( - flex: 1, - child: Center( - child: Text( - model - .list[ - index] - .scoreboard - .coin - .toString(), - style: Theme.of( - context) - .textTheme - .subhead), - ), - ) - ], - ), + ) + ], ), - ], - ), + ), + Expanded( + flex: 1, + child: Row( + children: [ + Expanded( + flex: 1, + child: Center( + child: Text( + "Coin", + style: Theme.of( + context) + .textTheme + .subtitle2), + ), + ), + Expanded( + flex: 1, + child: Center( + child: Text( + e.scoreboard + .coin + .toString(), + style: Theme.of( + context) + .textTheme + .subtitle2), + ), + ) + ], + ), + ), + ], ), - ) - ], - ), + ), + ) + ], ), ), ), - ); - }, - itemCount: model.list.length, - gridDelegate: - SliverGridDelegateWithFixedCrossAxisCount( - childAspectRatio: 3.3, - crossAxisCount: 1), - )), + ), + )) + .toList(), + ), ), Expanded( flex: 10, diff --git a/lib/src/ui/magicTriangle/magic_triangle_view.dart b/lib/src/ui/magicTriangle/magic_triangle_view.dart old mode 100644 new mode 100755 index ba5c3ec..177d864 --- a/lib/src/ui/magicTriangle/magic_triangle_view.dart +++ b/lib/src/ui/magicTriangle/magic_triangle_view.dart @@ -45,7 +45,7 @@ class MagicTriangleView extends StatelessWidget { Text( magicTriangleProvider.currentState.answer .toString(), - style: Theme.of(context).textTheme.display1) + style: Theme.of(context).textTheme.headline1) ], ), ), diff --git a/lib/src/ui/magicTriangle/magic_triangle_view_model.dart b/lib/src/ui/magicTriangle/magic_triangle_view_model.dart old mode 100644 new mode 100755 diff --git a/lib/src/ui/magicTriangle/triangle_3x3.dart b/lib/src/ui/magicTriangle/triangle_3x3.dart old mode 100644 new mode 100755 diff --git a/lib/src/ui/magicTriangle/triangle_4x4.dart b/lib/src/ui/magicTriangle/triangle_4x4.dart old mode 100644 new mode 100755 diff --git a/lib/src/ui/magicTriangle/triangle_button.dart b/lib/src/ui/magicTriangle/triangle_button.dart old mode 100644 new mode 100755 index ce2cb86..2a9b69e --- a/lib/src/ui/magicTriangle/triangle_button.dart +++ b/lib/src/ui/magicTriangle/triangle_button.dart @@ -33,7 +33,7 @@ class TriangleButton extends StatelessWidget { magicTriangleProvider.checkResult(index, digit); }, child: - Text(digit.value, style: Theme.of(context).textTheme.headline), + Text(digit.value, style: Theme.of(context).textTheme.headline1), ), ), ), diff --git a/lib/src/ui/magicTriangle/triangle_input_3x3.dart b/lib/src/ui/magicTriangle/triangle_input_3x3.dart old mode 100644 new mode 100755 diff --git a/lib/src/ui/magicTriangle/triangle_input_4x4.dart b/lib/src/ui/magicTriangle/triangle_input_4x4.dart old mode 100644 new mode 100755 diff --git a/lib/src/ui/magicTriangle/triangle_input_button.dart b/lib/src/ui/magicTriangle/triangle_input_button.dart old mode 100644 new mode 100755 index aa85f00..35ba945 --- a/lib/src/ui/magicTriangle/triangle_input_button.dart +++ b/lib/src/ui/magicTriangle/triangle_input_button.dart @@ -31,7 +31,7 @@ class TriangleInputButton extends StatelessWidget { child: Center( child: Text( input.value, - style: Theme.of(context).textTheme.headline, + style: Theme.of(context).textTheme.headline1, ), )), ), diff --git a/lib/src/ui/magicTriangle/triangle_painter.dart b/lib/src/ui/magicTriangle/triangle_painter.dart old mode 100644 new mode 100755 diff --git a/lib/src/ui/mathGrid/math_grid_button.dart b/lib/src/ui/mathGrid/math_grid_button.dart old mode 100644 new mode 100755 index 8785666..bc71190 --- a/lib/src/ui/mathGrid/math_grid_button.dart +++ b/lib/src/ui/mathGrid/math_grid_button.dart @@ -25,7 +25,7 @@ class MathGridButton extends StatelessWidget { mathGridProvider.checkResult(value, gridModel); }, child: Center( - child: Text(value.toString(), style: Theme.of(context).textTheme.subhead), + child: Text(value.toString(), style: Theme.of(context).textTheme.subtitle2), ), ), ), diff --git a/lib/src/ui/mathGrid/math_grid_view.dart b/lib/src/ui/mathGrid/math_grid_view.dart old mode 100644 new mode 100755 index 1c0cb3b..b578881 --- a/lib/src/ui/mathGrid/math_grid_view.dart +++ b/lib/src/ui/mathGrid/math_grid_view.dart @@ -35,7 +35,7 @@ class MathGridView extends StatelessWidget { Text( mathGridProvider.currentState.currentAnswer .toString(), - style: Theme.of(context).textTheme.display1) + style: Theme.of(context).textTheme.headline1) ], ), ), diff --git a/lib/src/ui/mathGrid/math_grid_view_model.dart b/lib/src/ui/mathGrid/math_grid_view_model.dart old mode 100644 new mode 100755 diff --git a/lib/src/ui/mathPairs/math_pairs_button.dart b/lib/src/ui/mathPairs/math_pairs_button.dart old mode 100644 new mode 100755 index 76c39ea..de2779a --- a/lib/src/ui/mathPairs/math_pairs_button.dart +++ b/lib/src/ui/mathPairs/math_pairs_button.dart @@ -38,7 +38,7 @@ class MathPairsButton extends StatelessWidget { fit: BoxFit.contain, child: Text( mathPairs.text, - style: Theme.of(context).textTheme.headline, + style: Theme.of(context).textTheme.headline1, ), ), ), diff --git a/lib/src/ui/mathPairs/math_pairs_view.dart b/lib/src/ui/mathPairs/math_pairs_view.dart old mode 100644 new mode 100755 diff --git a/lib/src/ui/mathPairs/math_pairs_view_model.dart b/lib/src/ui/mathPairs/math_pairs_view_model.dart old mode 100644 new mode 100755 diff --git a/lib/src/ui/mentalArithmetic/mental_arithmetic_button.dart b/lib/src/ui/mentalArithmetic/mental_arithmetic_button.dart old mode 100644 new mode 100755 diff --git a/lib/src/ui/mentalArithmetic/mental_arithmetic_view.dart b/lib/src/ui/mentalArithmetic/mental_arithmetic_view.dart old mode 100644 new mode 100755 index d67548f..054467a --- a/lib/src/ui/mentalArithmetic/mental_arithmetic_view.dart +++ b/lib/src/ui/mentalArithmetic/mental_arithmetic_view.dart @@ -32,7 +32,7 @@ class MentalArithmeticView extends StatelessWidget { child: Center( child: Text( provider.currentState.currentQuestion, - style: Theme.of(context).textTheme.display1, + style: Theme.of(context).textTheme.headline1, ), )); }), diff --git a/lib/src/ui/mentalArithmetic/mental_arithmetic_view_model.dart b/lib/src/ui/mentalArithmetic/mental_arithmetic_view_model.dart old mode 100644 new mode 100755 diff --git a/lib/src/ui/numberPyramid/number_pyramid_box.dart b/lib/src/ui/numberPyramid/number_pyramid_box.dart old mode 100644 new mode 100755 index 8ac9770..958108a --- a/lib/src/ui/numberPyramid/number_pyramid_box.dart +++ b/lib/src/ui/numberPyramid/number_pyramid_box.dart @@ -42,7 +42,7 @@ class PyramidNumberBox extends StatelessWidget { numPyramidCellModel.isHidden ? numPyramidCellModel.text : numPyramidCellModel.numberOnCell.toString(), - style: Theme.of(context).textTheme.title, + style: Theme.of(context).textTheme.subtitle1, ), ), ); diff --git a/lib/src/ui/numberPyramid/number_pyramid_button.dart b/lib/src/ui/numberPyramid/number_pyramid_button.dart old mode 100644 new mode 100755 index 9076289..3fcff7e --- a/lib/src/ui/numberPyramid/number_pyramid_button.dart +++ b/lib/src/ui/numberPyramid/number_pyramid_button.dart @@ -33,7 +33,7 @@ class PyramidNumberButton extends StatelessWidget { child: Center( child: Text( text, - style: Theme.of(context).textTheme.headline, + style: Theme.of(context).textTheme.headline1, ), ), ), diff --git a/lib/src/ui/numberPyramid/number_pyramid_view.dart b/lib/src/ui/numberPyramid/number_pyramid_view.dart old mode 100644 new mode 100755 diff --git a/lib/src/ui/numberPyramid/number_pyramid_view_model.dart b/lib/src/ui/numberPyramid/number_pyramid_view_model.dart old mode 100644 new mode 100755 diff --git a/lib/src/ui/picturePuzzle/circle_shape.dart b/lib/src/ui/picturePuzzle/circle_shape.dart old mode 100644 new mode 100755 diff --git a/lib/src/ui/picturePuzzle/picture_puzzle_answer_button.dart b/lib/src/ui/picturePuzzle/picture_puzzle_answer_button.dart old mode 100644 new mode 100755 index 018f9dd..4f8eb05 --- a/lib/src/ui/picturePuzzle/picture_puzzle_answer_button.dart +++ b/lib/src/ui/picturePuzzle/picture_puzzle_answer_button.dart @@ -35,7 +35,7 @@ class PicturePuzzleAnswerButton extends StatelessWidget { child: Center( child: Text( text, - style: Theme.of(context).textTheme.headline, + style: Theme.of(context).textTheme.headline1, ), ), ), diff --git a/lib/src/ui/picturePuzzle/picture_puzzle_button.dart b/lib/src/ui/picturePuzzle/picture_puzzle_button.dart old mode 100644 new mode 100755 index f54d176..7c0e36f --- a/lib/src/ui/picturePuzzle/picture_puzzle_button.dart +++ b/lib/src/ui/picturePuzzle/picture_puzzle_button.dart @@ -19,7 +19,7 @@ class PicturePuzzleButton extends StatelessWidget { child: Center( child: Text( picturePuzzleShape.text, - style: Theme.of(context).textTheme.headline, + style: Theme.of(context).textTheme.headline1, ), ), ) diff --git a/lib/src/ui/picturePuzzle/picture_puzzle_view.dart b/lib/src/ui/picturePuzzle/picture_puzzle_view.dart old mode 100644 new mode 100755 index 0883b9b..93f9886 --- a/lib/src/ui/picturePuzzle/picture_puzzle_view.dart +++ b/lib/src/ui/picturePuzzle/picture_puzzle_view.dart @@ -79,7 +79,7 @@ class PicturePuzzleView extends StatelessWidget { builder: (context, provider, child) { return Text( provider.result, - style: Theme.of(context).textTheme.display1, + style: Theme.of(context).textTheme.headline1, ); }, ), diff --git a/lib/src/ui/picturePuzzle/picture_puzzle_view_model.dart b/lib/src/ui/picturePuzzle/picture_puzzle_view_model.dart old mode 100644 new mode 100755 diff --git a/lib/src/ui/picturePuzzle/square_shape.dart b/lib/src/ui/picturePuzzle/square_shape.dart old mode 100644 new mode 100755 diff --git a/lib/src/ui/picturePuzzle/triangle_shape.dart b/lib/src/ui/picturePuzzle/triangle_shape.dart old mode 100644 new mode 100755 diff --git a/lib/src/ui/quickCalculation/quick_calculation_button.dart b/lib/src/ui/quickCalculation/quick_calculation_button.dart old mode 100644 new mode 100755 index 68a53f8..ada5589 --- a/lib/src/ui/quickCalculation/quick_calculation_button.dart +++ b/lib/src/ui/quickCalculation/quick_calculation_button.dart @@ -35,8 +35,8 @@ class QuickCalculationButton extends StatelessWidget { child: Text( text, style: text == "CLEAR" - ? Theme.of(context).textTheme.display1 - : Theme.of(context).textTheme.display1, + ? Theme.of(context).textTheme.headline1 + : Theme.of(context).textTheme.headline1, ), ), ), diff --git a/lib/src/ui/quickCalculation/quick_calculation_view.dart b/lib/src/ui/quickCalculation/quick_calculation_view.dart old mode 100644 new mode 100755 index 45b4370..8f70f98 --- a/lib/src/ui/quickCalculation/quick_calculation_view.dart +++ b/lib/src/ui/quickCalculation/quick_calculation_view.dart @@ -56,16 +56,16 @@ class QuickCalculationView extends StatelessWidget { Text(data.question, style: Theme.of(context) .textTheme - .headline), + .headline1), Text(" = ", style: Theme.of(context) .textTheme - .headline), + .headline1), Text( data.userAnswer, style: Theme.of(context) .textTheme - .headline, + .headline1, ) ], ); diff --git a/lib/src/ui/quickCalculation/quick_calculation_view_model.dart b/lib/src/ui/quickCalculation/quick_calculation_view_model.dart old mode 100644 new mode 100755 diff --git a/lib/src/ui/squareRoot/square_root_button.dart b/lib/src/ui/squareRoot/square_root_button.dart old mode 100644 new mode 100755 index 706ba38..398d0bf --- a/lib/src/ui/squareRoot/square_root_button.dart +++ b/lib/src/ui/squareRoot/square_root_button.dart @@ -30,7 +30,7 @@ class SquareRootButton extends StatelessWidget { child: Center( child: Text( text, - style: Theme.of(context).textTheme.display1, + style: Theme.of(context).textTheme.headline1, ), ), ), diff --git a/lib/src/ui/squareRoot/square_root_view.dart b/lib/src/ui/squareRoot/square_root_view.dart old mode 100644 new mode 100755 index d720e69..284fa4c --- a/lib/src/ui/squareRoot/square_root_view.dart +++ b/lib/src/ui/squareRoot/square_root_view.dart @@ -38,7 +38,7 @@ class SquareRootView extends StatelessWidget { visible: !squareRootProvider.pause, child: Text( squareRootProvider.currentState.question, - style: Theme.of(context).textTheme.display1, + style: Theme.of(context).textTheme.headline1, ), ), )), diff --git a/lib/src/ui/squareRoot/square_root_view_model.dart b/lib/src/ui/squareRoot/square_root_view_model.dart old mode 100644 new mode 100755 diff --git a/lib/src/ui/whatsTheSign/sign_button.dart b/lib/src/ui/whatsTheSign/sign_button.dart old mode 100644 new mode 100755 index 63fe197..35b6568 --- a/lib/src/ui/whatsTheSign/sign_button.dart +++ b/lib/src/ui/whatsTheSign/sign_button.dart @@ -30,7 +30,7 @@ class SignButton extends StatelessWidget { child: Center( child: Text( text, - style: Theme.of(context).textTheme.display2, + style: Theme.of(context).textTheme.headline2, ), ), ), diff --git a/lib/src/ui/whatsTheSign/sign_view.dart b/lib/src/ui/whatsTheSign/sign_view.dart old mode 100644 new mode 100755 index 7319dc7..df93c66 --- a/lib/src/ui/whatsTheSign/sign_view.dart +++ b/lib/src/ui/whatsTheSign/sign_view.dart @@ -35,7 +35,7 @@ class SignView extends StatelessWidget { Center( child: Text( signProvider.currentState.firstDigit, - style: Theme.of(context).textTheme.display1, + style: Theme.of(context).textTheme.headline1, ), ), Container( @@ -54,7 +54,7 @@ class SignView extends StatelessWidget { heightFactor: 1, child: Text( signProvider.result, - style: Theme.of(context).textTheme.headline, + style: Theme.of(context).textTheme.headline1, ), ), ), @@ -62,19 +62,19 @@ class SignView extends StatelessWidget { Center( child: Text( signProvider.currentState.secondDigit, - style: Theme.of(context).textTheme.display1, + style: Theme.of(context).textTheme.headline1, ), ), Center( child: Text( " = ", - style: Theme.of(context).textTheme.display1, + style: Theme.of(context).textTheme.headline1, ), ), Center( child: Text( signProvider.currentState.answer, - style: Theme.of(context).textTheme.display1, + style: Theme.of(context).textTheme.headline1, ), ), ], diff --git a/lib/src/ui/whatsTheSign/sign_view_model.dart b/lib/src/ui/whatsTheSign/sign_view_model.dart old mode 100644 new mode 100755 diff --git a/lib/src/utility/dialog_info_util.dart b/lib/src/utility/dialog_info_util.dart old mode 100644 new mode 100755 diff --git a/lib/src/utility/math_util.dart b/lib/src/utility/math_util.dart old mode 100644 new mode 100755 diff --git a/pubspec.yaml b/pubspec.yaml old mode 100644 new mode 100755 index 3d66885..15bac99 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -20,14 +20,13 @@ dependencies: flutter: sdk: flutter cupertino_icons: ^0.1.2 - flutter_svg: ^0.19.1 + flutter_svg: ^1.0.0 get_it: ^4.0.1 - percent_indicator: ^2.1.9+1 + percent_indicator: ^3.4.0 provider: ^4.0.5 - provider_architecture: ^1.0.6 - rflutter_alert: ^1.1.0 - shared_preferences: ^0.5.12+4 - tuple: ^1.0.3 + rflutter_alert: ^2.0.4 + shared_preferences: ^2.0.11 + tuple: ^2.0.0 dev_dependencies: flutter_test: diff --git a/test/widget_test.dart b/test/widget_test.dart old mode 100644 new mode 100755