90 changed files with 2080 additions and 301 deletions
			
			
		- 
					3assets/images/svg/next_level.svg
- 
					3assets/images/svg/sad.svg
- 
					30data/data_core/local_db/local_db_core/.gitignore
- 
					10data/data_core/local_db/local_db_core/.metadata
- 
					3data/data_core/local_db/local_db_core/CHANGELOG.md
- 
					1data/data_core/local_db/local_db_core/LICENSE
- 
					39data/data_core/local_db/local_db_core/README.md
- 
					4data/data_core/local_db/local_db_core/analysis_options.yaml
- 
					25data/data_core/local_db/local_db_core/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
- 
					2data/data_core/local_db/local_db_core/android/local.properties
- 
					14data/data_core/local_db/local_db_core/ios/Flutter/Generated.xcconfig
- 
					13data/data_core/local_db/local_db_core/ios/Flutter/flutter_export_environment.sh
- 
					19data/data_core/local_db/local_db_core/ios/Runner/GeneratedPluginRegistrant.h
- 
					21data/data_core/local_db/local_db_core/ios/Runner/GeneratedPluginRegistrant.m
- 
					75data/data_core/local_db/local_db_core/lib/boxes/box_list/level_box/level_box.dart
- 
					8data/data_core/local_db/local_db_core/lib/boxes/box_list/level_box/level_box_keys.dart
- 
					7data/data_core/local_db/local_db_core/lib/boxes/interfaces/base_box_interface.dart
- 
					1data/data_core/local_db/local_db_core/linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux
- 
					11data/data_core/local_db/local_db_core/linux/flutter/generated_plugin_registrant.cc
- 
					15data/data_core/local_db/local_db_core/linux/flutter/generated_plugin_registrant.h
- 
					23data/data_core/local_db/local_db_core/linux/flutter/generated_plugins.cmake
- 
					12data/data_core/local_db/local_db_core/macos/Flutter/GeneratedPluginRegistrant.swift
- 
					11data/data_core/local_db/local_db_core/macos/Flutter/ephemeral/Flutter-Generated.xcconfig
- 
					12data/data_core/local_db/local_db_core/macos/Flutter/ephemeral/flutter_export_environment.sh
- 
					23data/data_core/local_db/local_db_core/pubspec.yaml
- 
					11data/data_core/local_db/local_db_core/windows/flutter/generated_plugin_registrant.cc
- 
					15data/data_core/local_db/local_db_core/windows/flutter/generated_plugin_registrant.h
- 
					23data/data_core/local_db/local_db_core/windows/flutter/generated_plugins.cmake
- 
					30data/data_types/types/.gitignore
- 
					10data/data_types/types/.metadata
- 
					3data/data_types/types/CHANGELOG.md
- 
					1data/data_types/types/LICENSE
- 
					39data/data_types/types/README.md
- 
					4data/data_types/types/analysis_options.yaml
- 
					25data/data_types/types/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
- 
					2data/data_types/types/android/local.properties
- 
					14data/data_types/types/ios/Flutter/Generated.xcconfig
- 
					13data/data_types/types/ios/Flutter/flutter_export_environment.sh
- 
					19data/data_types/types/ios/Runner/GeneratedPluginRegistrant.h
- 
					21data/data_types/types/ios/Runner/GeneratedPluginRegistrant.m
- 
					83data/data_types/types/lib/level_data/interface/level_box_repository_impl.dart
- 
					1data/data_types/types/linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux
- 
					11data/data_types/types/linux/flutter/generated_plugin_registrant.cc
- 
					15data/data_types/types/linux/flutter/generated_plugin_registrant.h
- 
					23data/data_types/types/linux/flutter/generated_plugins.cmake
- 
					12data/data_types/types/macos/Flutter/GeneratedPluginRegistrant.swift
- 
					11data/data_types/types/macos/Flutter/ephemeral/Flutter-Generated.xcconfig
- 
					12data/data_types/types/macos/Flutter/ephemeral/flutter_export_environment.sh
- 
					22data/data_types/types/pubspec.yaml
- 
					11data/data_types/types/windows/flutter/generated_plugin_registrant.cc
- 
					15data/data_types/types/windows/flutter/generated_plugin_registrant.h
- 
					23data/data_types/types/windows/flutter/generated_plugins.cmake
- 
					30domain/repositories/.gitignore
- 
					10domain/repositories/.metadata
- 
					3domain/repositories/CHANGELOG.md
- 
					1domain/repositories/LICENSE
- 
					39domain/repositories/README.md
- 
					4domain/repositories/analysis_options.yaml
- 
					25domain/repositories/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
- 
					19domain/repositories/ios/Runner/GeneratedPluginRegistrant.h
- 
					21domain/repositories/ios/Runner/GeneratedPluginRegistrant.m
- 
					49domain/repositories/lib/level_box_domain/adapter/level_model_adapter.dart
- 
					37domain/repositories/lib/level_box_domain/model/level_model.dart
- 
					11domain/repositories/lib/level_box_domain/repository/level_box_repository.dart
- 
					11domain/repositories/linux/flutter/generated_plugin_registrant.cc
- 
					15domain/repositories/linux/flutter/generated_plugin_registrant.h
- 
					23domain/repositories/linux/flutter/generated_plugins.cmake
- 
					12domain/repositories/macos/Flutter/GeneratedPluginRegistrant.swift
- 
					11domain/repositories/macos/Flutter/ephemeral/Flutter-Generated.xcconfig
- 
					12domain/repositories/macos/Flutter/ephemeral/flutter_export_environment.sh
- 
					18domain/repositories/pubspec.yaml
- 
					11domain/repositories/windows/flutter/generated_plugin_registrant.cc
- 
					15domain/repositories/windows/flutter/generated_plugin_registrant.h
- 
					23domain/repositories/windows/flutter/generated_plugins.cmake
- 
					25lib/initializer.dart
- 
					22lib/main.dart
- 
					31lib/screens/level_list/cubit/level_list_cubit.dart
- 
					176lib/screens/level_list/screen/level_list_screen.dart
- 
					4lib/screens/level_list/widgets/level_widget.dart
- 
					4lib/screens/level_list/widgets/lock_level_widget.dart
- 
					11lib/screens/level_list/widgets/payed_level_widget.dart
- 
					221lib/screens/lose/lose_screen.dart
- 
					278lib/screens/photo/photo_screen_large.dart
- 
					7lib/screens/splash/screen/splash_screen.dart
- 
					235lib/screens/win/win_screen.dart
- 
					2lib/utils/toast.dart
- 
					60lib/widgets/solo_screen/moves_tiles_widget.dart
- 
					6lib/widgets/solo_screen/moves_tiles_widget/moves_tiles_text.dart
- 
					39pubspec.lock
- 
					6pubspec.yaml
| @ -0,0 +1,3 @@ | |||
| <svg xmlns="http://www.w3.org/2000/svg" width="12.028" height="11.723" viewBox="0 0 12.028 11.723"> | |||
|   <path id="Icon_awesome-arrow-right" data-name="Icon awesome-arrow-right" d="M5.114,3.432l.6-.6a.642.642,0,0,1,.91,0l5.219,5.216a.642.642,0,0,1,0,.91L6.62,14.181a.642.642,0,0,1-.91,0l-.6-.6a.645.645,0,0,1,.011-.921L8.36,9.583H.644A.643.643,0,0,1,0,8.938V8.079a.643.643,0,0,1,.644-.644H8.36L5.125,4.353A.64.64,0,0,1,5.114,3.432Z" transform="translate(0 -2.647)" fill="#ff9c00"/> | |||
| </svg> | |||
| @ -0,0 +1,3 @@ | |||
| <svg xmlns="http://www.w3.org/2000/svg" width="29.25" height="29.25" viewBox="0 0 29.25 29.25"> | |||
|   <path id="Icon_ionic-ios-sad" data-name="Icon ionic-ios-sad" d="M18,3.375A14.625,14.625,0,1,0,32.625,18,14.623,14.623,0,0,0,18,3.375ZM12.8,14.07a1.69,1.69,0,1,1-1.547,1.547A1.691,1.691,0,0,1,12.8,14.07Zm-.049,10.68a1.127,1.127,0,0,1-1.034-1.575,6.844,6.844,0,0,1,12.558,0,1.124,1.124,0,0,1-1.034,1.575,50.671,50.671,0,0,0-5.14-.281C15.4,24.469,12.755,24.75,12.755,24.75ZM23.2,17.43a1.69,1.69,0,1,1,1.547-1.547A1.691,1.691,0,0,1,23.2,17.43Z" transform="translate(-3.375 -3.375)" fill="#fff"/> | |||
| </svg> | |||
| @ -0,0 +1,30 @@ | |||
| # Miscellaneous | |||
| *.class | |||
| *.log | |||
| *.pyc | |||
| *.swp | |||
| .DS_Store | |||
| .atom/ | |||
| .buildlog/ | |||
| .history | |||
| .svn/ | |||
| migrate_working_dir/ | |||
| 
 | |||
| # IntelliJ related | |||
| *.iml | |||
| *.ipr | |||
| *.iws | |||
| .idea/ | |||
| 
 | |||
| # The .vscode folder contains launch configuration and tasks you configure in | |||
| # VS Code which you may wish to be included in version control, so this line | |||
| # is commented out by default. | |||
| #.vscode/ | |||
| 
 | |||
| # Flutter/Dart/Pub related | |||
| # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. | |||
| /pubspec.lock | |||
| **/doc/api/ | |||
| .dart_tool/ | |||
| .packages | |||
| build/ | |||
| @ -0,0 +1,10 @@ | |||
| # This file tracks properties of this Flutter project. | |||
| # Used by Flutter tool to assess capabilities and perform upgrades etc. | |||
| # | |||
| # This file should be version controlled and should not be manually edited. | |||
| 
 | |||
| version: | |||
|   revision: b4bce91dd0f168179d46a7ae5eceb3572ba9637a | |||
|   channel: stable | |||
| 
 | |||
| project_type: package | |||
| @ -0,0 +1,3 @@ | |||
| ## 0.0.1 | |||
| 
 | |||
