├── supabase ├── seed.sql ├── migrations │ └── 20240914185833_remote_schema.sql └── .gitignore ├── lib ├── resources │ ├── resources.dart │ └── app_images.dart ├── src │ ├── core │ │ ├── supabase │ │ │ ├── table_interface.dart │ │ │ ├── client.dart │ │ │ └── query_supabase.dart │ │ ├── extensions │ │ │ ├── list.dart │ │ │ └── string.dart │ │ ├── di │ │ │ ├── modules │ │ │ │ └── modules.dart │ │ │ └── dependency_injection.dart │ │ ├── constants.dart │ │ ├── services │ │ │ ├── ranking_datasource.dart │ │ │ ├── settings_datasource.dart │ │ │ ├── player_datasource.dart │ │ │ └── game_datasource.dart │ │ ├── utils │ │ │ ├── object_extensions.dart │ │ │ ├── widgets │ │ │ │ ├── generic_button.dart │ │ │ │ └── bottom_snackbar.dart │ │ │ └── utils.dart │ │ ├── exceptions.dart │ │ ├── preferences │ │ │ └── preferences.dart │ │ └── ui │ │ │ ├── extensions.dart │ │ │ └── colors.dart │ ├── features │ │ ├── splash │ │ │ ├── cubit │ │ │ │ ├── app_state.dart │ │ │ │ └── app_cubit.dart │ │ │ └── loading_profile_data.dart │ │ ├── ranking │ │ │ ├── mocks │ │ │ │ └── ranking_mocks.dart │ │ │ ├── cubit │ │ │ │ ├── ranking_state.dart │ │ │ │ └── ranking_cubit.dart │ │ │ ├── data │ │ │ │ ├── model │ │ │ │ │ ├── ranking.g.dart │ │ │ │ │ └── ranking.dart │ │ │ │ └── ranking_repository.dart │ │ │ └── uitls │ │ │ │ └── ranking_utils.dart │ │ ├── player │ │ │ ├── cubit │ │ │ │ └── player_state.dart │ │ │ ├── data │ │ │ │ └── model │ │ │ │ │ ├── player.g.dart │ │ │ │ │ ├── player.dart │ │ │ │ │ ├── player_number.g.dart │ │ │ │ │ └── player_number.dart │ │ │ └── domain │ │ │ │ └── player_number_realtime.dart │ │ ├── game │ │ │ ├── domain │ │ │ │ └── mocks │ │ │ │ │ └── attempt_mock.dart │ │ │ ├── utils │ │ │ │ └── game_utils.dart │ │ │ ├── data │ │ │ │ └── model │ │ │ │ │ ├── game_status.g.dart │ │ │ │ │ ├── attempt.g.dart │ │ │ │ │ ├── game_status.dart │ │ │ │ │ ├── game.g.dart │ │ │ │ │ └── attempt.dart │ │ │ ├── widgets │ │ │ │ └── game_turn_widget.dart │ │ │ └── cubit │ │ │ │ └── game_state.dart │ │ ├── auth │ │ │ ├── cubit │ │ │ │ └── auth_state.dart │ │ │ └── data │ │ │ │ └── auth_repository.dart │ │ ├── settings │ │ │ ├── mocks │ │ │ │ └── settings_mock.dart │ │ │ ├── data │ │ │ │ ├── model │ │ │ │ │ ├── rules.dart │ │ │ │ │ └── rules.g.dart │ │ │ │ ├── profile_images.dart │ │ │ │ └── settings_repository.dart │ │ │ ├── pages │ │ │ │ └── how_to_play_screen.dart │ │ │ └── cubit │ │ │ │ ├── settings_state.dart │ │ │ │ └── settings_cubit.dart │ │ └── home │ │ │ └── widgets │ │ │ ├── header_section.dart │ │ │ └── user_points.dart │ └── app.dart ├── l10n │ └── l10n.dart ├── bootstrap.dart ├── main.dart └── firebase_options.dart ├── ios ├── Runner │ ├── Runner-Bridging-Header.h │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── AppIcon.appiconset │ │ │ ├── 16.png │ │ │ ├── 20.png │ │ │ ├── 29.png │ │ │ ├── 32.png │ │ │ ├── 40.png │ │ │ ├── 48.png │ │ │ ├── 50.png │ │ │ ├── 55.png │ │ │ ├── 57.png │ │ │ ├── 58.png │ │ │ ├── 60.png │ │ │ ├── 64.png │ │ │ ├── 72.png │ │ │ ├── 76.png │ │ │ ├── 80.png │ │ │ ├── 87.png │ │ │ ├── 88.png │ │ │ ├── 100.png │ │ │ ├── 1024.png │ │ │ ├── 114.png │ │ │ ├── 120.png │ │ │ ├── 128.png │ │ │ ├── 144.png │ │ │ ├── 152.png │ │ │ ├── 167.png │ │ │ ├── 172.png │ │ │ ├── 180.png │ │ │ ├── 196.png │ │ │ ├── 216.png │ │ │ ├── 256.png │ │ │ ├── 512.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-50x50@1x.png │ │ │ ├── Icon-App-50x50@2x.png │ │ │ ├── Icon-App-57x57@1x.png │ │ │ ├── Icon-App-57x57@2x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-72x72@1x.png │ │ │ ├── Icon-App-72x72@2x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ └── Contents.json │ │ ├── AppIcon-dev.appiconset │ │ │ ├── 100.png │ │ │ ├── 114.png │ │ │ ├── 120.png │ │ │ ├── 128.png │ │ │ ├── 144.png │ │ │ ├── 152.png │ │ │ ├── 16.png │ │ │ ├── 167.png │ │ │ ├── 172.png │ │ │ ├── 180.png │ │ │ ├── 196.png │ │ │ ├── 20.png │ │ │ ├── 216.png │ │ │ ├── 256.png │ │ │ ├── 29.png │ │ │ ├── 32.png │ │ │ ├── 40.png │ │ │ ├── 48.png │ │ │ ├── 50.png │ │ │ ├── 512.png │ │ │ ├── 55.png │ │ │ ├── 57.png │ │ │ ├── 58.png │ │ │ ├── 60.png │ │ │ ├── 64.png │ │ │ ├── 72.png │ │ │ ├── 76.png │ │ │ ├── 80.png │ │ │ ├── 87.png │ │ │ ├── 88.png │ │ │ └── 1024.png │ │ ├── AppIcon-stg.appiconset │ │ │ ├── 100.png │ │ │ ├── 114.png │ │ │ ├── 120.png │ │ │ ├── 128.png │ │ │ ├── 144.png │ │ │ ├── 152.png │ │ │ ├── 16.png │ │ │ ├── 167.png │ │ │ ├── 172.png │ │ │ ├── 180.png │ │ │ ├── 196.png │ │ │ ├── 20.png │ │ │ ├── 216.png │ │ │ ├── 256.png │ │ │ ├── 29.png │ │ │ ├── 32.png │ │ │ ├── 40.png │ │ │ ├── 48.png │ │ │ ├── 50.png │ │ │ ├── 512.png │ │ │ ├── 55.png │ │ │ ├── 57.png │ │ │ ├── 58.png │ │ │ ├── 60.png │ │ │ ├── 64.png │ │ │ ├── 72.png │ │ │ ├── 76.png │ │ │ ├── 80.png │ │ │ ├── 87.png │ │ │ ├── 88.png │ │ │ └── 1024.png │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@1x.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ └── LaunchBackground.imageset │ │ │ ├── background.png │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── GoogleService-Info.plist │ ├── Base.lproj │ │ └── Main.storyboard │ └── Info.plist ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner.xcodeproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist ├── Runner.xcworkspace │ └── contents.xcworkspacedata ├── RunnerTests │ └── RunnerTests.swift ├── .gitignore └── Podfile ├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ └── favicon.png ├── splash │ └── img │ │ ├── dark-1x.png │ │ ├── dark-2x.png │ │ ├── dark-3x.png │ │ ├── dark-4x.png │ │ ├── light-1x.png │ │ ├── light-2x.png │ │ ├── light-3x.png │ │ └── light-4x.png └── manifest.json ├── assets ├── images │ ├── logo.png │ ├── logo_app.png │ ├── no_photo.png │ ├── first_place.png │ ├── game_points.png │ ├── play-button.png │ ├── third_place.png │ └── second_place.png └── fonts │ ├── poppins │ ├── Poppins-Light.ttf │ ├── Poppins-Medium.ttf │ └── Poppins-SemiBold.ttf │ └── sniglet │ └── Sniglet-Regular.ttf ├── android ├── gradle.properties ├── app │ ├── src │ │ ├── main │ │ │ ├── ic_launcher-playstore.png │ │ │ ├── res │ │ │ │ ├── drawable-hdpi │ │ │ │ │ └── splash.png │ │ │ │ ├── drawable-mdpi │ │ │ │ │ └── splash.png │ │ │ │ ├── drawable │ │ │ │ │ ├── background.png │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable-v21 │ │ │ │ │ ├── background.png │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable-xhdpi │ │ │ │ │ └── splash.png │ │ │ │ ├── drawable-xxhdpi │ │ │ │ │ └── splash.png │ │ │ │ ├── drawable-xxxhdpi │ │ │ │ │ └── splash.png │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_background.png │ │ │ │ │ ├── ic_launcher_foreground.png │ │ │ │ │ └── ic_launcher_monochrome.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_background.png │ │ │ │ │ ├── ic_launcher_foreground.png │ │ │ │ │ └── ic_launcher_monochrome.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_background.png │ │ │ │ │ ├── ic_launcher_foreground.png │ │ │ │ │ └── ic_launcher_monochrome.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_background.png │ │ │ │ │ ├── ic_launcher_foreground.png │ │ │ │ │ └── ic_launcher_monochrome.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_background.png │ │ │ │ │ ├── ic_launcher_foreground.png │ │ │ │ │ └── ic_launcher_monochrome.png │ │ │ │ ├── values │ │ │ │ │ ├── ic_launcher_background.xml │ │ │ │ │ └── styles.xml │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ │ └── ic_launcher.xml │ │ │ │ ├── values-v31 │ │ │ │ │ └── styles.xml │ │ │ │ ├── values-night-v31 │ │ │ │ │ └── styles.xml │ │ │ │ └── values-night │ │ │ │ │ └── styles.xml │ │ │ └── kotlin │ │ │ │ └── com │ │ │ │ └── mindcows │ │ │ │ └── app │ │ │ │ └── MainActivity.kt │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── google-services.json ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── build.gradle ├── settings.gradle └── gradlew.bat ├── macos ├── Runner │ ├── Configs │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ ├── Warnings.xcconfig │ │ └── AppInfo.xcconfig │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── AppIcon.appiconset │ │ │ ├── 16.png │ │ │ ├── 32.png │ │ │ ├── 64.png │ │ │ ├── 1024.png │ │ │ ├── 128.png │ │ │ ├── 256 1.png │ │ │ ├── 256.png │ │ │ ├── 32 1.png │ │ │ ├── 512 1.png │ │ │ ├── 512.png │ │ │ └── Contents.json │ │ ├── AppIcon-dev.appiconset │ │ │ ├── 128.png │ │ │ ├── 16.png │ │ │ ├── 256.png │ │ │ ├── 32.png │ │ │ ├── 512.png │ │ │ ├── 64.png │ │ │ ├── 1024.png │ │ │ ├── 256 1.png │ │ │ ├── 32 1.png │ │ │ ├── 512 1.png │ │ │ └── Contents.json │ │ ├── AppIcon-stg.appiconset │ │ │ ├── 128.png │ │ │ ├── 16.png │ │ │ ├── 256.png │ │ │ ├── 32.png │ │ │ ├── 512.png │ │ │ ├── 64.png │ │ │ ├── 1024.png │ │ │ ├── 256 1.png │ │ │ ├── 32 1.png │ │ │ ├── 512 1.png │ │ │ └── Contents.json │ │ └── LaunchImage.imageset │ │ │ ├── LaunchImage@1x.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Release.entitlements │ ├── DebugProfile.entitlements │ ├── MainFlutterWindow.swift │ └── Info.plist ├── .gitignore ├── Flutter │ ├── Flutter-Debug.xcconfig │ ├── Flutter-Release.xcconfig │ └── GeneratedPluginRegistrant.swift ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Runner.xcodeproj │ └── project.xcworkspace │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── RunnerTests │ └── RunnerTests.swift └── Podfile ├── windows ├── runner │ ├── resources │ │ └── app_icon.ico │ ├── resource.h │ ├── CMakeLists.txt │ ├── utils.h │ ├── runner.exe.manifest │ ├── flutter_window.h │ ├── main.cpp │ ├── utils.cpp │ └── flutter_window.cpp ├── .gitignore └── flutter │ ├── generated_plugin_registrant.h │ ├── generated_plugin_registrant.cc │ └── generated_plugins.cmake ├── native_splash.yaml ├── l10n.yaml ├── icons_launcher.yaml ├── devtools_options.yaml ├── analysis_options.yaml ├── .github ├── dependabot.yaml ├── workflows │ └── main.yaml ├── PULL_REQUEST_TEMPLATE.md └── cspell.json ├── .vscode ├── extensions.json └── launch.json ├── .idea └── runConfigurations │ ├── staging.xml │ ├── development.xml │ └── production.xml ├── firebase.json ├── test └── app_images_test.dart ├── coverage_badge.svg ├── spider.yaml ├── .metadata ├── README.md ├── pubspec.yaml └── .gitignore /supabase/seed.sql: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /supabase/migrations/20240914185833_remote_schema.sql: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/resources/resources.dart: -------------------------------------------------------------------------------- 1 | part 'app_images.dart'; 2 | -------------------------------------------------------------------------------- /supabase/.gitignore: -------------------------------------------------------------------------------- 1 | # Supabase 2 | .branches 3 | .temp 4 | .env 5 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/web/favicon.png -------------------------------------------------------------------------------- /assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/assets/images/logo.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/web/icons/Icon-512.png -------------------------------------------------------------------------------- /web/icons/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/web/icons/favicon.png -------------------------------------------------------------------------------- /assets/images/logo_app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/assets/images/logo_app.png -------------------------------------------------------------------------------- /assets/images/no_photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/assets/images/no_photo.png -------------------------------------------------------------------------------- /web/splash/img/dark-1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/web/splash/img/dark-1x.png -------------------------------------------------------------------------------- /web/splash/img/dark-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/web/splash/img/dark-2x.png -------------------------------------------------------------------------------- /web/splash/img/dark-3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/web/splash/img/dark-3x.png -------------------------------------------------------------------------------- /web/splash/img/dark-4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/web/splash/img/dark-4x.png -------------------------------------------------------------------------------- /web/splash/img/light-1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/web/splash/img/light-1x.png -------------------------------------------------------------------------------- /web/splash/img/light-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/web/splash/img/light-2x.png -------------------------------------------------------------------------------- /web/splash/img/light-3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/web/splash/img/light-3x.png -------------------------------------------------------------------------------- /web/splash/img/light-4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/web/splash/img/light-4x.png -------------------------------------------------------------------------------- /assets/images/first_place.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/assets/images/first_place.png -------------------------------------------------------------------------------- /assets/images/game_points.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/assets/images/game_points.png -------------------------------------------------------------------------------- /assets/images/play-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/assets/images/play-button.png -------------------------------------------------------------------------------- /assets/images/third_place.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/assets/images/third_place.png -------------------------------------------------------------------------------- /assets/images/second_place.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/assets/images/second_place.png -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /assets/fonts/poppins/Poppins-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/assets/fonts/poppins/Poppins-Light.ttf -------------------------------------------------------------------------------- /assets/fonts/poppins/Poppins-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/assets/fonts/poppins/Poppins-Medium.ttf -------------------------------------------------------------------------------- /macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /assets/fonts/poppins/Poppins-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/assets/fonts/poppins/Poppins-SemiBold.ttf -------------------------------------------------------------------------------- /assets/fonts/sniglet/Sniglet-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/assets/fonts/sniglet/Sniglet-Regular.ttf -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /native_splash.yaml: -------------------------------------------------------------------------------- 1 | flutter_native_splash: 2 | android: true 3 | ios: true 4 | 5 | color: "FFFFFF" 6 | image: "assets/images/logo.png" -------------------------------------------------------------------------------- /android/app/src/main/ic_launcher-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/android/app/src/main/ic_launcher-playstore.png -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-hdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/android/app/src/main/res/drawable-hdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-mdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/android/app/src/main/res/drawable-mdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/android/app/src/main/res/drawable/background.png -------------------------------------------------------------------------------- /l10n.yaml: -------------------------------------------------------------------------------- 1 | arb-dir: lib/l10n/arb 2 | template-arb-file: app_en.arb 3 | output-localization-file: app_localizations.dart 4 | nullable-getter: false 5 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/android/app/src/main/res/drawable-v21/background.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/android/app/src/main/res/drawable-xhdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/android/app/src/main/res/drawable-xxhdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/android/app/src/main/res/drawable-xxxhdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/16.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/20.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/32.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/48.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/50.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/55.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/55.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/64.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/72.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/76.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/88.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/88.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/100.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/128.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/144.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/152.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/167.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/172.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/172.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/196.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/196.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/216.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/216.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/256.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/512.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/16.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/32.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/64.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/100.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/114.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/120.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/128.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/144.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/152.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/16.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/167.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/172.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/172.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/180.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/196.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/196.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/20.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/216.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/216.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/256.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/29.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/32.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/40.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/48.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/50.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/512.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/55.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/55.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/57.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/58.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/60.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/64.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/72.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/76.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/80.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/87.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/88.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/88.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/100.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/114.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/120.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/128.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/144.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/152.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/16.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/167.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/172.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/172.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/180.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/196.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/196.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/20.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/216.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/216.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/256.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/29.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/32.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/40.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/48.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/50.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/512.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/55.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/55.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/57.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/58.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/60.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/64.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/72.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/76.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/80.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/87.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/88.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/88.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/1024.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/128.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/256 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/256 1.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/256.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/32 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/32 1.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/512 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/512 1.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/512.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/1024.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/1024.png -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon-dev.appiconset/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/macos/Runner/Assets.xcassets/AppIcon-dev.appiconset/128.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon-dev.appiconset/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/macos/Runner/Assets.xcassets/AppIcon-dev.appiconset/16.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon-dev.appiconset/256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/macos/Runner/Assets.xcassets/AppIcon-dev.appiconset/256.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon-dev.appiconset/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/macos/Runner/Assets.xcassets/AppIcon-dev.appiconset/32.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon-dev.appiconset/512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/macos/Runner/Assets.xcassets/AppIcon-dev.appiconset/512.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon-dev.appiconset/64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/macos/Runner/Assets.xcassets/AppIcon-dev.appiconset/64.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon-stg.appiconset/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/macos/Runner/Assets.xcassets/AppIcon-stg.appiconset/128.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon-stg.appiconset/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/macos/Runner/Assets.xcassets/AppIcon-stg.appiconset/16.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon-stg.appiconset/256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/macos/Runner/Assets.xcassets/AppIcon-stg.appiconset/256.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon-stg.appiconset/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/macos/Runner/Assets.xcassets/AppIcon-stg.appiconset/32.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon-stg.appiconset/512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/macos/Runner/Assets.xcassets/AppIcon-stg.appiconset/512.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon-stg.appiconset/64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/macos/Runner/Assets.xcassets/AppIcon-stg.appiconset/64.png -------------------------------------------------------------------------------- /icons_launcher.yaml: -------------------------------------------------------------------------------- 1 | icons_launcher: 2 | image_path: "assets/images/logo_app.png" 3 | platforms: 4 | android: 5 | enable: true 6 | ios: 7 | enable: false -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon-dev.appiconset/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/macos/Runner/Assets.xcassets/AppIcon-dev.appiconset/1024.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon-dev.appiconset/256 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/macos/Runner/Assets.xcassets/AppIcon-dev.appiconset/256 1.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon-dev.appiconset/32 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/macos/Runner/Assets.xcassets/AppIcon-dev.appiconset/32 1.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon-dev.appiconset/512 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/macos/Runner/Assets.xcassets/AppIcon-dev.appiconset/512 1.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon-stg.appiconset/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/macos/Runner/Assets.xcassets/AppIcon-stg.appiconset/1024.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon-stg.appiconset/256 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/macos/Runner/Assets.xcassets/AppIcon-stg.appiconset/256 1.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon-stg.appiconset/32 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/macos/Runner/Assets.xcassets/AppIcon-stg.appiconset/32 1.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon-stg.appiconset/512 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/macos/Runner/Assets.xcassets/AppIcon-stg.appiconset/512 1.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/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/ale24dev/mind-cows/HEAD/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/ale24dev/mind-cows/HEAD/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/ale24dev/mind-cows/HEAD/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/ale24dev/mind-cows/HEAD/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/ale24dev/mind-cows/HEAD/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/ale24dev/mind-cows/HEAD/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/ale24dev/mind-cows/HEAD/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/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/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/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/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/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/macos/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@1x.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/macos/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/macos/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/mindcows/app/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.mindcows.app 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() 6 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale24dev/mind-cows/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /lib/src/core/supabase/table_interface.dart: -------------------------------------------------------------------------------- 1 | mixin TableInterface { 2 | /// Table name in the database. 3 | String tableName(); 4 | 5 | /// Columns to select in the query. 6 | String columns(); 7 | } 8 | -------------------------------------------------------------------------------- /devtools_options.yaml: -------------------------------------------------------------------------------- 1 | description: This file stores settings for Dart & Flutter DevTools. 2 | documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states 3 | extensions: 4 | -------------------------------------------------------------------------------- /lib/src/core/extensions/list.dart: -------------------------------------------------------------------------------- 1 | extension ListX on List { 2 | /// Convert a list of integers to a comma-separated string. 3 | String? get parseNumberListToString { 4 | return join(); 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | analyzer: 2 | errors: 3 | avoid_final_parameters: ignore 4 | include: package:very_good_analysis/analysis_options.6.0.0.yaml 5 | linter: 6 | rules: 7 | public_member_api_docs: false 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.github/dependabot.yaml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: "daily" 7 | - package-ecosystem: "pub" 8 | directory: "/" 9 | schedule: 10 | interval: "daily" 11 | -------------------------------------------------------------------------------- /lib/src/core/supabase/client.dart: -------------------------------------------------------------------------------- 1 | import 'package:injectable/injectable.dart'; 2 | import 'package:supabase_flutter/supabase_flutter.dart'; 3 | 4 | @module 5 | abstract class SupabaseModule { 6 | @lazySingleton 7 | SupabaseClient get client => Supabase.instance.client; 8 | } 9 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=827846 3 | // for the documentation about the extensions.json format 4 | "recommendations": [ 5 | "dart-code.dart-code", 6 | "dart-code.flutter", 7 | "felixangelov.bloc" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @NSApplicationMain 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/src/core/di/modules/modules.dart: -------------------------------------------------------------------------------- 1 | import 'package:injectable/injectable.dart'; 2 | import 'package:shared_preferences/shared_preferences.dart'; 3 | 4 | @module 5 | abstract class Modules { 6 | @preResolve 7 | Future get prefs => SharedPreferences.getInstance(); 8 | } 9 | -------------------------------------------------------------------------------- /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-7.5-all.zip 7 | -------------------------------------------------------------------------------- /macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /lib/l10n/l10n.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/widgets.dart'; 2 | import 'package:flutter_gen/gen_l10n/app_localizations.dart'; 3 | 4 | export 'package:flutter_gen/gen_l10n/app_localizations.dart'; 5 | 6 | extension AppLocalizationsX on BuildContext { 7 | AppLocalizations get l10n => AppLocalizations.of(this); 8 | } 9 | -------------------------------------------------------------------------------- /lib/src/core/constants.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: non_constant_identifier_names 2 | 3 | abstract class Constants { 4 | static double BUTTON_HEIGHT = 60; 5 | 6 | static String apiUrl = 'https://vtxedgyoqydehqzgcpwb.supabase.co'; 7 | 8 | static String publicStorageUrl = '$apiUrl/storage/v1/object/public'; 9 | } 10 | -------------------------------------------------------------------------------- /lib/src/core/di/dependency_injection.dart: -------------------------------------------------------------------------------- 1 | import 'package:get_it/get_it.dart'; 2 | import 'package:injectable/injectable.dart'; 3 | import 'package:mind_cows/src/core/di/dependency_injection.config.dart'; 4 | 5 | final getIt = GetIt.instance; 6 | 7 | @InjectableInit() 8 | Future configureDependencies() => getIt.init(); 9 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /local.properties 5 | GeneratedPluginRegistrant.java 6 | 7 | # Remember to never publicly share your keystore. 8 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 9 | key.properties 10 | **/*.keystore 11 | **/*.jks 12 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /macos/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import FlutterMacOS 2 | import Cocoa 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /.idea/runConfigurations/staging.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | -------------------------------------------------------------------------------- /windows/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral/ 2 | 3 | # Visual Studio user-specific files. 4 | *.suo 5 | *.user 6 | *.userosscache 7 | *.sln.docstates 8 | 9 | # Visual Studio build-related files. 10 | x64/ 11 | x86/ 12 | 13 | # Visual Studio cache files 14 | # files ending in .cache can be ignored 15 | *.[Cc]ache 16 | # but keep track of directories ending in .cache 17 | !*.[Cc]ache/ 18 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/runConfigurations/development.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/runConfigurations/production.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /lib/src/core/services/ranking_datasource.dart: -------------------------------------------------------------------------------- 1 | import 'package:fpdart/fpdart.dart'; 2 | import 'package:mind_cows/src/core/exceptions.dart'; 3 | import 'package:mind_cows/src/features/ranking/data/model/ranking.dart'; 4 | 5 | abstract class RankingDatasource { 6 | Future?>> getRanking(); 7 | 8 | void listenRanking( 9 | void Function() callback, 10 | ); 11 | } 12 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void RegisterPlugins(flutter::PluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.network.server 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "background.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @main 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | allprojects { 2 | repositories { 3 | google() 4 | mavenCentral() 5 | } 6 | } 7 | 8 | rootProject.buildDir = "../build" 9 | subprojects { 10 | project.buildDir = "${rootProject.buildDir}/${project.name}" 11 | } 12 | subprojects { 13 | project.evaluationDependsOn(":app") 14 | } 15 | 16 | tasks.register("clean", Delete) { 17 | delete rootProject.buildDir 18 | } 19 | 20 | buildscript { 21 | ext.kotlin_version = '1.8.0' 22 | } -------------------------------------------------------------------------------- /macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | // 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Runner.rc 4 | // 5 | #define IDI_APP_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /lib/src/core/services/settings_datasource.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:fpdart/fpdart.dart'; 3 | import 'package:mind_cows/src/core/exceptions.dart'; 4 | import 'package:mind_cows/src/features/settings/data/model/rules.dart'; 5 | 6 | abstract class SettingsDatasource { 7 | Locale changeLanguage(String language); 8 | 9 | ThemeMode changeTheme(); 10 | 11 | Locale? getLanguage(); 12 | 13 | ThemeMode getTheme(); 14 | 15 | Future?>> getRules(); 16 | } 17 | -------------------------------------------------------------------------------- /firebase.json: -------------------------------------------------------------------------------- 1 | {"flutter":{"platforms":{"android":{"default":{"projectId":"mindcows-e6b33","appId":"1:43890310910:android:a2ac88ac0ab8108b0defaf","fileOutput":"android/app/google-services.json"}},"ios":{"default":{"projectId":"mindcows-e6b33","appId":"1:43890310910:ios:3d504774e0667cee0defaf","uploadDebugSymbols":true,"fileOutput":"ios/Runner/GoogleService-Info.plist"}},"dart":{"lib/firebase_options.dart":{"projectId":"mindcows-e6b33","configurations":{"android":"1:43890310910:android:a2ac88ac0ab8108b0defaf","ios":"1:43890310910:ios:3d504774e0667cee0defaf"}}}}}} -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "LaunchImage.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "LaunchImage@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "LaunchImage@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "LaunchImage@1x.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "LaunchImage@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "LaunchImage@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "Launch", 9 | "request": "launch", 10 | "type": "dart", 11 | "program": "lib/main.dart", 12 | "args": [ 13 | "--flavor", 14 | "development", 15 | "--target", 16 | "lib/main.dart" 17 | ] 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /lib/src/features/splash/cubit/app_state.dart: -------------------------------------------------------------------------------- 1 | part of 'app_cubit.dart'; 2 | 3 | enum AppStatus { initial, loading, success, error } 4 | 5 | @freezed 6 | class AppState with _$AppState { 7 | const factory AppState({ 8 | @Default(AppStatus.initial) AppStatus status, 9 | @Default([]) List gameStatus, 10 | @Default(false) bool initialized, 11 | }) = _AppState; 12 | const AppState._(); 13 | 14 | bool get isLoading => status == AppStatus.loading; 15 | bool get isSuccess => status == AppStatus.success; 16 | bool get isError => status == AppStatus.error; 17 | } 18 | -------------------------------------------------------------------------------- /lib/src/features/ranking/mocks/ranking_mocks.dart: -------------------------------------------------------------------------------- 1 | import 'package:mind_cows/src/features/player/data/model/player.dart'; 2 | import 'package:mind_cows/src/features/ranking/data/model/ranking.dart'; 3 | 4 | final rankingMock = List.generate(20, (index) { 5 | return Ranking( 6 | id: index, 7 | gamesLoss: index, 8 | gamesWon: index, 9 | minimumAttempts: index, 10 | position: index, 11 | player: Player( 12 | id: index.toString(), 13 | username: 'Player $index', 14 | avatarUrl: 'https://example.com/avatar$index.png', 15 | ), 16 | points: 80, 17 | ); 18 | }); 19 | -------------------------------------------------------------------------------- /lib/src/features/player/cubit/player_state.dart: -------------------------------------------------------------------------------- 1 | part of 'player_cubit.dart'; 2 | 3 | enum PlayerStatus { initial, loading, success, error } 4 | 5 | @freezed 6 | class PlayerState with _$PlayerState { 7 | const factory PlayerState({ 8 | final Player? player, 9 | final PlayerNumber? playerNumber, 10 | @Default(PlayerStatus.initial) final PlayerStatus status, 11 | }) = _PlayerState; 12 | const PlayerState._(); 13 | 14 | bool get isLoading => status == PlayerStatus.loading; 15 | bool get isSuccess => status == PlayerStatus.success; 16 | bool get isError => status == PlayerStatus.error; 17 | } 18 | -------------------------------------------------------------------------------- /lib/src/features/ranking/cubit/ranking_state.dart: -------------------------------------------------------------------------------- 1 | part of 'ranking_cubit.dart'; 2 | 3 | enum RankingStateStatus { initial, loading, loaded, error } 4 | 5 | @freezed 6 | class RankingState with _$RankingState { 7 | const factory RankingState({ 8 | @Default([]) List ranking, 9 | @Default(RankingStateStatus.initial) RankingStateStatus status, 10 | }) = _RankingState; 11 | const RankingState._(); 12 | 13 | bool get isLoading => status == RankingStateStatus.loading; 14 | bool get isLoaded => status == RankingStateStatus.loaded; 15 | bool get isError => status == RankingStateStatus.error; 16 | } 17 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Warnings.xcconfig: -------------------------------------------------------------------------------- 1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings 2 | GCC_WARN_UNDECLARED_SELECTOR = YES 3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 6 | CLANG_WARN_PRAGMA_PACK = YES 7 | CLANG_WARN_STRICT_PROTOTYPES = YES 8 | CLANG_WARN_COMMA = YES 9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 12 | GCC_WARN_SHADOW = YES 13 | CLANG_WARN_UNREACHABLE_CODE = YES 14 | -------------------------------------------------------------------------------- /windows/runner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | project(runner LANGUAGES CXX) 3 | 4 | add_executable(${BINARY_NAME} WIN32 5 | "flutter_window.cpp" 6 | "main.cpp" 7 | "utils.cpp" 8 | "win32_window.cpp" 9 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 10 | "Runner.rc" 11 | "runner.exe.manifest" 12 | ) 13 | apply_standard_settings(${BINARY_NAME}) 14 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") 15 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) 16 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 17 | add_dependencies(${BINARY_NAME} flutter_assemble) 18 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "My App", 3 | "short_name": "My App", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "My new flutter app", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /lib/src/features/game/domain/mocks/attempt_mock.dart: -------------------------------------------------------------------------------- 1 | import 'package:mind_cows/src/features/game/data/model/attempt.dart'; 2 | import 'package:mind_cows/src/features/game/data/model/game.dart'; 3 | import 'package:mind_cows/src/features/game/data/model/game_status.dart'; 4 | import 'package:mind_cows/src/features/player/data/model/player.dart'; 5 | 6 | List getAttemptsMock(int quantity) { 7 | return List.generate(quantity, (index) { 8 | return Attempt( 9 | id: 0, 10 | game: Game(id: 0, status: GameStatus.empty()), 11 | bulls: 0, 12 | cows: 0, 13 | number: [8, 8, 8, 8], 14 | player: Player.empty(), 15 | ); 16 | }); 17 | } 18 | -------------------------------------------------------------------------------- /macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = mind_cows 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.myApp 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2023 com.example. All rights reserved. 15 | -------------------------------------------------------------------------------- /lib/src/features/auth/cubit/auth_state.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: avoid_final_parameters 2 | 3 | part of 'auth_cubit.dart'; 4 | 5 | enum AuthStatus { initial, loading, success, authenticated, error } 6 | 7 | extension AuthStatusX on AuthStatus { 8 | bool get isLoading => this == AuthStatus.loading; 9 | bool get isSuccess => this == AuthStatus.success; 10 | bool get isError => this == AuthStatus.error; 11 | bool get isAuthenticated => this == AuthStatus.authenticated; 12 | } 13 | 14 | @freezed 15 | class AuthState with _$AuthState { 16 | const factory AuthState({ 17 | @Default(AuthStatus.initial) final AuthStatus authStatus, 18 | final User? user, 19 | String? errorMessage, 20 | }) = _AuthState; 21 | } 22 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /.github/workflows/main.yaml: -------------------------------------------------------------------------------- 1 | name: mind_cows 2 | 3 | concurrency: 4 | group: $-$ 5 | cancel-in-progress: true 6 | 7 | on: 8 | push: 9 | branches: 10 | - main 11 | pull_request: 12 | branches: 13 | - main 14 | 15 | jobs: 16 | semantic-pull-request: 17 | uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/semantic_pull_request.yml@v1 18 | 19 | build: 20 | uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1 21 | with: 22 | flutter_channel: stable 23 | 24 | spell-check: 25 | uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/spell_check.yml@v1 26 | with: 27 | includes: | 28 | **/*.md 29 | modified_files_only: false 30 | -------------------------------------------------------------------------------- /lib/src/features/game/utils/game_utils.dart: -------------------------------------------------------------------------------- 1 | abstract class GameUtils { 2 | static int calculateResultPoints({ 3 | required bool wonCurrentGame, 4 | required int minimumAttempts, 5 | }) { 6 | var pointsForCurrentGame = 0; 7 | 8 | // If the player won the current game, they earn 3 points 9 | if (wonCurrentGame) { 10 | pointsForCurrentGame += 3; 11 | 12 | // Calculate additional points for minimum attempts, if applicable 13 | if (minimumAttempts > 0) { 14 | pointsForCurrentGame += 100 ~/ (minimumAttempts + 5); 15 | } 16 | } else { 17 | // If the player lost, subtract 3 points 18 | pointsForCurrentGame -= 3; 19 | } 20 | 21 | return pointsForCurrentGame; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/src/features/player/data/model/player.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'player.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Player _$PlayerFromJson(Map json) => Player( 10 | id: json['id'] as String, 11 | username: json['username'] as String, 12 | avatarUrl: json['avatar_url'] as String, 13 | ); 14 | 15 | Map _$PlayerToJson(Player instance) => { 16 | 'id': instance.id, 17 | 'username': instance.username, 18 | 'avatar_url': instance.avatarUrl, 19 | }; 20 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | void RegisterPlugins(flutter::PluginRegistry* registry) { 14 | AppLinksPluginCApiRegisterWithRegistrar( 15 | registry->GetRegistrarForPlugin("AppLinksPluginCApi")); 16 | FirebaseCorePluginCApiRegisterWithRegistrar( 17 | registry->GetRegistrarForPlugin("FirebaseCorePluginCApi")); 18 | UrlLauncherWindowsRegisterWithRegistrar( 19 | registry->GetRegistrarForPlugin("UrlLauncherWindows")); 20 | } 21 | -------------------------------------------------------------------------------- /windows/runner/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_UTILS_H_ 2 | #define RUNNER_UTILS_H_ 3 | 4 | #include 5 | #include 6 | 7 | // Creates a console for the process, and redirects stdout and stderr to 8 | // it for both the runner and the Flutter library. 9 | void CreateAndAttachConsole(); 10 | 11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string 12 | // encoded in UTF-8. Returns an empty std::string on failure. 13 | std::string Utf8FromUtf16(const wchar_t* utf16_string); 14 | 15 | // Gets the command line arguments passed in as a std::vector, 16 | // encoded in UTF-8. Returns an empty std::vector on failure. 17 | std::vector GetCommandLineArguments(); 18 | 19 | #endif // RUNNER_UTILS_H_ 20 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 8 | 9 | ## Description 10 | 11 | 12 | 13 | ## Type of Change 14 | 15 | 16 | 17 | - [ ] ✨ New feature (non-breaking change which adds functionality) 18 | - [ ] 🛠️ Bug fix (non-breaking change which fixes an issue) 19 | - [ ] ❌ Breaking change (fix or feature that would cause existing functionality to change) 20 | - [ ] 🧹 Code refactor 21 | - [ ] ✅ Build configuration change 22 | - [ ] 📝 Documentation 23 | - [ ] 🗑️ Chore 24 | -------------------------------------------------------------------------------- /lib/src/core/utils/object_extensions.dart: -------------------------------------------------------------------------------- 1 | typedef Json = Map; 2 | 3 | extension LetExtension on T? { 4 | /// Verify is value is null 5 | bool get isNull => this == null; 6 | 7 | /// Verify is value is not null 8 | bool get isNotNull => this != null; 9 | 10 | /// Executes a code [block] only if the value is not null, 11 | /// returning the block's result or 'null' 12 | /// if the original value was null 13 | /// Example 14 | /// ```dart 15 | /// String? name = 'World'; 16 | /// String? result = nombre?.let((it) => "Hello, $it!"); 17 | /// print(result); // Hello World 18 | /// ``` 19 | R? let(R Function(T it) block) { 20 | if (isNotNull) { 21 | return block(this as T); 22 | } 23 | return null; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/src/features/settings/mocks/settings_mock.dart: -------------------------------------------------------------------------------- 1 | import 'package:supabase_flutter/supabase_flutter.dart'; 2 | 3 | /// Mocks for the settings feature 4 | final profileImagesMock = List.generate(5, (index) { 5 | return FileObject( 6 | name: 'avatar${index + 1}.png', 7 | id: index.toString(), 8 | updatedAt: '', 9 | createdAt: '', 10 | lastAccessedAt: '', 11 | metadata: { 12 | 'eTag': '"c5e8c553235d9af30ef4f6e280790b92"', 13 | 'size': 32175, 14 | 'mimetype': 'image/png', 15 | 'cacheControl': 'max-age=3600', 16 | 'lastModified': '2024-05-22T23:06:05.574Z', 17 | 'contentLength': 32175, 18 | 'httpStatusCode': 200, 19 | }, 20 | owner: 'owner-id', 21 | buckets: null, 22 | bucketId: index.toString(), 23 | ); 24 | }); 25 | -------------------------------------------------------------------------------- /android/app/google-services.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_info": { 3 | "project_number": "43890310910", 4 | "project_id": "mindcows-e6b33", 5 | "storage_bucket": "mindcows-e6b33.appspot.com" 6 | }, 7 | "client": [ 8 | { 9 | "client_info": { 10 | "mobilesdk_app_id": "1:43890310910:android:a2ac88ac0ab8108b0defaf", 11 | "android_client_info": { 12 | "package_name": "com.mindcows.app" 13 | } 14 | }, 15 | "oauth_client": [], 16 | "api_key": [ 17 | { 18 | "current_key": "AIzaSyCwT6qBwOxItq7Mh3Xp9w-xNECUv7ZTiP0" 19 | } 20 | ], 21 | "services": { 22 | "appinvite_service": { 23 | "other_platform_oauth_client": [] 24 | } 25 | } 26 | } 27 | ], 28 | "configuration_version": "1" 29 | } -------------------------------------------------------------------------------- /lib/src/core/exceptions.dart: -------------------------------------------------------------------------------- 1 | /// Base class from which all exceptions that are specific to the app should extend. 2 | sealed class AppException implements Exception { 3 | const AppException([this.message]); 4 | final String? message; 5 | } 6 | 7 | class PostresAppException extends AppException { 8 | const PostresAppException([super.message]); 9 | } 10 | 11 | class CustomAppException extends AppException { 12 | const CustomAppException([super.message]); 13 | } 14 | 15 | class AuthenticationException extends AppException { 16 | const AuthenticationException([super.message]); 17 | } 18 | 19 | class AuthorizationException extends AppException { 20 | const AuthorizationException([super.message]); 21 | } 22 | 23 | class NetworkException extends AppException { 24 | const NetworkException([super.message]); 25 | } 26 | -------------------------------------------------------------------------------- /.github/cspell.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2", 3 | "$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json", 4 | "dictionaries": ["vgv_allowed", "vgv_forbidden"], 5 | "dictionaryDefinitions": [ 6 | { 7 | "name": "vgv_allowed", 8 | "path": "https://raw.githubusercontent.com/verygoodopensource/very_good_dictionaries/main/allowed.txt", 9 | "description": "Allowed VGV Spellings" 10 | }, 11 | { 12 | "name": "vgv_forbidden", 13 | "path": "https://raw.githubusercontent.com/verygoodopensource/very_good_dictionaries/main/forbidden.txt", 14 | "description": "Forbidden VGV Spellings" 15 | } 16 | ], 17 | "useGitignore": true, 18 | "words": [ 19 | "Contador", 20 | "localizable", 21 | "mostrado", 22 | "página", 23 | "Texto" 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /lib/src/features/player/domain/player_number_realtime.dart: -------------------------------------------------------------------------------- 1 | class PlayerNumberRealtime { 2 | PlayerNumberRealtime({ 3 | required this.isTurn, 4 | // required this.timeLeft, 5 | required this.startedTime, 6 | required this.finishTime, 7 | }); 8 | 9 | factory PlayerNumberRealtime.fromJson(Map json) { 10 | return PlayerNumberRealtime( 11 | isTurn: json['is_turn'] as bool, 12 | startedTime: json['started_time'] == null 13 | ? DateTime.now() 14 | : DateTime.parse(json['started_time'] as String), 15 | finishTime: json['finish_time'] == null 16 | ? DateTime.now() 17 | : DateTime.parse(json['finish_time'] as String), 18 | ); 19 | } 20 | 21 | final bool isTurn; 22 | // final int timeLeft; 23 | final DateTime startedTime; 24 | final DateTime finishTime; 25 | } 26 | -------------------------------------------------------------------------------- /lib/src/features/settings/data/model/rules.dart: -------------------------------------------------------------------------------- 1 | import 'package:freezed_annotation/freezed_annotation.dart'; 2 | import 'package:mind_cows/src/core/utils/object_extensions.dart'; 3 | import 'package:mind_cows/src/features/settings/cubit/settings_cubit.dart'; 4 | 5 | part 'rules.freezed.dart'; 6 | part 'rules.g.dart'; 7 | 8 | List rulesFromJson(List str) => 9 | str.map((x) => Rules.fromJson(x as Json)).toList(); 10 | 11 | @freezed 12 | class Rules with _$Rules { 13 | const factory Rules({ 14 | required int id, 15 | required String rules, 16 | required LanguageEnum language, 17 | @JsonKey(name: 'updated_at') required DateTime updatedAt, 18 | }) = _Rules; 19 | 20 | factory Rules.fromJson(Map json) => _$RulesFromJson(json); 21 | } 22 | 23 | enum LanguageEnum { 24 | @JsonValue('en') 25 | en, 26 | @JsonValue('es') 27 | es, 28 | } 29 | -------------------------------------------------------------------------------- /lib/resources/app_images.dart: -------------------------------------------------------------------------------- 1 | part of 'resources.dart'; 2 | 3 | class AppImages { 4 | AppImages._(); 5 | 6 | static const String appLoading = 'assets/images/app_loading.json'; 7 | static const String bullSearchGame = 'assets/images/bull_search_game.json'; 8 | static const String cowSearchGame = 'assets/images/cow_search_game.json'; 9 | static const String firstPlace = 'assets/images/first_place.png'; 10 | static const String gamePoints = 'assets/images/game_points.png'; 11 | static const String loseGame = 'assets/images/lose_game.json'; 12 | static const String noPhoto = 'assets/images/no_photo.png'; 13 | static const String playButton = 'assets/images/play-button.png'; 14 | static const String secondPlace = 'assets/images/second_place.png'; 15 | static const String thirdPlace = 'assets/images/third_place.png'; 16 | static const String winGame = 'assets/images/win_game.json'; 17 | } 18 | -------------------------------------------------------------------------------- /lib/src/core/supabase/query_supabase.dart: -------------------------------------------------------------------------------- 1 | ///This class contains all tables inside of supabase database 2 | abstract class QuerySupabase { 3 | static String get rules => 'id, rules, language, updated_at'; 4 | 5 | static String get player => 'id, username, avatar_url'; 6 | 7 | static String get playerNumber => 8 | 'id, player($player), number, is_turn, time_left, started_time, finish_time'; 9 | 10 | static String get game => ''' 11 | id, status!inner($gameStatus), player_number1!inner($playerNumber), player_number2!inner($playerNumber), winner($player) 12 | '''; 13 | 14 | static String get gameStatus => 'id, status'; 15 | 16 | static String ranking = ''' 17 | id, position, points, games_won, games_loss, minimum_attempts, player($player) 18 | '''; 19 | 20 | static String attempt = ''' 21 | id, game($game), number, bulls, cows, number, player($player) 22 | '''; 23 | } 24 | -------------------------------------------------------------------------------- /lib/src/features/settings/data/profile_images.dart: -------------------------------------------------------------------------------- 1 | import 'package:mind_cows/src/core/constants.dart'; 2 | 3 | final profileImagesUrl = [ 4 | '${Constants.publicStorageUrl}/avatars/2151021955.jpg?t=2024-10-05T03%3A55%3A11.685Z', 5 | '${Constants.publicStorageUrl}/avatars/3d-cartoon-style-character%20(1).jpg', 6 | '${Constants.publicStorageUrl}/avatars/2151033971.jpg?t=2024-10-05T04%3A03%3A52.520Z', 7 | '${Constants.publicStorageUrl}/avatars/40542.jpg', 8 | '${Constants.publicStorageUrl}/avatars/portrait-beautiful-girl-with-blond-hair-3d-rendering.jpg', 9 | '${Constants.publicStorageUrl}/avatars/51491.jpg', 10 | '${Constants.publicStorageUrl}/avatars/businesswoman-cartoon-character-gray-background-3d-illustration-business-concept.jpg', 11 | '${Constants.publicStorageUrl}/avatars/50955.jpg', 12 | '${Constants.publicStorageUrl}/avatars/portrait-beautiful-young-woman-with-stylish-hairstyle-glasses.jpg', 13 | ]; 14 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 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 | 12.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | app_links 7 | firebase_core 8 | url_launcher_windows 9 | ) 10 | 11 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 12 | ) 13 | 14 | set(PLUGIN_BUNDLED_LIBRARIES) 15 | 16 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 17 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 18 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 19 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 20 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 21 | endforeach(plugin) 22 | 23 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 24 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 25 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 26 | endforeach(ffi_plugin) 27 | -------------------------------------------------------------------------------- /test/app_images_test.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:flutter_test/flutter_test.dart'; 4 | import 'package:mind_cows/resources/resources.dart'; 5 | 6 | void main() { 7 | test('app_images assets test', () { 8 | expect(File(AppImages.appLoading).existsSync(), isTrue); 9 | expect(File(AppImages.bullSearchGame).existsSync(), isTrue); 10 | expect(File(AppImages.cowSearchGame).existsSync(), isTrue); 11 | expect(File(AppImages.firstPlace).existsSync(), isTrue); 12 | expect(File(AppImages.gamePoints).existsSync(), isTrue); 13 | expect(File(AppImages.loseGame).existsSync(), isTrue); 14 | expect(File(AppImages.noPhoto).existsSync(), isTrue); 15 | expect(File(AppImages.playButton).existsSync(), isTrue); 16 | expect(File(AppImages.secondPlace).existsSync(), isTrue); 17 | expect(File(AppImages.thirdPlace).existsSync(), isTrue); 18 | expect(File(AppImages.winGame).existsSync(), isTrue); 19 | }); 20 | } 21 | -------------------------------------------------------------------------------- /windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /lib/src/features/game/data/model/game_status.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'game_status.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | GameStatus _$GameStatusFromJson(Map json) => GameStatus( 10 | id: (json['id'] as num).toInt(), 11 | status: $enumDecode(_$StatusEnumEnumMap, json['status']), 12 | ); 13 | 14 | Map _$GameStatusToJson(GameStatus instance) => 15 | { 16 | 'id': instance.id, 17 | 'status': _$StatusEnumEnumMap[instance.status]!, 18 | }; 19 | 20 | const _$StatusEnumEnumMap = { 21 | StatusEnum.searching: 'searching', 22 | StatusEnum.inProgress: 'in_progress', 23 | StatusEnum.finished: 'finished', 24 | StatusEnum.selectingSecretNumbers: 'selecting_secret_numbers', 25 | }; 26 | -------------------------------------------------------------------------------- /lib/bootstrap.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:developer'; 3 | 4 | import 'package:bloc/bloc.dart'; 5 | import 'package:flutter/widgets.dart'; 6 | 7 | class AppBlocObserver extends BlocObserver { 8 | const AppBlocObserver(); 9 | 10 | @override 11 | void onChange(BlocBase bloc, Change change) { 12 | super.onChange(bloc, change); 13 | log('onChange(${bloc.runtimeType}, $change)'); 14 | } 15 | 16 | @override 17 | void onError(BlocBase bloc, Object error, StackTrace stackTrace) { 18 | log('onError(${bloc.runtimeType}, $error, $stackTrace)'); 19 | super.onError(bloc, error, stackTrace); 20 | } 21 | } 22 | 23 | Future bootstrap(FutureOr Function() builder) async { 24 | FlutterError.onError = (details) { 25 | log(details.exceptionAsString(), stackTrace: details.stack); 26 | }; 27 | 28 | Bloc.observer = const AppBlocObserver(); 29 | 30 | // Add cross-flavor configuration here 31 | 32 | runApp(await builder()); 33 | } 34 | -------------------------------------------------------------------------------- /lib/src/core/services/player_datasource.dart: -------------------------------------------------------------------------------- 1 | import 'package:fpdart/fpdart.dart'; 2 | import 'package:mind_cows/src/core/exceptions.dart'; 3 | import 'package:mind_cows/src/features/player/data/model/player.dart'; 4 | import 'package:mind_cows/src/features/player/data/model/player_number.dart'; 5 | import 'package:mind_cows/src/features/player/domain/player_number_realtime.dart'; 6 | 7 | abstract class PlayerDatasource { 8 | Future> getPlayerById(String id); 9 | 10 | Future> createPlayerNumber( 11 | Player player, 12 | List number, 13 | ); 14 | 15 | Future> updatePlayerNumber( 16 | PlayerNumber playerNumber, 17 | ); 18 | 19 | void listenPlayerNumberChanges( 20 | String playerId, 21 | void Function(PlayerNumberRealtime) callback, 22 | ); 23 | 24 | Future> setProfileImage( 25 | Player player, 26 | String imageUrl, 27 | ); 28 | } 29 | -------------------------------------------------------------------------------- /lib/src/features/settings/pages/how_to_play_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_gutter/flutter_gutter.dart'; 3 | import 'package:mind_cows/l10n/l10n.dart'; 4 | import 'package:mind_cows/src/core/ui/device.dart'; 5 | import 'package:mind_cows/src/features/settings/data/model/rules.dart'; 6 | 7 | class HowToPlayScreen extends StatelessWidget { 8 | const HowToPlayScreen({required this.rules, super.key}); 9 | 10 | final Rules rules; 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return Scaffold( 15 | appBar: AppBar(title: Text(context.l10n.howToPlay)), 16 | body: Padding( 17 | padding: context.responsiveContentPadding, 18 | child: SingleChildScrollView( 19 | child: Column( 20 | children: [ 21 | const Gutter(), 22 | Text(rules.rules), 23 | const Gutter(), 24 | ], 25 | ), 26 | ), 27 | ), 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ios/Runner/GoogleService-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | API_KEY 6 | AIzaSyCEULtTU1gnEmv27AV3IajcJ_iEZDbrlfs 7 | GCM_SENDER_ID 8 | 43890310910 9 | PLIST_VERSION 10 | 1 11 | BUNDLE_ID 12 | com.mindcows.app 13 | PROJECT_ID 14 | mindcows-e6b33 15 | STORAGE_BUCKET 16 | mindcows-e6b33.appspot.com 17 | IS_ADS_ENABLED 18 | 19 | IS_ANALYTICS_ENABLED 20 | 21 | IS_APPINVITE_ENABLED 22 | 23 | IS_GCM_ENABLED 24 | 25 | IS_SIGNIN_ENABLED 26 | 27 | GOOGLE_APP_ID 28 | 1:43890310910:ios:3d504774e0667cee0defaf 29 | 30 | -------------------------------------------------------------------------------- /lib/src/features/settings/cubit/settings_state.dart: -------------------------------------------------------------------------------- 1 | part of 'settings_cubit.dart'; 2 | 3 | enum SettingsStateStatus { initial, loading, loaded, error } 4 | 5 | enum Language { english, spanish } 6 | 7 | extension LanguagesX on Language { 8 | Locale get locale { 9 | switch (this) { 10 | case Language.english: 11 | return const Locale('en'); 12 | case Language.spanish: 13 | return const Locale('es'); 14 | } 15 | } 16 | } 17 | 18 | @freezed 19 | class SettingsState with _$SettingsState { 20 | const factory SettingsState({ 21 | @Default(SettingsStateStatus.initial) SettingsStateStatus stateStatus, 22 | Locale? locale, 23 | List? rules, 24 | ThemeMode? theme, 25 | AppException? error, 26 | }) = _SettingsState; 27 | const SettingsState._(); 28 | 29 | bool get isLoading => stateStatus == SettingsStateStatus.loading; 30 | bool get isLoaded => stateStatus == SettingsStateStatus.loaded; 31 | bool get isError => stateStatus == SettingsStateStatus.error; 32 | } 33 | -------------------------------------------------------------------------------- /lib/src/features/settings/data/model/rules.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'rules.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | _$RulesImpl _$$RulesImplFromJson(Map json) => _$RulesImpl( 10 | id: (json['id'] as num).toInt(), 11 | rules: json['rules'] as String, 12 | language: $enumDecode(_$LanguageEnumEnumMap, json['language']), 13 | updatedAt: DateTime.parse(json['updated_at'] as String), 14 | ); 15 | 16 | Map _$$RulesImplToJson(_$RulesImpl instance) => 17 | { 18 | 'id': instance.id, 19 | 'rules': instance.rules, 20 | 'language': _$LanguageEnumEnumMap[instance.language]!, 21 | 'updated_at': instance.updatedAt.toIso8601String(), 22 | }; 23 | 24 | const _$LanguageEnumEnumMap = { 25 | LanguageEnum.en: 'en', 26 | LanguageEnum.es: 'es', 27 | }; 28 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | def flutterSdkPath = { 3 | def properties = new Properties() 4 | file("local.properties").withInputStream { properties.load(it) } 5 | def flutterSdkPath = properties.getProperty("flutter.sdk") 6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 7 | return flutterSdkPath 8 | }() 9 | 10 | includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") 11 | 12 | repositories { 13 | google() 14 | mavenCentral() 15 | gradlePluginPortal() 16 | } 17 | } 18 | 19 | plugins { 20 | id "dev.flutter.flutter-plugin-loader" version "1.0.0" 21 | id "com.android.application" version "7.3.0" apply false 22 | // START: FlutterFire Configuration 23 | id "com.google.gms.google-services" version "4.3.15" apply false 24 | id "com.google.firebase.crashlytics" version "2.8.1" apply false 25 | // END: FlutterFire Configuration 26 | id "org.jetbrains.kotlin.android" version "1.9.0" apply false 27 | 28 | } 29 | 30 | include ":app" 31 | -------------------------------------------------------------------------------- /lib/src/features/player/data/model/player.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | import 'package:json_annotation/json_annotation.dart'; 3 | import 'package:mind_cows/src/core/supabase/table_interface.dart'; 4 | 5 | part 'player.g.dart'; 6 | 7 | @JsonSerializable(explicitToJson: true, fieldRename: FieldRename.snake) 8 | class Player extends Equatable with TableInterface { 9 | Player({ 10 | required this.id, 11 | required this.username, 12 | required this.avatarUrl, 13 | }); 14 | 15 | factory Player.empty() => Player(id: '', username: '', avatarUrl: ''); 16 | 17 | factory Player.fromJson(Map json) => _$PlayerFromJson(json); 18 | final String id; 19 | final String username; 20 | final String avatarUrl; 21 | 22 | Map toJson() => _$PlayerToJson(this); 23 | 24 | @override 25 | String tableName() => 'players'; 26 | 27 | @override 28 | String columns() => 'id, username, avatar_url'; 29 | 30 | @override 31 | // TODO: implement props 32 | List get props => [id, username, avatarUrl]; 33 | } 34 | -------------------------------------------------------------------------------- /lib/src/core/utils/widgets/generic_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:mind_cows/src/core/ui/colors.dart'; 3 | 4 | class GenericButton extends StatelessWidget { 5 | const GenericButton({ 6 | required this.widget, 7 | super.key, 8 | this.onPressed, 9 | this.style, 10 | this.width, 11 | this.color, 12 | this.loading = false, 13 | }); 14 | 15 | final Widget widget; 16 | final VoidCallback? onPressed; 17 | final ButtonStyle? style; 18 | final double? width; 19 | final Color? color; 20 | final bool loading; 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return SizedBox( 25 | width: width, 26 | child: ElevatedButton( 27 | onPressed: onPressed?.call, 28 | style: style ?? 29 | ElevatedButton.styleFrom( 30 | backgroundColor: color ?? AppColor.primary, 31 | ), 32 | child: Container( 33 | child: loading ? const CircularProgressIndicator.adaptive() : widget, 34 | ), 35 | ), 36 | ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_FLUTTER_WINDOW_H_ 2 | #define RUNNER_FLUTTER_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include "win32_window.h" 10 | 11 | // A window that does nothing but host a Flutter view. 12 | class FlutterWindow : public Win32Window { 13 | public: 14 | // Creates a new FlutterWindow hosting a Flutter view running |project|. 15 | explicit FlutterWindow(const flutter::DartProject& project); 16 | virtual ~FlutterWindow(); 17 | 18 | protected: 19 | // Win32Window: 20 | bool OnCreate() override; 21 | void OnDestroy() override; 22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, 23 | LPARAM const lparam) noexcept override; 24 | 25 | private: 26 | // The project to run. 27 | flutter::DartProject project_; 28 | 29 | // The Flutter instance hosted by this window. 30 | std::unique_ptr flutter_controller_; 31 | }; 32 | 33 | #endif // RUNNER_FLUTTER_WINDOW_H_ 34 | -------------------------------------------------------------------------------- /macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | import app_links 9 | import firebase_core 10 | import firebase_crashlytics 11 | import path_provider_foundation 12 | import shared_preferences_foundation 13 | import sqflite 14 | import url_launcher_macos 15 | 16 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 17 | AppLinksMacosPlugin.register(with: registry.registrar(forPlugin: "AppLinksMacosPlugin")) 18 | FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) 19 | FLTFirebaseCrashlyticsPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCrashlyticsPlugin")) 20 | PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) 21 | SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) 22 | SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) 23 | UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) 24 | } 25 | -------------------------------------------------------------------------------- /lib/src/features/game/widgets/game_turn_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:mind_cows/l10n/l10n.dart'; 3 | import 'package:mind_cows/src/core/ui/typography.dart'; 4 | import 'package:mind_cows/src/features/player/data/model/player_number.dart'; 5 | 6 | class GameTurnWidget extends StatelessWidget { 7 | const GameTurnWidget({ 8 | required this.ownPlayerNumber, 9 | super.key, 10 | }); 11 | 12 | final PlayerNumber ownPlayerNumber; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return Container( 17 | decoration: BoxDecoration( 18 | color: ownPlayerNumber.isTurn ? Colors.green : Colors.red, 19 | borderRadius: BorderRadius.circular(5), 20 | ), 21 | child: Padding( 22 | padding: const EdgeInsets.symmetric(vertical: 5, horizontal: 15), 23 | child: Text( 24 | ownPlayerNumber.isTurn 25 | ? context.l10n.yourTurn 26 | : context.l10n.rivalTurn, 27 | style: AppTextStyle().body.copyWith(color: Colors.white), 28 | ), 29 | ), 30 | ); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lib/src/features/game/data/model/attempt.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'attempt.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Attempt _$AttemptFromJson(Map json) => Attempt( 10 | id: (json['id'] as num).toInt(), 11 | game: Game.fromJson(json['game'] as Map), 12 | bulls: (json['bulls'] as num).toInt(), 13 | cows: (json['cows'] as num).toInt(), 14 | number: (json['number'] as List) 15 | .map((e) => (e as num).toInt()) 16 | .toList(), 17 | player: Player.fromJson(json['player'] as Map), 18 | ); 19 | 20 | Map _$AttemptToJson(Attempt instance) => { 21 | 'id': instance.id, 22 | 'game': instance.game.toJson(), 23 | 'bulls': instance.bulls, 24 | 'cows': instance.cows, 25 | 'number': instance.number, 26 | 'player': instance.player.toJson(), 27 | }; 28 | -------------------------------------------------------------------------------- /lib/src/core/preferences/preferences.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:injectable/injectable.dart'; 3 | import 'package:mind_cows/src/core/utils/utils.dart'; 4 | import 'package:mind_cows/src/core/utils/utils.dart'; 5 | import 'package:shared_preferences/shared_preferences.dart'; 6 | 7 | enum PrefsKey { 8 | darkMode, 9 | language, 10 | } 11 | 12 | @singleton 13 | class Preferences { 14 | Preferences(this._prefs); 15 | 16 | final SharedPreferences _prefs; 17 | 18 | ThemeMode getTheme() { 19 | final isDarkMode = _prefs.getBool(PrefsKey.darkMode.name) ?? true; 20 | 21 | return isDarkMode ? ThemeMode.dark : ThemeMode.light; 22 | } 23 | 24 | void changeTheme() { 25 | final theme = _prefs.getBool(PrefsKey.darkMode.name) ?? true; 26 | 27 | _prefs.setBool(PrefsKey.darkMode.name, !theme); 28 | } 29 | 30 | Locale? getLanguage() { 31 | final languageString = _prefs.getString(PrefsKey.language.name); 32 | 33 | return Utils.getLocaleByCode(languageString); 34 | } 35 | 36 | void setLanguage(String language) { 37 | _prefs.setString(PrefsKey.language.name, language); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-v31/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 16 | 19 | 20 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-night-v31/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 16 | 19 | 20 | -------------------------------------------------------------------------------- /coverage_badge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | coverage 16 | coverage 17 | 100% 18 | 100% 19 | 20 | -------------------------------------------------------------------------------- /spider.yaml: -------------------------------------------------------------------------------- 1 | # Generated by Spider 2 | # For more info on configuration, visit https://birjuvachhani.github.io/spider/grouping/ 3 | # Generates unit tests to verify that the assets exists in assets directory 4 | generate_tests: true 5 | 6 | # Use this to remove vcs noise created by the `generated` comments in dart code 7 | no_comments: true 8 | 9 | # Exports all the generated file as the one library 10 | export: true 11 | 12 | # This allows you to import all the generated references with 1 single import! 13 | use_part_of: true 14 | 15 | # Generates a variable that contains a list of all asset values. 16 | use_references_list: false 17 | 18 | # Generates files with given ignore rules for file. 19 | # ignored_rules: 20 | # - public_member_api_docs 21 | 22 | # Generates dart font family references for fonts specified in pubspec.yaml 23 | # fonts: true 24 | # -------- OR -------- 25 | # fonts: 26 | # class_name: MyFonts 27 | # file_name: my_fonts 28 | 29 | # Location where all the generated references will be stored 30 | package: resources 31 | 32 | groups: 33 | - path: assets/images 34 | class_name: AppImages 35 | types: [ .png, .jpg, .jpeg, .webp, .webm, .bmp, .json ] -------------------------------------------------------------------------------- /lib/src/features/ranking/data/model/ranking.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'ranking.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Ranking _$RankingFromJson(Map json) => Ranking( 10 | id: (json['id'] as num).toInt(), 11 | position: (json['position'] as num).toInt(), 12 | points: (json['points'] as num).toInt(), 13 | gamesWon: (json['games_won'] as num).toInt(), 14 | gamesLoss: (json['games_loss'] as num).toInt(), 15 | minimumAttempts: (json['minimum_attempts'] as num).toInt(), 16 | player: Player.fromJson(json['player'] as Map), 17 | ); 18 | 19 | Map _$RankingToJson(Ranking instance) => { 20 | 'id': instance.id, 21 | 'position': instance.position, 22 | 'points': instance.points, 23 | 'games_won': instance.gamesWon, 24 | 'games_loss': instance.gamesLoss, 25 | 'minimum_attempts': instance.minimumAttempts, 26 | 'player': instance.player.toJson(), 27 | }; 28 | -------------------------------------------------------------------------------- /lib/src/core/utils/utils.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:mind_cows/l10n/l10n.dart'; 3 | import 'package:mind_cows/src/features/settings/data/model/rules.dart'; 4 | 5 | abstract class Utils { 6 | static bool isValidPlayerNumber(String value) { 7 | final values = value.split(''); 8 | 9 | if (values.length != 4) return false; 10 | 11 | final uniqueValues = values.toSet(); 12 | 13 | return uniqueValues.length == values.length; 14 | } 15 | 16 | static String attemptResult(BuildContext context, int cows, int bulls) { 17 | return '${context.l10n.cowPlay}$cows ${context.l10n.bullPlay}$bulls'; 18 | } 19 | 20 | static Locale? getLocaleByCode(String? languageString) { 21 | switch (languageString) { 22 | case 'en': 23 | return const Locale('en', 'US'); 24 | case 'es': 25 | return const Locale('es', 'ES'); 26 | default: 27 | return null; 28 | } 29 | } 30 | 31 | static Rules getRulesByLanguage( 32 | String language, { 33 | required List rules, 34 | }) { 35 | final rule = 36 | rules.firstWhere((element) => element.language.name == language); 37 | 38 | return rule; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /lib/src/core/extensions/string.dart: -------------------------------------------------------------------------------- 1 | extension StringX on String { 2 | /// Parse a string to an email address (GMAIL by default). 3 | String get parseStringToEmail => '${trim()}@gmail.com'; 4 | 5 | /// Convert a camelCase string to snake_case. 6 | String get camelToSnakeCase { 7 | return replaceAllMapped( 8 | RegExp('([a-z])([A-Z])'), 9 | (Match match) => '${match.group(1)}_${match.group(2)}', 10 | ).toLowerCase(); 11 | } 12 | 13 | /// Convert a string to a list of integers. 14 | List get parseOptToNumberValue => split('').map(int.parse).toList(); 15 | 16 | /// Parse a string representing seconds to a time format (mm:ss). 17 | String get parseToMinutesAndSeconds { 18 | final totalSeconds = int.tryParse(this) ?? 0; 19 | final minutes = totalSeconds ~/ 60; 20 | final seconds = totalSeconds % 60; 21 | return '${minutes.toString().padLeft(2, '0')}:${seconds.toString().padLeft(2, '0')}'; 22 | } 23 | 24 | /// Parse a string representing seconds to a DateTime. 25 | DateTime get parseToDateTime { 26 | final totalSeconds = int.tryParse(this) ?? 0; 27 | final now = DateTime.now(); 28 | 29 | return now.subtract(Duration(seconds: totalSeconds)); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /.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: "d211f42860350d914a5ad8102f9ec32764dc6d06" 8 | channel: "stable" 9 | 10 | project_type: app 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a 17 | base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a 18 | - platform: macos 19 | create_revision: d211f42860350d914a5ad8102f9ec32764dc6d06 20 | base_revision: d211f42860350d914a5ad8102f9ec32764dc6d06 21 | - platform: ios 22 | create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a 23 | base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a 24 | 25 | # User provided section 26 | 27 | # List of Local paths (relative to this file) that should be 28 | # ignored by the migrate tool. 29 | # 30 | # Files that are not part of the templates will be ignored by default. 31 | unmanaged_files: 32 | - 'lib/main.dart' 33 | - 'ios/Runner.xcodeproj/project.pbxproj' 34 | -------------------------------------------------------------------------------- /lib/src/features/home/widgets/header_section.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:mind_cows/src/core/ui/extensions.dart'; 3 | import 'package:mind_cows/src/features/ranking/leaderboard.dart'; 4 | import 'package:mind_cows/src/features/home/widgets/versus_section.dart'; 5 | import 'package:sized_context/sized_context.dart'; 6 | 7 | class HeaderSection extends StatelessWidget { 8 | const HeaderSection({ 9 | required this.height, 10 | super.key, 11 | this.isCollapsed = false, 12 | }); 13 | 14 | final double height; 15 | 16 | final bool isCollapsed; 17 | @override 18 | Widget build(BuildContext context) { 19 | final colorScheme = Theme.of(context).colorScheme; 20 | 21 | return AnimatedContainer( 22 | duration: 200.milliseconds, 23 | height: height, 24 | width: context.widthPx, 25 | decoration: BoxDecoration( 26 | color: colorScheme.primary, 27 | borderRadius: const BorderRadius.only( 28 | bottomLeft: Radius.circular(50), 29 | bottomRight: Radius.circular(50), 30 | ), 31 | ), 32 | child: AnimatedSwitcher( 33 | duration: 500.milliseconds, 34 | child: const LeaderboardWidget(), 35 | ), 36 | ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /lib/src/features/ranking/cubit/ranking_cubit.dart: -------------------------------------------------------------------------------- 1 | import 'package:bloc/bloc.dart'; 2 | import 'package:freezed_annotation/freezed_annotation.dart'; 3 | import 'package:injectable/injectable.dart'; 4 | import 'package:mind_cows/src/features/ranking/data/model/ranking.dart'; 5 | import 'package:mind_cows/src/features/ranking/data/ranking_repository.dart'; 6 | 7 | part 'ranking_state.dart'; 8 | part 'ranking_cubit.freezed.dart'; 9 | 10 | @injectable 11 | class RankingCubit extends Cubit { 12 | RankingCubit(this._rankingRepository) : super(const RankingState()) { 13 | _listenRankingChanges(); 14 | } 15 | 16 | final RankingRepository _rankingRepository; 17 | 18 | void _listenRankingChanges() { 19 | _rankingRepository.listenRanking(loadRanking); 20 | } 21 | 22 | void loadRanking() { 23 | emit(state.copyWith(status: RankingStateStatus.loading)); 24 | 25 | _rankingRepository.getRanking().then((result) { 26 | result.fold( 27 | (error) => emit(state.copyWith(status: RankingStateStatus.error)), 28 | (ranking) => emit( 29 | state.copyWith( 30 | ranking: ranking ?? [], 31 | status: RankingStateStatus.loaded, 32 | ), 33 | ), 34 | ); 35 | }); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /macos/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleName 12 | $(FLAVOR_APP_NAME) 13 | CFBundleDisplayName 14 | $(FLAVOR_APP_NAME) 15 | CFBundleIdentifier 16 | $(PRODUCT_BUNDLE_IDENTIFIER) 17 | CFBundleInfoDictionaryVersion 18 | 6.0 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | $(FLUTTER_BUILD_NAME) 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSMinimumSystemVersion 26 | $(MACOSX_DEPLOYMENT_TARGET) 27 | NSHumanReadableCopyright 28 | $(PRODUCT_COPYRIGHT) 29 | NSMainNibFile 30 | MainMenu 31 | NSPrincipalClass 32 | NSApplication 33 | 34 | 35 | -------------------------------------------------------------------------------- /lib/src/features/game/data/model/game_status.dart: -------------------------------------------------------------------------------- 1 | import 'package:mind_cows/src/core/supabase/table_interface.dart'; 2 | import 'package:json_annotation/json_annotation.dart'; 3 | import 'package:mind_cows/src/core/utils/object_extensions.dart'; 4 | 5 | part 'game_status.g.dart'; 6 | 7 | List gameStatusFromJson(List str) => 8 | str.map((x) => GameStatus.fromJson(x as Json)).toList(); 9 | 10 | @JsonSerializable(explicitToJson: true) 11 | class GameStatus with TableInterface { 12 | GameStatus({ 13 | required this.id, 14 | required this.status, 15 | }); 16 | 17 | factory GameStatus.empty() => GameStatus( 18 | id: 0, 19 | status: StatusEnum.searching, 20 | ); 21 | 22 | factory GameStatus.fromJson(Map json) => 23 | _$GameStatusFromJson(json); 24 | final int id; 25 | final StatusEnum status; 26 | 27 | Map toJson() => _$GameStatusToJson(this); 28 | 29 | @override 30 | String columns() => 'id, status'; 31 | 32 | @override 33 | String tableName() => 'game_status'; 34 | } 35 | 36 | enum StatusEnum { 37 | @JsonValue('searching') 38 | searching, 39 | @JsonValue('in_progress') 40 | inProgress, 41 | @JsonValue('finished') 42 | finished, 43 | @JsonValue('selecting_secret_numbers') 44 | selectingSecretNumbers, 45 | } 46 | -------------------------------------------------------------------------------- /lib/src/features/game/data/model/game.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'game.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Game _$GameFromJson(Map json) => Game( 10 | id: (json['id'] as num).toInt(), 11 | status: GameStatus.fromJson(json['status'] as Map), 12 | playerNumber1: json['player_number1'] == null 13 | ? null 14 | : PlayerNumber.fromJson( 15 | json['player_number1'] as Map), 16 | playerNumber2: json['player_number2'] == null 17 | ? null 18 | : PlayerNumber.fromJson( 19 | json['player_number2'] as Map), 20 | winner: json['winner'] == null 21 | ? null 22 | : Player.fromJson(json['winner'] as Map), 23 | ); 24 | 25 | Map _$GameToJson(Game instance) => { 26 | 'id': instance.id, 27 | 'status': instance.status.toJson(), 28 | 'player_number1': instance.playerNumber1?.toJson(), 29 | 'player_number2': instance.playerNumber2?.toJson(), 30 | 'winner': instance.winner?.toJson(), 31 | }; 32 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'dart:developer'; 2 | 3 | import 'package:firebase_core/firebase_core.dart'; 4 | import 'package:firebase_crashlytics/firebase_crashlytics.dart'; 5 | import 'package:flutter/foundation.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:flutter_dotenv/flutter_dotenv.dart'; 8 | import 'package:mind_cows/firebase_options.dart'; 9 | import 'package:mind_cows/src/app.dart'; 10 | import 'package:mind_cows/src/core/di/dependency_injection.dart'; 11 | import 'package:supabase_flutter/supabase_flutter.dart'; 12 | 13 | Future main() async { 14 | WidgetsFlutterBinding.ensureInitialized(); 15 | await dotenv.load(); 16 | 17 | await Supabase.initialize( 18 | url: dotenv.get('SUPABASE_URL'), 19 | anonKey: dotenv.get('ANON_KEY'), 20 | ); 21 | 22 | await configureDependencies(); 23 | 24 | await Firebase.initializeApp( 25 | options: DefaultFirebaseOptions.currentPlatform, 26 | ); 27 | 28 | FlutterError.onError = (details) { 29 | FirebaseCrashlytics.instance.recordFlutterError(details); 30 | log('FlutterError.onError: $details'); 31 | }; 32 | 33 | PlatformDispatcher.instance.onError = (error, stack) { 34 | FirebaseCrashlytics.instance.recordError(error, stack); 35 | log('PlatformDispatcher.instance.onError: $error'); 36 | return true; 37 | }; 38 | 39 | runApp(const MyApp()); 40 | } 41 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 13 | 19 | 22 | 23 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 13 | 19 | 22 | 23 | -------------------------------------------------------------------------------- /lib/src/core/services/game_datasource.dart: -------------------------------------------------------------------------------- 1 | import 'package:fpdart/fpdart.dart'; 2 | import 'package:mind_cows/src/core/exceptions.dart'; 3 | import 'package:mind_cows/src/features/game/data/game_repository.dart'; 4 | import 'package:mind_cows/src/features/game/data/model/attempt.dart'; 5 | import 'package:mind_cows/src/features/game/data/model/game.dart'; 6 | import 'package:mind_cows/src/features/game/data/model/game_status.dart'; 7 | import 'package:mind_cows/src/features/player/data/model/player.dart'; 8 | 9 | abstract class GameDataSource { 10 | Future> findOrCreateGame(Player player); 11 | 12 | Future> cancelSearchGame(Player player); 13 | 14 | Future?>> getAllGameStatus(); 15 | 16 | Future> getLastGame(Player player); 17 | 18 | Future?>> getAttemptsInGameByPlayer( 19 | Game game, 20 | Player player, 21 | ); 22 | 23 | Future> insertAttempt(Attempt attempt); 24 | 25 | Future> getServerTime(); 26 | 27 | Future> surrenderGame( 28 | Game game, 29 | Player player, 30 | ); 31 | 32 | void listenAttempts( 33 | Game game, 34 | Player player, 35 | void Function(AttemptCallbackData) callback, 36 | ); 37 | } 38 | -------------------------------------------------------------------------------- /lib/src/features/ranking/uitls/ranking_utils.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:mind_cows/resources/resources.dart'; 3 | import 'package:mind_cows/src/features/ranking/data/model/ranking.dart'; 4 | 5 | enum PodiumPosition { first, second, third } 6 | 7 | abstract class RankingUtils { 8 | static List podium(List ranking) { 9 | // If there are less than 3 rankings, return the original list 10 | if (ranking.length < 3) return ranking; 11 | 12 | // Get the first three elements 13 | final podium = ranking.sublist(0, 3); 14 | 15 | // Rearrange the list to show 2nd, 1st, and then 3rd 16 | return [podium[1], podium[0], podium[2]]; 17 | } 18 | 19 | static String getImageRankingByPos(PodiumPosition podiumPosition) { 20 | return switch (podiumPosition) { 21 | PodiumPosition.first => AppImages.firstPlace, 22 | PodiumPosition.second => AppImages.secondPlace, 23 | _ => AppImages.thirdPlace 24 | }; 25 | } 26 | 27 | static double getRotationByPos(PodiumPosition podiumPosition) { 28 | return switch (podiumPosition) { 29 | PodiumPosition.first => 0, 30 | PodiumPosition.second => -0.1, 31 | _ => 0.1, 32 | }; 33 | } 34 | 35 | static Ranking getRankingByPlayerId(List ranking, String playerId) { 36 | return ranking.firstWhere((element) => element.player.id == playerId); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /lib/src/features/ranking/data/model/ranking.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | import 'package:mind_cows/src/core/supabase/table_interface.dart'; 3 | import 'package:mind_cows/src/core/utils/object_extensions.dart'; 4 | import 'package:mind_cows/src/features/player/data/model/player.dart'; 5 | 6 | part 'ranking.g.dart'; 7 | 8 | List rankingsFromJson(List str) => 9 | str.map((x) => Ranking.fromJson(x as Json)).toList(); 10 | 11 | @JsonSerializable(explicitToJson: true, fieldRename: FieldRename.snake) 12 | class Ranking with TableInterface { 13 | Ranking({ 14 | required this.id, 15 | required this.position, 16 | required this.points, 17 | required this.gamesWon, 18 | required this.gamesLoss, 19 | required this.minimumAttempts, 20 | required this.player, 21 | }); 22 | 23 | factory Ranking.fromJson(Map json) => 24 | _$RankingFromJson(json); 25 | 26 | final int id; 27 | final int position; 28 | final int points; 29 | final int gamesWon; 30 | final int gamesLoss; 31 | final int minimumAttempts; 32 | final Player player; 33 | 34 | Map toJson() => _$RankingToJson(this); 35 | 36 | @override 37 | String columns() => ''' 38 | id, games_won, games_lost, minimum_attempts, player(${player.columns()}) 39 | '''; 40 | 41 | @override 42 | String tableName() => 'ranking'; 43 | } 44 | -------------------------------------------------------------------------------- /lib/src/core/utils/widgets/bottom_snackbar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:mind_cows/src/core/ui/typography.dart'; 3 | 4 | class BottomSnackbar extends StatelessWidget { 5 | const BottomSnackbar({ 6 | this.message, 7 | super.key, 8 | this.backgroundColor, 9 | this.widget, 10 | this.height = 40, 11 | this.textColor = Colors.white, 12 | }); 13 | 14 | final Color? backgroundColor; 15 | final String? message; 16 | final Widget? widget; 17 | final double? height; 18 | final Color? textColor; 19 | 20 | @override 21 | Widget build(BuildContext context) { 22 | final colorScheme = Theme.of(context).colorScheme; 23 | return Card( 24 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(5)), 25 | color: backgroundColor ?? colorScheme.surface, 26 | child: Padding( 27 | padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 16), 28 | child: Align( 29 | child: SizedBox( 30 | child: widget ?? 31 | Text( 32 | message!, 33 | style: AppTextStyle().body.copyWith( 34 | fontSize: 12, 35 | color: textColor ?? Colors.white, 36 | ), 37 | textAlign: TextAlign.center, 38 | ), 39 | ), 40 | ), 41 | ), 42 | ); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /windows/runner/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "flutter_window.h" 6 | #include "utils.h" 7 | 8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, 9 | _In_ wchar_t *command_line, _In_ int show_command) { 10 | // Attach to console when present (e.g., 'flutter run') or create a 11 | // new console when running with a debugger. 12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { 13 | CreateAndAttachConsole(); 14 | } 15 | 16 | // Initialize COM, so that it is available for use in the library and/or 17 | // plugins. 18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); 19 | 20 | flutter::DartProject project(L"data"); 21 | 22 | std::vector command_line_arguments = 23 | GetCommandLineArguments(); 24 | 25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); 26 | 27 | FlutterWindow window(project); 28 | Win32Window::Point origin(10, 10); 29 | Win32Window::Size size(1280, 720); 30 | if (!window.CreateAndShow(L"My App", origin, size)) { 31 | return EXIT_FAILURE; 32 | } 33 | window.SetQuitOnClose(true); 34 | 35 | ::MSG msg; 36 | while (::GetMessage(&msg, nullptr, 0, 0)) { 37 | ::TranslateMessage(&msg); 38 | ::DispatchMessage(&msg); 39 | } 40 | 41 | ::CoUninitialize(); 42 | return EXIT_SUCCESS; 43 | } 44 | -------------------------------------------------------------------------------- /lib/src/features/player/data/model/player_number.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'player_number.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | PlayerNumber _$PlayerNumberFromJson(Map json) => PlayerNumber( 10 | id: (json['id'] as num).toInt(), 11 | player: Player.fromJson(json['player'] as Map), 12 | isTurn: json['is_turn'] as bool, 13 | timeLeft: (json['time_left'] as num).toInt(), 14 | startedTime: json['started_time'] == null 15 | ? null 16 | : DateTime.parse(json['started_time'] as String), 17 | finishTime: json['finish_time'] == null 18 | ? null 19 | : DateTime.parse(json['finish_time'] as String), 20 | number: (json['number'] as List?) 21 | ?.map((e) => (e as num).toInt()) 22 | .toList(), 23 | ); 24 | 25 | Map _$PlayerNumberToJson(PlayerNumber instance) => 26 | { 27 | 'id': instance.id, 28 | 'player': instance.player.toJson(), 29 | 'is_turn': instance.isTurn, 30 | 'time_left': instance.timeLeft, 31 | 'started_time': instance.startedTime?.toIso8601String(), 32 | 'finish_time': instance.finishTime?.toIso8601String(), 33 | 'number': instance.number, 34 | }; 35 | -------------------------------------------------------------------------------- /lib/src/features/game/cubit/game_state.dart: -------------------------------------------------------------------------------- 1 | part of 'game_cubit.dart'; 2 | 3 | enum GameStateStatus { intial, searchingGame, loading, success, error, cancel } 4 | 5 | @freezed 6 | class GameState with _$GameState { 7 | const factory GameState({ 8 | final Game? game, 9 | @Default(GameStateStatus.intial) final GameStateStatus stateStatus, 10 | @Default([]) final List listGameStatus, 11 | @Default([]) final List listAttempts, 12 | @Default(false) final bool selectSecretNumberShowed, 13 | final AttemptCallbackData? lastRivalResult, 14 | Player? player, 15 | DateTime? serverTime, 16 | AppException? error, 17 | }) = _GameState; 18 | const GameState._(); 19 | 20 | bool get isLoading => stateStatus == GameStateStatus.loading; 21 | bool get isSearchingGame => stateStatus == GameStateStatus.loading; 22 | bool get isSuccess => stateStatus == GameStateStatus.success; 23 | bool get isError => stateStatus == GameStateStatus.error; 24 | bool get isCancel => stateStatus == GameStateStatus.cancel; 25 | 26 | bool get isGameSearching => 27 | game.isNotNull && game!.isSearching || isSearchingGame; 28 | bool get isInSelectingSecretsNumbers => 29 | game.isNotNull && game!.isInSelectingSecretsNumbers; 30 | bool get isGameInProgress => game.isNotNull && game!.isInProgress; 31 | bool get isGameStarted => isInSelectingSecretsNumbers || isGameInProgress; 32 | bool get canCreateGame => game.isNull || (game.isNotNull && game!.isFinished); 33 | } 34 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon-dev.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "16.png", 5 | "idiom" : "mac", 6 | "scale" : "1x", 7 | "size" : "16x16" 8 | }, 9 | { 10 | "filename" : "32 1.png", 11 | "idiom" : "mac", 12 | "scale" : "2x", 13 | "size" : "16x16" 14 | }, 15 | { 16 | "filename" : "32.png", 17 | "idiom" : "mac", 18 | "scale" : "1x", 19 | "size" : "32x32" 20 | }, 21 | { 22 | "filename" : "64.png", 23 | "idiom" : "mac", 24 | "scale" : "2x", 25 | "size" : "32x32" 26 | }, 27 | { 28 | "filename" : "128.png", 29 | "idiom" : "mac", 30 | "scale" : "1x", 31 | "size" : "128x128" 32 | }, 33 | { 34 | "filename" : "256 1.png", 35 | "idiom" : "mac", 36 | "scale" : "2x", 37 | "size" : "128x128" 38 | }, 39 | { 40 | "filename" : "256.png", 41 | "idiom" : "mac", 42 | "scale" : "1x", 43 | "size" : "256x256" 44 | }, 45 | { 46 | "filename" : "512 1.png", 47 | "idiom" : "mac", 48 | "scale" : "2x", 49 | "size" : "256x256" 50 | }, 51 | { 52 | "filename" : "512.png", 53 | "idiom" : "mac", 54 | "scale" : "1x", 55 | "size" : "512x512" 56 | }, 57 | { 58 | "filename" : "1024.png", 59 | "idiom" : "mac", 60 | "scale" : "2x", 61 | "size" : "512x512" 62 | } 63 | ], 64 | "info" : { 65 | "author" : "xcode", 66 | "version" : 1 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon-stg.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "16.png", 5 | "idiom" : "mac", 6 | "scale" : "1x", 7 | "size" : "16x16" 8 | }, 9 | { 10 | "filename" : "32 1.png", 11 | "idiom" : "mac", 12 | "scale" : "2x", 13 | "size" : "16x16" 14 | }, 15 | { 16 | "filename" : "32.png", 17 | "idiom" : "mac", 18 | "scale" : "1x", 19 | "size" : "32x32" 20 | }, 21 | { 22 | "filename" : "64.png", 23 | "idiom" : "mac", 24 | "scale" : "2x", 25 | "size" : "32x32" 26 | }, 27 | { 28 | "filename" : "128.png", 29 | "idiom" : "mac", 30 | "scale" : "1x", 31 | "size" : "128x128" 32 | }, 33 | { 34 | "filename" : "256 1.png", 35 | "idiom" : "mac", 36 | "scale" : "2x", 37 | "size" : "128x128" 38 | }, 39 | { 40 | "filename" : "256.png", 41 | "idiom" : "mac", 42 | "scale" : "1x", 43 | "size" : "256x256" 44 | }, 45 | { 46 | "filename" : "512 1.png", 47 | "idiom" : "mac", 48 | "scale" : "2x", 49 | "size" : "256x256" 50 | }, 51 | { 52 | "filename" : "512.png", 53 | "idiom" : "mac", 54 | "scale" : "1x", 55 | "size" : "512x512" 56 | }, 57 | { 58 | "filename" : "1024.png", 59 | "idiom" : "mac", 60 | "scale" : "2x", 61 | "size" : "512x512" 62 | } 63 | ], 64 | "info" : { 65 | "author" : "xcode", 66 | "version" : 1 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "16.png", 5 | "idiom" : "mac", 6 | "scale" : "1x", 7 | "size" : "16x16" 8 | }, 9 | { 10 | "filename" : "32 1.png", 11 | "idiom" : "mac", 12 | "scale" : "2x", 13 | "size" : "16x16" 14 | }, 15 | { 16 | "filename" : "32.png", 17 | "idiom" : "mac", 18 | "scale" : "1x", 19 | "size" : "32x32" 20 | }, 21 | { 22 | "filename" : "64.png", 23 | "idiom" : "mac", 24 | "scale" : "2x", 25 | "size" : "32x32" 26 | }, 27 | { 28 | "filename" : "128.png", 29 | "idiom" : "mac", 30 | "scale" : "1x", 31 | "size" : "128x128" 32 | }, 33 | { 34 | "filename" : "256 1.png", 35 | "idiom" : "mac", 36 | "scale" : "2x", 37 | "size" : "128x128" 38 | }, 39 | { 40 | "filename" : "256.png", 41 | "idiom" : "mac", 42 | "scale" : "1x", 43 | "size" : "256x256" 44 | }, 45 | { 46 | "filename" : "512 1.png", 47 | "idiom" : "mac", 48 | "scale" : "2x", 49 | "size" : "256x256" 50 | }, 51 | { 52 | "filename" : "512.png", 53 | "idiom" : "mac", 54 | "scale" : "1x", 55 | "size" : "512x512" 56 | }, 57 | { 58 | "filename" : "1024.png", 59 | "idiom" : "mac", 60 | "scale" : "2x", 61 | "size" : "512x512" 62 | } 63 | ], 64 | "info" : { 65 | "author" : "xcode", 66 | "version" : 1 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /macos/Podfile: -------------------------------------------------------------------------------- 1 | platform :osx, '10.14' 2 | 3 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 4 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 5 | 6 | project 'Runner', { 7 | 'Debug' => :debug, 8 | 'Profile' => :release, 9 | 'Release' => :release, 10 | } 11 | 12 | def flutter_root 13 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) 14 | unless File.exist?(generated_xcode_build_settings_path) 15 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" 16 | end 17 | 18 | File.foreach(generated_xcode_build_settings_path) do |line| 19 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 20 | return matches[1].strip if matches 21 | end 22 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" 23 | end 24 | 25 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 26 | 27 | flutter_macos_podfile_setup 28 | 29 | target 'Runner' do 30 | use_frameworks! 31 | use_modular_headers! 32 | 33 | flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) 34 | target 'RunnerTests' do 35 | inherit! :search_paths 36 | end 37 | end 38 | 39 | post_install do |installer| 40 | installer.pods_project.targets.each do |target| 41 | flutter_additional_macos_build_settings(target) 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /lib/src/features/splash/cubit/app_cubit.dart: -------------------------------------------------------------------------------- 1 | import 'dart:developer'; 2 | 3 | import 'package:bloc/bloc.dart'; 4 | import 'package:freezed_annotation/freezed_annotation.dart'; 5 | import 'package:injectable/injectable.dart'; 6 | import 'package:mind_cows/src/features/game/data/game_repository.dart'; 7 | import 'package:mind_cows/src/features/game/data/model/game_status.dart'; 8 | import 'package:supabase_flutter/supabase_flutter.dart'; 9 | 10 | part 'app_state.dart'; 11 | part 'app_cubit.freezed.dart'; 12 | 13 | @injectable 14 | class AppCubit extends Cubit { 15 | AppCubit(this._gameRepository, this._client) : super(const AppState()); 16 | 17 | final GameRepository _gameRepository; 18 | 19 | final SupabaseClient _client; 20 | 21 | Future initialize() async { 22 | if (_client.auth.currentSession != null) { 23 | emit(state.copyWith(status: AppStatus.loading)); 24 | 25 | final gameStatusState = await getAllGameStatus(); 26 | if (gameStatusState.status == AppStatus.error) { 27 | emit(state.copyWith(status: AppStatus.error)); 28 | return; 29 | } 30 | emit(gameStatusState); 31 | emit(state.copyWith(initialized: true)); 32 | } 33 | emit(state.copyWith(status: AppStatus.success)); 34 | } 35 | 36 | Future getAllGameStatus() async { 37 | return _gameRepository.getAllGameStatus().then((value) { 38 | return value.fold( 39 | (error) => state.copyWith(status: AppStatus.error), 40 | (gameStatus) => state.copyWith( 41 | gameStatus: gameStatus ?? [], 42 | ), 43 | ); 44 | }); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /lib/src/core/ui/extensions.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/widgets.dart'; 2 | import 'package:go_router/go_router.dart'; 3 | import 'package:mind_cows/l10n/l10n.dart'; 4 | import 'package:mind_cows/src/core/ui/colors.dart'; 5 | import 'package:mind_cows/src/core/utils/widgets/bottom_snackbar.dart'; 6 | import 'package:top_snackbar_flutter/top_snack_bar.dart'; 7 | 8 | /// Adds extensions to num to make creating durations more succint: 9 | /// 10 | /// ``` 11 | /// 200.ms // equivalent to Duration(milliseconds: 200) 12 | /// 3.seconds // equivalent to Duration(milliseconds: 3000) 13 | /// 1.5.days // equivalent to Duration(hours: 36) 14 | /// ``` 15 | extension NumDurationX on num { 16 | Duration get microseconds => Duration(microseconds: round()); 17 | Duration get ms => (this * 1000).microseconds; 18 | Duration get milliseconds => (this * 1000).microseconds; 19 | Duration get seconds => (this * 1000 * 1000).microseconds; 20 | Duration get minutes => (this * 1000 * 1000 * 60).microseconds; 21 | Duration get hours => (this * 1000 * 1000 * 60 * 60).microseconds; 22 | Duration get days => (this * 1000 * 1000 * 60 * 60 * 24).microseconds; 23 | } 24 | 25 | extension TextStyleX on TextStyle { 26 | TextStyle get bold => copyWith(fontWeight: FontWeight.bold); 27 | 28 | TextStyle get italic => copyWith(fontStyle: FontStyle.italic); 29 | 30 | TextStyle color(Color color) => copyWith(color: color); 31 | } 32 | 33 | extension BuildContextX on BuildContext { 34 | void genericMessage({String? message, Widget? widget}) { 35 | if (mounted) { 36 | showTopSnackBar( 37 | Overlay.of(this), 38 | BottomSnackbar(message: message, widget: widget), 39 | ); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/src/features/settings/data/settings_repository.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:fpdart/src/either.dart'; 3 | import 'package:injectable/injectable.dart'; 4 | import 'package:mind_cows/src/core/exceptions.dart'; 5 | import 'package:mind_cows/src/core/interceptor.dart'; 6 | import 'package:mind_cows/src/core/preferences/preferences.dart'; 7 | import 'package:mind_cows/src/core/services/settings_datasource.dart'; 8 | import 'package:mind_cows/src/core/supabase/query_supabase.dart'; 9 | import 'package:mind_cows/src/core/utils/utils.dart'; 10 | import 'package:mind_cows/src/features/settings/data/model/rules.dart'; 11 | import 'package:supabase_flutter/supabase_flutter.dart'; 12 | 13 | @Singleton(as: SettingsDatasource) 14 | class SettingsRepository extends SettingsDatasource { 15 | SettingsRepository(this._preferences, this._client, this._supabaseService); 16 | 17 | final Preferences _preferences; 18 | final SupabaseClient _client; 19 | final SupabaseServiceImpl _supabaseService; 20 | 21 | @override 22 | Locale changeLanguage(String language) { 23 | _preferences.setLanguage(language); 24 | return Utils.getLocaleByCode(language)!; 25 | } 26 | 27 | @override 28 | ThemeMode changeTheme() { 29 | _preferences.changeTheme(); 30 | 31 | return _preferences.getTheme(); 32 | } 33 | 34 | @override 35 | Locale? getLanguage() { 36 | return _preferences.getLanguage(); 37 | } 38 | 39 | @override 40 | ThemeMode getTheme() { 41 | return _preferences.getTheme(); 42 | } 43 | 44 | @override 45 | Future?>> getRules() async { 46 | return _supabaseService.query>( 47 | table: 'getRules', 48 | request: () => _client.from('rules').select(QuerySupabase.rules), 49 | queryOption: QueryOption.select, 50 | fromJsonParse: rulesFromJson, 51 | ); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /lib/src/core/ui/colors.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | import 'package:flutter/material.dart'; 4 | 5 | /// App color palette. These colors can and should be used to construct a custom Theme 6 | abstract class AppColor { 7 | // static const primary = Color.fromARGB(255, 67, 104, 235); 8 | static const primary = Color(0xFFE3A700); 9 | // static const primary = Color(0xFFD2FE73); 10 | static const secondary = Color(0xFFFFB70A); 11 | static const container = Color(0xFFFBFEFB); 12 | static const containerDark = Color(0xFF2B2B2B); 13 | static const subContainerDark = Color.fromARGB(255, 37, 36, 36); 14 | static const textFieldDark = Color.fromARGB(255, 64, 64, 64); 15 | static const shadow = Color.fromARGB(11, 0, 0, 0); 16 | static const headerText = Color(0xFF2B3445); 17 | static const settingsTitleText = Color(0xFFA0A4AB); 18 | // static const textColor = Color(0xFF595960); 19 | static const titleText = Color(0xFF030136); 20 | static const bodyText = Color(0xFF323233); 21 | static const scaffold = Color(0xFFF5F6F6); 22 | static const inputUnfocused = Color(0xFFDCE8E2); 23 | static const switchTrackUnfocused = Color(0xFFD5D5D5); 24 | static const boxShadow = Color(0x8FC5AA29); 25 | static const radioUnselected = Color(0xFFA8A8A8); 26 | static const onboardText = Color(0xFFE6E6E6); 27 | static const frostButtonBackground = Color(0xFFB4B4B4); 28 | static const frostButtonText = Color(0xFFD9D9D9); 29 | static const divider = Color.fromRGBO(53, 53, 53, 1); 30 | static const deliveryText = Color(0xFFACACAC); 31 | static const success = Color(0xFF4F861A); 32 | static const warning = Color(0xFFFAAD14); 33 | static const fail = Color(0xFFFF4D4F); 34 | static const info = Color(0xFF1890FF); 35 | static const win = Color.fromARGB(255, 68, 154, 25); 36 | static const draw = Color.fromARGB(255, 87, 84, 87); 37 | static const lose = Color.fromARGB(255, 182, 52, 52); 38 | } 39 | -------------------------------------------------------------------------------- /windows/runner/utils.cpp: -------------------------------------------------------------------------------- 1 | #include "utils.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | void CreateAndAttachConsole() { 11 | if (::AllocConsole()) { 12 | FILE *unused; 13 | if (freopen_s(&unused, "CONOUT$", "w", stdout)) { 14 | _dup2(_fileno(stdout), 1); 15 | } 16 | if (freopen_s(&unused, "CONOUT$", "w", stderr)) { 17 | _dup2(_fileno(stdout), 2); 18 | } 19 | std::ios::sync_with_stdio(); 20 | FlutterDesktopResyncOutputStreams(); 21 | } 22 | } 23 | 24 | std::vector GetCommandLineArguments() { 25 | // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. 26 | int argc; 27 | wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); 28 | if (argv == nullptr) { 29 | return std::vector(); 30 | } 31 | 32 | std::vector command_line_arguments; 33 | 34 | // Skip the first argument as it's the binary name. 35 | for (int i = 1; i < argc; i++) { 36 | command_line_arguments.push_back(Utf8FromUtf16(argv[i])); 37 | } 38 | 39 | ::LocalFree(argv); 40 | 41 | return command_line_arguments; 42 | } 43 | 44 | std::string Utf8FromUtf16(const wchar_t* utf16_string) { 45 | if (utf16_string == nullptr) { 46 | return std::string(); 47 | } 48 | int target_length = ::WideCharToMultiByte( 49 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 50 | -1, nullptr, 0, nullptr, nullptr); 51 | if (target_length == 0) { 52 | return std::string(); 53 | } 54 | std::string utf8_string; 55 | utf8_string.resize(target_length); 56 | int converted_length = ::WideCharToMultiByte( 57 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 58 | -1, utf8_string.data(), 59 | target_length, nullptr, nullptr); 60 | if (converted_length == 0) { 61 | return std::string(); 62 | } 63 | return utf8_string; 64 | } 65 | -------------------------------------------------------------------------------- /lib/src/features/home/widgets/user_points.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_bloc/flutter_bloc.dart'; 3 | import 'package:flutter_gutter/flutter_gutter.dart'; 4 | import 'package:mind_cows/resources/resources.dart'; 5 | import 'package:mind_cows/src/core/ui/typography.dart'; 6 | import 'package:mind_cows/src/features/player/data/model/player.dart'; 7 | import 'package:mind_cows/src/features/ranking/cubit/ranking_cubit.dart'; 8 | import 'package:mind_cows/src/features/ranking/uitls/ranking_utils.dart'; 9 | 10 | class UserPoints extends StatelessWidget { 11 | const UserPoints({ 12 | required this.player, super.key, 13 | }); 14 | 15 | final Player player; 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | return Container( 20 | decoration: BoxDecoration( 21 | color: Colors.white, 22 | borderRadius: BorderRadius.circular(50), 23 | ), 24 | child: Padding( 25 | padding: const EdgeInsets.all(8), 26 | child: Row( 27 | children: [ 28 | Image.asset( 29 | AppImages.gamePoints, 30 | height: 20, 31 | ), 32 | const GutterTiny(), 33 | BlocBuilder( 34 | builder: (context, state) { 35 | if (state.isLoading) { 36 | return const CircularProgressIndicator.adaptive(); 37 | } 38 | 39 | final ranking = RankingUtils.getRankingByPlayerId( 40 | state.ranking, 41 | player.id, 42 | ); 43 | return Text( 44 | '${ranking.points}', 45 | style: 46 | AppTextStyle().body.copyWith(fontWeight: FontWeight.bold), 47 | ); 48 | }, 49 | ), 50 | ], 51 | ), 52 | ), 53 | ); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MindCows 2 | 3 | Welcome to **MindCows**, a fun and interactive game developed for the [Supabase Hackathon Launch Week 12, 2024](https://supabase.com/blog/supabase-lw12-hackathon). This project was built using **Flutter** and **Supabase** and is fully open-source. 4 | 5 | # Screenshots 6 | ![Screenshot 2024-10-08 at 3 26 00 AM](https://github.com/user-attachments/assets/4f50f436-99c4-4994-81b4-28b0f300f455) 7 | 8 | ![Screenshot 2024-10-08 at 3 24 24 AM](https://github.com/user-attachments/assets/b558ae35-615b-4f36-9cd0-55ab83f6078c) 9 | 10 | 11 | ## Overview 12 | 13 | **MindCows** is an engaging multiplayer puzzle game where players challenge their cognitive skills by guessing the exact numbers in each position of their opponents' boards. The game leverages **Supabase** for real-time multiplayer capabilities, data storage, and authentication, while **Flutter** provides a seamless cross-platform user experience. 14 | 15 | ## Features 16 | 17 | - **Cross-Platform**: Available on both iOS and Android, providing a consistent experience across devices. 18 | - **Real-Time Multiplayer Support**: Play with friends and other players in real-time, enabled by Supabase’s real-time API. 19 | - **User Authentication**: Secure login and profile management powered by Supabase Auth, ensuring player safety. 20 | - **Global Leaderboard**: Compete with others and track your ranking on the leaderboard. 21 | - **Data Storage**: Game progress and player stats are securely stored using Supabase's PostgreSQL database. 22 | - **Scalable Architecture**: Built to scale seamlessly to billions of users using Supabase’s robust infrastructure. 23 | 24 | ## Installation 25 | 26 | - Clone the repository: 27 | ``` 28 | git clone https://github.com/your-username/MindCows.git 29 | ``` 30 | 31 | ## Contributing 32 | 33 | Contributions are welcome! Please feel free to submit a pull request or open an issue. 34 | 35 | Thank you for checking out MindCows! We hope you enjoy playing and exploring the game. 36 | 37 | 38 | -------------------------------------------------------------------------------- /lib/src/features/settings/cubit/settings_cubit.dart: -------------------------------------------------------------------------------- 1 | import 'package:bloc/bloc.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:freezed_annotation/freezed_annotation.dart'; 4 | import 'package:injectable/injectable.dart'; 5 | import 'package:mind_cows/src/core/exceptions.dart'; 6 | import 'package:mind_cows/src/core/services/settings_datasource.dart'; 7 | import 'package:mind_cows/src/features/settings/data/model/rules.dart'; 8 | 9 | part 'settings_state.dart'; 10 | part 'settings_cubit.freezed.dart'; 11 | 12 | @injectable 13 | class SettingsCubit extends Cubit { 14 | SettingsCubit(this._settingsDatasource) : super(const SettingsState()) { 15 | _initData(); 16 | } 17 | 18 | final SettingsDatasource _settingsDatasource; 19 | 20 | void changeLanguage(String language) { 21 | final locale = _settingsDatasource.changeLanguage(language); 22 | 23 | emit(state.copyWith(locale: locale)); 24 | } 25 | 26 | void changeTheme() { 27 | final themeMode = _settingsDatasource.changeTheme(); 28 | emit(state.copyWith(theme: themeMode)); 29 | } 30 | 31 | void _initData() { 32 | getTheme(); 33 | getLanguage(); 34 | getRules(); 35 | } 36 | 37 | void getTheme() { 38 | emit(state.copyWith(theme: _settingsDatasource.getTheme())); 39 | } 40 | 41 | void getLanguage() { 42 | emit(state.copyWith(locale: _settingsDatasource.getLanguage())); 43 | } 44 | 45 | void getRules() { 46 | emit(state.copyWith(stateStatus: SettingsStateStatus.loading)); 47 | 48 | _settingsDatasource.getRules().then((result) { 49 | result.fold( 50 | (error) => emit( 51 | state.copyWith( 52 | stateStatus: SettingsStateStatus.error, 53 | error: error, 54 | ), 55 | ), 56 | (rules) => emit( 57 | state.copyWith( 58 | rules: rules ?? [], 59 | stateStatus: SettingsStateStatus.loaded, 60 | ), 61 | ), 62 | ); 63 | }); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | platform :ios, '13.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! 32 | use_modular_headers! 33 | 34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35 | target 'RunnerTests' do 36 | inherit! :search_paths 37 | end 38 | end 39 | 40 | post_install do |installer| 41 | installer.generated_projects.each do |project| 42 | project.targets.each do |target| 43 | target.build_configurations.each do |config| 44 | config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0' 45 | end 46 | end 47 | end 48 | installer.pods_project.targets.each do |target| 49 | flutter_additional_ios_build_settings(target) 50 | end 51 | end 52 | # post_install do |installer| 53 | # installer.pods_project.targets.each do |target| 54 | # flutter_additional_ios_build_settings(target) 55 | # end 56 | # end 57 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.cpp: -------------------------------------------------------------------------------- 1 | #include "flutter_window.h" 2 | 3 | #include 4 | 5 | #include "flutter/generated_plugin_registrant.h" 6 | 7 | FlutterWindow::FlutterWindow(const flutter::DartProject& project) 8 | : project_(project) {} 9 | 10 | FlutterWindow::~FlutterWindow() {} 11 | 12 | bool FlutterWindow::OnCreate() { 13 | if (!Win32Window::OnCreate()) { 14 | return false; 15 | } 16 | 17 | RECT frame = GetClientArea(); 18 | 19 | // The size here must match the window dimensions to avoid unnecessary surface 20 | // creation / destruction in the startup path. 21 | flutter_controller_ = std::make_unique( 22 | frame.right - frame.left, frame.bottom - frame.top, project_); 23 | // Ensure that basic setup of the controller was successful. 24 | if (!flutter_controller_->engine() || !flutter_controller_->view()) { 25 | return false; 26 | } 27 | RegisterPlugins(flutter_controller_->engine()); 28 | SetChildContent(flutter_controller_->view()->GetNativeWindow()); 29 | return true; 30 | } 31 | 32 | void FlutterWindow::OnDestroy() { 33 | if (flutter_controller_) { 34 | flutter_controller_ = nullptr; 35 | } 36 | 37 | Win32Window::OnDestroy(); 38 | } 39 | 40 | LRESULT 41 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message, 42 | WPARAM const wparam, 43 | LPARAM const lparam) noexcept { 44 | // Give Flutter, including plugins, an opportunity to handle window messages. 45 | if (flutter_controller_) { 46 | std::optional result = 47 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, 48 | lparam); 49 | if (result) { 50 | return *result; 51 | } 52 | } 53 | 54 | switch (message) { 55 | case WM_FONTCHANGE: 56 | flutter_controller_->engine()->ReloadSystemFonts(); 57 | break; 58 | } 59 | 60 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam); 61 | } 62 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | {"images":[{"size":"20x20","idiom":"iphone","filename":"Icon-App-20x20@2x.png","scale":"2x"},{"size":"20x20","idiom":"iphone","filename":"Icon-App-20x20@3x.png","scale":"3x"},{"size":"29x29","idiom":"iphone","filename":"Icon-App-29x29@1x.png","scale":"1x"},{"size":"29x29","idiom":"iphone","filename":"Icon-App-29x29@2x.png","scale":"2x"},{"size":"29x29","idiom":"iphone","filename":"Icon-App-29x29@3x.png","scale":"3x"},{"size":"40x40","idiom":"iphone","filename":"Icon-App-40x40@2x.png","scale":"2x"},{"size":"40x40","idiom":"iphone","filename":"Icon-App-40x40@3x.png","scale":"3x"},{"size":"57x57","idiom":"iphone","filename":"Icon-App-57x57@1x.png","scale":"1x"},{"size":"57x57","idiom":"iphone","filename":"Icon-App-57x57@2x.png","scale":"2x"},{"size":"60x60","idiom":"iphone","filename":"Icon-App-60x60@2x.png","scale":"2x"},{"size":"60x60","idiom":"iphone","filename":"Icon-App-60x60@3x.png","scale":"3x"},{"size":"20x20","idiom":"ipad","filename":"Icon-App-20x20@1x.png","scale":"1x"},{"size":"20x20","idiom":"ipad","filename":"Icon-App-20x20@2x.png","scale":"2x"},{"size":"29x29","idiom":"ipad","filename":"Icon-App-29x29@1x.png","scale":"1x"},{"size":"29x29","idiom":"ipad","filename":"Icon-App-29x29@2x.png","scale":"2x"},{"size":"40x40","idiom":"ipad","filename":"Icon-App-40x40@1x.png","scale":"1x"},{"size":"40x40","idiom":"ipad","filename":"Icon-App-40x40@2x.png","scale":"2x"},{"size":"50x50","idiom":"ipad","filename":"Icon-App-50x50@1x.png","scale":"1x"},{"size":"50x50","idiom":"ipad","filename":"Icon-App-50x50@2x.png","scale":"2x"},{"size":"72x72","idiom":"ipad","filename":"Icon-App-72x72@1x.png","scale":"1x"},{"size":"72x72","idiom":"ipad","filename":"Icon-App-72x72@2x.png","scale":"2x"},{"size":"76x76","idiom":"ipad","filename":"Icon-App-76x76@1x.png","scale":"1x"},{"size":"76x76","idiom":"ipad","filename":"Icon-App-76x76@2x.png","scale":"2x"},{"size":"83.5x83.5","idiom":"ipad","filename":"Icon-App-83.5x83.5@2x.png","scale":"2x"},{"size":"1024x1024","idiom":"ios-marketing","filename":"Icon-App-1024x1024@1x.png","scale":"1x"}],"info":{"version":1,"author":"xcode"}} -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleLocalizations 6 | 7 | en 8 | es 9 | 10 | CFBundleDevelopmentRegion 11 | $(DEVELOPMENT_LANGUAGE) 12 | CFBundleDisplayName 13 | MindCows 14 | CFBundleExecutable 15 | $(EXECUTABLE_NAME) 16 | CFBundleIdentifier 17 | $(PRODUCT_BUNDLE_IDENTIFIER) 18 | CFBundleInfoDictionaryVersion 19 | 6.0 20 | CFBundleName 21 | $(FLAVOR_APP_NAME) 22 | CFBundlePackageType 23 | APPL 24 | CFBundleShortVersionString 25 | $(FLUTTER_BUILD_NAME) 26 | CFBundleSignature 27 | ???? 28 | CFBundleVersion 29 | $(FLUTTER_BUILD_NUMBER) 30 | LSRequiresIPhoneOS 31 | 32 | UILaunchStoryboardName 33 | LaunchScreen 34 | UIMainStoryboardFile 35 | Main 36 | UISupportedInterfaceOrientations 37 | 38 | UIInterfaceOrientationPortrait 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UISupportedInterfaceOrientations~ipad 43 | 44 | UIInterfaceOrientationPortrait 45 | UIInterfaceOrientationPortraitUpsideDown 46 | UIInterfaceOrientationLandscapeLeft 47 | UIInterfaceOrientationLandscapeRight 48 | 49 | UIViewControllerBasedStatusBarAppearance 50 | 51 | CADisableMinimumFrameDurationOnPhone 52 | 53 | UIApplicationSupportsIndirectInputEvents 54 | 55 | UIStatusBarHidden 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /lib/src/app.dart: -------------------------------------------------------------------------------- 1 | import 'dart:developer'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_bloc/flutter_bloc.dart'; 5 | import 'package:mind_cows/l10n/l10n.dart'; 6 | import 'package:mind_cows/src/core/di/dependency_injection.dart'; 7 | import 'package:mind_cows/src/core/ui/theme.dart'; 8 | import 'package:mind_cows/src/features/auth/cubit/auth_cubit.dart'; 9 | import 'package:mind_cows/src/features/game/cubit/game_cubit.dart'; 10 | import 'package:mind_cows/src/features/player/cubit/player_cubit.dart'; 11 | import 'package:mind_cows/src/features/ranking/cubit/ranking_cubit.dart'; 12 | import 'package:mind_cows/src/features/settings/cubit/settings_cubit.dart'; 13 | import 'package:mind_cows/src/features/splash/cubit/app_cubit.dart'; 14 | import 'package:mind_cows/src/router/router.dart'; 15 | 16 | class MyApp extends StatefulWidget { 17 | const MyApp({super.key}); 18 | 19 | @override 20 | State createState() => _MyAppState(); 21 | } 22 | 23 | class _MyAppState extends State { 24 | final router = RouterController(getIt.get()).router; 25 | @override 26 | Widget build(BuildContext context) { 27 | final theme = AppTheme(); 28 | return MultiBlocProvider( 29 | providers: [ 30 | BlocProvider(create: (_) => getIt.get()), 31 | BlocProvider(create: (_) => getIt.get()), 32 | BlocProvider(create: (_) => getIt.get()), 33 | BlocProvider(create: (_) => getIt.get()), 34 | BlocProvider(create: (_) => getIt.get()), 35 | BlocProvider(create: (_) => getIt.get()), 36 | ], 37 | child: BlocBuilder( 38 | builder: (context, state) { 39 | return MaterialApp.router( 40 | debugShowCheckedModeBanner: false, 41 | theme: theme.light, 42 | darkTheme: theme.dark, 43 | locale: state.locale, 44 | themeMode: state.theme, 45 | routerConfig: router, 46 | localizationsDelegates: AppLocalizations.localizationsDelegates, 47 | supportedLocales: AppLocalizations.supportedLocales, 48 | ); 49 | }, 50 | ), 51 | ); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /lib/src/features/splash/loading_profile_data.dart: -------------------------------------------------------------------------------- 1 | import 'dart:developer'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_bloc/flutter_bloc.dart'; 5 | import 'package:flutter_gutter/flutter_gutter.dart'; 6 | import 'package:go_router/go_router.dart'; 7 | import 'package:lottie/lottie.dart'; 8 | import 'package:mind_cows/l10n/l10n.dart'; 9 | import 'package:mind_cows/resources/resources.dart'; 10 | import 'package:mind_cows/src/core/utils/object_extensions.dart'; 11 | import 'package:mind_cows/src/features/game/cubit/game_cubit.dart'; 12 | import 'package:mind_cows/src/features/player/cubit/player_cubit.dart'; 13 | import 'package:mind_cows/src/router/router.dart'; 14 | 15 | class LoadingProfileData extends StatefulWidget { 16 | const LoadingProfileData({super.key}); 17 | 18 | @override 19 | State createState() => _LoadingProfileDataState(); 20 | } 21 | 22 | class _LoadingProfileDataState extends State { 23 | @override 24 | Widget build(BuildContext context) { 25 | final gameCubit = context.read(); 26 | return Scaffold( 27 | body: BlocListener( 28 | listenWhen: (previous, current) => previous.status != current.status, 29 | listener: (context, state) { 30 | if (state.status == PlayerStatus.success) { 31 | if (gameCubit.state.player == null) { 32 | context.read().setUserPlayer(state.player!); 33 | } 34 | 35 | // if (gameCubit.state.game.isNull) { 36 | WidgetsFlutterBinding.ensureInitialized() 37 | .addPostFrameCallback((_) { 38 | context.goNamed(AppRoute.home.name); 39 | }); 40 | // } 41 | } 42 | }, 43 | child: Center( 44 | child: Column( 45 | mainAxisAlignment: MainAxisAlignment.center, 46 | children: [ 47 | LottieBuilder.asset( 48 | AppImages.appLoading, 49 | height: 100, 50 | fit: BoxFit.cover, 51 | ), 52 | const GutterSmall(), 53 | Text(context.l10n.loading), 54 | ], 55 | ), 56 | ), 57 | ), 58 | ); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /lib/src/features/auth/data/auth_repository.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_dotenv/flutter_dotenv.dart'; 2 | import 'package:fpdart/fpdart.dart'; 3 | import 'package:injectable/injectable.dart'; 4 | import 'package:mind_cows/src/core/exceptions.dart'; 5 | import 'package:mind_cows/src/core/utils/object_extensions.dart'; 6 | import 'package:supabase_flutter/supabase_flutter.dart'; 7 | 8 | @singleton 9 | class AuthRepository { 10 | AuthRepository(this._client); 11 | 12 | final SupabaseClient _client; 13 | 14 | Future> signUp({ 15 | required String email, 16 | required String password, 17 | }) async { 18 | try { 19 | await _client.auth.signUp(email: email, password: password); 20 | return right(true); 21 | } catch (e) { 22 | return left(Exception('Error sign up')); 23 | } 24 | } 25 | 26 | Future> signIn({ 27 | required String email, 28 | required String password, 29 | }) async { 30 | try { 31 | await _client.auth.signInWithPassword(email: email, password: password); 32 | return right(true); 33 | } catch (e) { 34 | return left(Exception('Error sign up')); 35 | } 36 | } 37 | 38 | Future> logout() async { 39 | try { 40 | await _client.auth.signOut(); 41 | return right(true); 42 | } catch (e) { 43 | return left(Exception('Error sign up')); 44 | } 45 | } 46 | 47 | Future> removeAccount() async { 48 | try { 49 | final supabase = SupabaseClient( 50 | dotenv.get('SUPABASE_URL'), dotenv.get('SERVICE_ROLE_KEY'),); 51 | final resp = 52 | await supabase.auth.admin.deleteUser(_client.auth.currentUser!.id); 53 | return right(true); 54 | } catch (e) { 55 | return left(Exception('Error removing account')); 56 | } 57 | } 58 | 59 | Future> refreshToken() async { 60 | try { 61 | final refreshToken = _client.auth.currentSession?.refreshToken; 62 | if (refreshToken.isNull) throw AuthSessionMissingException(); 63 | await _client.auth.refreshSession(); 64 | return right(true); 65 | } catch (e) { 66 | return left(const AuthorizationException('Error refreshing token')); 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /lib/src/features/game/data/model/attempt.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/widgets.dart'; 2 | import 'package:freezed_annotation/freezed_annotation.dart'; 3 | import 'package:mind_cows/l10n/l10n.dart'; 4 | import 'package:mind_cows/src/core/supabase/table_interface.dart'; 5 | import 'package:mind_cows/src/core/utils/object_extensions.dart'; 6 | import 'package:mind_cows/src/features/auth/views/auth_screen.dart'; 7 | import 'package:mind_cows/src/features/game/data/model/game.dart'; 8 | import 'package:mind_cows/src/features/player/data/model/player.dart'; 9 | 10 | part 'attempt.g.dart'; 11 | 12 | List attemptsFromJson(List str) => 13 | str.map((x) => Attempt.fromJson(x as Json)).toList(); 14 | 15 | @JsonSerializable(explicitToJson: true) 16 | class Attempt with TableInterface { 17 | Attempt({ 18 | required this.id, 19 | required this.game, 20 | required this.bulls, 21 | required this.cows, 22 | required this.number, 23 | required this.player, 24 | }); 25 | 26 | factory Attempt.empty() => Attempt( 27 | id: 0, 28 | game: Game.empty(), 29 | bulls: 0, 30 | cows: 0, 31 | number: [], 32 | player: Player.empty(), 33 | ); 34 | 35 | factory Attempt.fromJson(Map json) => 36 | _$AttemptFromJson(json); 37 | final int id; 38 | final Game game; 39 | final int bulls; 40 | final int cows; 41 | final List number; 42 | final Player player; 43 | 44 | @override 45 | String columns() => 'id, game, bulls, cows, number, player'; 46 | 47 | @override 48 | String tableName() => 'attempt'; 49 | } 50 | 51 | extension AttemptX on Attempt { 52 | String attemptResult(BuildContext context, {int? cows, int? bulls}) { 53 | return '${context.l10n.cowPlay}${cows ?? this.cows} ${context.l10n.bullPlay}${bulls ?? this.bulls}'; 54 | } 55 | 56 | Attempt copyWith({ 57 | int? id, 58 | Game? game, 59 | int? bulls, 60 | int? cows, 61 | List? number, 62 | Player? player, 63 | }) => 64 | Attempt( 65 | id: id ?? this.id, 66 | game: game ?? this.game, 67 | bulls: bulls ?? this.bulls, 68 | cows: cows ?? this.cows, 69 | number: number ?? this.number, 70 | player: player ?? this.player, 71 | ); 72 | 73 | Map toJson() => { 74 | 'game': game.id, 75 | 'player': player.id, 76 | 'number': number, 77 | }; 78 | } 79 | -------------------------------------------------------------------------------- /lib/src/features/player/data/model/player_number.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | import 'package:mind_cows/src/core/supabase/table_interface.dart'; 3 | import 'package:mind_cows/src/features/player/data/model/player.dart'; 4 | import 'package:equatable/equatable.dart'; 5 | 6 | part 'player_number.g.dart'; 7 | 8 | @JsonSerializable(explicitToJson: true, fieldRename: FieldRename.snake) 9 | class PlayerNumber extends Equatable with TableInterface { 10 | PlayerNumber({ 11 | required this.id, 12 | required this.player, 13 | required this.isTurn, 14 | required this.timeLeft, 15 | this.startedTime, 16 | this.finishTime, 17 | this.number, 18 | }); 19 | 20 | factory PlayerNumber.empty() => PlayerNumber( 21 | id: 0, 22 | player: Player.empty(), 23 | startedTime: DateTime.now(), 24 | number: const [], 25 | isTurn: false, 26 | timeLeft: 0, 27 | ); 28 | 29 | factory PlayerNumber.fromJson(Map json) => 30 | _$PlayerNumberFromJson(json); 31 | final int id; 32 | final Player player; 33 | final bool isTurn; 34 | final int timeLeft; 35 | 36 | /// Started time of the turn 37 | final DateTime? startedTime; 38 | 39 | /// Finished time of the turn 40 | final DateTime? finishTime; 41 | final List? number; 42 | 43 | @override 44 | String columns() => 'id, player(${player.columns()}), number'; 45 | 46 | @override 47 | String tableName() => 'player_number'; 48 | 49 | @override 50 | List get props => [id, player, number]; 51 | } 52 | 53 | extension PlayerNumberX on PlayerNumber { 54 | bool get haveNumber => number != null && number!.isNotEmpty; 55 | 56 | bool get canPlay => isTurn; 57 | 58 | PlayerNumber copyWith({ 59 | int? id, 60 | Player? player, 61 | List? number, 62 | bool? isTurn, 63 | int? timeLeft, 64 | DateTime? startedTime, 65 | DateTime? finishTime, 66 | }) { 67 | return PlayerNumber( 68 | id: id ?? this.id, 69 | player: player ?? this.player, 70 | number: number ?? this.number, 71 | isTurn: isTurn ?? this.isTurn, 72 | timeLeft: timeLeft ?? this.timeLeft, 73 | startedTime: startedTime ?? this.startedTime, 74 | finishTime: finishTime ?? this.finishTime, 75 | ); 76 | } 77 | 78 | Map toJson() { 79 | return { 80 | 'player': player.id, 81 | 'number': number, 82 | }; 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: mind_cows 2 | description: My new flutter app 3 | version: 1.0.0+1 4 | publish_to: none 5 | 6 | environment: 7 | sdk: ">=3.3.0 <4.0.0" 8 | flutter: ^3.22.1 9 | 10 | dependencies: 11 | bloc: ^8.1.4 12 | cached_network_image: ^3.2.3 13 | flex_color_scheme: ^7.3.1 14 | flutter: 15 | sdk: flutter 16 | flutter_bloc: ^8.1.6 17 | flutter_dotenv: ^5.1.0 18 | flutter_gutter: ^2.2.0 19 | flutter_localizations: 20 | sdk: flutter 21 | fpdart: ^1.1.0 22 | freezed_annotation: ^2.4.1 23 | get_it: ^7.7.0 24 | injectable: ^2.4.4 25 | intl: ^0.19.0 26 | logger: ^2.3.0 27 | go_router: ^14.2.8 28 | flutter_hooks: ^0.20.5 29 | 30 | skeletonizer: ^1.4.2 31 | top_snackbar_flutter: ^3.1.0 32 | 33 | lottie: ^3.1.2 34 | rxdart: ^0.28.0 35 | 36 | sized_context: ^1.0.0+4 37 | spider: ^4.2.2 38 | 39 | supabase_flutter: ^2.6.0 40 | shared_preferences: ^2.3.2 41 | 42 | uuid: ^4.5.1 43 | 44 | equatable: ^2.0.0 45 | 46 | firebase_crashlytics: ^4.1.3 47 | firebase_core: ^3.6.0 48 | 49 | dev_dependencies: 50 | bloc_test: ^9.1.7 51 | build_runner: ^2.4.12 52 | flutter_test: 53 | sdk: flutter 54 | freezed: ^2.4.6 55 | injectable_generator: ^2.6.2 56 | json_serializable: ^6.2.0 57 | mocktail: ^1.0.4 58 | very_good_analysis: ^6.0.0 59 | 60 | package_rename: ^1.7.1 61 | flutter_launcher_icons: "^0.14.1" 62 | flutter_native_splash: ^2.4.2 63 | icons_launcher: ^3.0.0 64 | 65 | flutter: 66 | uses-material-design: true 67 | generate: true 68 | 69 | assets: 70 | - .env 71 | - assets/images/ 72 | - assets/fonts/sniglet/ 73 | - assets/fonts/poppins/ 74 | 75 | fonts: 76 | - family: Poppins 77 | fonts: 78 | - asset: assets/fonts/poppins/Poppins-Light.ttf 79 | - asset: assets/fonts/poppins/Poppins-Medium.ttf 80 | weight: 500 81 | - asset: assets/fonts/poppins/Poppins-SemiBold.ttf 82 | weight: 600 83 | - family: Sniglet 84 | fonts: 85 | - asset: assets/fonts/sniglet/Sniglet-Regular.ttf 86 | 87 | flutter_launcher_icons: 88 | android: "launcher_icon" 89 | ios: false 90 | image_path: "assets/images/logo.png" 91 | min_sdk_android: 21 92 | 93 | package_rename_config: 94 | android: 95 | app_name: "MindCows" 96 | package_name: "com.mindcows.app" 97 | ios: 98 | app_name: "MindCows" 99 | package_name: "com.mindcows.app" 100 | -------------------------------------------------------------------------------- /lib/src/features/ranking/data/ranking_repository.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:developer'; 3 | 4 | import 'package:fpdart/fpdart.dart'; 5 | import 'package:injectable/injectable.dart'; 6 | import 'package:mind_cows/src/core/exceptions.dart'; 7 | import 'package:mind_cows/src/core/interceptor.dart'; 8 | import 'package:mind_cows/src/core/services/ranking_datasource.dart'; 9 | import 'package:mind_cows/src/core/supabase/query_supabase.dart'; 10 | import 'package:mind_cows/src/core/ui/extensions.dart'; 11 | import 'package:mind_cows/src/features/ranking/data/model/ranking.dart'; 12 | import 'package:supabase_flutter/supabase_flutter.dart'; 13 | 14 | @singleton 15 | class RankingRepository extends RankingDatasource { 16 | RankingRepository(this._supabaseServiceImpl, this._client); 17 | 18 | final SupabaseServiceImpl _supabaseServiceImpl; 19 | final SupabaseClient _client; 20 | Timer? _debounceTimer; 21 | 22 | @override 23 | Future?>> getRanking() async { 24 | return _supabaseServiceImpl.query>( 25 | table: 'ranking', 26 | request: () => _client 27 | .from('ranking') 28 | .select(QuerySupabase.ranking) 29 | .order('position', ascending: true), 30 | queryOption: QueryOption.select, 31 | fromJsonParse: rankingsFromJson, 32 | ); 33 | } 34 | 35 | @override 36 | void listenRanking( 37 | void Function() callback, 38 | ) { 39 | final myChannel = _client.channel('ranking_channel'); 40 | log('Ranking Database Changes Listen On'); 41 | 42 | myChannel 43 | .onPostgresChanges( 44 | event: PostgresChangeEvent.update, 45 | schema: 'public', 46 | table: 'ranking', 47 | callback: (payload) { 48 | log('Ranking Database change detected'); 49 | 50 | // Si no hay debounce activo, ejecuta inmediatamente 51 | if (_debounceTimer == null || !_debounceTimer!.isActive) { 52 | callback(); // Ejecuta el callback inmediatamente 53 | } 54 | 55 | // Cancelar el temporizador anterior si existe 56 | _debounceTimer?.cancel(); 57 | 58 | // Iniciar un nuevo temporizador de debounce 59 | _debounceTimer = Timer(5.seconds, () { 60 | log('5 segundos de inactividad, reiniciando debounce'); 61 | // Aquí puedes realizar acciones adicionales si es necesario. 62 | }); 63 | }, 64 | ) 65 | .subscribe(); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /lib/firebase_options.dart: -------------------------------------------------------------------------------- 1 | // File generated by FlutterFire CLI. 2 | // ignore_for_file: type=lint 3 | import 'package:firebase_core/firebase_core.dart' show FirebaseOptions; 4 | import 'package:flutter/foundation.dart' 5 | show defaultTargetPlatform, kIsWeb, TargetPlatform; 6 | 7 | /// Default [FirebaseOptions] for use with your Firebase apps. 8 | /// 9 | /// Example: 10 | /// ```dart 11 | /// import 'firebase_options.dart'; 12 | /// // ... 13 | /// await Firebase.initializeApp( 14 | /// options: DefaultFirebaseOptions.currentPlatform, 15 | /// ); 16 | /// ``` 17 | class DefaultFirebaseOptions { 18 | static FirebaseOptions get currentPlatform { 19 | if (kIsWeb) { 20 | throw UnsupportedError( 21 | 'DefaultFirebaseOptions have not been configured for web - ' 22 | 'you can reconfigure this by running the FlutterFire CLI again.', 23 | ); 24 | } 25 | switch (defaultTargetPlatform) { 26 | case TargetPlatform.android: 27 | return android; 28 | case TargetPlatform.iOS: 29 | return ios; 30 | case TargetPlatform.macOS: 31 | throw UnsupportedError( 32 | 'DefaultFirebaseOptions have not been configured for macos - ' 33 | 'you can reconfigure this by running the FlutterFire CLI again.', 34 | ); 35 | case TargetPlatform.windows: 36 | throw UnsupportedError( 37 | 'DefaultFirebaseOptions have not been configured for windows - ' 38 | 'you can reconfigure this by running the FlutterFire CLI again.', 39 | ); 40 | case TargetPlatform.linux: 41 | throw UnsupportedError( 42 | 'DefaultFirebaseOptions have not been configured for linux - ' 43 | 'you can reconfigure this by running the FlutterFire CLI again.', 44 | ); 45 | default: 46 | throw UnsupportedError( 47 | 'DefaultFirebaseOptions are not supported for this platform.', 48 | ); 49 | } 50 | } 51 | 52 | static const FirebaseOptions android = FirebaseOptions( 53 | apiKey: 'AIzaSyCwT6qBwOxItq7Mh3Xp9w-xNECUv7ZTiP0', 54 | appId: '1:43890310910:android:a2ac88ac0ab8108b0defaf', 55 | messagingSenderId: '43890310910', 56 | projectId: 'mindcows-e6b33', 57 | storageBucket: 'mindcows-e6b33.appspot.com', 58 | ); 59 | 60 | static const FirebaseOptions ios = FirebaseOptions( 61 | apiKey: 'AIzaSyCEULtTU1gnEmv27AV3IajcJ_iEZDbrlfs', 62 | appId: '1:43890310910:ios:3d504774e0667cee0defaf', 63 | messagingSenderId: '43890310910', 64 | projectId: 'mindcows-e6b33', 65 | storageBucket: 'mindcows-e6b33.appspot.com', 66 | iosBundleId: 'com.mindcows.app', 67 | ); 68 | } 69 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/* 18 | 19 | # Visual Studio Code related 20 | .classpath 21 | .project 22 | .settings/ 23 | .vscode/* 24 | 25 | # packages file containing multi-root paths 26 | .packages.generated 27 | 28 | # Flutter/Dart/Pub related 29 | **/doc/api/ 30 | **/ios/Flutter/.last_build_id 31 | .dart_tool/ 32 | .flutter-plugins 33 | .flutter-plugins-dependencies 34 | .packages 35 | .pub-cache/ 36 | .pub/ 37 | build/ 38 | flutter_*.png 39 | linked_*.ds 40 | unlinked.ds 41 | unlinked_spec.ds 42 | .fvm/ 43 | 44 | # Android related 45 | **/android/**/gradle-wrapper.jar 46 | **/android/.gradle 47 | **/android/captures/ 48 | **/android/local.properties 49 | **/android/**/GeneratedPluginRegistrant.java 50 | **/android/key.properties 51 | **/android/.idea/ 52 | **/android/app/debug 53 | **/android/app/profile 54 | **/android/app/release 55 | *.jks 56 | 57 | # iOS/XCode related 58 | **/ios/**/*.mode1v3 59 | **/ios/**/*.mode2v3 60 | **/ios/**/*.moved-aside 61 | **/ios/**/*.pbxuser 62 | **/ios/**/*.perspectivev3 63 | **/ios/**/*sync/ 64 | **/ios/**/.sconsign.dblite 65 | **/ios/**/.tags* 66 | **/ios/**/.vagrant/ 67 | **/ios/**/DerivedData/ 68 | **/ios/**/Icon? 69 | **/ios/**/Pods/ 70 | **/ios/**/.symlinks/ 71 | **/ios/**/profile 72 | **/ios/**/xcuserdata 73 | **/ios/.generated/ 74 | **/ios/Flutter/App.framework 75 | **/ios/Flutter/Flutter.framework 76 | **/ios/Flutter/Flutter.podspec 77 | **/ios/Flutter/Generated.xcconfig 78 | **/ios/Flutter/app.flx 79 | **/ios/Flutter/app.zip 80 | **/ios/Flutter/.last_build_id 81 | **/ios/Flutter/flutter_assets/ 82 | **/ios/Flutter/flutter_export_environment.sh 83 | **/ios/ServiceDefinitions.json 84 | **/ios/Runner/GeneratedPluginRegistrant.* 85 | 86 | # Coverage 87 | coverage/ 88 | 89 | # Submodules 90 | packages/**/pubspec.lock 91 | 92 | # Web related 93 | lib/generated_plugin_registrant.dart 94 | 95 | # Symbolication related 96 | app.*.symbols 97 | 98 | # Obfuscation related 99 | app.*.map.json 100 | 101 | # Exceptions to the above rules. 102 | !**/ios/**/default.mode1v3 103 | !**/ios/**/default.mode2v3 104 | !**/ios/**/default.pbxuser 105 | !**/ios/**/default.perspectivev3 106 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 107 | !/dev/ci/**/Gemfile.lock 108 | !.vscode/extensions.json 109 | !.vscode/launch.json 110 | !.idea/codeStyles/ 111 | !.idea/dictionaries/ 112 | !.idea/runConfigurations/ 113 | .env 114 | scripts/fix_seed_sql.sh 115 | scripts/run_dump.sh 116 | Makefile 117 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | --------------------------------------------------------------------------------