├── .gitignore ├── .metadata ├── README.md ├── android ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── benzneststudios │ │ │ │ └── flutter_match_animal_game │ │ │ │ └── MainActivity.java │ │ └── res │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── assets └── images │ ├── animal │ ├── ic_alligator.png │ ├── ic_butterfly.png │ ├── ic_dog.png │ ├── ic_dolphin.png │ ├── ic_fish.png │ ├── ic_panda.png │ └── ic_pug.png │ ├── ic_color.png │ ├── people │ ├── ic_people_1.png │ ├── ic_people_2.png │ ├── ic_people_3.png │ ├── ic_people_4.png │ ├── ic_people_5.png │ ├── ic_people_6.png │ ├── ic_people_7.png │ ├── ic_people_8.png │ └── ic_people_9.png │ └── tranparent.png ├── ios ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ └── contents.xcworkspacedata └── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-1024x1024@1x.png │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ └── Icon-App-83.5x83.5@2x.png │ └── LaunchImage.imageset │ │ ├── Contents.json │ │ ├── LaunchImage.png │ │ ├── LaunchImage@2x.png │ │ ├── LaunchImage@3x.png │ │ └── README.md │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── Runner-Bridging-Header.h ├── lib ├── features │ ├── block │ │ ├── block_manager.dart │ │ └── mode │ │ │ ├── block_animal_manager.dart │ │ │ ├── block_color_manager.dart │ │ │ └── block_people_manager.dart │ ├── game │ │ ├── game_table.dart │ │ └── game_table_calculation.dart │ └── lines_match │ │ ├── lines_match_builder.dart │ │ └── lines_match_painter.dart ├── game_config.dart ├── main.dart ├── models │ ├── block.dart │ └── coordinate.dart ├── my_application.dart ├── ui │ └── screens │ │ ├── game_menu_screen.dart │ │ └── game_play_screen.dart └── utils │ └── my_utils.dart ├── pubspec.lock ├── pubspec.yaml ├── screenshot ├── 1.png ├── a1.gif ├── a2.gif ├── a3.gif └── a4.gif └── test └── widget_test.dart /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | .dart_tool/ 26 | .flutter-plugins 27 | .packages 28 | .pub-cache/ 29 | .pub/ 30 | /build/ 31 | 32 | # Android related 33 | **/android/**/gradle-wrapper.jar 34 | **/android/.gradle 35 | **/android/captures/ 36 | **/android/gradlew 37 | **/android/gradlew.bat 38 | **/android/local.properties 39 | **/android/**/GeneratedPluginRegistrant.java 40 | 41 | # iOS/XCode related 42 | **/ios/**/*.mode1v3 43 | **/ios/**/*.mode2v3 44 | **/ios/**/*.moved-aside 45 | **/ios/**/*.pbxuser 46 | **/ios/**/*.perspectivev3 47 | **/ios/**/*sync/ 48 | **/ios/**/.sconsign.dblite 49 | **/ios/**/.tags* 50 | **/ios/**/.vagrant/ 51 | **/ios/**/DerivedData/ 52 | **/ios/**/Icon? 53 | **/ios/**/Pods/ 54 | **/ios/**/.symlinks/ 55 | **/ios/**/profile 56 | **/ios/**/xcuserdata 57 | **/ios/.generated/ 58 | **/ios/Flutter/App.framework 59 | **/ios/Flutter/Flutter.framework 60 | **/ios/Flutter/Generated.xcconfig 61 | **/ios/Flutter/app.flx 62 | **/ios/Flutter/app.zip 63 | **/ios/Flutter/flutter_assets/ 64 | **/ios/ServiceDefinitions.json 65 | **/ios/Runner/GeneratedPluginRegistrant.* 66 | 67 | # Exceptions to above rules. 68 | !**/ios/**/default.mode1v3 69 | !**/ios/**/default.mode2v3 70 | !**/ios/**/default.pbxuser 71 | !**/ios/**/default.perspectivev3 72 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 73 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: eba005e94e20809eef2669194ffca1c10b66b45f 8 | channel: master 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Matching Game 2 | 3 | on Flutter 4 | 5 | 6 | ![Game Play](screenshot/1.png) 7 | 8 | ![Game Play](screenshot/a3.gif) 9 | ![Game Play](screenshot/a4.gif) 10 | 11 | ![Game Play](screenshot/a2.gif) 12 | ![Game Play](screenshot/a1.gif) 13 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 26 | 27 | android { 28 | compileSdkVersion 28 29 | 30 | lintOptions { 31 | disable 'InvalidPackage' 32 | } 33 | 34 | defaultConfig { 35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 36 | applicationId "com.benzneststudios.flutter_match_animal_game" 37 | minSdkVersion 16 38 | targetSdkVersion 28 39 | versionCode flutterVersionCode.toInteger() 40 | versionName flutterVersionName 41 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 42 | } 43 | 44 | buildTypes { 45 | release { 46 | // TODO: Add your own signing config for the release build. 47 | // Signing with the debug keys for now, so `flutter run --release` works. 48 | signingConfig signingConfigs.debug 49 | } 50 | } 51 | } 52 | 53 | flutter { 54 | source '../..' 55 | } 56 | 57 | dependencies { 58 | testImplementation 'junit:junit:4.12' 59 | androidTestImplementation 'com.android.support.test:runner:1.0.2' 60 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 61 | } 62 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 9 | 13 | 20 | 24 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/benzneststudios/flutter_match_animal_game/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.benzneststudios.flutter_match_animal_game; 2 | 3 | import android.os.Bundle; 4 | import io.flutter.app.FlutterActivity; 5 | import io.flutter.plugins.GeneratedPluginRegistrant; 6 | 7 | public class MainActivity extends FlutterActivity { 8 | @Override 9 | protected void onCreate(Bundle savedInstanceState) { 10 | super.onCreate(savedInstanceState); 11 | GeneratedPluginRegistrant.registerWith(this); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.2.1' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | jcenter() 16 | } 17 | } 18 | 19 | rootProject.buildDir = '../build' 20 | subprojects { 21 | project.buildDir = "${rootProject.buildDir}/${project.name}" 22 | } 23 | subprojects { 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip 7 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /assets/images/animal/ic_alligator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/assets/images/animal/ic_alligator.png -------------------------------------------------------------------------------- /assets/images/animal/ic_butterfly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/assets/images/animal/ic_butterfly.png -------------------------------------------------------------------------------- /assets/images/animal/ic_dog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/assets/images/animal/ic_dog.png -------------------------------------------------------------------------------- /assets/images/animal/ic_dolphin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/assets/images/animal/ic_dolphin.png -------------------------------------------------------------------------------- /assets/images/animal/ic_fish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/assets/images/animal/ic_fish.png -------------------------------------------------------------------------------- /assets/images/animal/ic_panda.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/assets/images/animal/ic_panda.png -------------------------------------------------------------------------------- /assets/images/animal/ic_pug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/assets/images/animal/ic_pug.png -------------------------------------------------------------------------------- /assets/images/ic_color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/assets/images/ic_color.png -------------------------------------------------------------------------------- /assets/images/people/ic_people_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/assets/images/people/ic_people_1.png -------------------------------------------------------------------------------- /assets/images/people/ic_people_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/assets/images/people/ic_people_2.png -------------------------------------------------------------------------------- /assets/images/people/ic_people_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/assets/images/people/ic_people_3.png -------------------------------------------------------------------------------- /assets/images/people/ic_people_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/assets/images/people/ic_people_4.png -------------------------------------------------------------------------------- /assets/images/people/ic_people_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/assets/images/people/ic_people_5.png -------------------------------------------------------------------------------- /assets/images/people/ic_people_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/assets/images/people/ic_people_6.png -------------------------------------------------------------------------------- /assets/images/people/ic_people_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/assets/images/people/ic_people_7.png -------------------------------------------------------------------------------- /assets/images/people/ic_people_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/assets/images/people/ic_people_8.png -------------------------------------------------------------------------------- /assets/images/people/ic_people_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/assets/images/people/ic_people_9.png -------------------------------------------------------------------------------- /assets/images/tranparent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/assets/images/tranparent.png -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 13 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 14 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 15 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 16 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 17 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; 18 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 19 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 20 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXCopyFilesBuildPhase section */ 24 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 25 | isa = PBXCopyFilesBuildPhase; 26 | buildActionMask = 2147483647; 27 | dstPath = ""; 28 | dstSubfolderSpec = 10; 29 | files = ( 30 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 31 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 32 | ); 33 | name = "Embed Frameworks"; 34 | runOnlyForDeploymentPostprocessing = 0; 35 | }; 36 | /* End PBXCopyFilesBuildPhase section */ 37 | 38 | /* Begin PBXFileReference section */ 39 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 40 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 41 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 42 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 43 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 44 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 45 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 46 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 47 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 48 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 49 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 51 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 52 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 53 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 54 | /* End PBXFileReference section */ 55 | 56 | /* Begin PBXFrameworksBuildPhase section */ 57 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 58 | isa = PBXFrameworksBuildPhase; 59 | buildActionMask = 2147483647; 60 | files = ( 61 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 62 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 63 | ); 64 | runOnlyForDeploymentPostprocessing = 0; 65 | }; 66 | /* End PBXFrameworksBuildPhase section */ 67 | 68 | /* Begin PBXGroup section */ 69 | 9740EEB11CF90186004384FC /* Flutter */ = { 70 | isa = PBXGroup; 71 | children = ( 72 | 3B80C3931E831B6300D905FE /* App.framework */, 73 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 74 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 75 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 76 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 77 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 78 | ); 79 | name = Flutter; 80 | sourceTree = ""; 81 | }; 82 | 97C146E51CF9000F007C117D = { 83 | isa = PBXGroup; 84 | children = ( 85 | 9740EEB11CF90186004384FC /* Flutter */, 86 | 97C146F01CF9000F007C117D /* Runner */, 87 | 97C146EF1CF9000F007C117D /* Products */, 88 | ); 89 | sourceTree = ""; 90 | }; 91 | 97C146EF1CF9000F007C117D /* Products */ = { 92 | isa = PBXGroup; 93 | children = ( 94 | 97C146EE1CF9000F007C117D /* Runner.app */, 95 | ); 96 | name = Products; 97 | sourceTree = ""; 98 | }; 99 | 97C146F01CF9000F007C117D /* Runner */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 103 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 104 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 105 | 97C147021CF9000F007C117D /* Info.plist */, 106 | 97C146F11CF9000F007C117D /* Supporting Files */, 107 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 108 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 109 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 110 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 111 | ); 112 | path = Runner; 113 | sourceTree = ""; 114 | }; 115 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | ); 119 | name = "Supporting Files"; 120 | sourceTree = ""; 121 | }; 122 | /* End PBXGroup section */ 123 | 124 | /* Begin PBXNativeTarget section */ 125 | 97C146ED1CF9000F007C117D /* Runner */ = { 126 | isa = PBXNativeTarget; 127 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 128 | buildPhases = ( 129 | 9740EEB61CF901F6004384FC /* Run Script */, 130 | 97C146EA1CF9000F007C117D /* Sources */, 131 | 97C146EB1CF9000F007C117D /* Frameworks */, 132 | 97C146EC1CF9000F007C117D /* Resources */, 133 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 134 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 135 | ); 136 | buildRules = ( 137 | ); 138 | dependencies = ( 139 | ); 140 | name = Runner; 141 | productName = Runner; 142 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 143 | productType = "com.apple.product-type.application"; 144 | }; 145 | /* End PBXNativeTarget section */ 146 | 147 | /* Begin PBXProject section */ 148 | 97C146E61CF9000F007C117D /* Project object */ = { 149 | isa = PBXProject; 150 | attributes = { 151 | LastUpgradeCheck = 0910; 152 | ORGANIZATIONNAME = "The Chromium Authors"; 153 | TargetAttributes = { 154 | 97C146ED1CF9000F007C117D = { 155 | CreatedOnToolsVersion = 7.3.1; 156 | LastSwiftMigration = 0910; 157 | }; 158 | }; 159 | }; 160 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 161 | compatibilityVersion = "Xcode 3.2"; 162 | developmentRegion = English; 163 | hasScannedForEncodings = 0; 164 | knownRegions = ( 165 | en, 166 | Base, 167 | ); 168 | mainGroup = 97C146E51CF9000F007C117D; 169 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 170 | projectDirPath = ""; 171 | projectRoot = ""; 172 | targets = ( 173 | 97C146ED1CF9000F007C117D /* Runner */, 174 | ); 175 | }; 176 | /* End PBXProject section */ 177 | 178 | /* Begin PBXResourcesBuildPhase section */ 179 | 97C146EC1CF9000F007C117D /* Resources */ = { 180 | isa = PBXResourcesBuildPhase; 181 | buildActionMask = 2147483647; 182 | files = ( 183 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 184 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 185 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, 186 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 187 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 188 | ); 189 | runOnlyForDeploymentPostprocessing = 0; 190 | }; 191 | /* End PBXResourcesBuildPhase section */ 192 | 193 | /* Begin PBXShellScriptBuildPhase section */ 194 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 195 | isa = PBXShellScriptBuildPhase; 196 | buildActionMask = 2147483647; 197 | files = ( 198 | ); 199 | inputPaths = ( 200 | ); 201 | name = "Thin Binary"; 202 | outputPaths = ( 203 | ); 204 | runOnlyForDeploymentPostprocessing = 0; 205 | shellPath = /bin/sh; 206 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 207 | }; 208 | 9740EEB61CF901F6004384FC /* Run Script */ = { 209 | isa = PBXShellScriptBuildPhase; 210 | buildActionMask = 2147483647; 211 | files = ( 212 | ); 213 | inputPaths = ( 214 | ); 215 | name = "Run Script"; 216 | outputPaths = ( 217 | ); 218 | runOnlyForDeploymentPostprocessing = 0; 219 | shellPath = /bin/sh; 220 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 221 | }; 222 | /* End PBXShellScriptBuildPhase section */ 223 | 224 | /* Begin PBXSourcesBuildPhase section */ 225 | 97C146EA1CF9000F007C117D /* Sources */ = { 226 | isa = PBXSourcesBuildPhase; 227 | buildActionMask = 2147483647; 228 | files = ( 229 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 230 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 231 | ); 232 | runOnlyForDeploymentPostprocessing = 0; 233 | }; 234 | /* End PBXSourcesBuildPhase section */ 235 | 236 | /* Begin PBXVariantGroup section */ 237 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 238 | isa = PBXVariantGroup; 239 | children = ( 240 | 97C146FB1CF9000F007C117D /* Base */, 241 | ); 242 | name = Main.storyboard; 243 | sourceTree = ""; 244 | }; 245 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 246 | isa = PBXVariantGroup; 247 | children = ( 248 | 97C147001CF9000F007C117D /* Base */, 249 | ); 250 | name = LaunchScreen.storyboard; 251 | sourceTree = ""; 252 | }; 253 | /* End PBXVariantGroup section */ 254 | 255 | /* Begin XCBuildConfiguration section */ 256 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 257 | isa = XCBuildConfiguration; 258 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 259 | buildSettings = { 260 | ALWAYS_SEARCH_USER_PATHS = NO; 261 | CLANG_ANALYZER_NONNULL = YES; 262 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 263 | CLANG_CXX_LIBRARY = "libc++"; 264 | CLANG_ENABLE_MODULES = YES; 265 | CLANG_ENABLE_OBJC_ARC = YES; 266 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 267 | CLANG_WARN_BOOL_CONVERSION = YES; 268 | CLANG_WARN_COMMA = YES; 269 | CLANG_WARN_CONSTANT_CONVERSION = YES; 270 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 271 | CLANG_WARN_EMPTY_BODY = YES; 272 | CLANG_WARN_ENUM_CONVERSION = YES; 273 | CLANG_WARN_INFINITE_RECURSION = YES; 274 | CLANG_WARN_INT_CONVERSION = YES; 275 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 276 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 277 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 278 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 279 | CLANG_WARN_STRICT_PROTOTYPES = YES; 280 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 281 | CLANG_WARN_UNREACHABLE_CODE = YES; 282 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 283 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 284 | COPY_PHASE_STRIP = NO; 285 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 286 | ENABLE_NS_ASSERTIONS = NO; 287 | ENABLE_STRICT_OBJC_MSGSEND = YES; 288 | GCC_C_LANGUAGE_STANDARD = gnu99; 289 | GCC_NO_COMMON_BLOCKS = YES; 290 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 291 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 292 | GCC_WARN_UNDECLARED_SELECTOR = YES; 293 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 294 | GCC_WARN_UNUSED_FUNCTION = YES; 295 | GCC_WARN_UNUSED_VARIABLE = YES; 296 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 297 | MTL_ENABLE_DEBUG_INFO = NO; 298 | SDKROOT = iphoneos; 299 | TARGETED_DEVICE_FAMILY = "1,2"; 300 | VALIDATE_PRODUCT = YES; 301 | }; 302 | name = Profile; 303 | }; 304 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 305 | isa = XCBuildConfiguration; 306 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 307 | buildSettings = { 308 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 309 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 310 | DEVELOPMENT_TEAM = S8QB4VV633; 311 | ENABLE_BITCODE = NO; 312 | FRAMEWORK_SEARCH_PATHS = ( 313 | "$(inherited)", 314 | "$(PROJECT_DIR)/Flutter", 315 | ); 316 | INFOPLIST_FILE = Runner/Info.plist; 317 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 318 | LIBRARY_SEARCH_PATHS = ( 319 | "$(inherited)", 320 | "$(PROJECT_DIR)/Flutter", 321 | ); 322 | PRODUCT_BUNDLE_IDENTIFIER = com.benzneststudios.flutterMatchAnimalGame; 323 | PRODUCT_NAME = "$(TARGET_NAME)"; 324 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 325 | SWIFT_VERSION = 4.0; 326 | VERSIONING_SYSTEM = "apple-generic"; 327 | }; 328 | name = Profile; 329 | }; 330 | 97C147031CF9000F007C117D /* Debug */ = { 331 | isa = XCBuildConfiguration; 332 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 333 | buildSettings = { 334 | ALWAYS_SEARCH_USER_PATHS = NO; 335 | CLANG_ANALYZER_NONNULL = YES; 336 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 337 | CLANG_CXX_LIBRARY = "libc++"; 338 | CLANG_ENABLE_MODULES = YES; 339 | CLANG_ENABLE_OBJC_ARC = YES; 340 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 341 | CLANG_WARN_BOOL_CONVERSION = YES; 342 | CLANG_WARN_COMMA = YES; 343 | CLANG_WARN_CONSTANT_CONVERSION = YES; 344 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 345 | CLANG_WARN_EMPTY_BODY = YES; 346 | CLANG_WARN_ENUM_CONVERSION = YES; 347 | CLANG_WARN_INFINITE_RECURSION = YES; 348 | CLANG_WARN_INT_CONVERSION = YES; 349 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 350 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 351 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 352 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 353 | CLANG_WARN_STRICT_PROTOTYPES = YES; 354 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 355 | CLANG_WARN_UNREACHABLE_CODE = YES; 356 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 357 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 358 | COPY_PHASE_STRIP = NO; 359 | DEBUG_INFORMATION_FORMAT = dwarf; 360 | ENABLE_STRICT_OBJC_MSGSEND = YES; 361 | ENABLE_TESTABILITY = YES; 362 | GCC_C_LANGUAGE_STANDARD = gnu99; 363 | GCC_DYNAMIC_NO_PIC = NO; 364 | GCC_NO_COMMON_BLOCKS = YES; 365 | GCC_OPTIMIZATION_LEVEL = 0; 366 | GCC_PREPROCESSOR_DEFINITIONS = ( 367 | "DEBUG=1", 368 | "$(inherited)", 369 | ); 370 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 371 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 372 | GCC_WARN_UNDECLARED_SELECTOR = YES; 373 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 374 | GCC_WARN_UNUSED_FUNCTION = YES; 375 | GCC_WARN_UNUSED_VARIABLE = YES; 376 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 377 | MTL_ENABLE_DEBUG_INFO = YES; 378 | ONLY_ACTIVE_ARCH = YES; 379 | SDKROOT = iphoneos; 380 | TARGETED_DEVICE_FAMILY = "1,2"; 381 | }; 382 | name = Debug; 383 | }; 384 | 97C147041CF9000F007C117D /* Release */ = { 385 | isa = XCBuildConfiguration; 386 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 387 | buildSettings = { 388 | ALWAYS_SEARCH_USER_PATHS = NO; 389 | CLANG_ANALYZER_NONNULL = YES; 390 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 391 | CLANG_CXX_LIBRARY = "libc++"; 392 | CLANG_ENABLE_MODULES = YES; 393 | CLANG_ENABLE_OBJC_ARC = YES; 394 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 395 | CLANG_WARN_BOOL_CONVERSION = YES; 396 | CLANG_WARN_COMMA = YES; 397 | CLANG_WARN_CONSTANT_CONVERSION = YES; 398 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 399 | CLANG_WARN_EMPTY_BODY = YES; 400 | CLANG_WARN_ENUM_CONVERSION = YES; 401 | CLANG_WARN_INFINITE_RECURSION = YES; 402 | CLANG_WARN_INT_CONVERSION = YES; 403 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 404 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 405 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 406 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 407 | CLANG_WARN_STRICT_PROTOTYPES = YES; 408 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 409 | CLANG_WARN_UNREACHABLE_CODE = YES; 410 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 411 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 412 | COPY_PHASE_STRIP = NO; 413 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 414 | ENABLE_NS_ASSERTIONS = NO; 415 | ENABLE_STRICT_OBJC_MSGSEND = YES; 416 | GCC_C_LANGUAGE_STANDARD = gnu99; 417 | GCC_NO_COMMON_BLOCKS = YES; 418 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 419 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 420 | GCC_WARN_UNDECLARED_SELECTOR = YES; 421 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 422 | GCC_WARN_UNUSED_FUNCTION = YES; 423 | GCC_WARN_UNUSED_VARIABLE = YES; 424 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 425 | MTL_ENABLE_DEBUG_INFO = NO; 426 | SDKROOT = iphoneos; 427 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 428 | TARGETED_DEVICE_FAMILY = "1,2"; 429 | VALIDATE_PRODUCT = YES; 430 | }; 431 | name = Release; 432 | }; 433 | 97C147061CF9000F007C117D /* Debug */ = { 434 | isa = XCBuildConfiguration; 435 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 436 | buildSettings = { 437 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 438 | CLANG_ENABLE_MODULES = YES; 439 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 440 | ENABLE_BITCODE = NO; 441 | FRAMEWORK_SEARCH_PATHS = ( 442 | "$(inherited)", 443 | "$(PROJECT_DIR)/Flutter", 444 | ); 445 | INFOPLIST_FILE = Runner/Info.plist; 446 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 447 | LIBRARY_SEARCH_PATHS = ( 448 | "$(inherited)", 449 | "$(PROJECT_DIR)/Flutter", 450 | ); 451 | PRODUCT_BUNDLE_IDENTIFIER = com.benzneststudios.flutterMatchAnimalGame; 452 | PRODUCT_NAME = "$(TARGET_NAME)"; 453 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 454 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 455 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 456 | SWIFT_VERSION = 4.0; 457 | VERSIONING_SYSTEM = "apple-generic"; 458 | }; 459 | name = Debug; 460 | }; 461 | 97C147071CF9000F007C117D /* Release */ = { 462 | isa = XCBuildConfiguration; 463 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 464 | buildSettings = { 465 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 466 | CLANG_ENABLE_MODULES = YES; 467 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 468 | ENABLE_BITCODE = NO; 469 | FRAMEWORK_SEARCH_PATHS = ( 470 | "$(inherited)", 471 | "$(PROJECT_DIR)/Flutter", 472 | ); 473 | INFOPLIST_FILE = Runner/Info.plist; 474 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 475 | LIBRARY_SEARCH_PATHS = ( 476 | "$(inherited)", 477 | "$(PROJECT_DIR)/Flutter", 478 | ); 479 | PRODUCT_BUNDLE_IDENTIFIER = com.benzneststudios.flutterMatchAnimalGame; 480 | PRODUCT_NAME = "$(TARGET_NAME)"; 481 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 482 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 483 | SWIFT_VERSION = 4.0; 484 | VERSIONING_SYSTEM = "apple-generic"; 485 | }; 486 | name = Release; 487 | }; 488 | /* End XCBuildConfiguration section */ 489 | 490 | /* Begin XCConfigurationList section */ 491 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 492 | isa = XCConfigurationList; 493 | buildConfigurations = ( 494 | 97C147031CF9000F007C117D /* Debug */, 495 | 97C147041CF9000F007C117D /* Release */, 496 | 249021D3217E4FDB00AE95B9 /* Profile */, 497 | ); 498 | defaultConfigurationIsVisible = 0; 499 | defaultConfigurationName = Release; 500 | }; 501 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 502 | isa = XCConfigurationList; 503 | buildConfigurations = ( 504 | 97C147061CF9000F007C117D /* Debug */, 505 | 97C147071CF9000F007C117D /* Release */, 506 | 249021D4217E4FDB00AE95B9 /* Profile */, 507 | ); 508 | defaultConfigurationIsVisible = 0; 509 | defaultConfigurationName = Release; 510 | }; 511 | /* End XCConfigurationList section */ 512 | 513 | }; 514 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 515 | } 516 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 56 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 75 | 77 | 83 | 84 | 85 | 86 | 88 | 89 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | flutter_match_animal_game 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" -------------------------------------------------------------------------------- /lib/features/block/block_manager.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_match_animal_game/features/block/mode/block_animal_manager.dart'; 3 | import 'package:flutter_match_animal_game/features/block/mode/block_color_manager.dart'; 4 | import 'package:flutter_match_animal_game/features/block/mode/block_people_manager.dart'; 5 | import 'package:flutter_match_animal_game/models/block.dart'; 6 | import 'package:flutter_match_animal_game/utils/my_utils.dart'; 7 | 8 | enum BlockMode { 9 | COLOR, 10 | ANIMAL, 11 | PEOPLE 12 | } 13 | 14 | class BlockManager { 15 | static BlockMode blockMode; 16 | static List listBlockData = List(); 17 | 18 | static init() { 19 | BlockColorManager.init(); 20 | BlockAnimalManager.init(); 21 | BlockPeopleManager.init(); 22 | 23 | setBlockMode(BlockMode.COLOR); 24 | } 25 | 26 | static void setBlockMode(BlockMode mode) { 27 | blockMode = mode; 28 | if (mode == BlockMode.COLOR) { 29 | listBlockData = BlockColorManager.listBlockColor; 30 | } else if (mode == BlockMode.ANIMAL) { 31 | listBlockData = BlockAnimalManager.listBlockAnimal; 32 | } else if (mode == BlockMode.PEOPLE) { 33 | listBlockData = BlockPeopleManager.listBlockPeople; 34 | } 35 | } 36 | 37 | static String getBlockModeName(BlockMode mode) { 38 | if (mode == BlockMode.COLOR) { 39 | return BlockColorManager.nameMode; 40 | } else if (mode == BlockMode.ANIMAL) { 41 | return BlockAnimalManager.nameMode; 42 | } else if (mode == BlockMode.PEOPLE) { 43 | return BlockPeopleManager.nameMode; 44 | } 45 | return ""; 46 | } 47 | 48 | static String getIconBlockMode(BlockMode mode) { 49 | if (mode == BlockMode.COLOR) { 50 | return BlockColorManager.icon; 51 | } else if (mode == BlockMode.ANIMAL) { 52 | return BlockAnimalManager.icon; 53 | } else if (mode == BlockMode.PEOPLE) { 54 | return BlockPeopleManager.icon; 55 | } 56 | return null; 57 | } 58 | 59 | static Block getBlock(int value) { 60 | return Block.of(listBlockData[value]); 61 | } 62 | 63 | static Block getEmptyBlock() { 64 | return Block.of(listBlockData[0]); 65 | } 66 | 67 | static Block randomBlock() { 68 | return BlockManager.getBlock(MyUtils.randomInt(min: 1, max: listBlockData.length -1)); 69 | } 70 | 71 | 72 | } 73 | -------------------------------------------------------------------------------- /lib/features/block/mode/block_animal_manager.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_match_animal_game/game_config.dart'; 3 | import 'package:flutter_match_animal_game/models/block.dart'; 4 | 5 | class BlockAnimalManager { 6 | static String nameMode = "Animal"; 7 | static List listBlockAnimal = List(); 8 | static String icon = GameConfig.BASE_ASSET_PATH + "animal/ic_dog.png"; 9 | 10 | static init() { 11 | listBlockAnimal = List() 12 | ..add(Block(value: 0, asset: GameConfig.BASE_ASSET_PATH + "tranparent.png")) // 13 | ..add(Block(value: 1, asset: GameConfig.BASE_ASSET_PATH + "animal/ic_butterfly.png")) // 14 | ..add(Block(value: 2, asset: GameConfig.BASE_ASSET_PATH + "animal/ic_dolphin.png")) // 15 | ..add(Block(value: 3, asset: GameConfig.BASE_ASSET_PATH + "animal/ic_fish.png")) // 16 | ..add(Block(value: 4, asset: GameConfig.BASE_ASSET_PATH + "animal/ic_panda.png")) // 17 | ..add(Block(value: 5, asset: GameConfig.BASE_ASSET_PATH + "animal/ic_pug.png")); // 18 | } 19 | } -------------------------------------------------------------------------------- /lib/features/block/mode/block_color_manager.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_match_animal_game/game_config.dart'; 3 | import 'package:flutter_match_animal_game/models/block.dart'; 4 | 5 | class BlockColorManager { 6 | static String nameMode = "Colors"; 7 | static List listBlockColor = List(); 8 | static String icon = GameConfig.BASE_ASSET_PATH + "ic_color.png"; 9 | 10 | static init() { 11 | listBlockColor = List() 12 | ..add(Block(value: 0, color: Colors.transparent)) // 13 | ..add(Block(value: 1, color: Colors.blue[300])) // 14 | ..add(Block(value: 2, color: Colors.red[300])) // 15 | ..add(Block(value: 3, color: Colors.green[300])) // 16 | ..add(Block(value: 4, color: Colors.purple[300])) // 17 | ..add(Block(value: 5, color: Colors.orange[300])); // 18 | } 19 | } -------------------------------------------------------------------------------- /lib/features/block/mode/block_people_manager.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_match_animal_game/game_config.dart'; 3 | import 'package:flutter_match_animal_game/models/block.dart'; 4 | 5 | class BlockPeopleManager { 6 | static String nameMode = "People"; 7 | static List listBlockPeople = List(); 8 | static String icon = GameConfig.BASE_ASSET_PATH + "people/ic_people_1.png"; 9 | 10 | static init() { 11 | listBlockPeople = List() 12 | ..add(Block(value: 0, asset: GameConfig.BASE_ASSET_PATH + "tranparent.png")) // 13 | ..add(Block(value: 1, asset: GameConfig.BASE_ASSET_PATH + "people/ic_people_1.png")) // 14 | ..add(Block(value: 2, asset: GameConfig.BASE_ASSET_PATH + "people/ic_people_2.png")) // 15 | ..add(Block(value: 3, asset: GameConfig.BASE_ASSET_PATH + "people/ic_people_3.png")) // 16 | ..add(Block(value: 4, asset: GameConfig.BASE_ASSET_PATH + "people/ic_people_4.png")) // 17 | ..add(Block(value: 5, asset: GameConfig.BASE_ASSET_PATH + "people/ic_people_5.png")) // 18 | ..add(Block(value: 6, asset: GameConfig.BASE_ASSET_PATH + "people/ic_people_6.png")) // 19 | ..add(Block(value: 7, asset: GameConfig.BASE_ASSET_PATH + "people/ic_people_7.png")) // 20 | ..add(Block(value: 8, asset: GameConfig.BASE_ASSET_PATH + "people/ic_people_8.png")) // 21 | ..add(Block(value: 9, asset: GameConfig.BASE_ASSET_PATH + "people/ic_people_9.png")); // 22 | } 23 | } 24 | 25 | -------------------------------------------------------------------------------- /lib/features/game/game_table.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | 3 | import 'package:flutter_match_animal_game/models/block.dart'; 4 | import 'package:flutter_match_animal_game/models/coordinate.dart'; 5 | import 'package:flutter_match_animal_game/game_config.dart'; 6 | import 'package:flutter_match_animal_game/features/game/game_table_calculation.dart'; 7 | import 'package:flutter_match_animal_game/features/block/block_manager.dart'; 8 | 9 | enum BorderSide { NONE, LEFT, TOP, RIGHT, BOTTOM } 10 | 11 | class LineMatchResult { 12 | bool available; 13 | Coordinate a; 14 | Coordinate b; 15 | Coordinate c; 16 | Coordinate d; 17 | 18 | LineMatchResult({this.a, this.b, this.c, this.d, this.available = false}); 19 | } 20 | 21 | class GameTable { 22 | int countRow; 23 | int countCol; 24 | double blockSize; 25 | double blockMargin; 26 | int countRenovate; 27 | List> tableData; 28 | GameTableCalculation gameTableCalculation; 29 | int countBlock; 30 | 31 | GameTable( 32 | {this.countRow = GameConfig.COUNT_ROW_DEFAULT, 33 | this.countCol = GameConfig.COUNT_COL_DEFAULT, 34 | this.blockSize = GameConfig.BLOCK_SIZE_DEFAULT, 35 | this.blockMargin = GameConfig.BLOCK_MARGIN_DEFAULT, 36 | this.countRenovate = GameConfig.COUNT_RENOVATE_DEFAULT}); 37 | 38 | void init() { 39 | initTable(); 40 | } 41 | 42 | void initTable({bool isRandom = true, int value = 1}) { 43 | countBlock = (countRow - 1) * (countCol - 1); 44 | tableData = List(); 45 | for (int row = 0; row < countRow; row++) { 46 | List listBlock = List(); 47 | for (int col = 0; col < countCol; col++) { 48 | if (isOuterBlock(Coordinate(row: row, col: col))) { 49 | listBlock.add(BlockManager.getEmptyBlock()); 50 | } else { 51 | if (isRandom) { 52 | listBlock.add(BlockManager.randomBlock()); 53 | } else { 54 | listBlock.add(BlockManager.getBlock(value)); 55 | } 56 | } 57 | } 58 | tableData.add(listBlock); 59 | } 60 | } 61 | 62 | removeBlock(Coordinate coor) { 63 | if (coor != null) { 64 | tableData[coor.row][coor.col] = BlockManager.getEmptyBlock(); 65 | } 66 | } 67 | 68 | bool isOuterBlock(Coordinate coor) { 69 | return coor.row == 0 || 70 | coor.row == countRow - 1 || 71 | coor.col == 0 || 72 | coor.col == countCol - 1; 73 | } 74 | 75 | bool isBorderBlock(Coordinate coor) { 76 | return coor.row == 1 || 77 | coor.row == countRow - 2 || 78 | coor.col == 1 || 79 | coor.col == countCol - 2; 80 | } 81 | 82 | bool isBlockEmpty(Coordinate coor) { 83 | return getTableValue(Coordinate(row: coor.row, col: coor.col)) == 0; 84 | } 85 | 86 | BorderSide getBorderSideBlock(Coordinate source, Coordinate target) { 87 | if (source.row == 1 && target.row == 1) { 88 | return BorderSide.TOP; 89 | } else if (source.row == countRow - 2 && target.row == countRow - 2) { 90 | return BorderSide.BOTTOM; 91 | } else if (source.col == 1 && target.col == 1) { 92 | return BorderSide.LEFT; 93 | } else if (source.col == countCol - 2 && target.col == countCol - 2) { 94 | return BorderSide.RIGHT; 95 | } 96 | return BorderSide.NONE; 97 | } 98 | 99 | bool isPathAttachBlock(Coordinate source, Coordinate target) { 100 | if (source.row == target.row) { 101 | if (source.col + 1 == target.col || source.col - 1 == target.col) { 102 | return true; 103 | } 104 | } else if (source.col == target.col) { 105 | if (source.row + 1 == target.row || source.row - 1 == target.row) { 106 | return true; 107 | } 108 | } 109 | 110 | return false; 111 | } 112 | 113 | bool isBlockInSameAxis(Coordinate source, Coordinate target) { 114 | return source.row == target.row || source.col == target.col; 115 | } 116 | 117 | int getTableValue(Coordinate coor) { 118 | return tableData[coor.row][coor.col].value; 119 | } 120 | 121 | bool isValueMatch(Coordinate source, Coordinate target) { 122 | return getTableValue(source) == getTableValue(target); 123 | } 124 | 125 | LineMatchResult checkBlockMatch(Coordinate source, Coordinate target) { 126 | if (isValueMatch(source, target)) { 127 | gameTableCalculation = GameTableCalculation(this); 128 | if (isPathAttachBlock(source, target)) { 129 | return gameTableCalculation.makePathAttachCase(source, target); 130 | } else if (isPathOnBorder(source, target)) { 131 | return gameTableCalculation.makePathBorderCase(source, target); 132 | } else { 133 | // For case L and U 134 | gameTableCalculation.prepareCalculation(); 135 | gameTableCalculation.calculatePossiblePath(source, target); 136 | 137 | if (gameTableCalculation.isPathL()) { 138 | return gameTableCalculation.makePathL(source, target); 139 | } else { 140 | gameTableCalculation.calculatePathU(); 141 | if (gameTableCalculation.isPathU()) { 142 | return gameTableCalculation.makePathU(source, target); 143 | } 144 | } 145 | } 146 | } else { 147 | print("value block is not match."); 148 | } 149 | 150 | LineMatchResult result = LineMatchResult(); 151 | return result; 152 | } 153 | 154 | bool isPathOnBorder(Coordinate source, Coordinate target) { 155 | return isBorderBlock(source) && 156 | isBorderBlock(target) && 157 | isBlockInSameAxis(source, target); 158 | } 159 | 160 | void renovate() { 161 | for (int row = 1; row < countRow - 1; row++) { 162 | for (int col = 1; col < countCol - 1; col++) { 163 | Coordinate coor = Coordinate(row: row, col: col); 164 | if (!isBlockEmpty(coor)) { 165 | tableData[row][col] = BlockManager.randomBlock(); 166 | } 167 | } 168 | } 169 | } 170 | 171 | bool canRenovate() { 172 | return countRenovate > 0; 173 | } 174 | } 175 | -------------------------------------------------------------------------------- /lib/features/game/game_table_calculation.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_match_animal_game/models/coordinate.dart'; 2 | import 'package:flutter_match_animal_game/features/game/game_table.dart'; 3 | 4 | enum MarkPathStatus { DONE, VISIT_INTERSECTION, FAIL } 5 | enum CoordinateType { NORMAL, SOURCE, TARGET } 6 | 7 | class IntersectionPoint { 8 | Coordinate a; 9 | Coordinate b; 10 | 11 | IntersectionPoint({this.a, this.b}); 12 | 13 | bool isOnlyA() { 14 | return a != null && b == null; 15 | } 16 | 17 | bool isBothAvailable() { 18 | return a != null && b != null; 19 | } 20 | } 21 | 22 | class GameTableCalculation { 23 | GameTable gameTable; 24 | List> tableCoordinateCalculationTempSource; 25 | List listCoordinateCalculationTempSource; 26 | List> tableCoordinateCalculationTempTarget; 27 | List listCoordinateCalculationTempTarget; 28 | 29 | // For case U inside table. 30 | IntersectionPoint intersectionPoint; 31 | 32 | GameTableCalculation(this.gameTable); 33 | 34 | void prepareCalculation() { 35 | intersectionPoint = IntersectionPoint(); 36 | listCoordinateCalculationTempSource = List(); 37 | tableCoordinateCalculationTempSource = List(); 38 | tableCoordinateCalculationTempTarget = List(); 39 | listCoordinateCalculationTempTarget = List(); 40 | 41 | for (int row = 0; row < gameTable.countRow; row++) { 42 | List listSource = List(); 43 | List listTarget = List(); 44 | for (int col = 0; col < gameTable.countCol; col++) { 45 | listSource.add(false); 46 | listTarget.add(false); 47 | } 48 | 49 | tableCoordinateCalculationTempSource.add(listSource); 50 | tableCoordinateCalculationTempTarget.add(listTarget); 51 | } 52 | } 53 | 54 | bool isPathL() { 55 | return intersectionPoint.isOnlyA(); 56 | } 57 | 58 | bool isPathU() { 59 | return intersectionPoint.isBothAvailable(); 60 | } 61 | 62 | LineMatchResult makePathL(Coordinate source, Coordinate target) { 63 | LineMatchResult result = LineMatchResult(); 64 | if (intersectionPoint.isOnlyA()) { 65 | result.a = source; 66 | result.b = intersectionPoint.a; 67 | result.c = target; 68 | result.available = true; 69 | } 70 | return result; 71 | } 72 | 73 | LineMatchResult makePathU(Coordinate source, Coordinate target) { 74 | LineMatchResult result = LineMatchResult(); 75 | if (intersectionPoint.isBothAvailable()) { 76 | result.a = source; 77 | result.b = intersectionPoint.a; 78 | result.c = intersectionPoint.b; 79 | result.d = target; 80 | result.available = true; 81 | } 82 | return result; 83 | } 84 | 85 | LineMatchResult makePathAttachCase(Coordinate source, Coordinate target) { 86 | LineMatchResult result = LineMatchResult(); 87 | result.a = source; 88 | result.b = target; 89 | result.available = true; 90 | return result; 91 | } 92 | 93 | LineMatchResult makePathBorderCase(Coordinate source, Coordinate target) { 94 | LineMatchResult result = LineMatchResult(); 95 | BorderSide borderSide = gameTable.getBorderSideBlock(source, target); 96 | result.a = Coordinate.of(source); 97 | if (borderSide == BorderSide.TOP) { 98 | result.b = Coordinate.of(source, addRow: -1); 99 | result.c = Coordinate.of(target, addRow: -1); 100 | } else if (borderSide == BorderSide.LEFT) { 101 | result.b = Coordinate.of(source, addCol: -1); 102 | result.c = Coordinate.of(target, addCol: -1); 103 | } else if (borderSide == BorderSide.BOTTOM) { 104 | result.b = Coordinate.of(source, addRow: 1); 105 | result.c = Coordinate.of(target, addRow: 1); 106 | } else if (borderSide == BorderSide.RIGHT) { 107 | result.b = Coordinate.of(source, addCol: 1); 108 | result.c = Coordinate.of(target, addCol: 1); 109 | } 110 | 111 | result.d = Coordinate.of(target); 112 | result.available = true; 113 | return result; 114 | } 115 | 116 | void calculatePossiblePath(Coordinate source, Coordinate target) { 117 | markPath(source, coorType: CoordinateType.SOURCE); 118 | markPath(target, coorType: CoordinateType.TARGET); 119 | } 120 | 121 | CoordinateAxis inverseCoordinateAxis(CoordinateAxis axis) { 122 | if (axis == CoordinateAxis.Y) { 123 | return CoordinateAxis.X; 124 | } else if (axis == CoordinateAxis.X) { 125 | return CoordinateAxis.Y; 126 | } 127 | return CoordinateAxis.NONE; 128 | } 129 | 130 | void calculatePathU() { 131 | for (Coordinate coor in listCoordinateCalculationTempSource) { 132 | coor.printData(); 133 | } 134 | 135 | for (Coordinate coor in listCoordinateCalculationTempSource) { 136 | if (coor.axis != CoordinateAxis.NONE) { 137 | Coordinate coorIntersection = 138 | seekPathBetweenTarget(coor, axis: inverseCoordinateAxis(coor.axis)); 139 | if (coorIntersection != null) { 140 | intersectionPoint.a = coor; 141 | intersectionPoint.b = coorIntersection; 142 | return; 143 | } 144 | } 145 | } 146 | } 147 | 148 | Coordinate markPath(Coordinate coor, 149 | {CoordinateAxis axis = CoordinateAxis.NONE, 150 | CoordinateType coorType = CoordinateType.SOURCE}) { 151 | if (axis == CoordinateAxis.NONE || axis == CoordinateAxis.Y) { 152 | for (int row = coor.row - 1; row >= 0; row--) { 153 | Coordinate subCoor = Coordinate(row: row, col: coor.col); 154 | 155 | MarkPathStatus status = 156 | markCoordinateOnPath(subCoor, CoordinateAxis.Y, coorType); 157 | if (status == MarkPathStatus.FAIL) { 158 | break; 159 | } else if (status == MarkPathStatus.VISIT_INTERSECTION) { 160 | return subCoor; 161 | } 162 | } 163 | 164 | for (int row = coor.row + 1; row < gameTable.countRow; row++) { 165 | Coordinate subCoor = Coordinate(row: row, col: coor.col); 166 | MarkPathStatus status = 167 | markCoordinateOnPath(subCoor, CoordinateAxis.Y, coorType); 168 | if (status == MarkPathStatus.FAIL) { 169 | break; 170 | } else if (status == MarkPathStatus.VISIT_INTERSECTION) { 171 | return subCoor; 172 | } 173 | } 174 | } 175 | 176 | if (axis == CoordinateAxis.NONE || axis == CoordinateAxis.X) { 177 | for (int col = coor.col - 1; col >= 0; col--) { 178 | Coordinate subCoor = Coordinate(row: coor.row, col: col); 179 | MarkPathStatus status = 180 | markCoordinateOnPath(subCoor, CoordinateAxis.X, coorType); 181 | if (status == MarkPathStatus.FAIL) { 182 | break; 183 | } else if (status == MarkPathStatus.VISIT_INTERSECTION) { 184 | return subCoor; 185 | } 186 | } 187 | 188 | for (int col = coor.col + 1; col < gameTable.countCol; col++) { 189 | Coordinate subCoor = Coordinate(row: coor.row, col: col); 190 | MarkPathStatus status = 191 | markCoordinateOnPath(subCoor, CoordinateAxis.X, coorType); 192 | if (status == MarkPathStatus.FAIL) { 193 | break; 194 | } else if (status == MarkPathStatus.VISIT_INTERSECTION) { 195 | return subCoor; 196 | } 197 | } 198 | } 199 | 200 | return null; 201 | } 202 | 203 | MarkPathStatus markCoordinateOnPath( 204 | Coordinate subCoor, CoordinateAxis axis, CoordinateType coorType) { 205 | if (gameTable.isBlockEmpty(subCoor)) { 206 | if (isIntersectionOnSourcePath(subCoor)) { 207 | intersectionPoint.a = Coordinate.ofAxis(subCoor, axis); 208 | return MarkPathStatus.VISIT_INTERSECTION; 209 | } else { 210 | if (coorType == CoordinateType.SOURCE) { 211 | markTableTempSource(subCoor, axis); 212 | } else if (coorType == CoordinateType.TARGET) { 213 | markTableTempTarget(subCoor, axis); 214 | } 215 | return MarkPathStatus.DONE; 216 | } 217 | } else { 218 | return MarkPathStatus.FAIL; 219 | } 220 | } 221 | 222 | bool isIntersectionOnSourcePath(Coordinate coor) { 223 | return tableCoordinateCalculationTempSource[coor.row][coor.col]; 224 | } 225 | 226 | markTableTempSource(Coordinate coor, CoordinateAxis axis) { 227 | tableCoordinateCalculationTempSource[coor.row][coor.col] = true; 228 | listCoordinateCalculationTempSource.add(Coordinate.ofAxis(coor, axis)); 229 | } 230 | 231 | markTableTempTarget(Coordinate coor, CoordinateAxis axis) { 232 | tableCoordinateCalculationTempTarget[coor.row][coor.col] = true; 233 | listCoordinateCalculationTempTarget.add(Coordinate.ofAxis(coor, axis)); 234 | } 235 | 236 | Coordinate seekPathBetweenTarget(Coordinate coor, 237 | {CoordinateAxis axis = CoordinateAxis.NONE}) { 238 | if (axis == CoordinateAxis.NONE || axis == CoordinateAxis.Y) { 239 | for (int row = coor.row - 1; row >= 0; row--) { 240 | Coordinate subCoor = Coordinate(row: row, col: coor.col); 241 | if (gameTable.isBlockEmpty(subCoor)) { 242 | if (isInTargetTemp(subCoor)) { 243 | return subCoor; 244 | } 245 | } else { 246 | break; 247 | } 248 | } 249 | 250 | for (int row = coor.row + 1; row < gameTable.countRow; row++) { 251 | Coordinate subCoor = Coordinate(row: row, col: coor.col); 252 | if (gameTable.isBlockEmpty(subCoor)) { 253 | if (isInTargetTemp(subCoor)) { 254 | return subCoor; 255 | } 256 | } else { 257 | break; 258 | } 259 | } 260 | } 261 | 262 | if (axis == CoordinateAxis.NONE || axis == CoordinateAxis.X) { 263 | for (int col = coor.col - 1; col >= 0; col--) { 264 | Coordinate subCoor = Coordinate(row: coor.row, col: col); 265 | if (gameTable.isBlockEmpty(subCoor)) { 266 | if (isInTargetTemp(subCoor)) { 267 | return subCoor; 268 | } 269 | } else { 270 | break; 271 | } 272 | } 273 | 274 | for (int col = coor.col + 1; col < gameTable.countCol; col++) { 275 | Coordinate subCoor = Coordinate(row: coor.row, col: col); 276 | if (gameTable.isBlockEmpty(subCoor)) { 277 | if (isInTargetTemp(subCoor)) { 278 | return subCoor; 279 | } 280 | } else { 281 | break; 282 | } 283 | } 284 | } 285 | 286 | return null; 287 | } 288 | 289 | bool isInTargetTemp(Coordinate coor) { 290 | for (Coordinate subCoor in listCoordinateCalculationTempTarget) { 291 | print("------"); 292 | print( 293 | "coor [${coor.row},${coor.col}] == ${subCoor.row},${subCoor.col}] "); 294 | if (coor.equals(subCoor)) { 295 | return true; 296 | } 297 | } 298 | return false; 299 | } 300 | } 301 | -------------------------------------------------------------------------------- /lib/features/lines_match/lines_match_builder.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_match_animal_game/models/coordinate.dart'; 3 | import 'package:flutter_match_animal_game/game_config.dart'; 4 | import 'package:flutter_match_animal_game/features/game/game_table.dart'; 5 | import 'package:flutter_match_animal_game/features/lines_match/lines_match_painter.dart'; 6 | 7 | class LineMatchBuilder { 8 | double marginLineFromBlock = 5; 9 | GameTable gameTable; 10 | 11 | LineMatchBuilder( 12 | {@required this.gameTable, 13 | this.marginLineFromBlock = GameConfig 14 | .MARGIN_LINE_FROM_BLOCK}); // double BASE_HEIGHT_LINE = 15; 15 | 16 | LinesMatchPainter build( 17 | {Coordinate a, Coordinate b, Coordinate c, Coordinate d}) { 18 | Offset offsetA = getCenterOffsetBlock(a); 19 | Offset offsetB = getCenterOffsetBlock(b); 20 | Offset offsetC = getCenterOffsetBlock(c); 21 | Offset offsetD = getCenterOffsetBlock(d); 22 | 23 | return LinesMatchPainter( 24 | offsetA: offsetA, offsetB: offsetB, offsetC: offsetC, offsetD: offsetD); 25 | } 26 | 27 | Offset getCenterOffsetBlock(Coordinate coor) { 28 | if(coor != null) { 29 | double dx = ((coor.col + 1) * (gameTable.blockMargin * 2)) + 30 | (coor.col * gameTable.blockSize) + 31 | (gameTable.blockSize / 2); 32 | double dy = ((coor.row + 1) * (gameTable.blockMargin * 2)) + 33 | (coor.row * gameTable.blockSize) + 34 | (gameTable.blockSize / 2); 35 | 36 | return Offset(dx, dy); 37 | } 38 | return null; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /lib/features/lines_match/lines_match_painter.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class LinesMatchPainter extends CustomPainter { 4 | Offset offsetA; 5 | Offset offsetB; 6 | Offset offsetC; 7 | Offset offsetD; 8 | 9 | LinesMatchPainter.empty(); 10 | 11 | LinesMatchPainter({this.offsetA, this.offsetB, this.offsetC, this.offsetD}); 12 | 13 | @override 14 | void paint(Canvas canvas, Size size) { 15 | Paint paint = Paint() 16 | ..strokeWidth = 5.0 17 | ..strokeCap = StrokeCap.round 18 | ..color = Colors.yellow[800]; 19 | 20 | if (offsetA != null && offsetB != null) { 21 | canvas.drawLine(offsetA, offsetB, paint); 22 | } 23 | 24 | if (offsetB != null && offsetC != null) { 25 | canvas.drawLine(offsetB, offsetC, paint); 26 | } 27 | 28 | if (offsetC != null && offsetD != null) { 29 | canvas.drawLine(offsetC, offsetD, paint); 30 | } 31 | 32 | // canvas.drawPaint(paint); 33 | } 34 | 35 | @override 36 | bool shouldRepaint(CustomPainter oldDelegate) => false; 37 | } 38 | -------------------------------------------------------------------------------- /lib/game_config.dart: -------------------------------------------------------------------------------- 1 | class GameConfig{ 2 | static const int COUNT_ROW_DEFAULT = 10; 3 | static const int COUNT_COL_DEFAULT = 20; 4 | static const double BLOCK_SIZE_DEFAULT = 27; 5 | static const double BLOCK_MARGIN_DEFAULT = 2; 6 | static const double MARGIN_LINE_FROM_BLOCK = 5; 7 | static const double BASE_HEIGHT_LINE = 15; 8 | static const int COUNT_RENOVATE_DEFAULT = 2; 9 | static const String BASE_ASSET_PATH = "assets/images/"; 10 | } -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/services.dart'; 3 | import 'package:flutter_match_animal_game/ui/screens/game_menu_screen.dart'; 4 | import 'package:flutter_match_animal_game/ui/screens/game_play_screen.dart'; 5 | import 'package:flutter_match_animal_game/my_application.dart'; 6 | 7 | void main() { 8 | MyApplication.init(); 9 | runApp(MyApp()); 10 | } 11 | 12 | class MyApp extends StatelessWidget { 13 | @override 14 | Widget build(BuildContext context) { 15 | SystemChrome.setPreferredOrientations([ 16 | DeviceOrientation.landscapeRight, 17 | DeviceOrientation.landscapeLeft, 18 | ]); 19 | return MaterialApp( 20 | debugShowCheckedModeBanner: false, 21 | title: 'Onet Game'.toUpperCase(), 22 | theme: ThemeData( 23 | primarySwatch: Colors.blue, 24 | ), 25 | home: GameMenuScreen(title: 'Onet Game'.toUpperCase()), 26 | ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/models/block.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_match_animal_game/models/coordinate.dart'; 3 | 4 | class Block { 5 | int value; 6 | Color color; 7 | String asset; 8 | 9 | Block({this.value = 0, this.color, this.asset}); 10 | 11 | Block.of(Block data) { 12 | value = data.value; 13 | color = data.color; 14 | asset = data.asset; 15 | } 16 | 17 | isColorBlock(){ 18 | return color != null; 19 | } 20 | 21 | isImageBlock(){ 22 | return asset != null; 23 | } 24 | 25 | 26 | } 27 | -------------------------------------------------------------------------------- /lib/models/coordinate.dart: -------------------------------------------------------------------------------- 1 | enum CoordinateAxis { NONE, X, Y } 2 | 3 | class Coordinate { 4 | int row; 5 | int col; 6 | CoordinateAxis axis; 7 | 8 | Coordinate({this.row = 0, this.col = 0, this.axis = CoordinateAxis.NONE}); 9 | 10 | Coordinate.of(Coordinate coor, {int addRow = 0, int addCol = 0}) { 11 | row = coor.row + addRow; 12 | col = coor.col + addCol; 13 | axis = coor.axis; 14 | } 15 | 16 | Coordinate.ofAxis(Coordinate coor, CoordinateAxis axis) { 17 | this.row = coor.row; 18 | this.col = coor.col; 19 | this.axis = axis; 20 | } 21 | 22 | bool equals(Coordinate coor) { 23 | if (coor != null) { 24 | return row == coor.row && col == coor.col; 25 | } 26 | return false; 27 | } 28 | 29 | printData() { 30 | print("$row , $col , $axis"); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lib/my_application.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_match_animal_game/features/block/block_manager.dart'; 2 | 3 | class MyApplication{ 4 | static init(){ 5 | BlockManager.init(); 6 | } 7 | } -------------------------------------------------------------------------------- /lib/ui/screens/game_menu_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/services.dart'; 3 | import 'package:flutter_match_animal_game/features/block/block_manager.dart'; 4 | import 'package:flutter_match_animal_game/features/block/mode/block_animal_manager.dart'; 5 | import 'package:flutter_match_animal_game/features/block/mode/block_color_manager.dart'; 6 | import 'package:flutter_match_animal_game/features/block/mode/block_people_manager.dart'; 7 | import 'package:flutter_match_animal_game/ui/screens/game_play_screen.dart'; 8 | 9 | class GameMenuScreen extends StatefulWidget { 10 | GameMenuScreen({Key key, this.title}) : super(key: key); 11 | 12 | final String title; 13 | 14 | @override 15 | _GameMenuScreenState createState() => _GameMenuScreenState(); 16 | } 17 | 18 | class _GameMenuScreenState extends State { 19 | BlockMode currentBlockMode; 20 | 21 | @override 22 | void initState() { 23 | currentBlockMode = BlockManager.blockMode; 24 | super.initState(); 25 | } 26 | 27 | @override 28 | dispose() { 29 | super.dispose(); 30 | } 31 | 32 | @override 33 | Widget build(BuildContext context) { 34 | 35 | return Scaffold( 36 | appBar: buildAppBar(), 37 | body: buildBody("Home"), 38 | floatingActionButton: buildFloatingActionButton(), 39 | floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat, 40 | ); 41 | } 42 | 43 | Widget buildBody(String data) { 44 | return Container( 45 | decoration: BoxDecoration( 46 | gradient: LinearGradient(colors: [Colors.green[100], Colors.yellow[100]], begin: Alignment.topLeft, end: Alignment.bottomRight)), 47 | child: ListView(children: [ 48 | Container( 49 | child: Container( 50 | padding: EdgeInsets.all(32), 51 | margin: EdgeInsets.symmetric(vertical: 32, horizontal: 64), 52 | decoration: BoxDecoration(boxShadow: [ 53 | BoxShadow( 54 | color: Colors.green[100], 55 | offset: Offset(0, 5), 56 | blurRadius: 20, 57 | spreadRadius: 5) 58 | ], color: Colors.white, borderRadius: BorderRadius.circular(16)), 59 | child: 60 | Column(mainAxisSize: MainAxisSize.min, children: [ 61 | Text("Mode".toUpperCase(), 62 | style: TextStyle( 63 | color: Colors.black54, 64 | fontSize: 20, 65 | fontWeight: FontWeight.bold)), 66 | Padding( 67 | padding: EdgeInsets.all(8.0), 68 | child: Text(BlockManager.getBlockModeName(currentBlockMode).toUpperCase(), 69 | style: TextStyle( 70 | color: Colors.black54, 71 | fontSize: 16, 72 | fontWeight: FontWeight.bold)), 73 | ), 74 | Row( 75 | mainAxisAlignment: MainAxisAlignment.center, 76 | mainAxisSize: MainAxisSize.min, 77 | children: [ 78 | buildBlockModeContainer(BlockMode.COLOR), 79 | buildBlockModeContainer(BlockMode.ANIMAL), 80 | buildBlockModeContainer(BlockMode.PEOPLE), 81 | ], 82 | ), 83 | ]))) 84 | ]), 85 | ); 86 | } 87 | 88 | Widget buildBlockModeContainer(BlockMode blockMode) { 89 | String icon = BlockManager.getIconBlockMode(blockMode); 90 | 91 | if (blockMode == currentBlockMode) { 92 | return Container( 93 | width: 50, 94 | height: 50, 95 | margin: EdgeInsets.symmetric(horizontal: 4), 96 | decoration: BoxDecoration( 97 | border: Border.all(color: Colors.blue, width: 4), 98 | borderRadius: BorderRadius.circular(6)), 99 | child: Image.asset(icon, width: 50, height: 50,), 100 | ); 101 | } else { 102 | return GestureDetector(child: Opacity(opacity: 0.4, child: Container( 103 | width: 50, 104 | height: 50, 105 | margin: EdgeInsets.symmetric(horizontal: 4), 106 | decoration: BoxDecoration( 107 | border: Border.all(color: Colors.grey[300], width: 4), 108 | borderRadius: BorderRadius.circular(6)), 109 | child: Image.asset(icon, width: 50, height: 50,), 110 | )), onTap: () { 111 | setState(() { 112 | currentBlockMode = blockMode; 113 | BlockManager.setBlockMode(blockMode); 114 | }); 115 | }); 116 | } 117 | } 118 | 119 | FloatingActionButton buildFloatingActionButton() { 120 | return FloatingActionButton.extended( 121 | label: Text("Start".toUpperCase()), 122 | icon: Icon(Icons.check), 123 | backgroundColor: Colors.orange[300], 124 | onPressed: () { 125 | startGame(); 126 | }, 127 | tooltip: 'Increment', 128 | ); 129 | } 130 | 131 | AppBar buildAppBar() { 132 | return AppBar( 133 | centerTitle: true, 134 | backgroundColor: Colors.green[200], 135 | elevation: 0, 136 | title: Text(widget.title), 137 | actions: [ 138 | // IconButton(icon: Icon(Icons.search), onPressed: () {}), 139 | // IconButton(icon: Icon(Icons.more_vert), onPressed: () {}) 140 | ], 141 | ); 142 | } 143 | 144 | void startGame() { 145 | Navigator.push(context, MaterialPageRoute(builder: (context) => GamePlayScreen())); 146 | } 147 | } 148 | -------------------------------------------------------------------------------- /lib/ui/screens/game_play_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/services.dart'; 3 | import 'package:flutter_match_animal_game/models/block.dart'; 4 | import 'package:flutter_match_animal_game/models/coordinate.dart'; 5 | import 'package:flutter_match_animal_game/game_config.dart'; 6 | import 'package:flutter_match_animal_game/features/game/game_table.dart'; 7 | import 'package:flutter_match_animal_game/features/lines_match/lines_match_builder.dart'; 8 | import 'package:flutter_match_animal_game/features/lines_match/lines_match_painter.dart'; 9 | 10 | class GamePlayScreen extends StatefulWidget { 11 | GamePlayScreen({Key key}) : super(key: key); 12 | 13 | @override 14 | _GamePlayScreenState createState() => _GamePlayScreenState(); 15 | } 16 | 17 | class _GamePlayScreenState extends State { 18 | GameTable gameTable; 19 | Coordinate coordinateSelected; 20 | LinesMatchPainter linesMatchPainter; 21 | 22 | @override 23 | void initState() { 24 | gameTable = GameTable( 25 | countRow: GameConfig.COUNT_ROW_DEFAULT, 26 | countCol: GameConfig.COUNT_COL_DEFAULT, 27 | blockSize: GameConfig.BLOCK_SIZE_DEFAULT); 28 | gameTable.init(); 29 | 30 | linesMatchPainter = null; 31 | 32 | super.initState(); 33 | } 34 | 35 | bool isSelectedMode() { 36 | return coordinateSelected != null; 37 | } 38 | 39 | @override 40 | dispose() { 41 | super.dispose(); 42 | } 43 | 44 | @override 45 | Widget build(BuildContext context) { 46 | 47 | return Scaffold( 48 | appBar: AppBar( 49 | backgroundColor: Colors.green[200], 50 | title: Text("Onet story".toUpperCase()), 51 | centerTitle: true, 52 | elevation: 0, 53 | actions: [ 54 | Opacity( 55 | opacity: gameTable.canRenovate() ? 1 : 0.2, 56 | child: FlatButton.icon( 57 | label: Container( 58 | decoration: BoxDecoration( 59 | borderRadius: BorderRadius.circular(4), 60 | color: Colors.red[200], 61 | ), 62 | padding: EdgeInsets.all(4), 63 | child: Text("${gameTable.countRenovate}", 64 | style: TextStyle(color: Colors.white))), 65 | icon: Icon(Icons.crop_rotate, color: Colors.white), 66 | onPressed: () => renovateTable())), 67 | FlatButton( 68 | child: Text( 69 | '${gameTable.countBlock}', 70 | style: TextStyle(color: Colors.white), 71 | ), 72 | onPressed: () {}), 73 | ], 74 | ), 75 | body: GestureDetector( 76 | child: Container( 77 | color: Colors.green[100], 78 | child: Center( 79 | child: CustomPaint( 80 | painter: linesMatchPainter, 81 | child: Container(child: buildGameTable())))), 82 | onTap: () { 83 | clear(); 84 | })); 85 | } 86 | 87 | buildGameTable() { 88 | List listRow = List(); 89 | for (int row = 0; row < gameTable.countRow; row++) { 90 | List listBlock = List(); 91 | for (int col = 0; col < gameTable.countCol; col++) { 92 | Block block = gameTable.tableData[row][col]; 93 | Coordinate coor = Coordinate(row: row, col: col); 94 | listBlock.add(GestureDetector( 95 | child: buildBlock(block, isSelected: coor.equals(coordinateSelected)), 96 | onTap: () { 97 | selectBlock(block, coor); 98 | }, 99 | )); 100 | } 101 | listRow.add(Row(mainAxisSize: MainAxisSize.min, children: listBlock)); 102 | } 103 | 104 | return Column(mainAxisSize: MainAxisSize.min, children: listRow); 105 | } 106 | 107 | Container buildBlock(Block block, {bool isSelected = false}) { 108 | if (block.isColorBlock()) { 109 | return buildBlockColor(block, isSelected: isSelected); 110 | } else { 111 | return buildBlockImage(block, isSelected: isSelected); 112 | } 113 | } 114 | 115 | Container buildBlockColor(Block block, {bool isSelected = false}) { 116 | if (block.value != 0 && isSelected) { 117 | return Container( 118 | margin: EdgeInsets.all(2), 119 | width: gameTable.blockSize, 120 | height: gameTable.blockSize, 121 | decoration: BoxDecoration( 122 | borderRadius: BorderRadius.circular(2), 123 | color: block.color, 124 | ), 125 | child: Icon(Icons.check, color: Colors.white), 126 | ); 127 | } else { 128 | return Container( 129 | margin: EdgeInsets.all(2), 130 | width: gameTable.blockSize, 131 | height: gameTable.blockSize, 132 | decoration: BoxDecoration( 133 | borderRadius: BorderRadius.circular(2), 134 | color: block.color, 135 | )); 136 | } 137 | } 138 | 139 | Container buildBlockImage(Block block, {bool isSelected = false}) { 140 | if (block.value != 0 && isSelected) { 141 | return Container( 142 | margin: EdgeInsets.all(2), 143 | width: gameTable.blockSize, 144 | height: gameTable.blockSize, 145 | decoration: BoxDecoration( 146 | borderRadius: BorderRadius.circular(2), 147 | border: Border.all(color: Colors.blue[600], width: 4), 148 | color: Colors.grey[200] 149 | ), 150 | child: Image.asset(block.asset, 151 | width: gameTable.blockSize, 152 | height: gameTable.blockSize), 153 | ); 154 | } else { 155 | if (block.value == 0) { 156 | return Container( 157 | margin: EdgeInsets.all(2), 158 | width: gameTable.blockSize, 159 | height: gameTable.blockSize); 160 | } else { 161 | return Container( 162 | margin: EdgeInsets.all(2), 163 | width: gameTable.blockSize, 164 | height: gameTable.blockSize, 165 | decoration: BoxDecoration( 166 | borderRadius: BorderRadius.circular(2), 167 | color: Colors.blue[200] 168 | ), 169 | child: Image.asset(block.asset, 170 | width: gameTable.blockSize, 171 | height: gameTable.blockSize)); 172 | } 173 | } 174 | } 175 | 176 | clear() { 177 | setState(() { 178 | coordinateSelected = null; 179 | }); 180 | } 181 | 182 | setCoordinateSelected(Coordinate coor) { 183 | print("setCoordinateSelected"); 184 | setState(() { 185 | coordinateSelected = coor; 186 | }); 187 | } 188 | 189 | void selectBlock(Block block, Coordinate coor) { 190 | if (block.value != 0 && 191 | isSelectedMode() && 192 | !coordinateSelected.equals(coor)) { 193 | LineMatchResult result = 194 | gameTable.checkBlockMatch(coordinateSelected, coor); 195 | if (result.available) { 196 | linesMatchPainter = LineMatchBuilder(gameTable: gameTable).build( 197 | a: result.a, 198 | b: result.b, 199 | c: result.c, 200 | d: result.d, 201 | ); 202 | 203 | gameTable.removeBlock(result.a); 204 | gameTable.removeBlock(result.b); 205 | gameTable.removeBlock(result.c); 206 | gameTable.removeBlock(result.d); 207 | gameTable.countBlock -= 2; 208 | clear(); 209 | 210 | delay( 211 | milli: 200, 212 | then: () { 213 | linesMatchPainter = null; 214 | }); 215 | } else { 216 | clear(); 217 | } 218 | } else if (block.value != 0 && !isSelectedMode()) { 219 | setCoordinateSelected(coor); 220 | } else { 221 | clear(); 222 | } 223 | } 224 | 225 | void delay({int milli = 300, Function then}) { 226 | Future.delayed(Duration(milliseconds: milli), () { 227 | if (then != null) { 228 | setState(() { 229 | then(); 230 | }); 231 | } 232 | }); 233 | } 234 | 235 | renovateTable() { 236 | if (gameTable.canRenovate()) { 237 | setState(() { 238 | gameTable.renovate(); 239 | gameTable.countRenovate--; 240 | }); 241 | } 242 | } 243 | } 244 | -------------------------------------------------------------------------------- /lib/utils/my_utils.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | 3 | class MyUtils{ 4 | static int randomInt({int min = 1, int max = 5}) { 5 | Random random = Random(); 6 | return random.nextInt(max) + min; 7 | } 8 | } -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://www.dartlang.org/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.2.0" 11 | boolean_selector: 12 | dependency: transitive 13 | description: 14 | name: boolean_selector 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "1.0.4" 18 | charcode: 19 | dependency: transitive 20 | description: 21 | name: charcode 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "1.1.2" 25 | collection: 26 | dependency: transitive 27 | description: 28 | name: collection 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.14.11" 32 | cupertino_icons: 33 | dependency: "direct main" 34 | description: 35 | name: cupertino_icons 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "0.1.2" 39 | flutter: 40 | dependency: "direct main" 41 | description: flutter 42 | source: sdk 43 | version: "0.0.0" 44 | flutter_test: 45 | dependency: "direct dev" 46 | description: flutter 47 | source: sdk 48 | version: "0.0.0" 49 | matcher: 50 | dependency: transitive 51 | description: 52 | name: matcher 53 | url: "https://pub.dartlang.org" 54 | source: hosted 55 | version: "0.12.5" 56 | meta: 57 | dependency: transitive 58 | description: 59 | name: meta 60 | url: "https://pub.dartlang.org" 61 | source: hosted 62 | version: "1.1.6" 63 | path: 64 | dependency: transitive 65 | description: 66 | name: path 67 | url: "https://pub.dartlang.org" 68 | source: hosted 69 | version: "1.6.2" 70 | pedantic: 71 | dependency: transitive 72 | description: 73 | name: pedantic 74 | url: "https://pub.dartlang.org" 75 | source: hosted 76 | version: "1.5.0" 77 | quiver: 78 | dependency: transitive 79 | description: 80 | name: quiver 81 | url: "https://pub.dartlang.org" 82 | source: hosted 83 | version: "2.0.3" 84 | sky_engine: 85 | dependency: transitive 86 | description: flutter 87 | source: sdk 88 | version: "0.0.99" 89 | source_span: 90 | dependency: transitive 91 | description: 92 | name: source_span 93 | url: "https://pub.dartlang.org" 94 | source: hosted 95 | version: "1.5.5" 96 | stack_trace: 97 | dependency: transitive 98 | description: 99 | name: stack_trace 100 | url: "https://pub.dartlang.org" 101 | source: hosted 102 | version: "1.9.3" 103 | stream_channel: 104 | dependency: transitive 105 | description: 106 | name: stream_channel 107 | url: "https://pub.dartlang.org" 108 | source: hosted 109 | version: "2.0.0" 110 | string_scanner: 111 | dependency: transitive 112 | description: 113 | name: string_scanner 114 | url: "https://pub.dartlang.org" 115 | source: hosted 116 | version: "1.0.4" 117 | term_glyph: 118 | dependency: transitive 119 | description: 120 | name: term_glyph 121 | url: "https://pub.dartlang.org" 122 | source: hosted 123 | version: "1.1.0" 124 | test_api: 125 | dependency: transitive 126 | description: 127 | name: test_api 128 | url: "https://pub.dartlang.org" 129 | source: hosted 130 | version: "0.2.5" 131 | typed_data: 132 | dependency: transitive 133 | description: 134 | name: typed_data 135 | url: "https://pub.dartlang.org" 136 | source: hosted 137 | version: "1.1.6" 138 | vector_math: 139 | dependency: transitive 140 | description: 141 | name: vector_math 142 | url: "https://pub.dartlang.org" 143 | source: hosted 144 | version: "2.0.8" 145 | sdks: 146 | dart: ">=2.2.0 <3.0.0" 147 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_match_animal_game 2 | description: A new Flutter application. 3 | 4 | # The following defines the version and build number for your application. 5 | # A version number is three numbers separated by dots, like 1.2.43 6 | # followed by an optional build number separated by a +. 7 | # Both the version and the builder number may be overridden in flutter 8 | # build by specifying --build-name and --build-number, respectively. 9 | # In Android, build-name is used as versionName while build-number used as versionCode. 10 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 11 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 12 | # Read more about iOS versioning at 13 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 14 | version: 1.0.0+1 15 | 16 | environment: 17 | sdk: ">=2.1.0 <3.0.0" 18 | 19 | dependencies: 20 | flutter: 21 | sdk: flutter 22 | 23 | # The following adds the Cupertino Icons font to your application. 24 | # Use with the CupertinoIcons class for iOS style icons. 25 | cupertino_icons: ^0.1.2 26 | 27 | dev_dependencies: 28 | flutter_test: 29 | sdk: flutter 30 | 31 | 32 | # For information on the generic Dart part of this file, see the 33 | # following page: https://dart.dev/tools/pub/pubspec 34 | 35 | # The following section is specific to Flutter. 36 | flutter: 37 | 38 | # The following line ensures that the Material Icons font is 39 | # included with your application, so that you can use the icons in 40 | # the material Icons class. 41 | uses-material-design: true 42 | 43 | # To add assets to your application, add an assets section, like this: 44 | assets: 45 | - assets/images/ 46 | - assets/images/animal/ 47 | - assets/images/people/ 48 | 49 | # An image asset can refer to one or more resolution-specific "variants", see 50 | # https://flutter.dev/assets-and-images/#resolution-aware. 51 | 52 | # For details regarding adding assets from package dependencies, see 53 | # https://flutter.dev/assets-and-images/#from-packages 54 | 55 | # To add custom fonts to your application, add a fonts section here, 56 | # in this "flutter" section. Each entry in this list should have a 57 | # "family" key with the font family name, and a "fonts" key with a 58 | # list giving the asset and other descriptors for the font. For 59 | # example: 60 | # fonts: 61 | # - family: Schyler 62 | # fonts: 63 | # - asset: fonts/Schyler-Regular.ttf 64 | # - asset: fonts/Schyler-Italic.ttf 65 | # style: italic 66 | # - family: Trajan Pro 67 | # fonts: 68 | # - asset: fonts/TrajanPro.ttf 69 | # - asset: fonts/TrajanPro_Bold.ttf 70 | # weight: 700 71 | # 72 | # For details regarding fonts from package dependencies, 73 | # see https://flutter.dev/custom-fonts/#from-packages 74 | -------------------------------------------------------------------------------- /screenshot/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/screenshot/1.png -------------------------------------------------------------------------------- /screenshot/a1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/screenshot/a1.gif -------------------------------------------------------------------------------- /screenshot/a2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/screenshot/a2.gif -------------------------------------------------------------------------------- /screenshot/a3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/screenshot/a3.gif -------------------------------------------------------------------------------- /screenshot/a4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benznest/flutter-matching-game/f796df86726116b319fa949deb98745f267dfa99/screenshot/a4.gif -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:flutter_match_animal_game/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | --------------------------------------------------------------------------------