| * TODO: Describe initial release. | |||
| @ -0,0 +1 @@ | |||
| TODO: Add your license here. | |||
| @ -0,0 +1,39 @@ | |||
| <!-- | |||
| This README describes the package. If you publish this package to pub.dev, | |||
| this README's contents appear on the landing page for your package. | |||
| 
 | |||
| For information about how to write a good package README, see the guide for | |||
| [writing package pages](https://dart.dev/guides/libraries/writing-package-pages). | |||
| 
 | |||
| For general information about developing packages, see the Dart guide for | |||
| [creating packages](https://dart.dev/guides/libraries/create-library-packages) | |||
| and the Flutter guide for | |||
| [developing packages and plugins](https://flutter.dev/developing-packages). | |||
| --> | |||
| 
 | |||
| TODO: Put a short description of the package here that helps potential users | |||
| know whether this package might be useful for them. | |||
| 
 | |||
| ## Features | |||
| 
 | |||
| TODO: List what your package can do. Maybe include images, gifs, or videos. | |||
| 
 | |||
| ## Getting started | |||
| 
 | |||
| TODO: List prerequisites and provide or point to information on how to | |||
| start using the package. | |||
| 
 | |||
| ## Usage | |||
| 
 | |||
| TODO: Include short and useful examples for package users. Add longer examples | |||
| to `/example` folder. | |||
| 
 | |||
| ```dart | |||
| const like = 'sample'; | |||
| ``` | |||
| 
 | |||
| ## Additional information | |||
| 
 | |||
| TODO: Tell users more about the package: where to find more information, how to | |||
| contribute to the package, how to file issues, what response they can expect | |||
| from the package authors, and more. | |||
| @ -0,0 +1,4 @@ | |||
| include: package:flutter_lints/flutter.yaml | |||
| 
 | |||
| # Additional information about this file can be found at | |||
| # https://dart.dev/guides/language/analysis-options | |||
| @ -0,0 +1,25 @@ | |||
| package io.flutter.plugins; | |||
| 
 | |||
| import io.flutter.plugin.common.PluginRegistry; | |||
| import io.flutter.plugins.pathprovider.PathProviderPlugin; | |||
| 
 | |||
| /** | |||
|  * Generated file. Do not edit. | |||
|  */ | |||
| public final class GeneratedPluginRegistrant { | |||
|   public static void registerWith(PluginRegistry registry) { | |||
|     if (alreadyRegisteredWith(registry)) { | |||
|       return; | |||
|     } | |||
|     PathProviderPlugin.registerWith(registry.registrarFor("io.flutter.plugins.pathprovider.PathProviderPlugin")); | |||
|   } | |||
| 
 | |||
|   private static boolean alreadyRegisteredWith(PluginRegistry registry) { | |||
|     final String key = GeneratedPluginRegistrant.class.getCanonicalName(); | |||
|     if (registry.hasPlugin(key)) { | |||
|       return true; | |||
|     } | |||
|     registry.registrarFor(key); | |||
|     return false; | |||
|   } | |||
| } | |||
| @ -0,0 +1,2 @@ | |||
| sdk.dir=C:\\Work\\Tools\\Sdk | |||
| flutter.sdk=C:\\Work\\Tools\\flutter | |||
| @ -0,0 +1,14 @@ | |||
| // This is a generated file; do not edit or check into version control. | |||
| FLUTTER_ROOT=C:\Work\Tools\flutter | |||
| FLUTTER_APPLICATION_PATH=C:\Users\user1\StudioProjects\habib_kids\data\data_core\local_db\local_db_core | |||
| COCOAPODS_PARALLEL_CODE_SIGN=true | |||
| FLUTTER_TARGET=lib\main.dart | |||
| FLUTTER_BUILD_DIR=build | |||
| FLUTTER_BUILD_NAME=1.0.0 | |||
| FLUTTER_BUILD_NUMBER=1 | |||
| EXCLUDED_ARCHS[sdk=iphonesimulator*]=i386 | |||
| EXCLUDED_ARCHS[sdk=iphoneos*]=armv7 | |||
| DART_OBFUSCATION=false | |||
| TRACK_WIDGET_CREATION=true | |||
| TREE_SHAKE_ICONS=false | |||
| PACKAGE_CONFIG=.dart_tool/package_config.json | |||
| @ -0,0 +1,13 @@ | |||
| #!/bin/sh | |||
| # This is a generated file; do not edit or check into version control. | |||
| export "FLUTTER_ROOT=C:\Work\Tools\flutter" | |||
| export "FLUTTER_APPLICATION_PATH=C:\Users\user1\StudioProjects\habib_kids\data\data_core\local_db\local_db_core" | |||
| export "COCOAPODS_PARALLEL_CODE_SIGN=true" | |||
| export "FLUTTER_TARGET=lib\main.dart" | |||
| export "FLUTTER_BUILD_DIR=build" | |||
| export "FLUTTER_BUILD_NAME=1.0.0" | |||
| export "FLUTTER_BUILD_NUMBER=1" | |||
| export "DART_OBFUSCATION=false" | |||
| export "TRACK_WIDGET_CREATION=true" | |||
| export "TREE_SHAKE_ICONS=false" | |||
| export "PACKAGE_CONFIG=.dart_tool/package_config.json" | |||
| @ -0,0 +1,19 @@ | |||
| // | |||
| //  Generated file. Do not edit. | |||
| // | |||
| 
 | |||
| // clang-format off | |||
| 
 | |||
| #ifndef GeneratedPluginRegistrant_h | |||
| #define GeneratedPluginRegistrant_h | |||
| 
 | |||
| #import <Flutter/Flutter.h> | |||
| 
 | |||
| NS_ASSUME_NONNULL_BEGIN | |||
| 
 | |||
| @interface GeneratedPluginRegistrant : NSObject | |||
| + (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry; | |||
| @end | |||
| 
 | |||
| NS_ASSUME_NONNULL_END | |||
| #endif /* GeneratedPluginRegistrant_h */ | |||
| @ -0,0 +1,21 @@ | |||
| // | |||
| //  Generated file. Do not edit. | |||
| // | |||
| 
 | |||
| // clang-format off | |||
| 
 | |||
| #import "GeneratedPluginRegistrant.h" | |||
| 
 | |||
| #if __has_include(<path_provider_foundation/PathProviderPlugin.h>) | |||
| #import <path_provider_foundation/PathProviderPlugin.h> | |||
| #else | |||
| @import path_provider_foundation; | |||
| #endif | |||
| 
 | |||
| @implementation GeneratedPluginRegistrant | |||
| 
 | |||
| + (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry { | |||
|   [PathProviderPlugin registerWithRegistrar:[registry registrarForPlugin:@"PathProviderPlugin"]]; | |||
| } | |||
| 
 | |||
| @end | |||
| @ -0,0 +1,75 @@ | |||
| import 'package:hive/hive.dart'; | |||
| import 'package:local_db_core/boxes/box_list/level_box/level_box_keys.dart'; | |||
| import 'package:local_db_core/boxes/interfaces/base_box_interface.dart'; | |||
| import 'package:repositories/level_box_domain/model/level_model.dart'; | |||
| 
 | |||
| class LevelBox implements BaseBoxInterface<LevelBoxKeys> { | |||
|   Box? _box; | |||
| 
 | |||
|   LevelBox.privateConstructor(); | |||
| 
 | |||
|   static final LevelBox instance = LevelBox.privateConstructor(); | |||
| 
 | |||
|   factory LevelBox() { | |||
|     return instance; | |||
|   } | |||
| 
 | |||
|   @override | |||
|   String getBoxName() { | |||
|     return "level"; | |||
|   } | |||
| 
 | |||
|   @override | |||
|   String getKeyName(LevelBoxKeys key) { | |||
|     return key.value; | |||
|   } | |||
| 
 | |||
|   @override | |||
|   Future<void> openBox() async { | |||
|     _box = await Hive.openBox(getBoxName()); | |||
|   } | |||
| 
 | |||
|   void updateData({required Level level}) async { | |||
|     if (!Hive.isBoxOpen(getBoxName())) { | |||
|       await openBox(); | |||
|     } | |||
|     List<Level> list = await getData(); | |||
|     int index = list.indexWhere((element) => element.level == level.level); | |||
|     if (index != -1) { | |||
|       list[index] = level; | |||
|       await saveData(list); | |||
|     } | |||
|   } | |||
| 
 | |||
|   Future<void> setCurrentLevel(int level) async { | |||
|     if (!Hive.isBoxOpen(getBoxName())) { | |||
|       await openBox(); | |||
|     } | |||
|     _box?.put(getKeyName(LevelBoxKeys.currentLevel), level); | |||
|   } | |||
| 
 | |||
|   Future<int> getLevel() async { | |||
|     if (!Hive.isBoxOpen(getBoxName())) { | |||
|       await openBox(); | |||
|     } | |||
|     int level = _box?.get(getKeyName(LevelBoxKeys.currentLevel), defaultValue: 1) ?? 1; | |||
|     return level; | |||
|   } | |||
| 
 | |||
|   Future<List<Level>> getData() async { | |||
|     if (!Hive.isBoxOpen(getBoxName())) { | |||
|       await openBox(); | |||
|     } | |||
|     return _box?.values.cast<Level>().toList() ?? []; | |||
|   } | |||
| 
 | |||
|   Future<void> saveData(List<Level> data) async { | |||
|     if (!Hive.isBoxOpen(getBoxName())) { | |||
|       await openBox(); | |||
|     } | |||
|     _box?.addAll(data); | |||
|     for (var value in data) { | |||
|       await value.save(); | |||
|     } | |||
|   } | |||
| } | |||
| @ -0,0 +1,8 @@ | |||
| enum LevelBoxKeys { | |||
|   levelList('levelList'), | |||
|   currentLevel('currentLevel'); | |||
| 
 | |||
|   final String value; | |||
| 
 | |||
|   const LevelBoxKeys(this.value); | |||
| } | |||
| @ -0,0 +1,7 @@ | |||
| abstract class BaseBoxInterface<T> { | |||
|   String getBoxName(); | |||
| 
 | |||
|   String getKeyName(T key); | |||
| 
 | |||
|   Future<void> openBox(); | |||
| } | |||
| @ -0,0 +1 @@ | |||
| C:/Users/user1/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_linux-2.1.10/ | |||
| @ -0,0 +1,11 @@ | |||
| //
 | |||
| //  Generated file. Do not edit.
 | |||
| //
 | |||
| 
 | |||
| // clang-format off
 | |||
| 
 | |||
| #include "generated_plugin_registrant.h"
 | |||
| 
 | |||
| 
 | |||
| void fl_register_plugins(FlPluginRegistry* registry) { | |||
| } | |||
| @ -0,0 +1,15 @@ | |||
| // | |||
| //  Generated file. Do not edit. | |||
| // | |||
| 
 | |||
| // clang-format off | |||
| 
 | |||
| #ifndef GENERATED_PLUGIN_REGISTRANT_ | |||
| #define GENERATED_PLUGIN_REGISTRANT_ | |||
| 
 | |||
| #include <flutter_linux/flutter_linux.h> | |||
| 
 | |||
| // Registers Flutter plugins. | |||
| void fl_register_plugins(FlPluginRegistry* registry); | |||
| 
 | |||
| #endif  // GENERATED_PLUGIN_REGISTRANT_ | |||
| @ -0,0 +1,23 @@ | |||
| # | |||
| # Generated file, do not edit. | |||
| # | |||
| 
 | |||
| list(APPEND FLUTTER_PLUGIN_LIST | |||
| ) | |||
| 
 | |||
| list(APPEND FLUTTER_FFI_PLUGIN_LIST | |||
| ) | |||
| 
 | |||
| set(PLUGIN_BUNDLED_LIBRARIES) | |||
| 
 | |||
| foreach(plugin ${FLUTTER_PLUGIN_LIST}) | |||
|   add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) | |||
|   target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) | |||
|   list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>) | |||
|   list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) | |||
| endforeach(plugin) | |||
| 
 | |||
| foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) | |||
|   add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) | |||
|   list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) | |||
| endforeach(ffi_plugin) | |||
| @ -0,0 +1,12 @@ | |||
| // | |||
| //  Generated file. Do not edit. | |||
| // | |||
| 
 | |||
| import FlutterMacOS | |||
| import Foundation | |||
| 
 | |||
| import path_provider_foundation | |||
| 
 | |||
| func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { | |||
|   PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) | |||
| } | |||
| @ -0,0 +1,11 @@ | |||
| // This is a generated file; do not edit or check into version control. | |||
| FLUTTER_ROOT=C:\Work\Tools\flutter | |||
| FLUTTER_APPLICATION_PATH=C:\Users\user1\StudioProjects\habib_kids\data\data_core\local_db\local_db_core | |||
| COCOAPODS_PARALLEL_CODE_SIGN=true | |||
| FLUTTER_BUILD_DIR=build | |||
| FLUTTER_BUILD_NAME=0.0.1 | |||
| FLUTTER_BUILD_NUMBER=0.0.1 | |||
| DART_OBFUSCATION=false | |||
| TRACK_WIDGET_CREATION=true | |||
| TREE_SHAKE_ICONS=false | |||
| PACKAGE_CONFIG=.dart_tool/package_config.json | |||
| @ -0,0 +1,12 @@ | |||
| #!/bin/sh | |||
| # This is a generated file; do not edit or check into version control. | |||
| export "FLUTTER_ROOT=C:\Work\Tools\flutter" | |||
| export "FLUTTER_APPLICATION_PATH=C:\Users\user1\StudioProjects\habib_kids\data\data_core\local_db\local_db_core" | |||
| export "COCOAPODS_PARALLEL_CODE_SIGN=true" | |||
| export "FLUTTER_BUILD_DIR=build" | |||
| export "FLUTTER_BUILD_NAME=0.0.1" | |||
| export "FLUTTER_BUILD_NUMBER=0.0.1" | |||
| export "DART_OBFUSCATION=false" | |||
| export "TRACK_WIDGET_CREATION=true" | |||
| export "TREE_SHAKE_ICONS=false" | |||
| export "PACKAGE_CONFIG=.dart_tool/package_config.json" | |||
| @ -0,0 +1,23 @@ | |||
| name: local_db_core | |||
| description: A new Flutter project. | |||
| version: 1.0.0+1 | |||
| publish_to: 'none' | |||
| 
 | |||
| environment: | |||
|   sdk: ">=2.17.6 <3.0.0" | |||
| dependencies: | |||
|   flutter: | |||
|     sdk: flutter | |||
|   cupertino_icons: ^1.0.2 | |||
|   hive: ^2.0.5 | |||
|   hive_flutter: ^1.1.0 | |||
|   path_provider: ^2.0.11 | |||
|   repositories: | |||
|     path : ../../../../domain/repositories | |||
| 
 | |||
| dev_dependencies: | |||
|   flutter_test: | |||
|     sdk: flutter | |||
|   flutter_lints: ^2.0.0 | |||
| flutter: | |||
|   uses-material-design: true | |||
| @ -0,0 +1,11 @@ | |||
| //
 | |||
| //  Generated file. Do not edit.
 | |||
| //
 | |||
| 
 | |||
| // clang-format off
 | |||
| 
 | |||
| #include "generated_plugin_registrant.h"
 | |||
| 
 | |||
| 
 | |||
| void RegisterPlugins(flutter::PluginRegistry* registry) { | |||
| } | |||
| @ -0,0 +1,15 @@ | |||
| // | |||
| //  Generated file. Do not edit. | |||
| // | |||
| 
 | |||
| // clang-format off | |||
| 
 | |||
| #ifndef GENERATED_PLUGIN_REGISTRANT_ | |||
| #define GENERATED_PLUGIN_REGISTRANT_ | |||
| 
 | |||
| #include <flutter/plugin_registry.h> | |||
| 
 | |||
| // Registers Flutter plugins. | |||
| void RegisterPlugins(flutter::PluginRegistry* registry); | |||
| 
 | |||
| #endif  // GENERATED_PLUGIN_REGISTRANT_ | |||
| @ -0,0 +1,23 @@ | |||
| # | |||
| # Generated file, do not edit. | |||
| # | |||
| 
 | |||
| list(APPEND FLUTTER_PLUGIN_LIST | |||
| ) | |||
| 
 | |||
| list(APPEND FLUTTER_FFI_PLUGIN_LIST | |||
| ) | |||
| 
 | |||
| set(PLUGIN_BUNDLED_LIBRARIES) | |||
| 
 | |||
| foreach(plugin ${FLUTTER_PLUGIN_LIST}) | |||
|   add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) | |||
|   target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) | |||
|   list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>) | |||
|   list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) | |||
| endforeach(plugin) | |||
| 
 | |||
| foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) | |||
|   add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) | |||
|   list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) | |||
| endforeach(ffi_plugin) | |||
| @ -0,0 +1,30 @@ | |||
| # Miscellaneous | |||
| *.class | |||
| *.log | |||
| *.pyc | |||
| *.swp | |||
| .DS_Store | |||
| .atom/ | |||
| .buildlog/ | |||
| .history | |||
| .svn/ | |||
| migrate_working_dir/ | |||
| 
 | |||
| # IntelliJ related | |||
| *.iml | |||
| *.ipr | |||
| *.iws | |||
| .idea/ | |||
| 
 | |||
| # The .vscode folder contains launch configuration and tasks you configure in | |||
| # VS Code which you may wish to be included in version control, so this line | |||
| # is commented out by default. | |||
| #.vscode/ | |||
| 
 | |||
| # Flutter/Dart/Pub related | |||
| # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. | |||
| /pubspec.lock | |||
| **/doc/api/ | |||
| .dart_tool/ | |||
| .packages | |||
| build/ | |||
| @ -0,0 +1,10 @@ | |||
| # This file tracks properties of this Flutter project. | |||
| # Used by Flutter tool to assess capabilities and perform upgrades etc. | |||
| # | |||
| # This file should be version controlled and should not be manually edited. | |||
| 
 | |||
| version: | |||
|   revision: b4bce91dd0f168179d46a7ae5eceb3572ba9637a | |||
|   channel: stable | |||
| 
 | |||
| project_type: package | |||
| @ -0,0 +1,3 @@ | |||
| ## 0.0.1 | |||
| 
 | |||
| * TODO: Describe initial release. | |||
| @ -0,0 +1 @@ | |||
| TODO: Add your license here. | |||
| @ -0,0 +1,39 @@ | |||
| <!-- | |||
| This README describes the package. If you publish this package to pub.dev, | |||
| this README's contents appear on the landing page for your package. | |||
| 
 | |||
| For information about how to write a good package README, see the guide for | |||
| [writing package pages](https://dart.dev/guides/libraries/writing-package-pages). | |||
| 
 | |||
| For general information about developing packages, see the Dart guide for | |||
| [creating packages](https://dart.dev/guides/libraries/create-library-packages) | |||
| and the Flutter guide for | |||
| [developing packages and plugins](https://flutter.dev/developing-packages). | |||
| --> | |||
| 
 | |||
| TODO: Put a short description of the package here that helps potential users | |||
| know whether this package might be useful for them. | |||
| 
 | |||
| ## Features | |||
| 
 | |||
| TODO: List what your package can do. Maybe include images, gifs, or videos. | |||
| 
 | |||
| ## Getting started | |||
| 
 | |||
| TODO: List prerequisites and provide or point to information on how to | |||
| start using the package. | |||
| 
 | |||
| ## Usage | |||
| 
 | |||
| TODO: Include short and useful examples for package users. Add longer examples | |||
| to `/example` folder. | |||
| 
 | |||
| ```dart | |||
| const like = 'sample'; | |||
| ``` | |||
| 
 | |||
| ## Additional information | |||
| 
 | |||
| TODO: Tell users more about the package: where to find more information, how to | |||
| contribute to the package, how to file issues, what response they can expect | |||
| from the package authors, and more. | |||
| @ -0,0 +1,4 @@ | |||
| include: package:flutter_lints/flutter.yaml | |||
| 
 | |||
| # Additional information about this file can be found at | |||
| # https://dart.dev/guides/language/analysis-options | |||
| @ -0,0 +1,25 @@ | |||
| package io.flutter.plugins; | |||
| 
 | |||
| import io.flutter.plugin.common.PluginRegistry; | |||
| import io.flutter.plugins.pathprovider.PathProviderPlugin; | |||
| 
 | |||
| /** | |||
|  * Generated file. Do not edit. | |||
|  */ | |||
| public final class GeneratedPluginRegistrant { | |||
|   public static void registerWith(PluginRegistry registry) { | |||
|     if (alreadyRegisteredWith(registry)) { | |||
|       return; | |||
|     } | |||
|     PathProviderPlugin.registerWith(registry.registrarFor("io.flutter.plugins.pathprovider.PathProviderPlugin")); | |||
|   } | |||
| 
 | |||
|   private static boolean alreadyRegisteredWith(PluginRegistry registry) { | |||
|     final String key = GeneratedPluginRegistrant.class.getCanonicalName(); | |||
|     if (registry.hasPlugin(key)) { | |||
|       return true; | |||
|     } | |||
|     registry.registrarFor(key); | |||
|     return false; | |||
|   } | |||
| } | |||
| @ -0,0 +1,2 @@ | |||
| sdk.dir=C:\\Work\\Tools\\Sdk | |||
| flutter.sdk=C:\\Work\\Tools\\flutter | |||
| @ -0,0 +1,14 @@ | |||
| // This is a generated file; do not edit or check into version control. | |||
| FLUTTER_ROOT=C:\Work\Tools\flutter | |||
| FLUTTER_APPLICATION_PATH=C:\Users\user1\StudioProjects\habib_kids\data\data_types\types | |||
| COCOAPODS_PARALLEL_CODE_SIGN=true | |||
| FLUTTER_TARGET=lib\main.dart | |||
| FLUTTER_BUILD_DIR=build | |||
| FLUTTER_BUILD_NAME=0.0.1 | |||
| FLUTTER_BUILD_NUMBER=0.0.1 | |||
| EXCLUDED_ARCHS[sdk=iphonesimulator*]=i386 | |||
| EXCLUDED_ARCHS[sdk=iphoneos*]=armv7 | |||
| DART_OBFUSCATION=false | |||
| TRACK_WIDGET_CREATION=true | |||
| TREE_SHAKE_ICONS=false | |||
| PACKAGE_CONFIG=.dart_tool/package_config.json | |||
| @ -0,0 +1,13 @@ | |||
| #!/bin/sh | |||
| # This is a generated file; do not edit or check into version control. | |||
| export "FLUTTER_ROOT=C:\Work\Tools\flutter" | |||
| export "FLUTTER_APPLICATION_PATH=C:\Users\user1\StudioProjects\habib_kids\data\data_types\types" | |||
| export "COCOAPODS_PARALLEL_CODE_SIGN=true" | |||
| export "FLUTTER_TARGET=lib\main.dart" | |||
| export "FLUTTER_BUILD_DIR=build" | |||
| export "FLUTTER_BUILD_NAME=0.0.1" | |||
| export "FLUTTER_BUILD_NUMBER=0.0.1" | |||
| export "DART_OBFUSCATION=false" | |||
| export "TRACK_WIDGET_CREATION=true" | |||
| export "TREE_SHAKE_ICONS=false" | |||
| export "PACKAGE_CONFIG=.dart_tool/package_config.json" | |||
| @ -0,0 +1,19 @@ | |||
| // | |||
| //  Generated file. Do not edit. | |||
| // | |||
| 
 | |||
| // clang-format off | |||
| 
 | |||
| #ifndef GeneratedPluginRegistrant_h | |||
| #define GeneratedPluginRegistrant_h | |||
| 
 | |||
| #import <Flutter/Flutter.h> | |||
| 
 | |||
| NS_ASSUME_NONNULL_BEGIN | |||
| 
 | |||
| @interface GeneratedPluginRegistrant : NSObject | |||
| + (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry; | |||
| @end | |||
| 
 | |||
| NS_ASSUME_NONNULL_END | |||
| #endif /* GeneratedPluginRegistrant_h */ | |||
| @ -0,0 +1,21 @@ | |||
| // | |||
| //  Generated file. Do not edit. | |||
| // | |||
| 
 | |||
| // clang-format off | |||
| 
 | |||
| #import "GeneratedPluginRegistrant.h" | |||
| 
 | |||
| #if __has_include(<path_provider_foundation/PathProviderPlugin.h>) | |||
| #import <path_provider_foundation/PathProviderPlugin.h> | |||
| #else | |||
| @import path_provider_foundation; | |||
| #endif | |||
| 
 | |||
| @implementation GeneratedPluginRegistrant | |||
| 
 | |||
| + (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry { | |||
|   [PathProviderPlugin registerWithRegistrar:[registry registrarForPlugin:@"PathProviderPlugin"]]; | |||
| } | |||
| 
 | |||
| @end | |||
| @ -0,0 +1,83 @@ | |||
| import 'package:local_db_core/boxes/box_list/level_box/level_box.dart'; | |||
| import 'package:repositories/level_box_domain/model/level_model.dart'; | |||
| import 'package:repositories/level_box_domain/repository/level_box_repository.dart'; | |||
| 
 | |||
| class LevelBoxRepositoryImpl extends LevelBoxRepository { | |||
|   final LevelBox _levelBox; | |||
| 
 | |||
|   LevelBoxRepositoryImpl({required LevelBox levelBox}) : _levelBox = levelBox; | |||
| 
 | |||
|   @override | |||
|   Future<void> getLevel({required void Function(List<Level> data) result}) async { | |||
|     final List<Level> levelList = []; | |||
|     levelList.add(Level( | |||
|       image: 'assets/images/jpg/level-1.jpg', | |||
|       duration: 4, | |||
|       puzzleSize: 3, | |||
|       level: 1, | |||
|     )); | |||
|     levelList.add(Level( | |||
|       image: 'assets/images/jpg/level-2.jpg', | |||
|       duration: 4, | |||
|       puzzleSize: 3, | |||
|       level: 2, | |||
|     )); | |||
|     levelList.add(Level( | |||
|       image: 'assets/images/jpg/level-3.jpg', | |||
|       duration: 4, | |||
|       puzzleSize: 3, | |||
|       level: 3, | |||
|     )); | |||
|     levelList.add(Level( | |||
|       image: 'assets/images/jpg/level-4.jpg', | |||
|       duration: 4, | |||
|       puzzleSize: 3, | |||
|       level: 4, | |||
|     )); | |||
|     levelList.add(Level( | |||
|       image: 'assets/images/jpg/level-5.jpg', | |||
|       duration: 4, | |||
|       puzzleSize: 3, | |||
|       level: 5, | |||
|       payable: true, | |||
|     )); | |||
|     levelList.add(Level( | |||
|       image: 'assets/images/jpg/level-6.jpg', | |||
|       duration: 4, | |||
|       puzzleSize: 3, | |||
|       level: 6, | |||
|       payable: true, | |||
|     )); | |||
|     levelList.add(Level( | |||
|       image: 'assets/images/jpg/level-7.jpg', | |||
|       duration: 6, | |||
|       puzzleSize: 4, | |||
|       level: 7, | |||
|       payable: true, | |||
|     )); | |||
|     levelList.add(Level( | |||
|       image: 'assets/images/jpg/level-8.jpg', | |||
|       duration: 6, | |||
|       puzzleSize: 4, | |||
|       level: 8, | |||
|       payable: true, | |||
|     )); | |||
|     _levelBox.saveData(levelList); | |||
|     result.call(levelList); | |||
|   } | |||
| 
 | |||
|   @override | |||
|   Future<void> openBox() async { | |||
|     await _levelBox.openBox(); | |||
|   } | |||
| 
 | |||
|   @override | |||
|   Future<int> getCurrentLevel() async { | |||
|     return await _levelBox.getLevel(); | |||
|   } | |||
| 
 | |||
|   @override | |||
|   Future<void> setCurrentLevel(int level) async { | |||
|     await _levelBox.setCurrentLevel(level); | |||
|   } | |||
| } | |||
| @ -0,0 +1 @@ | |||
| C:/Users/user1/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_linux-2.1.10/ | |||
| @ -0,0 +1,11 @@ | |||
| //
 | |||
| //  Generated file. Do not edit.
 | |||
| //
 | |||
| 
 | |||
| // clang-format off
 | |||
| 
 | |||
| #include "generated_plugin_registrant.h"
 | |||
| 
 | |||
| 
 | |||
| void fl_register_plugins(FlPluginRegistry* registry) { | |||
| } | |||
| @ -0,0 +1,15 @@ | |||
| // | |||
| //  Generated file. Do not edit. | |||
| // | |||
| 
 | |||
| // clang-format off | |||
| 
 | |||
| #ifndef GENERATED_PLUGIN_REGISTRANT_ | |||
| #define GENERATED_PLUGIN_REGISTRANT_ | |||
| 
 | |||
| #include <flutter_linux/flutter_linux.h> | |||
| 
 | |||
| // Registers Flutter plugins. | |||
| void fl_register_plugins(FlPluginRegistry* registry); | |||
| 
 | |||
| #endif  // GENERATED_PLUGIN_REGISTRANT_ | |||
| @ -0,0 +1,23 @@ | |||
| # | |||
| # Generated file, do not edit. | |||
| # | |||
| 
 | |||
| list(APPEND FLUTTER_PLUGIN_LIST | |||
| ) | |||
| 
 | |||
| list(APPEND FLUTTER_FFI_PLUGIN_LIST | |||
| ) | |||
| 
 | |||
| set(PLUGIN_BUNDLED_LIBRARIES) | |||
| 
 | |||
| foreach(plugin ${FLUTTER_PLUGIN_LIST}) | |||
|   add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) | |||
|   target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) | |||
|   list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>) | |||
|   list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) | |||
| endforeach(plugin) | |||
| 
 | |||
| foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) | |||
|   add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) | |||
|   list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) | |||
| endforeach(ffi_plugin) | |||
| @ -0,0 +1,12 @@ | |||
| // | |||
| //  Generated file. Do not edit. | |||
| // | |||
| 
 | |||
| import FlutterMacOS | |||
| import Foundation | |||
| 
 | |||
| import path_provider_foundation | |||
| 
 | |||
| func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { | |||
|   PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) | |||
| } | |||
| @ -0,0 +1,11 @@ | |||
| // This is a generated file; do not edit or check into version control. | |||
| FLUTTER_ROOT=C:\Work\Tools\flutter | |||
| FLUTTER_APPLICATION_PATH=C:\Users\user1\StudioProjects\habib_kids\data\data_types\types | |||
| COCOAPODS_PARALLEL_CODE_SIGN=true | |||
| FLUTTER_BUILD_DIR=build | |||
| FLUTTER_BUILD_NAME=0.0.1 | |||
| FLUTTER_BUILD_NUMBER=0.0.1 | |||
| DART_OBFUSCATION=false | |||
| TRACK_WIDGET_CREATION=true | |||
| TREE_SHAKE_ICONS=false | |||
| PACKAGE_CONFIG=.dart_tool/package_config.json | |||
| @ -0,0 +1,12 @@ | |||
| #!/bin/sh | |||
| # This is a generated file; do not edit or check into version control. | |||
| export "FLUTTER_ROOT=C:\Work\Tools\flutter" | |||
| export "FLUTTER_APPLICATION_PATH=C:\Users\user1\StudioProjects\habib_kids\data\data_types\types" | |||
| export "COCOAPODS_PARALLEL_CODE_SIGN=true" | |||
| export "FLUTTER_BUILD_DIR=build" | |||
| export "FLUTTER_BUILD_NAME=0.0.1" | |||
| export "FLUTTER_BUILD_NUMBER=0.0.1" | |||
| export "DART_OBFUSCATION=false" | |||
| export "TRACK_WIDGET_CREATION=true" | |||
| export "TREE_SHAKE_ICONS=false" | |||
| export "PACKAGE_CONFIG=.dart_tool/package_config.json" | |||
| @ -0,0 +1,22 @@ | |||
| name: types | |||
| description: A new Flutter project. | |||
| version: 0.0.1 | |||
| publish_to: 'none' | |||
| 
 | |||
| environment: | |||
|   sdk: ">=2.17.6 <3.0.0" | |||
|   flutter: ">=1.17.0" | |||
| 
 | |||
| dependencies: | |||
|   flutter: | |||
|     sdk: flutter | |||
|   repositories: | |||
|     path: ../../../domain/repositories | |||
|   local_db_core: | |||
|     path: ../../../data/data_core/local_db/local_db_core | |||
| 
 | |||
| dev_dependencies: | |||
|   flutter_test: | |||
|     sdk: flutter | |||
|   flutter_lints: ^2.0.0 | |||
| flutter: | |||
| @ -0,0 +1,11 @@ | |||
| //
 | |||
| //  Generated file. Do not edit.
 | |||
| //
 | |||
| 
 | |||
| // clang-format off
 | |||
| 
 | |||
| #include "generated_plugin_registrant.h"
 | |||
| 
 | |||
| 
 | |||
| void RegisterPlugins(flutter::PluginRegistry* registry) { | |||
| } | |||
| @ -0,0 +1,15 @@ | |||
| // | |||
| //  Generated file. Do not edit. | |||
| // | |||
| 
 | |||
| // clang-format off | |||
| 
 | |||
| #ifndef GENERATED_PLUGIN_REGISTRANT_ | |||
| #define GENERATED_PLUGIN_REGISTRANT_ | |||
| 
 | |||
| #include <flutter/plugin_registry.h> | |||
| 
 | |||
| // Registers Flutter plugins. | |||
| void RegisterPlugins(flutter::PluginRegistry* registry); | |||
| 
 | |||
| #endif  // GENERATED_PLUGIN_REGISTRANT_ | |||
| @ -0,0 +1,23 @@ | |||
| # | |||
| # Generated file, do not edit. | |||
| # | |||
| 
 | |||
| list(APPEND FLUTTER_PLUGIN_LIST | |||
| ) | |||
| 
 | |||
| list(APPEND FLUTTER_FFI_PLUGIN_LIST | |||
| ) | |||
| 
 | |||
| set(PLUGIN_BUNDLED_LIBRARIES) | |||
| 
 | |||
| foreach(plugin ${FLUTTER_PLUGIN_LIST}) | |||
|   add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) | |||
|   target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) | |||
|   list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>) | |||
|   list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) | |||
| endforeach(plugin) | |||
| 
 | |||
| foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) | |||
|   add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) | |||
|   list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) | |||
| endforeach(ffi_plugin) | |||
| @ -0,0 +1,30 @@ | |||
| # Miscellaneous | |||
| *.class | |||
| *.log | |||
| *.pyc | |||
| *.swp | |||
| .DS_Store | |||
| .atom/ | |||
| .buildlog/ | |||
| .history | |||
| .svn/ | |||
| migrate_working_dir/ | |||
| 
 | |||
| # IntelliJ related | |||
| *.iml | |||
| *.ipr | |||
| *.iws | |||
| .idea/ | |||
| 
 | |||
| # The .vscode folder contains launch configuration and tasks you configure in | |||
| # VS Code which you may wish to be included in version control, so this line | |||
| # is commented out by default. | |||
| #.vscode/ | |||
| 
 | |||
| # Flutter/Dart/Pub related | |||
| # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. | |||
| /pubspec.lock | |||
| **/doc/api/ | |||
| .dart_tool/ | |||
| .packages | |||
| build/ | |||
| @ -0,0 +1,10 @@ | |||
| # This file tracks properties of this Flutter project. | |||
| # Used by Flutter tool to assess capabilities and perform upgrades etc. | |||
| # | |||
| # This file should be version controlled and should not be manually edited. | |||
| 
 | |||
| version: | |||
|   revision: b4bce91dd0f168179d46a7ae5eceb3572ba9637a | |||
|   channel: stable | |||
| 
 | |||
| project_type: package | |||
| @ -0,0 +1,3 @@ | |||
| ## 0.0.1 | |||
| 
 | |||
| * TODO: Describe initial release. | |||
| @ -0,0 +1 @@ | |||
| TODO: Add your license here. | |||
| @ -0,0 +1,39 @@ | |||
| <!-- | |||
| This README describes the package. If you publish this package to pub.dev, | |||
| this README's contents appear on the landing page for your package. | |||
| 
 | |||
| For information about how to write a good package README, see the guide for | |||
| [writing package pages](https://dart.dev/guides/libraries/writing-package-pages). | |||
| 
 | |||
| For general information about developing packages, see the Dart guide for | |||
| [creating packages](https://dart.dev/guides/libraries/create-library-packages) | |||
| and the Flutter guide for | |||
| [developing packages and plugins](https://flutter.dev/developing-packages). | |||
| --> | |||
| 
 | |||
| TODO: Put a short description of the package here that helps potential users | |||
| know whether this package might be useful for them. | |||
| 
 | |||
| ## Features | |||
| 
 | |||
| TODO: List what your package can do. Maybe include images, gifs, or videos. | |||
| 
 | |||
| ## Getting started | |||
| 
 | |||
| TODO: List prerequisites and provide or point to information on how to | |||
| start using the package. | |||
| 
 | |||
| ## Usage | |||
| 
 | |||
| TODO: Include short and useful examples for package users. Add longer examples | |||
| to `/example` folder. | |||
| 
 | |||
| ```dart | |||
| const like = 'sample'; | |||
| ``` | |||
| 
 | |||
| ## Additional information | |||
| 
 | |||
| TODO: Tell users more about the package: where to find more information, how to | |||
| contribute to the package, how to file issues, what response they can expect | |||
| from the package authors, and more. | |||
| @ -0,0 +1,4 @@ | |||
| include: package:flutter_lints/flutter.yaml | |||
| 
 | |||
| # Additional information about this file can be found at | |||
| # https://dart.dev/guides/language/analysis-options | |||
| @ -0,0 +1,25 @@ | |||
| package io.flutter.plugins; | |||
| 
 | |||
| import io.flutter.plugin.common.PluginRegistry; | |||
| import io.flutter.plugins.pathprovider.PathProviderPlugin; | |||
| 
 | |||
| /** | |||
|  * Generated file. Do not edit. | |||
|  */ | |||
| public final class GeneratedPluginRegistrant { | |||
|   public static void registerWith(PluginRegistry registry) { | |||
|     if (alreadyRegisteredWith(registry)) { | |||
|       return; | |||
|     } | |||
|     PathProviderPlugin.registerWith(registry.registrarFor("io.flutter.plugins.pathprovider.PathProviderPlugin")); | |||
|   } | |||
| 
 | |||
|   private static boolean alreadyRegisteredWith(PluginRegistry registry) { | |||
|     final String key = GeneratedPluginRegistrant.class.getCanonicalName(); | |||
|     if (registry.hasPlugin(key)) { | |||
|       return true; | |||
|     } | |||
|     registry.registrarFor(key); | |||
|     return false; | |||
|   } | |||
| } | |||
| @ -0,0 +1,19 @@ | |||
| // | |||
| //  Generated file. Do not edit. | |||
| // | |||
| 
 | |||
| // clang-format off | |||
| 
 | |||
| #ifndef GeneratedPluginRegistrant_h | |||
| #define GeneratedPluginRegistrant_h | |||
| 
 | |||
| #import <Flutter/Flutter.h> | |||
| 
 | |||
| NS_ASSUME_NONNULL_BEGIN | |||
| 
 | |||
| @interface GeneratedPluginRegistrant : NSObject | |||
| + (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry; | |||
| @end | |||
| 
 | |||
| NS_ASSUME_NONNULL_END | |||
| #endif /* GeneratedPluginRegistrant_h */ | |||
| @ -0,0 +1,21 @@ | |||
| // | |||
| //  Generated file. Do not edit. | |||
| // | |||
| 
 | |||
| // clang-format off | |||
| 
 | |||
| #import "GeneratedPluginRegistrant.h" | |||
| 
 | |||
| #if __has_include(<path_provider_foundation/PathProviderPlugin.h>) | |||
| #import <path_provider_foundation/PathProviderPlugin.h> | |||
| #else | |||
| @import path_provider_foundation; | |||
| #endif | |||
| 
 | |||
| @implementation GeneratedPluginRegistrant | |||
| 
 | |||
| + (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry { | |||
|   [PathProviderPlugin registerWithRegistrar:[registry registrarForPlugin:@"PathProviderPlugin"]]; | |||
| } | |||
| 
 | |||
| @end | |||
| @ -0,0 +1,49 @@ | |||
| import 'package:hive_flutter/hive_flutter.dart'; | |||
| import 'package:repositories/level_box_domain/model/level_model.dart'; | |||
| 
 | |||
| class LevelModelAdapter extends TypeAdapter<Level> { | |||
|   @override | |||
|   final int typeId = 0; | |||
| 
 | |||
|   @override | |||
|   Level read(BinaryReader reader) { | |||
|     final numOfFields = reader.readByte(); | |||
|     final fields = <int, dynamic>{ | |||
|       for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(), | |||
|     }; | |||
|     return Level( | |||
|       image: fields[0] as String, | |||
|       puzzleSize: fields[1] as int, | |||
|       duration: fields[2] as int, | |||
|       level: fields[3] as int, | |||
|       recordDuration: fields[4] as int, | |||
|       payable: fields[5] as bool, | |||
|     ); | |||
|   } | |||
| 
 | |||
|   @override | |||
|   void write(BinaryWriter writer, Level obj) { | |||
|     writer | |||
|       ..writeByte(6) | |||
|       ..writeByte(0) | |||
|       ..write(obj.image) | |||
|       ..writeByte(1) | |||
|       ..write(obj.puzzleSize) | |||
|       ..writeByte(2) | |||
|       ..write(obj.duration) | |||
|       ..writeByte(3) | |||
|       ..write(obj.level) | |||
|       ..writeByte(4) | |||
|       ..write(obj.recordDuration) | |||
|       ..writeByte(5) | |||
|       ..write(obj.payable); | |||
|   } | |||
| 
 | |||
|   @override | |||
|   int get hashCode => typeId.hashCode; | |||
| 
 | |||
|   @override | |||
|   bool operator ==(Object other) => | |||
|       identical(this, other) || | |||
|       other is LevelModelAdapter && runtimeType == other.runtimeType && typeId == other.typeId; | |||
| } | |||
| @ -0,0 +1,37 @@ | |||
| import 'package:hive_flutter/adapters.dart'; | |||
| 
 | |||
| @HiveType(typeId: 0) | |||
| class Level extends HiveObject { | |||
|   @HiveField(0) | |||
|   final String image; | |||
|   @HiveField(1) | |||
|   final int puzzleSize; | |||
|   @HiveField(2) | |||
|   final int duration; | |||
|   @HiveField(3) | |||
|   final int level; | |||
|   @HiveField(4) | |||
|   final int recordDuration; | |||
|   @HiveField(5) | |||
|   final bool payable; | |||
| 
 | |||
|   Level({ | |||
|     required this.image, | |||
|     required this.duration, | |||
|     required this.puzzleSize, | |||
|     required this.level, | |||
|     this.recordDuration = 0, | |||
|     this.payable = false, | |||
|   }); | |||
| 
 | |||
|   Map<String, dynamic> toJson() { | |||
|     return { | |||
|       'image': image, | |||
|       'duration': duration, | |||
|       'puzzleSize': puzzleSize, | |||
|       'level': level, | |||
|       'recordDuration': recordDuration, | |||
|       'payable': payable, | |||
|     }; | |||
|   } | |||
| } | |||
| @ -0,0 +1,11 @@ | |||
| import 'package:repositories/level_box_domain/model/level_model.dart'; | |||
| 
 | |||
| abstract class LevelBoxRepository { | |||
|   Future<void> getLevel({required void Function(List<Level> data) result}); | |||
| 
 | |||
|   Future<void> openBox(); | |||
| 
 | |||
|   Future<int> getCurrentLevel(); | |||
| 
 | |||
|   Future<void> setCurrentLevel(int level); | |||
| } | |||
| @ -0,0 +1,11 @@ | |||
| //
 | |||
| //  Generated file. Do not edit.
 | |||
| //
 | |||
| 
 | |||
| // clang-format off
 | |||
| 
 | |||
| #include "generated_plugin_registrant.h"
 | |||
| 
 | |||
| 
 | |||
| void fl_register_plugins(FlPluginRegistry* registry) { | |||
| } | |||
| @ -0,0 +1,15 @@ | |||
| // | |||
| //  Generated file. Do not edit. | |||
| // | |||
| 
 | |||
| // clang-format off | |||
| 
 | |||
| #ifndef GENERATED_PLUGIN_REGISTRANT_ | |||
| #define GENERATED_PLUGIN_REGISTRANT_ | |||
| 
 | |||
| #include <flutter_linux/flutter_linux.h> | |||
| 
 | |||
| // Registers Flutter plugins. | |||
| void fl_register_plugins(FlPluginRegistry* registry); | |||
| 
 | |||
| #endif  // GENERATED_PLUGIN_REGISTRANT_ | |||
| @ -0,0 +1,23 @@ | |||
| # | |||
| # Generated file, do not edit. | |||
| # | |||
| 
 | |||
| list(APPEND FLUTTER_PLUGIN_LIST | |||
| ) | |||
| 
 | |||
| list(APPEND FLUTTER_FFI_PLUGIN_LIST | |||
| ) | |||
| 
 | |||
| set(PLUGIN_BUNDLED_LIBRARIES) | |||
| 
 | |||
| foreach(plugin ${FLUTTER_PLUGIN_LIST}) | |||
|   add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) | |||
|   target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) | |||
|   list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>) | |||
|   list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) | |||
| endforeach(plugin) | |||
| 
 | |||
| foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) | |||
|   add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) | |||
|   list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) | |||
| endforeach(ffi_plugin) | |||
| @ -0,0 +1,12 @@ | |||
| // | |||
| //  Generated file. Do not edit. | |||
| // | |||
| 
 | |||
| import FlutterMacOS | |||
| import Foundation | |||
| 
 | |||
| import path_provider_foundation | |||
| 
 | |||
| func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { | |||
|   PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) | |||
| } | |||
| @ -0,0 +1,11 @@ | |||
| // This is a generated file; do not edit or check into version control. | |||
| FLUTTER_ROOT=C:\Work\Tools\flutter | |||
| FLUTTER_APPLICATION_PATH=C:\Users\user1\StudioProjects\habib_kids\domain\repositories | |||
| COCOAPODS_PARALLEL_CODE_SIGN=true | |||
| FLUTTER_BUILD_DIR=build | |||
| FLUTTER_BUILD_NAME=0.0.1 | |||
| FLUTTER_BUILD_NUMBER=0.0.1 | |||
| DART_OBFUSCATION=false | |||
| TRACK_WIDGET_CREATION=true | |||
| TREE_SHAKE_ICONS=false | |||
| PACKAGE_CONFIG=.dart_tool/package_config.json | |||
| @ -0,0 +1,12 @@ | |||
| #!/bin/sh | |||
| # This is a generated file; do not edit or check into version control. | |||
| export "FLUTTER_ROOT=C:\Work\Tools\flutter" | |||
| export "FLUTTER_APPLICATION_PATH=C:\Users\user1\StudioProjects\habib_kids\domain\repositories" | |||
| export "COCOAPODS_PARALLEL_CODE_SIGN=true" | |||
| export "FLUTTER_BUILD_DIR=build" | |||
| export "FLUTTER_BUILD_NAME=0.0.1" | |||
| export "FLUTTER_BUILD_NUMBER=0.0.1" | |||
| export "DART_OBFUSCATION=false" | |||
| export "TRACK_WIDGET_CREATION=true" | |||
| export "TREE_SHAKE_ICONS=false" | |||
| export "PACKAGE_CONFIG=.dart_tool/package_config.json" | |||
| @ -0,0 +1,18 @@ | |||
| name: repositories | |||
| description: A new Flutter project. | |||
| version: 0.0.1 | |||
| 
 | |||
| environment: | |||
|   sdk: ">=2.17.6 <3.0.0" | |||
|   flutter: ">=1.17.0" | |||
| 
 | |||
| dependencies: | |||
|   flutter: | |||
|     sdk: flutter | |||
|   hive_flutter: ^1.1.0 | |||
| 
 | |||
| dev_dependencies: | |||
|   flutter_test: | |||
|     sdk: flutter | |||
|   flutter_lints: ^2.0.0 | |||
| flutter: | |||
| @ -0,0 +1,11 @@ | |||
| //
 | |||
| //  Generated file. Do not edit.
 | |||
| //
 | |||
| 
 | |||
| // clang-format off
 | |||
| 
 | |||
| #include "generated_plugin_registrant.h"
 | |||
| 
 | |||
| 
 | |||
| void RegisterPlugins(flutter::PluginRegistry* registry) { | |||
| } | |||
| @ -0,0 +1,15 @@ | |||
| // | |||
| //  Generated file. Do not edit. | |||
| // | |||
| 
 | |||
| // clang-format off | |||
| 
 | |||
| #ifndef GENERATED_PLUGIN_REGISTRANT_ | |||
| #define GENERATED_PLUGIN_REGISTRANT_ | |||
| 
 | |||
| #include <flutter/plugin_registry.h> | |||
| 
 | |||
| // Registers Flutter plugins. | |||
| void RegisterPlugins(flutter::PluginRegistry* registry); | |||
| 
 | |||
| #endif  // GENERATED_PLUGIN_REGISTRANT_ | |||
| @ -0,0 +1,23 @@ | |||
| # | |||
| # Generated file, do not edit. | |||
| # | |||
| 
 | |||
| list(APPEND FLUTTER_PLUGIN_LIST | |||
| ) | |||
| 
 | |||
| list(APPEND FLUTTER_FFI_PLUGIN_LIST | |||
| ) | |||
| 
 | |||
| set(PLUGIN_BUNDLED_LIBRARIES) | |||
| 
 | |||
| foreach(plugin ${FLUTTER_PLUGIN_LIST}) | |||
|   add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) | |||
|   target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) | |||
|   list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>) | |||
|   list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) | |||
| endforeach(plugin) | |||
| 
 | |||
| foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) | |||
|   add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) | |||
|   list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) | |||
| endforeach(ffi_plugin) | |||
| @ -0,0 +1,25 @@ | |||
| import 'package:local_db_core/boxes/box_list/level_box/level_box.dart'; | |||
| import 'package:path_provider/path_provider.dart'; | |||
| import 'package:repositories/level_box_domain/adapter/level_model_adapter.dart'; | |||
| import 'package:repositories/level_box_domain/repository/level_box_repository.dart'; | |||
| import 'package:types/level_data/interface/level_box_repository_impl.dart'; | |||
| import 'package:hive_flutter/hive_flutter.dart'; | |||
| 
 | |||
| class Initializer { | |||
|   Initializer.privateConstructor(); | |||
| 
 | |||
|   final LevelBoxRepository _repository = LevelBoxRepositoryImpl(levelBox: LevelBox()); | |||
|   static final Initializer instance = Initializer.privateConstructor(); | |||
| 
 | |||
|   factory Initializer() { | |||
|     return instance; | |||
|   } | |||
| 
 | |||
|   Future<void> initialHive() async { | |||
|     final dir = await getApplicationDocumentsDirectory(); | |||
|     Hive.init(dir.path); | |||
|     Hive.registerAdapter(LevelModelAdapter()); | |||
|     await _repository.openBox(); | |||
|     await _repository.setCurrentLevel(1); | |||
|   } | |||
| } | |||
| @ -0,0 +1,31 @@ | |||
| import 'package:flutter_bloc/flutter_bloc.dart'; | |||
| import 'package:local_db_core/boxes/box_list/level_box/level_box.dart'; | |||
| import 'package:my_flutter_puzzle/cubits/base_cubit_type.dart'; | |||
| import 'package:repositories/level_box_domain/model/level_model.dart'; | |||
| import 'package:repositories/level_box_domain/repository/level_box_repository.dart'; | |||
| import 'package:types/level_data/interface/level_box_repository_impl.dart'; | |||
| 
 | |||
| class LevelListCubit extends Cubit<BaseCubitType<LevelListCubitState>> { | |||
|   List<Level> levelList = []; | |||
|   late int currentLevel; | |||
|   final LevelBoxRepository _repository = LevelBoxRepositoryImpl(levelBox: LevelBox()); | |||
| 
 | |||
|   LevelListCubit() : super(BaseCubitType(eventName: LevelListCubitState.empty)); | |||
| 
 | |||
|   void empty() => emit(BaseCubitType(eventName: LevelListCubitState.empty)); | |||
| 
 | |||
|   void getData() async { | |||
|     currentLevel = await _repository.getCurrentLevel(); | |||
|     await _repository.getLevel( | |||
|       result: (data) { | |||
|         levelList = data; | |||
|         emit(BaseCubitType(eventName: LevelListCubitState.list)); | |||
|       }, | |||
|     ); | |||
|   } | |||
| } | |||
| 
 | |||
| enum LevelListCubitState { | |||
|   empty, | |||
|   list, | |||
| } | |||
| @ -0,0 +1,221 @@ | |||
| import 'package:flutter/material.dart'; | |||
| import 'package:flutter_svg/flutter_svg.dart'; | |||
| import 'package:my_flutter_puzzle/utils/extensions/context_extension.dart'; | |||
| import 'package:my_flutter_puzzle/utils/extensions/string_extensions.dart'; | |||
| 
 | |||
| class LoseScreen extends StatefulWidget { | |||
|   final int move; | |||
|   final int tiles; | |||
| 
 | |||
|   const LoseScreen({ | |||
|     Key? key, | |||
|     required this.tiles, | |||
|     required this.move, | |||
|   }) : super(key: key); | |||
| 
 | |||
|   @override | |||
|   State<LoseScreen> createState() => _LoseScreenState(); | |||
| } | |||
| 
 | |||
| class _LoseScreenState extends State<LoseScreen> { | |||
|   @override | |||
|   Widget build(BuildContext context) { | |||
|     return Scaffold( | |||
|       backgroundColor: const Color(0xffA7A7A7), | |||
|       body: SizedBox( | |||
|         width: context.width, | |||
|         height: context.height, | |||
|         child: Stack( | |||
|           alignment: AlignmentDirectional.centerEnd, | |||
|           children: [ | |||
|             Center( | |||
|               child: Stack( | |||
|                 alignment: Alignment.bottomCenter, | |||
|                 children: [ | |||
|                   Container( | |||
|                     width: context.width * 267 / 812, | |||
|                     height: context.height * 284 / 375, | |||
|                     decoration: BoxDecoration( | |||
|                       gradient: const LinearGradient( | |||
|                         colors: [ | |||
|                           Color(0xffB9B9B9), | |||
|                           Color(0xffD1D1D1), | |||
|                         ], | |||
|                         begin: Alignment.topCenter, | |||
|                         end: Alignment.bottomCenter, | |||
|                       ), | |||
|                       borderRadius: BorderRadius.circular(36), | |||
|                     ), | |||
|                     child: Column( | |||
|                       children: [ | |||
|                         const SizedBox(height: 31), | |||
|                         const Text( | |||
|                           'Opsssss !', | |||
|                           style: TextStyle( | |||
|                             color: Colors.white, | |||
|                             fontSize: 25, | |||
|                             fontWeight: FontWeight.bold, | |||
|                           ), | |||
|                         ), | |||
|                         const SizedBox(height: 24), | |||
|                         Container( | |||
|                           width: context.width * 114 / 812, | |||
|                           height: context.width * 114 / 812, | |||
|                           decoration: BoxDecoration( | |||
|                             color: const Color(0xffC0C0C0), | |||
|                             shape: BoxShape.circle, | |||
|                             border: Border.all( | |||
|                               color: const Color(0xff7a7a7a), | |||
|                               width: 1, | |||
|                             ), | |||
|                           ), | |||
|                           child: Container( | |||
|                             margin: EdgeInsets.all(context.width * 20 / 812), | |||
|                             padding: EdgeInsets.all(context.width * 20 / 812), | |||
|                             decoration: const BoxDecoration( | |||
|                               color: Color(0xffE02020), | |||
|                               shape: BoxShape.circle, | |||
|                             ), | |||
|                             child: SvgPicture.asset( | |||
|                               'sad'.svgPath, | |||
|                               colorFilter: const ColorFilter.mode( | |||
|                                 Colors.white, | |||
|                                 BlendMode.srcIn, | |||
|                               ), | |||
|                             ), | |||
|                           ), | |||
|                         ), | |||
|                         const SizedBox(height: 19), | |||
|                         Row( | |||
|                           mainAxisAlignment: MainAxisAlignment.center, | |||
|                           children: [ | |||
|                             Row( | |||
|                               children: [ | |||
|                                 const Text( | |||
|                                   'Tiles', | |||
|                                   style: TextStyle( | |||
|                                     color: Colors.white, | |||
|                                     fontSize: 13, | |||
|                                     fontWeight: FontWeight.bold, | |||
|                                   ), | |||
|                                 ), | |||
|                                 const SizedBox(width: 9), | |||
|                                 Text( | |||
|                                   '${widget.tiles}', | |||
|                                   style: const TextStyle( | |||
|                                     decoration: TextDecoration.underline, | |||
|                                     color: Colors.white, | |||
|                                     fontSize: 13, | |||
|                                     fontWeight: FontWeight.bold, | |||
|                                   ), | |||
|                                 ), | |||
|                               ], | |||
|                             ), | |||
|                             const SizedBox(width: 42), | |||
|                             Row( | |||
|                               children: [ | |||
|                                 const Text( | |||
|                                   'Move', | |||
|                                   style: TextStyle( | |||
|                                     color: Colors.white, | |||
|                                     fontSize: 13, | |||
|                                     fontWeight: FontWeight.bold, | |||
|                                   ), | |||
|                                 ), | |||
|                                 const SizedBox(width: 9), | |||
|                                 Text( | |||
|                                   '${widget.move}', | |||
|                                   style: const TextStyle( | |||
|                                     decoration: TextDecoration.underline, | |||
|                                     color: Colors.white, | |||
|                                     fontSize: 13, | |||
|                                     fontWeight: FontWeight.bold, | |||
|                                   ), | |||
|                                 ), | |||
|                               ], | |||
|                             ), | |||
|                           ], | |||
|                         ), | |||
|                       ], | |||
|                     ), | |||
|                   ), | |||
|                   Transform.translate( | |||
|                     offset: const Offset(0, 20), | |||
|                     child: Container( | |||
|                       width: context.width * 147 / 812, | |||
|                       height: context.height * 51 / 375, | |||
|                       padding: const EdgeInsets.all(3), | |||
|                       decoration: BoxDecoration( | |||
|                         color: const Color(0xff979797).withOpacity(0.12), | |||
|                         borderRadius: BorderRadius.circular(36), | |||
|                       ), | |||
|                       child: Container( | |||
|                         decoration: BoxDecoration( | |||
|                           borderRadius: BorderRadius.circular(31), | |||
|                           gradient: const LinearGradient( | |||
|                             colors: [ | |||
|                               Color(0xffFFC600), | |||
|                               Color(0xffFF5A00), | |||
|                             ], | |||
|                             begin: Alignment.topCenter, | |||
|                             end: Alignment.bottomCenter, | |||
|                           ), | |||
|                         ), | |||
|                         child: Row( | |||
|                           mainAxisAlignment: MainAxisAlignment.center, | |||
|                           children: [ | |||
|                             const SizedBox(width: 6), | |||
|                             Container( | |||
|                               width: context.width * 26 / 540, | |||
|                               height: context.width * 26 / 540, | |||
|                               padding: const EdgeInsets.all(9), | |||
|                               margin: const EdgeInsets.symmetric(vertical: 3), | |||
|                               decoration: BoxDecoration( | |||
|                                 border: Border.all( | |||
|                                   color: Colors.white, | |||
|                                   width: 1, | |||
|                                 ), | |||
|                                 gradient: const LinearGradient( | |||
|                                   colors: [ | |||
|                                     Colors.white, | |||
|                                     Color(0xffD5D5D5), | |||
|                                   ], | |||
|                                   begin: Alignment.topCenter, | |||
|                                   end: Alignment.bottomCenter, | |||
|                                 ), | |||
|                                 shape: BoxShape.circle, | |||
|                               ), | |||
|                               child: SvgPicture.asset('refresh'.svgPath), | |||
|                             ), | |||
|                             const SizedBox(width: 8), | |||
|                             const Text( | |||
|                               'Restart', | |||
|                               style: TextStyle( | |||
|                                 color: Colors.white, | |||
|                                 fontSize: 14, | |||
|                                 fontWeight: FontWeight.bold, | |||
|                               ), | |||
|                             ), | |||
|                             const SizedBox(width: 14), | |||
|                           ], | |||
|                         ), | |||
|                       ), | |||
|                     ), | |||
|                   ), | |||
|                 ], | |||
|               ), | |||
|             ), | |||
|             Container( | |||
|               margin: EdgeInsetsDirectional.only(end: context.width * 68 / 812), | |||
|               width: context.width * 142 / 812, | |||
|               height: context.height * 280 / 375, | |||
|               child: Image( | |||
|                 image: AssetImage('avatar'.pngPath), | |||
|               ), | |||
|             ), | |||
|           ], | |||
|         ), | |||
|       ), | |||
|     ); | |||
|   } | |||
| } | |||
| @ -0,0 +1,235 @@ | |||
| import 'package:flutter/material.dart'; | |||
| import 'package:flutter_svg/flutter_svg.dart'; | |||
| import 'package:my_flutter_puzzle/utils/extensions/context_extension.dart'; | |||
| import 'package:my_flutter_puzzle/utils/extensions/string_extensions.dart'; | |||
| 
 | |||
| class WinScreen extends StatefulWidget { | |||
|   final int move; | |||
|   final int tiles; | |||
|   final int level; | |||
| 
 | |||
|   const WinScreen({ | |||
|     Key? key, | |||
|     required this.tiles, | |||
|     required this.move, | |||
|     required this.level, | |||
|   }) : super(key: key); | |||
| 
 | |||
|   @override | |||
|   State<WinScreen> createState() => _WinScreenState(); | |||
| } | |||
| 
 | |||
| class _WinScreenState extends State<WinScreen> { | |||
|   @override | |||
|   Widget build(BuildContext context) { | |||
|     return Scaffold( | |||
|       backgroundColor: const Color(0xff4400CE), | |||
|       body: SizedBox( | |||
|         width: context.width, | |||
|         height: context.height, | |||
|         child: Stack( | |||
|           alignment: AlignmentDirectional.centerEnd, | |||
|           children: [ | |||
|             Center( | |||
|               child: Stack( | |||
|                 alignment: Alignment.bottomCenter, | |||
|                 children: [ | |||
|                   Container( | |||
|                     width: context.width * 267 / 812, | |||
|                     height: context.height * 284 / 375, | |||
|                     decoration: BoxDecoration( | |||
|                       gradient: const LinearGradient( | |||
|                         colors: [ | |||
|                           Color(0xff6236FF), | |||
|                           Color(0xff4706CC), | |||
|                         ], | |||
|                         begin: Alignment.topCenter, | |||
|                         end: Alignment.bottomCenter, | |||
|                       ), | |||
|                       borderRadius: BorderRadius.circular(36), | |||
|                     ), | |||
|                     child: Column( | |||
|                       children: [ | |||
|                         const SizedBox(height: 31), | |||
|                         const Text( | |||
|                           'Well done !', | |||
|                           style: TextStyle( | |||
|                             color: Colors.white, | |||
|                             fontSize: 25, | |||
|                             fontWeight: FontWeight.bold, | |||
|                           ), | |||
|                         ), | |||
|                         const SizedBox(height: 24), | |||
|                         Container( | |||
|                           width: context.width * 114 / 812, | |||
|                           height: context.width * 114 / 812, | |||
|                           decoration: BoxDecoration( | |||
|                             gradient: const LinearGradient( | |||
|                               colors: [ | |||
|                                 Color(0xff6236FF), | |||
|                                 Color(0xff4824CB), | |||
|                               ], | |||
|                               begin: Alignment.topCenter, | |||
|                               end: Alignment.bottomCenter, | |||
|                             ), | |||
|                             shape: BoxShape.circle, | |||
|                             border: Border.all( | |||
|                               color: const Color(0xff6136FE), | |||
|                               width: 1, | |||
|                             ), | |||
|                           ), | |||
|                           child: Container( | |||
|                             margin: EdgeInsets.all(context.width * 20 / 812), | |||
|                             padding: EdgeInsets.all(context.width * 20 / 812), | |||
|                             decoration: const BoxDecoration( | |||
|                               color: Color(0xff6DD400), | |||
|                               shape: BoxShape.circle, | |||
|                             ), | |||
|                             child: SvgPicture.asset( | |||
|                               'check'.svgPath, | |||
|                               colorFilter: const ColorFilter.mode( | |||
|                                 Colors.white, | |||
|                                 BlendMode.srcIn, | |||
|                               ), | |||
|                             ), | |||
|                           ), | |||
|                         ), | |||
|                         const SizedBox(height: 19), | |||
|                         Row( | |||
|                           mainAxisAlignment: MainAxisAlignment.center, | |||
|                           children: [ | |||
|                             Row( | |||
|                               children: [ | |||
|                                 const Text( | |||
|                                   'Tiles', | |||
|                                   style: TextStyle( | |||
|                                     color: Colors.white, | |||
|                                     fontSize: 13, | |||
|                                     fontWeight: FontWeight.bold, | |||
|                                   ), | |||
|                                 ), | |||
|                                 const SizedBox(width: 9), | |||
|                                 Text( | |||
|                                   '${widget.tiles}', | |||
|                                   style: const TextStyle( | |||
|                                     decoration: TextDecoration.underline, | |||
|                                     color: Colors.white, | |||
|                                     fontSize: 13, | |||
|                                     fontWeight: FontWeight.bold, | |||
|                                   ), | |||
|                                 ), | |||
|                               ], | |||
|                             ), | |||
|                             const SizedBox(width: 42), | |||
|                             Row( | |||
|                               children: [ | |||
|                                 const Text( | |||
|                                   'Move', | |||
|                                   style: TextStyle( | |||
|                                     color: Colors.white, | |||
|                                     fontSize: 13, | |||
|                                     fontWeight: FontWeight.bold, | |||
|                                   ), | |||
|                                 ), | |||
|                                 const SizedBox(width: 9), | |||
|                                 Text( | |||
|                                   '${widget.move}', | |||
|                                   style: const TextStyle( | |||
|                                     decoration: TextDecoration.underline, | |||
|                                     color: Colors.white, | |||
|                                     fontSize: 13, | |||
|                                     fontWeight: FontWeight.bold, | |||
|                                   ), | |||
|                                 ), | |||
|                               ], | |||
|                             ), | |||
|                           ], | |||
|                         ), | |||
|                       ], | |||
|                     ), | |||
|                   ), | |||
|                   Transform.translate( | |||
|                     offset: const Offset(0, 20), | |||
|                     child: GestureDetector( | |||
|                       onTap: () { | |||
| 
 | |||
|                       }, | |||
|                       child: Container( | |||
|                         width: context.width * 160 / 812, | |||
|                         height: context.height * 51 / 375, | |||
|                         padding: const EdgeInsets.all(3), | |||
|                         decoration: BoxDecoration( | |||
|                           color: const Color(0xff979797).withOpacity(0.12), | |||
|                           borderRadius: BorderRadius.circular(36), | |||
|                         ), | |||
|                         child: Container( | |||
|                           decoration: BoxDecoration( | |||
|                             borderRadius: BorderRadius.circular(31), | |||
|                             gradient: const LinearGradient( | |||
|                               colors: [ | |||
|                                 Color(0xffFFC600), | |||
|                                 Color(0xffFF5A00), | |||
|                               ], | |||
|                               begin: Alignment.topCenter, | |||
|                               end: Alignment.bottomCenter, | |||
|                             ), | |||
|                           ), | |||
|                           child: Row( | |||
|                             mainAxisAlignment: MainAxisAlignment.center, | |||
|                             children: [ | |||
|                               const SizedBox(width: 6), | |||
|                               Container( | |||
|                                 width: context.width * 31 / 540, | |||
|                                 height: context.width * 31 / 540, | |||
|                                 padding: const EdgeInsets.all(9), | |||
|                                 margin: const EdgeInsets.symmetric(vertical: 3), | |||
|                                 decoration: BoxDecoration( | |||
|                                   border: Border.all( | |||
|                                     color: Colors.white, | |||
|                                     width: 1, | |||
|                                   ), | |||
|                                   gradient: const LinearGradient( | |||
|                                     colors: [ | |||
|                                       Colors.white, | |||
|                                       Color(0xffD5D5D5), | |||
|                                     ], | |||
|                                     begin: Alignment.topCenter, | |||
|                                     end: Alignment.bottomCenter, | |||
|                                   ), | |||
|                                   shape: BoxShape.circle, | |||
|                                 ), | |||
|                                 child: SvgPicture.asset('next_level'.svgPath), | |||
|                               ), | |||
|                               const SizedBox(width: 8), | |||
|                               const Text( | |||
|                                 'Next level', | |||
|                                 style: TextStyle( | |||
|                                   color: Colors.white, | |||
|                                   fontSize: 14, | |||
|                                   fontWeight: FontWeight.bold, | |||
|                                 ), | |||
|                               ), | |||
|                               const SizedBox(width: 14), | |||
|                             ], | |||
|                           ), | |||
|                         ), | |||
|                       ), | |||
|                     ), | |||
|                   ), | |||
|                 ], | |||
|               ), | |||
|             ), | |||
|             Container( | |||
|               margin: EdgeInsetsDirectional.only(end: context.width * 68 / 812), | |||
|               width: context.width * 142 / 812, | |||
|               height: context.height * 280 / 375, | |||
|               child: Image( | |||
|                 image: AssetImage('avatar'.pngPath), | |||
|               ), | |||
|             ), | |||
|           ], | |||
|         ), | |||
|       ), | |||
|     ); | |||
|   } | |||
| } | |||
						Write
						Preview
					
					
					Loading…
					
					Cancel
						Save
					
		Reference in new issue