├── .gitignore ├── .metadata ├── .vscode └── settings.json ├── README.md ├── analysis_options.yaml ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── sesimiduy │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable-v21 │ │ │ └── launch_background.xml │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── launcher_icon.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── launcher_icon.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── launcher_icon.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── launcher_icon.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── launcher_icon.png │ │ │ ├── values-night │ │ │ └── styles.xml │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── assets ├── docs │ └── kvkk.pdf ├── icons │ ├── ic_car_help.png │ └── ic_map_help.png └── translations │ ├── en.json │ └── tr.json ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Gemfile ├── Podfile ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings ├── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-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-83.5x83.5@2x.png │ │ └── LaunchImage.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ └── README.md │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ └── Runner-Bridging-Header.h └── fastlane │ ├── Appfile │ ├── Fastfile │ ├── README.md │ └── report.xml ├── lib ├── core │ └── init │ │ └── core_localize.dart ├── features │ ├── home │ │ ├── provider │ │ │ └── home_provider.dart │ │ └── view │ │ │ └── home_view.dart │ └── login │ │ └── service │ │ └── firebase_service.dart ├── main.dart └── product │ ├── app_builder.dart │ ├── decoration │ └── product_text_field_decoration.dart │ ├── generated │ └── assets.gen.dart │ ├── init │ ├── application_init.dart │ └── language │ │ └── locale_keys.g.dart │ ├── items │ └── colors_custom.dart │ ├── model │ └── base │ │ ├── base_firebase_model.dart │ │ └── base_model.dart │ ├── utility │ ├── constants │ │ ├── app_constants.dart │ │ ├── regex_types.dart │ │ └── string_constants.dart │ ├── decorations │ │ ├── empty_box.dart │ │ └── style │ │ │ ├── bold_outline_style.dart │ │ │ └── button_rectangle_border.dart │ ├── firebase │ │ ├── collection_enums.dart │ │ ├── geo_parser.dart │ │ ├── index.dart │ │ └── time_parser.dart │ ├── mixin │ │ ├── app_provider_mixin.dart │ │ └── loading_state_mixin.dart │ ├── padding │ │ └── page_padding.dart │ ├── size │ │ ├── icon_size.dart │ │ ├── index.dart │ │ ├── widget_custom_size.dart │ │ └── widget_size.dart │ ├── state │ │ └── app_provider.dart │ └── validator │ │ └── validator_items.dart │ └── widget │ ├── builder │ └── responsive_builder.dart │ ├── button │ ├── active_button.dart │ └── social_media_button.dart │ ├── checkbox │ ├── info_checkbox.dart │ ├── kvkk_checkbox.dart │ └── product_checkbox.dart │ ├── combo_box │ ├── labeled_product_combo_box.dart │ └── product_combo_box.dart │ ├── custom_single_child_scroll.dart │ ├── padding │ └── padding_normal_button.dart │ ├── spacer │ ├── dynamic_horizontal_spacer.dart │ └── dynamic_vertical_spacer.dart │ ├── text │ ├── button_large_text.dart │ ├── button_normal_text.dart │ └── index.dart │ └── text_field │ ├── index.dart │ ├── labeled_product_textfield.dart │ └── product_textfield.dart ├── license.md ├── linux ├── .gitignore ├── CMakeLists.txt ├── flutter │ ├── CMakeLists.txt │ ├── generated_plugin_registrant.cc │ ├── generated_plugin_registrant.h │ └── generated_plugins.cmake ├── main.cc ├── my_application.cc └── my_application.h ├── macos ├── .gitignore ├── Flutter │ ├── Flutter-Debug.xcconfig │ ├── Flutter-Release.xcconfig │ └── GeneratedPluginRegistrant.swift ├── Podfile ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── app_icon_1024.png │ │ │ ├── app_icon_128.png │ │ │ ├── app_icon_16.png │ │ │ ├── app_icon_256.png │ │ │ ├── app_icon_32.png │ │ │ ├── app_icon_512.png │ │ │ └── app_icon_64.png │ ├── Base.lproj │ │ └── MainMenu.xib │ ├── Configs │ │ ├── AppInfo.xcconfig │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ └── Warnings.xcconfig │ ├── DebugProfile.entitlements │ ├── Info.plist │ ├── MainFlutterWindow.swift │ └── Release.entitlements └── firebase_app_id_file.json ├── pubspec.yaml ├── scripts ├── andorid_build.sh ├── build.sh ├── deep_clean.sh ├── icon.sh ├── install-arm.sh ├── lang.sh ├── pod-install-arm.sh └── pod-update-arm.sh ├── test └── widget_test.dart ├── web ├── favicon.ico ├── favicon.png ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ ├── Icon-maskable-192.png │ └── Icon-maskable-512.png ├── index.html └── manifest.json └── windows ├── .gitignore ├── CMakeLists.txt ├── flutter ├── CMakeLists.txt ├── generated_plugin_registrant.cc ├── generated_plugin_registrant.h └── generated_plugins.cmake └── runner ├── CMakeLists.txt ├── Runner.rc ├── flutter_window.cpp ├── flutter_window.h ├── main.cpp ├── resource.h ├── resources └── app_icon.ico ├── runner.exe.manifest ├── utils.cpp ├── utils.h ├── win32_window.cpp └── win32_window.h /.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 | *.lock 13 | 14 | # Ignore 15 | firebase_options.dart 16 | google-services.json 17 | google-services.plist 18 | GoogleService-Info.plist 19 | 20 | # IntelliJ related 21 | *.iml 22 | *.ipr 23 | *.iws 24 | .idea/ 25 | 26 | # The .vscode folder contains launch configuration and tasks you configure in 27 | # VS Code which you may wish to be included in version control, so this line 28 | # is commented out by default. 29 | #.vscode/ 30 | 31 | # Flutter/Dart/Pub related 32 | **/doc/api/ 33 | **/ios/Flutter/.last_build_id 34 | .dart_tool/ 35 | .flutter-plugins 36 | .flutter-plugins-dependencies 37 | .packages 38 | .pub-cache/ 39 | .pub/ 40 | /build/ 41 | 42 | # Symbolication related 43 | app.*.symbols 44 | 45 | # Obfuscation related 46 | app.*.map.json 47 | 48 | # Android Studio will place build artifacts here 49 | /android/app/debug 50 | /android/app/profile 51 | /android/app/release 52 | -------------------------------------------------------------------------------- /.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. 5 | 6 | version: 7 | revision: 7048ed95a5ad3e43d697e0c397464193991fc230 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: 7048ed95a5ad3e43d697e0c397464193991fc230 17 | base_revision: 7048ed95a5ad3e43d697e0c397464193991fc230 18 | - platform: android 19 | create_revision: 7048ed95a5ad3e43d697e0c397464193991fc230 20 | base_revision: 7048ed95a5ad3e43d697e0c397464193991fc230 21 | - platform: ios 22 | create_revision: 7048ed95a5ad3e43d697e0c397464193991fc230 23 | base_revision: 7048ed95a5ad3e43d697e0c397464193991fc230 24 | - platform: linux 25 | create_revision: 7048ed95a5ad3e43d697e0c397464193991fc230 26 | base_revision: 7048ed95a5ad3e43d697e0c397464193991fc230 27 | - platform: macos 28 | create_revision: 7048ed95a5ad3e43d697e0c397464193991fc230 29 | base_revision: 7048ed95a5ad3e43d697e0c397464193991fc230 30 | - platform: web 31 | create_revision: 7048ed95a5ad3e43d697e0c397464193991fc230 32 | base_revision: 7048ed95a5ad3e43d697e0c397464193991fc230 33 | - platform: windows 34 | create_revision: 7048ed95a5ad3e43d697e0c397464193991fc230 35 | base_revision: 7048ed95a5ad3e43d697e0c397464193991fc230 36 | 37 | # User provided section 38 | 39 | # List of Local paths (relative to this file) that should be 40 | # ignored by the migrate tool. 41 | # 42 | # Files that are not part of the templates will be ignored by default. 43 | unmanaged_files: 44 | - 'lib/main.dart' 45 | - 'ios/Runner.xcodeproj/project.pbxproj' 46 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "cSpell.words": [ 3 | "braziliante", 4 | "Firestore", 5 | "kartal", 6 | "Polyline", 7 | "polylines", 8 | "riverpod", 9 | "vbaseproject", 10 | "syncfusion", 11 | "wanteds" 12 | ], 13 | "dart.lineLength": 80, 14 | "docwriter.hotkey.mac": "⌥ + .", 15 | "editor.formatOnSave": true, 16 | "editor.formatOnPaste": true, 17 | "explorer.fileNesting.patterns": { 18 | "pubspec.yaml": ".flutter-plugins, .packages, .dart_tool, .flutter-plugins-dependencies, .metadata, .packages, pubspec.lock, build.yaml, analysis_options.yaml, all_lint_rules.yaml", 19 | ".gitignore": ".gitattributes, .gitmodules, .gitmessage, .mailmap, .git-blame*", 20 | "readme.*": "authors, backers.md, changelog*, citation*, code_of_conduct.md, codeowners, contributing.md, contributors, copying, credits, governance.md, history.md, license*, maintainers, readme*, security.md, sponsors.md", 21 | "*.dart": "$(capture).g.dart, $(capture).freezed.dart", 22 | }, 23 | "[dart]": { 24 | "editor.formatOnSave": true, 25 | "editor.formatOnType": true, 26 | "editor.rulers": [ 27 | 80 28 | ], 29 | "editor.selectionHighlight": false, 30 | "editor.suggest.snippetsPreventQuickSuggestions": false, 31 | "editor.suggestSelection": "first", 32 | "editor.tabCompletion": "onlySnippets", 33 | "editor.wordBasedSuggestions": true, 34 | "editor.codeActionsOnSave": { 35 | "source.fixAll": true 36 | } 37 | }, 38 | "workbench.colorCustomizations": { 39 | "tab.activeBorderTop": "#FFE81F" 40 | }, 41 | "editor.inlineSuggest.enabled": true, 42 | } 43 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

Base Project Firebase with Riverpod

2 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.yaml 2 | 3 | analyzer: 4 | exclude: 5 | - lib/product/init/language/ 6 | - lib/product/init/generation/ 7 | - "/*.g.dart" 8 | - "/*.gen.dart" 9 | - "/*.freezed.dart" 10 | - "test/.test_coverage.dart" 11 | - "bin/cache/**" 12 | - "lib/generated_plugin_registrant.dart" 13 | - test 14 | - assets/translations/ 15 | 16 | linter: 17 | rules: 18 | avoid_print: true # Uncomment to disable the avoid_print rule 19 | prefer_single_quotes: true # Uncomment to enable the prefer_single_quotes rule 20 | always_declare_return_types: true 21 | avoid_empty_else: true 22 | depend_on_referenced_packages: false 23 | public_member_api_docs: false 24 | sort_constructors_first: true 25 | prefer_const_constructors: true 26 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | // START: FlutterFire Configuration 26 | apply plugin: 'com.google.gms.google-services' 27 | // END: FlutterFire Configuration 28 | apply plugin: 'kotlin-android' 29 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 30 | 31 | 32 | def keystoreProperties = new Properties() 33 | def keystorePropertiesFile = rootProject.file('key.properties') 34 | if (keystorePropertiesFile.exists()) { 35 | keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) 36 | } 37 | 38 | android { 39 | compileSdkVersion flutter.compileSdkVersion 40 | ndkVersion flutter.ndkVersion 41 | 42 | compileOptions { 43 | sourceCompatibility JavaVersion.VERSION_1_8 44 | targetCompatibility JavaVersion.VERSION_1_8 45 | } 46 | 47 | kotlinOptions { 48 | jvmTarget = '1.8' 49 | } 50 | 51 | sourceSets { 52 | main.java.srcDirs += 'src/main/kotlin' 53 | } 54 | 55 | defaultConfig { 56 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 57 | applicationId "com.sesiniduydum.app" 58 | // You can update the following values to match your application needs. 59 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. 60 | minSdkVersion 20 61 | targetSdkVersion flutter.targetSdkVersion 62 | versionCode flutterVersionCode.toInteger() 63 | versionName flutterVersionName 64 | multiDexEnabled true 65 | } 66 | 67 | signingConfigs { 68 | release { 69 | keyAlias keystoreProperties['keyAlias'] 70 | keyPassword keystoreProperties['keyPassword'] 71 | storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null 72 | storePassword keystoreProperties['storePassword'] 73 | } 74 | } 75 | buildTypes { 76 | release { 77 | signingConfig signingConfigs.release 78 | } 79 | } 80 | } 81 | 82 | flutter { 83 | source '../..' 84 | } 85 | 86 | dependencies { 87 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 88 | implementation 'com.android.support:multidex:1.0.3' 89 | } 90 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 20 | 24 | 28 | 29 | 30 | 31 | 32 | 33 | 35 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/sesimiduy/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.sesiniduydum.app 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/android/app/src/main/res/mipmap-hdpi/launcher_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/android/app/src/main/res/mipmap-mdpi/launcher_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.7.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.2.0' 10 | // START: FlutterFire Configuration 11 | classpath 'com.google.gms:google-services:4.3.10' 12 | // END: FlutterFire Configuration 13 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 14 | } 15 | } 16 | 17 | allprojects { 18 | repositories { 19 | google() 20 | mavenCentral() 21 | } 22 | } 23 | 24 | rootProject.buildDir = '../build' 25 | subprojects { 26 | project.buildDir = "${rootProject.buildDir}/${project.name}" 27 | } 28 | subprojects { 29 | project.evaluationDependsOn(':app') 30 | } 31 | 32 | task clean(type: Delete) { 33 | delete rootProject.buildDir 34 | } 35 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip 6 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /assets/docs/kvkk.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/assets/docs/kvkk.pdf -------------------------------------------------------------------------------- /assets/icons/ic_car_help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/assets/icons/ic_car_help.png -------------------------------------------------------------------------------- /assets/icons/ic_map_help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/assets/icons/ic_map_help.png -------------------------------------------------------------------------------- /assets/translations/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "hello": "Hello" 3 | } 4 | -------------------------------------------------------------------------------- /assets/translations/tr.json: -------------------------------------------------------------------------------- 1 | { 2 | "hello": "Merhaba" 3 | } 4 | -------------------------------------------------------------------------------- /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 | 36 | Runner.ipa 37 | Runner.app.dSYM.zip 38 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 11.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gem "fastlane" 4 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '11.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 | end 36 | 37 | post_install do |installer| 38 | installer.pods_project.targets.each do |target| 39 | flutter_additional_ios_build_settings(target) 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | 11 | GeneratedPluginRegistrant.register(with: self) 12 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/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/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/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/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/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/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/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/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/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/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/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/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/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/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/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/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/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/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/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/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/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/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/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/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/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/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/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/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/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/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/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/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/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/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/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/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CADisableMinimumFrameDurationOnPhone 6 | 7 | CFBundleDevelopmentRegion 8 | $(DEVELOPMENT_LANGUAGE) 9 | CFBundleDisplayName 10 | BaseProject 11 | CFBundleExecutable 12 | $(EXECUTABLE_NAME) 13 | CFBundleIdentifier 14 | $(PRODUCT_BUNDLE_IDENTIFIER) 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | vbaseproject 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | $(FLUTTER_BUILD_NAME) 23 | CFBundleSignature 24 | ???? 25 | CFBundleVersion 26 | $(FLUTTER_BUILD_NUMBER) 27 | LSRequiresIPhoneOS 28 | 29 | NSLocationAlwaysUsageDescription 30 | Bu uygulama gönderilen yardımların doğru konumlarda buluşmasını sağlamak için, 31 | konumunuza ihtiyaç duyar. 32 | NSLocationWhenInUseUsageDescription 33 | Bu uygulama gönderilen yardımların doğru konumlarda buluşmasını sağlamak için, 34 | konumunuza ihtiyaç duyar. 35 | UIApplicationSupportsIndirectInputEvents 36 | 37 | UILaunchStoryboardName 38 | LaunchScreen 39 | UIMainStoryboardFile 40 | Main 41 | UISupportedInterfaceOrientations 42 | 43 | UIInterfaceOrientationPortrait 44 | UIInterfaceOrientationLandscapeLeft 45 | UIInterfaceOrientationLandscapeRight 46 | 47 | UISupportedInterfaceOrientations~ipad 48 | 49 | UIInterfaceOrientationLandscapeLeft 50 | UIInterfaceOrientationLandscapeRight 51 | UIInterfaceOrientationPortrait 52 | UIInterfaceOrientationPortraitUpsideDown 53 | 54 | UIViewControllerBasedStatusBarAppearance 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /ios/fastlane/Appfile: -------------------------------------------------------------------------------- 1 | app_identifier("com.sesiniduydum.app") # The bundle identifier of your app 2 | apple_id("vbacik.i10@icloud.com") # Your Apple Developer Portal username 3 | 4 | itc_team_id("125155847") # App Store Connect Team ID 5 | team_id("XE7NL975AC") # Developer Portal Team ID 6 | 7 | # For more information about the Appfile, see: 8 | # https://docs.fastlane.tools/advanced/#appfile 9 | -------------------------------------------------------------------------------- /ios/fastlane/Fastfile: -------------------------------------------------------------------------------- 1 | # This file contains the fastlane.tools configuration 2 | # You can find the documentation at https://docs.fastlane.tools 3 | # 4 | # For a list of all available actions, check out 5 | # 6 | # https://docs.fastlane.tools/actions 7 | # 8 | # For a list of all available plugins, check out 9 | # 10 | # https://docs.fastlane.tools/plugins/available-plugins 11 | # 12 | 13 | # Uncomment the line if you want fastlane to automatically update itself 14 | # update_fastlane 15 | 16 | default_platform(:ios) 17 | 18 | platform :ios do 19 | desc "Push a new beta build to TestFlight" 20 | lane :beta do 21 | build_app(workspace: "Runner.xcworkspace", scheme: "Runner") 22 | upload_to_testflight 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /ios/fastlane/README.md: -------------------------------------------------------------------------------- 1 | fastlane documentation 2 | ---- 3 | 4 | # Installation 5 | 6 | Make sure you have the latest version of the Xcode command line tools installed: 7 | 8 | ```sh 9 | xcode-select --install 10 | ``` 11 | 12 | For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane) 13 | 14 | # Available Actions 15 | 16 | ## iOS 17 | 18 | ### ios beta 19 | 20 | ```sh 21 | [bundle exec] fastlane ios beta 22 | ``` 23 | 24 | Push a new beta build to TestFlight 25 | 26 | ---- 27 | 28 | This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run. 29 | 30 | More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools). 31 | 32 | The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools). 33 | -------------------------------------------------------------------------------- /ios/fastlane/report.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /lib/core/init/core_localize.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | @immutable 4 | class CoreLocalize { 5 | final initialPath = 'assets/translations'; 6 | final List supportedItems = [ 7 | const Locale('en', 'US'), 8 | const Locale('tr', 'TR'), 9 | ]; 10 | } 11 | -------------------------------------------------------------------------------- /lib/features/home/provider/home_provider.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: public_member_api_docs, sort_constructors_first 2 | import 'package:equatable/equatable.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:riverpod/riverpod.dart'; 5 | 6 | class HomeProvider extends StateNotifier { 7 | HomeProvider() : super(const HomeState('')); 8 | 9 | void updateName() { 10 | state = state.copyWith(title: 'Hello World'); 11 | } 12 | } 13 | 14 | @immutable 15 | class HomeState extends Equatable { 16 | const HomeState(this.title); 17 | 18 | final String title; 19 | 20 | @override 21 | List get props => [title]; 22 | 23 | HomeState copyWith({ 24 | String? title, 25 | }) { 26 | return HomeState( 27 | title ?? this.title, 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /lib/features/home/view/home_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 3 | import 'package:kartal/kartal.dart'; 4 | import 'package:vbaseproject/features/home/provider/home_provider.dart'; 5 | 6 | class HomeView extends ConsumerStatefulWidget { 7 | const HomeView({super.key}); 8 | 9 | @override 10 | ConsumerState createState() => _HomeViewState(); 11 | } 12 | 13 | class _HomeViewState extends ConsumerState { 14 | late final StateNotifierProvider homeProvider; 15 | 16 | @override 17 | void initState() { 18 | super.initState(); 19 | homeProvider = StateNotifierProvider((ref) => HomeProvider()); 20 | } 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return Scaffold( 25 | floatingActionButton: FloatingActionButton( 26 | onPressed: () { 27 | ref.read(homeProvider.notifier).updateName(); 28 | }, 29 | child: const Icon(Icons.add), 30 | ), 31 | appBar: AppBar( 32 | title: Text(ref.watch(homeProvider).title), 33 | ), 34 | body: Image.network(''.ext.randomImage), 35 | ); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lib/features/login/service/firebase_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:logger/logger.dart'; 3 | 4 | import 'package:vbaseproject/product/model/base/base_firebase_model.dart'; 5 | 6 | import 'package:vbaseproject/product/utility/firebase/collection_enums.dart'; 7 | 8 | @immutable 9 | class FirebaseService { 10 | Future set({ 11 | required T model, 12 | required CollectionEnums path, 13 | }) async { 14 | try { 15 | await path.collection.doc().set(model.toJson()); 16 | } catch (e) { 17 | Logger().e(e.toString()); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | import 'package:easy_localization/easy_localization.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 6 | 7 | import 'package:vbaseproject/product/app_builder.dart'; 8 | import 'package:vbaseproject/product/init/application_init.dart'; 9 | 10 | void main() async { 11 | // await Firebase.initializeApp( 12 | // options: DefaultFirebaseOptions.currentPlatform, 13 | // ); 14 | final initialManager = ApplicationInit(); 15 | await initialManager.start(); 16 | runApp( 17 | EasyLocalization( 18 | supportedLocales: initialManager.localize.supportedItems, 19 | path: initialManager.localize.initialPath, 20 | // startLocale: CoreLocale.tr.locale, 21 | useOnlyLangCode: true, 22 | child: const ProviderScope(child: MyApp()), 23 | ), 24 | ); 25 | } 26 | 27 | class MyApp extends StatelessWidget { 28 | const MyApp({super.key}); 29 | 30 | @override 31 | Widget build(BuildContext context) { 32 | return MaterialApp( 33 | scrollBehavior: AppScrollBehavior(), 34 | debugShowCheckedModeBanner: false, 35 | localizationsDelegates: context.localizationDelegates, 36 | supportedLocales: context.supportedLocales, 37 | locale: context.locale, 38 | builder: AppBuilder.build, 39 | ); 40 | } 41 | } 42 | 43 | class AppScrollBehavior extends MaterialScrollBehavior { 44 | //Added because page view was not scrolling via mouse in web 45 | @override 46 | Set get dragDevices => { 47 | PointerDeviceKind.touch, 48 | PointerDeviceKind.mouse, 49 | PointerDeviceKind.trackpad, 50 | }; 51 | } 52 | -------------------------------------------------------------------------------- /lib/product/app_builder.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:responsive_framework/responsive_framework.dart'; 3 | 4 | class AppBuilder { 5 | AppBuilder._(); 6 | 7 | static Widget build(BuildContext context, Widget? child) { 8 | return ResponsiveBreakpoints.builder( 9 | child: child ?? const SizedBox(), 10 | breakpoints: [ 11 | const Breakpoint(start: 0, end: 450, name: MOBILE), 12 | const Breakpoint(start: 451, end: 800, name: TABLET), 13 | const Breakpoint(start: 801, end: 1920, name: DESKTOP), 14 | const Breakpoint(start: 1921, end: double.infinity, name: '4K'), 15 | ], 16 | ); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/product/decoration/product_text_field_decoration.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: lines_longer_than_80_chars 2 | 3 | import 'package:flutter/foundation.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:kartal/kartal.dart'; 6 | import 'package:vbaseproject/product/items/colors_custom.dart'; 7 | import 'package:vbaseproject/product/utility/size/index.dart'; 8 | 9 | class ProductTextFieldDecoration extends InputDecoration { 10 | ProductTextFieldDecoration(BuildContext context, String? hintText) 11 | : super( 12 | contentPadding: context.padding.low, 13 | enabledBorder: focusedBorderStyle(context), 14 | focusedBorder: focusedBorderStyle(context), 15 | border: standardBorder(context), 16 | hintText: hintText, 17 | hintStyle: context.general.textTheme.titleSmall?.copyWith( 18 | color: ColorsCustom.lightGray, 19 | ), 20 | ); 21 | 22 | static OutlineInputBorder focusedBorderStyle(BuildContext context) { 23 | return OutlineInputBorder( 24 | borderRadius: borderRadius, 25 | borderSide: const BorderSide( 26 | color: ColorsCustom.lightGray, 27 | ), 28 | ); 29 | } 30 | 31 | static OutlineInputBorder standardBorder(BuildContext context) => 32 | OutlineInputBorder( 33 | borderRadius: borderRadius, 34 | borderSide: BorderSide( 35 | color: ColorsCustom.lightGray, 36 | width: context.dynamicWidth(0.1), 37 | ), 38 | ); 39 | 40 | static BorderRadius get borderRadius => const BorderRadius.all( 41 | Radius.circular(kIsWeb ? WidgetSizes.spacingS : WidgetSizes.spacingM), 42 | ); 43 | } 44 | -------------------------------------------------------------------------------- /lib/product/generated/assets.gen.dart: -------------------------------------------------------------------------------- 1 | /// GENERATED CODE - DO NOT MODIFY BY HAND 2 | /// ***************************************************** 3 | /// FlutterGen 4 | /// ***************************************************** 5 | 6 | // coverage:ignore-file 7 | // ignore_for_file: type=lint 8 | // ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal,deprecated_member_use 9 | 10 | import 'package:flutter/widgets.dart'; 11 | 12 | class $AssetsDocsGen { 13 | const $AssetsDocsGen(); 14 | 15 | /// File path: assets/docs/kvkk.pdf 16 | String get kvkk => 'assets/docs/kvkk.pdf'; 17 | 18 | /// List of all assets 19 | List get values => [kvkk]; 20 | } 21 | 22 | class $AssetsIconsGen { 23 | const $AssetsIconsGen(); 24 | 25 | /// File path: assets/icons/ic_car_help.png 26 | AssetGenImage get icCarHelp => 27 | const AssetGenImage('assets/icons/ic_car_help.png'); 28 | 29 | /// File path: assets/icons/ic_map_help.png 30 | AssetGenImage get icMapHelp => 31 | const AssetGenImage('assets/icons/ic_map_help.png'); 32 | 33 | /// List of all assets 34 | List get values => [icCarHelp, icMapHelp]; 35 | } 36 | 37 | class $AssetsTranslationsGen { 38 | const $AssetsTranslationsGen(); 39 | 40 | /// File path: assets/translations/en.json 41 | String get en => 'assets/translations/en.json'; 42 | 43 | /// File path: assets/translations/tr.json 44 | String get tr => 'assets/translations/tr.json'; 45 | 46 | /// List of all assets 47 | List get values => [en, tr]; 48 | } 49 | 50 | class Assets { 51 | Assets._(); 52 | 53 | static const $AssetsDocsGen docs = $AssetsDocsGen(); 54 | static const $AssetsIconsGen icons = $AssetsIconsGen(); 55 | static const $AssetsTranslationsGen translations = $AssetsTranslationsGen(); 56 | } 57 | 58 | class AssetGenImage { 59 | const AssetGenImage(this._assetName); 60 | 61 | final String _assetName; 62 | 63 | Image image({ 64 | Key? key, 65 | AssetBundle? bundle, 66 | ImageFrameBuilder? frameBuilder, 67 | ImageErrorWidgetBuilder? errorBuilder, 68 | String? semanticLabel, 69 | bool excludeFromSemantics = false, 70 | double? scale, 71 | double? width, 72 | double? height, 73 | Color? color, 74 | Animation? opacity, 75 | BlendMode? colorBlendMode, 76 | BoxFit? fit, 77 | AlignmentGeometry alignment = Alignment.center, 78 | ImageRepeat repeat = ImageRepeat.noRepeat, 79 | Rect? centerSlice, 80 | bool matchTextDirection = false, 81 | bool gaplessPlayback = false, 82 | bool isAntiAlias = false, 83 | String? package, 84 | FilterQuality filterQuality = FilterQuality.low, 85 | int? cacheWidth, 86 | int? cacheHeight, 87 | }) { 88 | return Image.asset( 89 | _assetName, 90 | key: key, 91 | bundle: bundle, 92 | frameBuilder: frameBuilder, 93 | errorBuilder: errorBuilder, 94 | semanticLabel: semanticLabel, 95 | excludeFromSemantics: excludeFromSemantics, 96 | scale: scale, 97 | width: width, 98 | height: height, 99 | color: color, 100 | opacity: opacity, 101 | colorBlendMode: colorBlendMode, 102 | fit: fit, 103 | alignment: alignment, 104 | repeat: repeat, 105 | centerSlice: centerSlice, 106 | matchTextDirection: matchTextDirection, 107 | gaplessPlayback: gaplessPlayback, 108 | isAntiAlias: isAntiAlias, 109 | package: package, 110 | filterQuality: filterQuality, 111 | cacheWidth: cacheWidth, 112 | cacheHeight: cacheHeight, 113 | ); 114 | } 115 | 116 | ImageProvider provider({ 117 | AssetBundle? bundle, 118 | String? package, 119 | }) { 120 | return AssetImage( 121 | _assetName, 122 | bundle: bundle, 123 | package: package, 124 | ); 125 | } 126 | 127 | String get path => _assetName; 128 | 129 | String get keyName => _assetName; 130 | } 131 | -------------------------------------------------------------------------------- /lib/product/init/application_init.dart: -------------------------------------------------------------------------------- 1 | import 'package:easy_localization/easy_localization.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | import 'package:vbaseproject/core/init/core_localize.dart'; 5 | 6 | @immutable 7 | final class ApplicationInit { 8 | ApplicationInit(); 9 | 10 | final CoreLocalize localize = CoreLocalize(); 11 | 12 | /// The start function is a future that does not return any 13 | /// value and can be awaited. 14 | Future start() async { 15 | WidgetsFlutterBinding.ensureInitialized(); 16 | await EasyLocalization.ensureInitialized(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/product/init/language/locale_keys.g.dart: -------------------------------------------------------------------------------- 1 | // DO NOT EDIT. This is code generated via package:easy_localization/generate.dart 2 | 3 | abstract class LocaleKeys { 4 | static const dialog_successTitle = 'dialog.successTitle'; 5 | static const dialog_errorTitle = 'dialog.errorTitle'; 6 | static const dialog_successContent = 'dialog.successContent'; 7 | static const dialog_errorContent = 'dialog.errorContent'; 8 | static const dialog_permissionTitle = 'dialog.permissionTitle'; 9 | static const dialog_permissionDescription = 'dialog.permissionDescription'; 10 | static const dialog = 'dialog'; 11 | static const button_addNewItem = 'button.addNewItem'; 12 | static const button = 'button'; 13 | static const messages_success_helpRequest = 'messages.success.helpRequest'; 14 | static const messages_success_sendHelp = 'messages.success.sendHelp'; 15 | static const messages_success_delivered = 'messages.success.delivered'; 16 | static const messages_success = 'messages.success'; 17 | static const messages = 'messages'; 18 | static const needHelp = 'needHelp'; 19 | static const nameAndSurname = 'nameAndSurname'; 20 | static const phoneNumber = 'phoneNumber'; 21 | static const address = 'address'; 22 | static const hintNameNeed = 'hintNameNeed'; 23 | static const hintCategory = 'hintCategory'; 24 | static const personNeedsHelp = 'personNeedsHelp'; 25 | static const askForHelp = 'askForHelp'; 26 | static const youMaySelectMultiple = 'youMaySelectMultiple'; 27 | static const addressHint = 'addressHint'; 28 | static const goingtoHelp = 'goingtoHelp'; 29 | static const personalHelp = 'personalHelp'; 30 | static const companyHelp = 'companyHelp'; 31 | static const hintSubHeader = 'hintSubHeader'; 32 | static const labelCompanyName = 'labelCompanyName'; 33 | static const labelHelperPersonalName = 'labelHelperPersonalName'; 34 | static const labelHelperCompanyName = 'labelHelperCompanyName'; 35 | static const labelDriverName = 'labelDriverName'; 36 | static const labelDriverPhone = 'labelDriverPhone'; 37 | static const labelVehicleType = 'labelVehicleType'; 38 | static const sendHelp = 'sendHelp'; 39 | static const plate = 'plate'; 40 | static const delivered = 'delivered'; 41 | static const wasDelivered = 'wasDelivered'; 42 | static const helpCreatedSuccessfully = 'helpCreatedSuccessfully'; 43 | static const helpRequestCreated = 'helpRequestCreated'; 44 | static const requestFailed = 'requestFailed'; 45 | static const supportRequestFaield = 'supportRequestFaield'; 46 | static const deliver = 'deliver'; 47 | static const kvkk = 'kvkk'; 48 | static const kvkkReadApproved = 'kvkkReadApproved'; 49 | static const confirmationText = 'confirmationText'; 50 | static const hintPickCity = 'hintPickCity'; 51 | static const labelVehiclePlate = 'labelVehiclePlate'; 52 | static const labelFromCity = 'labelFromCity'; 53 | static const labelToCity = 'labelToCity'; 54 | static const carriedItems = 'carriedItems'; 55 | static const validation_fullName = 'validation.fullName'; 56 | static const validation_phoneNumber = 'validation.phoneNumber'; 57 | static const validation_address = 'validation.address'; 58 | static const validation_needs = 'validation.needs'; 59 | static const validation_plate = 'validation.plate'; 60 | static const validation_kvkk = 'validation.kvkk'; 61 | static const validation_surname = 'validation.surname'; 62 | static const validation_confirmationText = 'validation.confirmationText'; 63 | static const validation = 'validation'; 64 | static const login_wantHelp = 'login.wantHelp'; 65 | static const login_goingHelp = 'login.goingHelp'; 66 | static const login_currentMap = 'login.currentMap'; 67 | static const login_arrived = 'login.arrived'; 68 | static const login_info = 'login.info'; 69 | static const login_description = 'login.description'; 70 | static const login = 'login'; 71 | static const completeDialog_nameDelivered = 'completeDialog.nameDelivered'; 72 | static const completeDialog = 'completeDialog'; 73 | static const category = 'category'; 74 | static const map_makeRoute = 'map.makeRoute'; 75 | static const map = 'map'; 76 | 77 | } 78 | -------------------------------------------------------------------------------- /lib/product/items/colors_custom.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | @immutable 4 | class ColorsCustom { 5 | const ColorsCustom._(); 6 | static const Color sambacus = Color(0xFF101A2A); 7 | static const Color endless = Color(0xFFE23E3E); 8 | static const Color braziliante = Color(0xFF34C759); 9 | static const Color brandeisBlue = Color(0xFF0D6EFD); 10 | static const Color lightGray = Color(0xffCED4DA); 11 | static const Color white = Color(0xFFFFffff); 12 | static const Color imperilRead = Color(0xffEF2636); 13 | static const Color royalPeacock = Color(0xff27AAE5); 14 | } 15 | -------------------------------------------------------------------------------- /lib/product/model/base/base_firebase_model.dart: -------------------------------------------------------------------------------- 1 | // ignore: one_member_abstracts 2 | abstract class BaseFirebaseModel { 3 | Map toJson(); 4 | } 5 | -------------------------------------------------------------------------------- /lib/product/model/base/base_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | import 'package:vbaseproject/product/utility/firebase/time_parser.dart'; 3 | 4 | abstract class BaseModel { 5 | @JsonKey( 6 | toJson: FirebaseTimeParser.dateTimeToTimestamp, 7 | fromJson: FirebaseTimeParser.datetimeFromTimestamp, 8 | defaultValue: DateTime.now, 9 | ) 10 | DateTime? createdAt = DateTime.now(); 11 | @JsonKey( 12 | toJson: FirebaseTimeParser.dateTimeToTimestamp, 13 | fromJson: FirebaseTimeParser.datetimeFromTimestamp, 14 | defaultValue: DateTime.now, 15 | ) 16 | DateTime? updatedAt = DateTime.now(); 17 | } 18 | -------------------------------------------------------------------------------- /lib/product/utility/constants/app_constants.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | 3 | const String kWeb = 'kWeb'; 4 | 5 | @immutable 6 | class AppConstants { 7 | const AppConstants._(); 8 | static const int kZero = 0; 9 | static const int kOne = 1; 10 | static const int kTwo = 2; 11 | static const int kThree = 3; 12 | static const int kFour = 4; 13 | 14 | static const double defaultMapZoom = 14; 15 | } 16 | -------------------------------------------------------------------------------- /lib/product/utility/constants/regex_types.dart: -------------------------------------------------------------------------------- 1 | class RegexTypes { 2 | RegexTypes._(); 3 | 4 | static RegExp get firstAndLastName => RegExp( 5 | r"^([a-zA-Z]{2,}\s[a-zA-Z]{1,}'?-?[a-zA-Z]{2,}\s?([a-zA-Z]{1,})?)", 6 | ); 7 | } 8 | -------------------------------------------------------------------------------- /lib/product/utility/constants/string_constants.dart: -------------------------------------------------------------------------------- 1 | class StringConstants { 2 | static const String asteriks = '*'; 3 | static const String phoneHint = '(53X) XX XX'; 4 | static const String twitter = 'Twitter'; 5 | static const String afad = 'AFAD'; 6 | static const String instagram = 'Instagram'; 7 | } 8 | -------------------------------------------------------------------------------- /lib/product/utility/decorations/empty_box.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class EmptyBox extends SizedBox { 4 | const EmptyBox({super.key, super.height, super.width}); 5 | 6 | const EmptyBox.smallHeight({super.key}) : super(height: 8); 7 | const EmptyBox.middleHeight({super.key}) : super(height: 16); 8 | const EmptyBox.largeHeight({super.key}) : super(height: 24); 9 | } 10 | -------------------------------------------------------------------------------- /lib/product/utility/decorations/style/bold_outline_style.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:vbaseproject/product/items/colors_custom.dart'; 3 | import 'package:vbaseproject/product/utility/padding/page_padding.dart'; 4 | 5 | @immutable 6 | class CustomButtonStyle extends ButtonStyle { 7 | const CustomButtonStyle._(); 8 | 9 | static ButtonStyle get bold { 10 | return OutlinedButton.styleFrom( 11 | padding: const PagePadding.verticalSymmetric(), 12 | side: const BorderSide( 13 | color: ColorsCustom.sambacus, 14 | width: 3, 15 | ), 16 | ); 17 | } 18 | 19 | static ButtonStyle get normal { 20 | return ElevatedButton.styleFrom( 21 | padding: const PagePadding.verticalSymmetric(), 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/product/utility/decorations/style/button_rectangle_border.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CustomRectangleBorder extends RoundedRectangleBorder { 4 | const CustomRectangleBorder({ 5 | super.side = BorderSide.none, 6 | super.borderRadius = const BorderRadius.all(Radius.circular(12)), 7 | }); 8 | } 9 | -------------------------------------------------------------------------------- /lib/product/utility/firebase/collection_enums.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: constant_identifier_names 2 | 3 | import 'package:cloud_firestore/cloud_firestore.dart'; 4 | 5 | enum CollectionEnums { 6 | items, 7 | poi_list, 8 | wantHelp, 9 | sendHelp, 10 | poi_category, 11 | wantHelpItems, 12 | completeArrived; 13 | 14 | CollectionReference> get collection { 15 | return FirebaseFirestore.instance.collection(name); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/product/utility/firebase/geo_parser.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | @immutable 5 | class GeoParser { 6 | const GeoParser._(); 7 | static GeoPoint? geoPointConvertJson(GeoPoint? geoPoint) { 8 | return geoPoint; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /lib/product/utility/firebase/index.dart: -------------------------------------------------------------------------------- 1 | export 'collection_enums.dart'; 2 | export 'time_parser.dart'; 3 | -------------------------------------------------------------------------------- /lib/product/utility/firebase/time_parser.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:flutter/foundation.dart'; 3 | 4 | @immutable 5 | class FirebaseTimeParser { 6 | const FirebaseTimeParser._(); 7 | static DateTime? datetimeFromTimestamp(Timestamp? timestamp) { 8 | return timestamp != null 9 | ? DateTime.fromMillisecondsSinceEpoch(timestamp.millisecondsSinceEpoch) 10 | : null; 11 | } 12 | 13 | static Timestamp? dateTimeToTimestamp(DateTime? datetime) { 14 | return datetime != null ? Timestamp.fromDate(datetime) : null; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/product/utility/mixin/app_provider_mixin.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 2 | import 'package:vbaseproject/product/utility/state/app_provider.dart'; 3 | 4 | mixin AppProviderMixin on ConsumerState { 5 | AppProvider get appProvider => ref.read(AppProvider.provider.notifier); 6 | AppProviderState get appState => ref.read(AppProvider.provider); 7 | } 8 | -------------------------------------------------------------------------------- /lib/product/utility/mixin/loading_state_mixin.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | mixin LoadingState on State { 4 | bool isLoading = false; 5 | void changeLoading({bool forceUI = true}) { 6 | if (!mounted) return; 7 | isLoading = !isLoading; 8 | if (!forceUI) return; 9 | setState(() {}); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/product/utility/padding/page_padding.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:vbaseproject/product/utility/size/widget_size.dart'; 4 | 5 | @immutable 6 | class PagePadding extends EdgeInsets { 7 | const PagePadding.defaultPadding() 8 | : super.symmetric( 9 | horizontal: WidgetSizes.spacingM, 10 | ); 11 | const PagePadding.horizontalSymmetric() 12 | : super.symmetric(horizontal: WidgetSizes.spacingL); 13 | const PagePadding.horizontal18Symmetric() 14 | : super.symmetric( 15 | horizontal: WidgetSizes.spacingM + WidgetSizes.spacingXSS, 16 | ); 17 | const PagePadding.horizontalNormalSymmetric() 18 | : super.symmetric(horizontal: WidgetSizes.spacingS); 19 | const PagePadding.horizontalHighSymmetric() 20 | : super.symmetric(horizontal: WidgetSizes.spacingXxl4); 21 | const PagePadding.horizontalLowSymmetric() 22 | : super.symmetric(horizontal: WidgetSizes.spacingXsMid); 23 | const PagePadding.horizontalVeryLowSymmetric() 24 | : super.symmetric(horizontal: WidgetSizes.spacingXxs); 25 | const PagePadding.horizontalLowXss() 26 | : super.symmetric( 27 | horizontal: WidgetSizes.spacingXxs + WidgetSizes.spacingXSS, 28 | ); 29 | const PagePadding.horizontal16Symmetric() 30 | : super.symmetric(horizontal: WidgetSizes.spacingM); 31 | 32 | const PagePadding.verticalSymmetric() 33 | : super.symmetric(vertical: WidgetSizes.spacingL); 34 | const PagePadding.verticalMediumHighSymmetric() 35 | : super.symmetric(vertical: WidgetSizes.spacingXxl2); 36 | const PagePadding.verticalMediumSymmetric() 37 | : super.symmetric(vertical: WidgetSizes.spacingM); 38 | const PagePadding.verticalHigh() 39 | : super.symmetric(vertical: WidgetSizes.spacingXxl4); 40 | const PagePadding.verticalVeryLowSymmetric() 41 | : super.symmetric(vertical: WidgetSizes.spacingXxs); 42 | const PagePadding.verticalNormalSymmetric() 43 | : super.symmetric(vertical: WidgetSizes.spacingXl); 44 | const PagePadding.verticalLowSymmetric() 45 | : super.symmetric(vertical: WidgetSizes.spacingXsMid); 46 | const PagePadding.vertical8Symmetric() 47 | : super.symmetric(vertical: WidgetSizes.spacingXs); 48 | const PagePadding.vertical6Symmetric() 49 | : super.symmetric(vertical: WidgetSizes.spacingXSs); 50 | const PagePadding.vertical12Symmetric() 51 | : super.symmetric(vertical: WidgetSizes.spacingS); 52 | const PagePadding.highVerticalLowHorizontal() 53 | : super.symmetric( 54 | vertical: WidgetSizes.spacingXxl4, 55 | horizontal: WidgetSizes.spacingXsMid, 56 | ); 57 | 58 | const PagePadding.allNormal() : super.all(WidgetSizes.spacingXl); 59 | const PagePadding.all() : super.all(WidgetSizes.spacingL); 60 | const PagePadding.allLow() : super.all(WidgetSizes.spacingXsMid); 61 | const PagePadding.allVeryLow() : super.all(WidgetSizes.spacingXs); 62 | const PagePadding.generalLowAll() : super.all(WidgetSizes.spacingXsMid); 63 | const PagePadding.generalAllNormal() : super.all(WidgetSizes.spacingM); 64 | const PagePadding.generalAllLow() : super.all(WidgetSizes.spacingS); 65 | 66 | const PagePadding.generalCardAll() : super.all(WidgetSizes.spacingS); 67 | 68 | const PagePadding.generalCardOnlyRight() 69 | : super.only(right: WidgetSizes.spacingXs); 70 | 71 | const PagePadding.generalIconAll() : super.all(WidgetSizes.spacingXxs); 72 | const PagePadding.generalIconLowAll() : super.all(WidgetSizes.spacingXSS); 73 | const PagePadding.generalCircleAll() : super.all(WidgetSizes.spacingXs); 74 | 75 | const PagePadding.onlyLeftIcon() : super.only(left: WidgetSizes.spacingXl); 76 | const PagePadding.onlyLeft10() : super.only(left: WidgetSizes.spacingXsMid); 77 | 78 | const PagePadding.onlyLeft() : super.only(left: WidgetSizes.spacingM); 79 | const PagePadding.onlyLeftHigh() : super.only(left: WidgetSizes.spacingXxl2); 80 | const PagePadding.onlyLeftLow() : super.only(left: WidgetSizes.spacingS); 81 | const PagePadding.onlyLeftVeryLow() : super.only(left: WidgetSizes.spacingXs); 82 | 83 | const PagePadding.onlyBottomMedium() 84 | : super.only(bottom: WidgetSizes.spacingS); 85 | const PagePadding.onlyBottomNormal() 86 | : super.only(bottom: WidgetSizes.spacingXl); 87 | const PagePadding.onlyBottom() : super.only(bottom: WidgetSizes.spacingM); 88 | const PagePadding.onlyBottomLow() 89 | : super.only(bottom: WidgetSizes.spacingXsMid); 90 | const PagePadding.onlyBottomVeryLow() 91 | : super.only(bottom: WidgetSizes.spacingXxs); 92 | 93 | const PagePadding.onlyTopMedium() : super.only(top: WidgetSizes.spacingS); 94 | const PagePadding.onlyTop() : super.only(top: WidgetSizes.spacingXsMid); 95 | const PagePadding.onlyTopNormalMedium() 96 | : super.only(top: WidgetSizes.spacingXxl3 / 2); 97 | const PagePadding.onlyTopVeryLow() : super.only(top: WidgetSizes.spacingXSS); 98 | const PagePadding.onlyTopLow() : super.only(top: WidgetSizes.spacingXxs); 99 | const PagePadding.onlyTopLowNormal() 100 | : super.only(top: WidgetSizes.spacingXxl3 / 2); 101 | const PagePadding.onlyTopNormal() : super.only(top: WidgetSizes.spacingXl); 102 | const PagePadding.onlyTopNormalX() 103 | : super.only(top: WidgetSizes.spacingXxl2 - WidgetSizes.spacingXSS); 104 | const PagePadding.onlyTopHigh() : super.only(top: WidgetSizes.spacingXxl3); 105 | 106 | const PagePadding.onlyRight() : super.only(right: WidgetSizes.spacingM); 107 | const PagePadding.onlyRightMedium() : super.only(right: WidgetSizes.spacingL); 108 | const PagePadding.onlyRightNormal() 109 | : super.only(right: WidgetSizes.spacingXl); 110 | const PagePadding.onlyRightHigh() 111 | : super.only(right: WidgetSizes.spacingXl + WidgetSizes.spacingM); 112 | 113 | const PagePadding.onlyRightLow() 114 | : super.only(right: WidgetSizes.spacingXsMid); 115 | const PagePadding.onlyRightVeryLow() 116 | : super.only(right: WidgetSizes.spacingXSs); 117 | 118 | const PagePadding.horizontalLowVerticalVeryLowSymmetric() 119 | : super.symmetric( 120 | horizontal: WidgetSizes.spacingXsMid, 121 | vertical: WidgetSizes.spacingXxs, 122 | ); 123 | const PagePadding.boxDesignLowHorizontal() 124 | : super.fromLTRB( 125 | WidgetSizes.spacingS, 126 | WidgetSizes.spacingXSs, 127 | WidgetSizes.spacingS, 128 | WidgetSizes.spacingXSs, 129 | ); 130 | 131 | const PagePadding.boxWidgetDesignLowHorizontal() 132 | : super.fromLTRB( 133 | WidgetSizes.spacingL, 134 | WidgetSizes.spacingMx, 135 | WidgetSizes.spacingL, 136 | WidgetSizes.spacingXSS, 137 | ); 138 | const PagePadding.boxWidgetDesignVeryLowHorizontal() 139 | : super.fromLTRB( 140 | WidgetSizes.spacingM, 141 | WidgetSizes.spacingMx, 142 | WidgetSizes.spacingM, 143 | WidgetSizes.spacingMx, 144 | ); 145 | 146 | const PagePadding.boxPaddingLT() 147 | : super.only( 148 | left: WidgetSizes.spacingL, 149 | top: WidgetSizes.spacingMx, 150 | ); 151 | } 152 | 153 | class PageMargin extends EdgeInsets { 154 | const PageMargin.leftTopLow() 155 | : super.only( 156 | left: WidgetSizes.spacingS, 157 | top: WidgetSizes.spacingXxl3 / 2, 158 | ); 159 | } 160 | -------------------------------------------------------------------------------- /lib/product/utility/size/icon_size.dart: -------------------------------------------------------------------------------- 1 | enum IconSize { 2 | //size is [5] 3 | xSmall(5), 4 | //size is [10] 5 | small(10), 6 | //size is [15] 7 | smallX(15), 8 | //size is [25] 9 | medium(25), 10 | //size is [50] 11 | large(50), 12 | //size is [80] 13 | xLarge(80), 14 | //size is [100] 15 | xxLarge(100), 16 | ; 17 | 18 | final double value; 19 | // ignore: sort_constructors_first 20 | const IconSize(this.value); 21 | } 22 | -------------------------------------------------------------------------------- /lib/product/utility/size/index.dart: -------------------------------------------------------------------------------- 1 | export 'icon_size.dart'; 2 | export 'widget_size.dart'; 3 | -------------------------------------------------------------------------------- /lib/product/utility/size/widget_custom_size.dart: -------------------------------------------------------------------------------- 1 | enum WidgetCustomSize { 2 | //size is [300] 3 | header(300), 4 | 5 | //size is [300] 6 | headerIcon(200); 7 | 8 | final double value; 9 | // ignore: sort_constructors_first 10 | const WidgetCustomSize(this.value); 11 | } 12 | -------------------------------------------------------------------------------- /lib/product/utility/size/widget_size.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | @immutable 4 | class WidgetSizes { 5 | const WidgetSizes._(); 6 | 7 | static const double zero = 0; 8 | 9 | /// [spacingXSSs] is 1.5 10 | static const double spacingXSSs = 1.5; 11 | 12 | /// [spacingXSS] is 2.0 13 | static const double spacingXSS = 2; 14 | 15 | /// [spacingXxs] is 4.0 16 | static const double spacingXxs = 4; 17 | 18 | /// [spacingXSs] is 6.0 19 | static const double spacingXSs = 6; 20 | 21 | /// [spacingXs] is 8.0 22 | static const double spacingXs = 8; 23 | 24 | /// [spacingXsMid] is 10.0 25 | static const double spacingXsMid = 10; 26 | 27 | /// [spacingS] is 12.0 28 | static const double spacingS = 12; 29 | 30 | /// [spacingSs] is 14.0 31 | static const double spacingSs = 14; 32 | 33 | /// [spacingM] is 16.0 34 | static const double spacingM = 16; 35 | 36 | /// [spacingMx] is 18.0 37 | static const double spacingMx = 18; 38 | 39 | /// [spacingL] is 20.0 40 | static const double spacingL = 20; 41 | 42 | /// [spacingXl] is 24.0 43 | static const double spacingXl = 24; 44 | 45 | /// [spacingXxl] is 28.0 46 | static const double spacingXxl = 28; 47 | 48 | /// [spacingXxl2] is 32.0 49 | static const double spacingXxl2 = 32; 50 | 51 | /// [spacingXxl3] is 36.0 52 | static const double spacingXxl3 = 36; 53 | 54 | /// [spacingXxl4] is 40.0 55 | static const double spacingXxl4 = 40; 56 | 57 | /// [spacingXxl5] is 44.0 58 | static const double spacingXxl5 = 44; 59 | 60 | /// [spacingXxl6] is 48.0 61 | static const double spacingXxl6 = 48; 62 | 63 | /// [spacingXxl7] is 52.0 64 | static const double spacingXxl7 = 52; 65 | 66 | /// [spacingXxl8] is 60.0 67 | static const double spacingXxl8 = 60; 68 | 69 | /// [spacingXxl9] is 72.0 70 | static const double spacingXxl9 = 72; 71 | 72 | /// [spacingXxl12] is 100.0 73 | static const double spacingXxl12 = 100; 74 | 75 | /// [spacingXxlL12] is 200.0 76 | static const double spacingXxlL12 = 200; 77 | 78 | /// [spacingXxlL13] is 250.0 79 | static const double spacingXxlL13 = 250; 80 | 81 | /// [spacingXxlL14] is 300.0 82 | static const double spacingXxlL14 = 300; 83 | } 84 | -------------------------------------------------------------------------------- /lib/product/utility/state/app_provider.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: public_member_api_docs, sort_constructors_first 2 | 3 | import 'package:equatable/equatable.dart'; 4 | import 'package:flutter/foundation.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 7 | import 'package:kartal/kartal.dart'; 8 | import 'package:vbaseproject/features/login/service/firebase_service.dart'; 9 | import 'package:vbaseproject/product/utility/constants/app_constants.dart'; 10 | 11 | class AppProvider extends StateNotifier { 12 | AppProvider() : super(const AppProviderState()); 13 | 14 | final FirebaseService firebaseService = FirebaseService(); 15 | 16 | static final provider = 17 | StateNotifierProvider((_) { 18 | return AppProvider(); 19 | }); 20 | 21 | Future init(BuildContext context) async { 22 | await Future.wait([checkDeviceId()]); 23 | } 24 | 25 | Future checkDeviceId() async { 26 | try { 27 | final deviceID = 28 | kIsWeb ? kWeb : await DeviceUtility.instance.getUniqueDeviceId(); 29 | state = state.copyWith(deviceID: deviceID); 30 | } catch (e) { 31 | state = state.copyWith(deviceID: kWeb); 32 | } 33 | } 34 | } 35 | 36 | @immutable 37 | class AppProviderState extends Equatable { 38 | const AppProviderState({ 39 | this.deviceID, 40 | }); 41 | 42 | final String? deviceID; 43 | 44 | @override 45 | List get props => [deviceID]; 46 | 47 | AppProviderState copyWith({ 48 | String? deviceID, 49 | }) { 50 | return AppProviderState( 51 | deviceID: deviceID ?? this.deviceID, 52 | ); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /lib/product/utility/validator/validator_items.dart: -------------------------------------------------------------------------------- 1 | import 'package:easy_localization/easy_localization.dart'; 2 | import 'package:kartal/kartal.dart'; 3 | import 'package:vbaseproject/product/init/language/locale_keys.g.dart'; 4 | 5 | class ValidatorItems { 6 | const ValidatorItems(this.text); 7 | 8 | static const int phoneLength = 16; 9 | 10 | final String? text; 11 | 12 | String? get validateFullName { 13 | return text.ext.isNotNullOrNoEmpty 14 | ? null 15 | : LocaleKeys.validation_fullName.tr(); 16 | } 17 | 18 | String? get validatePhoneNumber { 19 | return (text?.ext.phoneFormatValue.ext.isNotNullOrNoEmpty ?? false) && 20 | text!.length == phoneLength 21 | ? null 22 | : LocaleKeys.validation_phoneNumber.tr(); 23 | } 24 | 25 | String? get validateAddress { 26 | return text.ext.isNotNullOrNoEmpty 27 | ? null 28 | : LocaleKeys.validation_address.tr(); 29 | } 30 | 31 | String? get validatePlate { 32 | return text.ext.isNotNullOrNoEmpty 33 | ? null 34 | : LocaleKeys.validation_plate.tr(); 35 | } 36 | } 37 | 38 | class ValidateGenericItems { 39 | const ValidateGenericItems(this.item); 40 | 41 | final T? item; 42 | 43 | String? get validateDropDown { 44 | return item != null ? null : LocaleKeys.validation_needs.tr(); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /lib/product/widget/builder/responsive_builder.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | enum WindowsSize { 4 | mobile, 5 | tablet, 6 | desktop; 7 | 8 | bool get isMobile => this == WindowsSize.mobile; 9 | bool get isTablet => this == WindowsSize.tablet; 10 | bool get isDesktop => this == WindowsSize.desktop; 11 | } 12 | 13 | class ResponsiveWindowBuilder extends StatelessWidget { 14 | const ResponsiveWindowBuilder({ 15 | required this.builder, 16 | super.key, 17 | this.mobileBreakpoint = 500, 18 | this.tabletBreakpoint = 800, 19 | this.desktopBreakpoint = 1200, 20 | }); 21 | 22 | final double mobileBreakpoint; 23 | final double tabletBreakpoint; 24 | final double desktopBreakpoint; 25 | 26 | final Widget Function(WindowsSize) builder; 27 | 28 | @override 29 | Widget build(BuildContext context) { 30 | return LayoutBuilder( 31 | builder: (context, constraints) { 32 | if (constraints.maxWidth <= mobileBreakpoint) { 33 | return builder(WindowsSize.mobile); 34 | } else if (constraints.maxWidth > mobileBreakpoint && 35 | constraints.maxWidth <= tabletBreakpoint) { 36 | return builder(WindowsSize.tablet); 37 | } else if (constraints.maxWidth > tabletBreakpoint) { 38 | return builder(WindowsSize.desktop); 39 | } 40 | return builder(WindowsSize.desktop); 41 | }, 42 | ); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /lib/product/widget/button/active_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:kartal/kartal.dart'; 3 | import 'package:vbaseproject/product/items/colors_custom.dart'; 4 | import 'package:vbaseproject/product/utility/padding/page_padding.dart'; 5 | 6 | class ActiveButton extends StatelessWidget { 7 | const ActiveButton({required this.label, required this.onPressed, super.key}); 8 | final String label; 9 | final VoidCallback? onPressed; 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return ElevatedButton( 14 | onPressed: onPressed, 15 | style: ElevatedButton.styleFrom( 16 | padding: const PagePadding.generalAllNormal(), 17 | backgroundColor: ColorsCustom.sambacus, 18 | ), 19 | child: Text( 20 | label, 21 | style: context.general.textTheme.titleMedium?.copyWith( 22 | fontWeight: FontWeight.w500, 23 | color: onPressed == null 24 | ? ColorsCustom.sambacus.withOpacity(0.5) 25 | : Colors.white, 26 | ), 27 | ), 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /lib/product/widget/button/social_media_button.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: public_member_api_docs, sort_constructors_first 2 | import 'package:flutter/material.dart'; 3 | 4 | import 'package:vbaseproject/product/widget/spacer/dynamic_horizontal_spacer.dart'; 5 | 6 | class SocialMediaButton extends StatefulWidget { 7 | final IconData icon; 8 | final String title; 9 | final VoidCallback onTap; 10 | const SocialMediaButton({ 11 | required this.icon, 12 | required this.title, 13 | required this.onTap, 14 | super.key, 15 | }); 16 | 17 | @override 18 | State createState() => _SocialMediaButtonState(); 19 | } 20 | 21 | class _SocialMediaButtonState extends State { 22 | @override 23 | Widget build(BuildContext context) { 24 | return InkWell( 25 | onTap: widget.onTap, 26 | hoverColor: Colors.transparent, 27 | child: Row( 28 | mainAxisSize: MainAxisSize.min, 29 | children: [ 30 | Icon(widget.icon), 31 | const HorizontalSpace.xxxSmall(), 32 | Text(widget.title), 33 | ], 34 | ), 35 | ); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lib/product/widget/checkbox/info_checkbox.dart: -------------------------------------------------------------------------------- 1 | import 'package:easy_localization/easy_localization.dart'; 2 | import 'package:flutter/cupertino.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:vbaseproject/product/init/language/locale_keys.g.dart'; 5 | import 'package:vbaseproject/product/widget/checkbox/product_checkbox.dart'; 6 | 7 | class InfoCheckBox extends StatelessWidget { 8 | const InfoCheckBox(this.autovalidateMode, {super.key}); 9 | final AutovalidateMode? autovalidateMode; 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return ProductCheckbox( 14 | autovalidateMode: autovalidateMode, 15 | title: Text(LocaleKeys.confirmationText.tr()), 16 | onSaved: (value) {}, 17 | validator: (value) { 18 | return value != null && value == true 19 | ? null 20 | : LocaleKeys.validation_confirmationText.tr(); 21 | }, 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/product/widget/checkbox/kvkk_checkbox.dart: -------------------------------------------------------------------------------- 1 | import 'package:easy_localization/easy_localization.dart'; 2 | import 'package:flutter/cupertino.dart'; 3 | import 'package:flutter/gestures.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:kartal/kartal.dart'; 6 | import 'package:vbaseproject/product/generated/assets.gen.dart'; 7 | import 'package:vbaseproject/product/init/language/locale_keys.g.dart'; 8 | import 'package:vbaseproject/product/items/colors_custom.dart'; 9 | import 'package:vbaseproject/product/widget/checkbox/product_checkbox.dart'; 10 | import 'package:syncfusion_flutter_pdfviewer/pdfviewer.dart'; 11 | 12 | class KvkkCheckBox extends StatelessWidget { 13 | const KvkkCheckBox(this.autovalidateMode, {super.key}); 14 | final AutovalidateMode? autovalidateMode; 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return ProductCheckbox( 19 | autovalidateMode: autovalidateMode, 20 | title: RichText( 21 | text: TextSpan( 22 | children: [ 23 | TextSpan( 24 | text: LocaleKeys.kvkk.tr(), 25 | style: const TextStyle( 26 | color: ColorsCustom.sambacus, 27 | decoration: TextDecoration.underline, 28 | fontWeight: FontWeight.w600, 29 | ), 30 | recognizer: TapGestureRecognizer() 31 | ..onTap = () { 32 | _navigate(context); 33 | }, 34 | ), 35 | TextSpan( 36 | text: LocaleKeys.kvkkReadApproved.tr(), 37 | style: context.general.textTheme.bodySmall?.copyWith( 38 | color: Colors.grey, 39 | fontWeight: FontWeight.w600, 40 | ), 41 | ), 42 | ], 43 | ), 44 | ), 45 | onSaved: (value) {}, 46 | validator: (value) { 47 | return value != null && value == true 48 | ? null 49 | : LocaleKeys.validation_kvkk.tr(); 50 | }, 51 | ); 52 | } 53 | 54 | void _navigate(BuildContext context) { 55 | Navigator.push( 56 | context, 57 | CupertinoPageRoute( 58 | fullscreenDialog: true, 59 | builder: (BuildContext context) { 60 | return Scaffold( 61 | extendBodyBehindAppBar: true, 62 | appBar: AppBar( 63 | backgroundColor: Colors.transparent, 64 | elevation: 0, 65 | iconTheme: const IconThemeData(color: Colors.black), 66 | ), 67 | body: SfPdfViewer.asset(Assets.docs.kvkk), 68 | ); 69 | }, 70 | ), 71 | ); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /lib/product/widget/checkbox/product_checkbox.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:vbaseproject/product/items/colors_custom.dart'; 3 | import 'package:vbaseproject/product/utility/constants/app_constants.dart'; 4 | 5 | class ProductCheckbox extends FormField { 6 | ProductCheckbox({ 7 | required Widget title, 8 | required FormFieldSetter super.onSaved, 9 | required FormFieldValidator super.validator, 10 | super.key, 11 | super.autovalidateMode, 12 | bool super.initialValue = false, 13 | }) : super( 14 | builder: (FormFieldState state) { 15 | return ListTile( 16 | leading: Checkbox( 17 | activeColor: ColorsCustom.sambacus, 18 | value: state.value, 19 | onChanged: state.didChange, 20 | ), 21 | dense: state.hasError, 22 | horizontalTitleGap: AppConstants.kZero.toDouble(), 23 | title: title, 24 | subtitle: state.hasError 25 | ? Builder( 26 | builder: (BuildContext context) => Text( 27 | state.errorText ?? 'Base error', 28 | style: TextStyle( 29 | color: Theme.of(context).colorScheme.error, 30 | ), 31 | ), 32 | ) 33 | : null, 34 | ); 35 | }, 36 | ); 37 | } 38 | -------------------------------------------------------------------------------- /lib/product/widget/combo_box/labeled_product_combo_box.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:kartal/kartal.dart'; 3 | import 'package:vbaseproject/product/utility/constants/string_constants.dart'; 4 | import 'package:vbaseproject/product/widget/combo_box/product_combo_box.dart'; 5 | 6 | class LabeledProductComboBox 7 | extends StatelessWidget { 8 | const LabeledProductComboBox({ 9 | required this.labelText, 10 | required this.items, 11 | required this.onChanged, 12 | required this.hintText, 13 | required this.validator, 14 | super.key, 15 | this.isRequired = true, 16 | this.initialItem, 17 | }); 18 | final bool isRequired; 19 | final String labelText; 20 | final List items; 21 | final ValueChanged onChanged; 22 | final String hintText; 23 | final String? Function(T?) validator; 24 | final T? initialItem; 25 | 26 | @override 27 | Widget build(BuildContext context) { 28 | return Column( 29 | crossAxisAlignment: CrossAxisAlignment.start, 30 | children: [ 31 | _Label(labelText: labelText, isRequired: isRequired), 32 | context.sized.emptySizedHeightBoxLow, 33 | ProductComboBox( 34 | initialItem: initialItem, 35 | validator: validator, 36 | hintText: hintText, 37 | items: items, 38 | onChanged: onChanged, 39 | ), 40 | ], 41 | ); 42 | } 43 | } 44 | 45 | class _Label extends StatelessWidget { 46 | const _Label({ 47 | required this.labelText, 48 | required this.isRequired, 49 | }); 50 | 51 | final String labelText; 52 | final bool isRequired; 53 | 54 | @override 55 | Widget build(BuildContext context) { 56 | return RichText( 57 | text: TextSpan( 58 | text: '$labelText ', 59 | style: context.general.textTheme.labelLarge?.copyWith( 60 | color: Colors.black, 61 | ), 62 | children: [ 63 | TextSpan( 64 | text: isRequired ? StringConstants.asteriks : '', 65 | style: context.general.textTheme.bodyLarge?.copyWith( 66 | color: Colors.red, 67 | ), 68 | ), 69 | ], 70 | ), 71 | ); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /lib/product/widget/combo_box/product_combo_box.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: avoid_redundant_argument_values 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:kartal/kartal.dart'; 5 | import 'package:vbaseproject/product/items/colors_custom.dart'; 6 | import 'package:vbaseproject/product/utility/padding/page_padding.dart'; 7 | import 'package:vbaseproject/product/utility/size/widget_size.dart'; 8 | 9 | class ProductComboBox extends StatefulWidget { 10 | const ProductComboBox({ 11 | required this.items, 12 | required this.onChanged, 13 | required this.hintText, 14 | required this.validator, 15 | super.key, 16 | this.initialItem, 17 | }); 18 | final List items; 19 | 20 | final ValueChanged onChanged; 21 | final String hintText; 22 | final String? Function(T?) validator; 23 | final T? initialItem; 24 | 25 | @override 26 | State> createState() => _ProductComboBoxState(); 27 | } 28 | 29 | class _ProductComboBoxState 30 | extends State> { 31 | T? selectedItem; 32 | 33 | @override 34 | void initState() { 35 | super.initState(); 36 | selectedItem = widget.initialItem; 37 | } 38 | 39 | @override 40 | Widget build(BuildContext context) { 41 | return DecoratedBox( 42 | decoration: BoxDecoration( 43 | border: Border.all( 44 | color: ColorsCustom.lightGray, 45 | ), 46 | borderRadius: 47 | const BorderRadius.all(Radius.circular(WidgetSizes.spacingXxs)), 48 | ), 49 | child: Padding( 50 | padding: const PagePadding.allVeryLow(), 51 | child: DropdownButtonHideUnderline( 52 | child: DropdownButtonFormField( 53 | decoration: const InputDecoration.collapsed(hintText: ''), 54 | value: selectedItem, 55 | hint: Text(widget.hintText), 56 | isExpanded: true, 57 | borderRadius: context.border.lowBorderRadius, 58 | validator: widget.validator, 59 | items: 60 | widget.items.map((e) => _ProductDropdownItem(item: e)).toList(), 61 | onChanged: (value) { 62 | selectItem(value); 63 | widget.onChanged(value); 64 | }, 65 | ), 66 | ), 67 | ), 68 | ); 69 | } 70 | 71 | void selectItem(T? value) { 72 | setState(() { 73 | selectedItem = value; 74 | }); 75 | } 76 | } 77 | 78 | class _ProductDropdownItem 79 | extends DropdownMenuItem { 80 | _ProductDropdownItem({required T item}) 81 | : super( 82 | child: Padding( 83 | padding: const PagePadding.horizontalVeryLowSymmetric(), 84 | child: Text(item.name ?? ''), 85 | ), 86 | value: item, 87 | ); 88 | } 89 | 90 | mixin ProductDropDownModel { 91 | String? get name; 92 | } 93 | -------------------------------------------------------------------------------- /lib/product/widget/custom_single_child_scroll.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:kartal/kartal.dart'; 3 | 4 | class CustomSingleChildScroll extends StatelessWidget { 5 | const CustomSingleChildScroll({required this.child, super.key}); 6 | final Widget child; 7 | @override 8 | Widget build(BuildContext context) { 9 | return Padding( 10 | padding: EdgeInsets.only(bottom: context.general.keyboardPadding), 11 | child: SingleChildScrollView( 12 | physics: const ClampingScrollPhysics(), 13 | child: child, 14 | ), 15 | ); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/product/widget/padding/padding_normal_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:responsive_builder/responsive_builder.dart'; 3 | import 'package:vbaseproject/product/utility/padding/page_padding.dart'; 4 | 5 | class PaddingNormalButton extends StatelessWidget { 6 | const PaddingNormalButton({ 7 | required this.child, 8 | super.key, 9 | }); 10 | final Widget child; 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return Padding( 15 | padding: getValueForScreenType( 16 | context: context, 17 | mobile: EdgeInsets.zero, 18 | tablet: const PagePadding.all(), 19 | desktop: const PagePadding.all(), 20 | ), 21 | child: child, 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/product/widget/spacer/dynamic_horizontal_spacer.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:kartal/kartal.dart'; 3 | 4 | import 'package:vbaseproject/product/utility/size/widget_size.dart'; 5 | 6 | /// Returns a [SizedBox] with the given [width]. 7 | class HorizontalSpace extends SizedBox { 8 | const HorizontalSpace({required this.width, super.key}); 9 | 10 | /// Returns a [SizedBox] with the 2px width. 11 | const HorizontalSpace.xxxSmall({Key? key}) 12 | : this(key: key, width: WidgetSizes.spacingXSS); 13 | 14 | /// Returns a [SizedBox] with the 8px width. 15 | const HorizontalSpace.xxSmall({Key? key}) 16 | : this(key: key, width: WidgetSizes.spacingXs); 17 | 18 | /// Returns a [SizedBox] with the 12px width. 19 | const HorizontalSpace.xSmall({Key? key}) 20 | : this(key: key, width: WidgetSizes.spacingS); 21 | 22 | /// Returns a [SizedBox] with the 16px width. 23 | const HorizontalSpace.standard({Key? key}) 24 | : this(key: key, width: WidgetSizes.spacingM); 25 | 26 | /// Returns a [SizedBox] with the 20px width. 27 | const HorizontalSpace.small({Key? key}) 28 | : this(key: key, width: WidgetSizes.spacingL); 29 | 30 | /// Returns a [SizedBox] with the 40px width. 31 | const HorizontalSpace.medium({Key? key}) 32 | : this(key: key, width: WidgetSizes.spacingXxl4); 33 | 34 | /// Returns a [SizedBox] with the 60px width. 35 | const HorizontalSpace.large({Key? key}) 36 | : this(key: key, width: WidgetSizes.spacingXxl8); 37 | 38 | /// Returns a [SizedBox] with the 100px width. 39 | const HorizontalSpace.xLarge({Key? key}) 40 | : this(key: key, width: WidgetSizes.spacingXxl12); 41 | 42 | /// Returns a [SizedBox] with the given [width] percentage of the screen width. 43 | HorizontalSpace.withPercentage({ 44 | required double percentage, 45 | required BuildContext context, 46 | Key? key, 47 | }) : this( 48 | key: key, 49 | width: (percentage / 100) * context.width, 50 | ); 51 | @override 52 | final double width; 53 | } 54 | -------------------------------------------------------------------------------- /lib/product/widget/spacer/dynamic_vertical_spacer.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: overridden_fields 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:kartal/kartal.dart'; 5 | import 'package:vbaseproject/product/utility/size/widget_size.dart'; 6 | 7 | class VerticalSpace extends SizedBox { 8 | const VerticalSpace({required this.height, super.key}); 9 | 10 | /// Returns a [SizedBox] with the given [height] percentage of the screen width. 11 | VerticalSpace.withPercentage({ 12 | required double percentage, 13 | required BuildContext context, 14 | Key? key, 15 | }) : this( 16 | key: key, 17 | height: context.sized.dynamicHeight(percentage), 18 | ); 19 | 20 | /// Returns a [SizedBox] with the 100px height. 21 | const VerticalSpace.xLarge({Key? key}) 22 | : this(key: key, height: WidgetSizes.spacingXxl12); 23 | 24 | /// Returns a [SizedBox] with the 60px height. 25 | const VerticalSpace.large({Key? key}) 26 | : this(key: key, height: WidgetSizes.spacingXxl8); 27 | 28 | /// Returns a [SizedBox] with the 40px height. 29 | const VerticalSpace.medium({Key? key}) 30 | : this(key: key, height: WidgetSizes.spacingXxl4); 31 | 32 | /// Returns a [SizedBox] with the 20px height. 33 | const VerticalSpace.small({Key? key}) 34 | : this(key: key, height: WidgetSizes.spacingL); 35 | 36 | /// Returns a [SizedBox] with the 16px height. 37 | const VerticalSpace.standard({Key? key}) 38 | : this(key: key, height: WidgetSizes.spacingM); 39 | 40 | /// Returns a [SizedBox] with the 12px height. 41 | const VerticalSpace.xSmall({Key? key}) 42 | : this(key: key, height: WidgetSizes.spacingS); 43 | 44 | /// Returns a [SizedBox] with the 8px width. 45 | const VerticalSpace.xxSmall({Key? key}) 46 | : this(key: key, height: WidgetSizes.spacingXs); 47 | @override 48 | final double height; 49 | } 50 | -------------------------------------------------------------------------------- /lib/product/widget/text/button_large_text.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:kartal/kartal.dart'; 3 | import 'package:responsive_builder/responsive_builder.dart'; 4 | 5 | import 'package:vbaseproject/product/items/colors_custom.dart'; 6 | 7 | class ButtonLargeText extends StatelessWidget { 8 | const ButtonLargeText({ 9 | required this.title, 10 | super.key, 11 | }); 12 | final String title; 13 | @override 14 | Widget build(BuildContext context) { 15 | return Text( 16 | title, 17 | textAlign: TextAlign.center, 18 | style: getValueForScreenType( 19 | context: context, 20 | mobile: context.general.textTheme.titleLarge, 21 | tablet: context.general.textTheme.headlineLarge, 22 | desktop: context.general.textTheme.headlineLarge, 23 | )?.copyWith( 24 | fontWeight: FontWeight.bold, 25 | color: ColorsCustom.white, 26 | ), 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/product/widget/text/button_normal_text.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:kartal/kartal.dart'; 3 | import 'package:responsive_builder/responsive_builder.dart'; 4 | 5 | import 'package:vbaseproject/product/items/colors_custom.dart'; 6 | 7 | class ButtonNormalText extends StatelessWidget { 8 | const ButtonNormalText({ 9 | required this.title, 10 | super.key, 11 | }); 12 | final String title; 13 | @override 14 | Widget build(BuildContext context) { 15 | return Text( 16 | title, 17 | textAlign: TextAlign.center, 18 | style: getValueForScreenType( 19 | context: context, 20 | mobile: context.general.textTheme.titleMedium, 21 | tablet: context.general.textTheme.titleMedium, 22 | desktop: context.general.textTheme.titleLarge, 23 | )?.copyWith( 24 | fontWeight: FontWeight.bold, 25 | color: ColorsCustom.sambacus, 26 | ), 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/product/widget/text/index.dart: -------------------------------------------------------------------------------- 1 | export 'button_large_text.dart'; 2 | export 'button_normal_text.dart'; 3 | -------------------------------------------------------------------------------- /lib/product/widget/text_field/index.dart: -------------------------------------------------------------------------------- 1 | export 'labeled_product_textfield.dart'; 2 | export 'product_textfield.dart'; 3 | -------------------------------------------------------------------------------- /lib/product/widget/text_field/labeled_product_textfield.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/services.dart'; 3 | import 'package:kartal/kartal.dart'; 4 | import 'package:vbaseproject/product/utility/constants/string_constants.dart'; 5 | import 'package:vbaseproject/product/widget/text_field/product_textfield.dart'; 6 | 7 | class LabeledProductTextField extends StatelessWidget { 8 | const LabeledProductTextField({ 9 | required this.validator, 10 | required this.labelText, 11 | super.key, 12 | this.isRequired = true, 13 | this.isMultiline = false, 14 | this.formatters, 15 | this.hintText, 16 | this.keyboardType, 17 | this.controller, 18 | }); 19 | final String labelText; 20 | final bool isRequired; 21 | final bool isMultiline; 22 | final String? Function(String?) validator; 23 | final List? formatters; 24 | final String? hintText; 25 | final TextInputType? keyboardType; 26 | final TextEditingController? controller; 27 | 28 | @override 29 | Widget build(BuildContext context) { 30 | return Column( 31 | crossAxisAlignment: CrossAxisAlignment.start, 32 | children: [ 33 | _Label(labelText: labelText, isRequired: isRequired), 34 | context.sized.emptySizedHeightBoxLow, 35 | ProductTextField( 36 | hintText: hintText, 37 | formatters: formatters, 38 | isMultiline: isMultiline, 39 | validator: validator, 40 | keyboardType: keyboardType ?? TextInputType.text, 41 | controller: controller, 42 | ), 43 | ], 44 | ); 45 | } 46 | } 47 | 48 | class _Label extends StatelessWidget { 49 | const _Label({ 50 | required this.labelText, 51 | required this.isRequired, 52 | }); 53 | 54 | final String labelText; 55 | final bool isRequired; 56 | 57 | @override 58 | Widget build(BuildContext context) { 59 | return RichText( 60 | text: TextSpan( 61 | text: '$labelText ', 62 | style: context.general.textTheme.labelLarge?.copyWith( 63 | color: Colors.black, 64 | ), 65 | children: [ 66 | TextSpan( 67 | text: isRequired ? StringConstants.asteriks : '', 68 | style: context.general.textTheme.bodyLarge?.copyWith( 69 | color: Colors.red, 70 | ), 71 | ), 72 | ], 73 | ), 74 | ); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /lib/product/widget/text_field/product_textfield.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/services.dart'; 3 | import 'package:kartal/kartal.dart'; 4 | import 'package:vbaseproject/product/decoration/product_text_field_decoration.dart'; 5 | import 'package:vbaseproject/product/utility/constants/app_constants.dart'; 6 | 7 | class ProductTextField extends StatelessWidget { 8 | const ProductTextField({ 9 | required this.validator, 10 | super.key, 11 | this.isMultiline = false, 12 | this.formatters, 13 | this.hintText, 14 | this.keyboardType, 15 | this.controller, 16 | }); 17 | final bool isMultiline; 18 | final String? Function(String?) validator; 19 | final List? formatters; 20 | final String? hintText; 21 | final TextInputType? keyboardType; 22 | final TextEditingController? controller; 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | return TextFormField( 27 | controller: controller, 28 | inputFormatters: formatters, 29 | keyboardType: keyboardType, 30 | maxLines: isMultiline ? AppConstants.kFour : AppConstants.kOne, 31 | cursorColor: context.colorScheme.onSurface, 32 | decoration: ProductTextFieldDecoration(context, hintText), 33 | validator: validator, 34 | ); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /license.md: -------------------------------------------------------------------------------- 1 | Copyright (c) [2023] [Veli Bacik] 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /linux/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Project-level configuration. 2 | cmake_minimum_required(VERSION 3.10) 3 | project(runner LANGUAGES CXX) 4 | 5 | # The name of the executable created for the application. Change this to change 6 | # the on-disk name of your application. 7 | set(BINARY_NAME "vbaseproject") 8 | # The unique GTK application identifier for this application. See: 9 | # https://wiki.gnome.org/HowDoI/ChooseApplicationID 10 | set(APPLICATION_ID "com.example.vbaseproject") 11 | 12 | # Explicitly opt in to modern CMake behaviors to avoid warnings with recent 13 | # versions of CMake. 14 | cmake_policy(SET CMP0063 NEW) 15 | 16 | # Load bundled libraries from the lib/ directory relative to the binary. 17 | set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") 18 | 19 | # Root filesystem for cross-building. 20 | if(FLUTTER_TARGET_PLATFORM_SYSROOT) 21 | set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT}) 22 | set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) 23 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 24 | set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) 25 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 26 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 27 | endif() 28 | 29 | # Define build configuration options. 30 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 31 | set(CMAKE_BUILD_TYPE "Debug" CACHE 32 | STRING "Flutter build mode" FORCE) 33 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS 34 | "Debug" "Profile" "Release") 35 | endif() 36 | 37 | # Compilation settings that should be applied to most targets. 38 | # 39 | # Be cautious about adding new options here, as plugins use this function by 40 | # default. In most cases, you should add new options to specific targets instead 41 | # of modifying this function. 42 | function(APPLY_STANDARD_SETTINGS TARGET) 43 | target_compile_features(${TARGET} PUBLIC cxx_std_14) 44 | target_compile_options(${TARGET} PRIVATE -Wall -Werror) 45 | target_compile_options(${TARGET} PRIVATE "$<$>:-O3>") 46 | target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>") 47 | endfunction() 48 | 49 | # Flutter library and tool build rules. 50 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") 51 | add_subdirectory(${FLUTTER_MANAGED_DIR}) 52 | 53 | # System-level dependencies. 54 | find_package(PkgConfig REQUIRED) 55 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) 56 | 57 | add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") 58 | 59 | # Define the application target. To change its name, change BINARY_NAME above, 60 | # not the value here, or `flutter run` will no longer work. 61 | # 62 | # Any new source files that you add to the application should be added here. 63 | add_executable(${BINARY_NAME} 64 | "main.cc" 65 | "my_application.cc" 66 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 67 | ) 68 | 69 | # Apply the standard set of build settings. This can be removed for applications 70 | # that need different build settings. 71 | apply_standard_settings(${BINARY_NAME}) 72 | 73 | # Add dependency libraries. Add any application-specific dependencies here. 74 | target_link_libraries(${BINARY_NAME} PRIVATE flutter) 75 | target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) 76 | 77 | # Run the Flutter tool portions of the build. This must not be removed. 78 | add_dependencies(${BINARY_NAME} flutter_assemble) 79 | 80 | # Only the install-generated bundle's copy of the executable will launch 81 | # correctly, since the resources must in the right relative locations. To avoid 82 | # people trying to run the unbundled copy, put it in a subdirectory instead of 83 | # the default top-level location. 84 | set_target_properties(${BINARY_NAME} 85 | PROPERTIES 86 | RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run" 87 | ) 88 | 89 | # Generated plugin build rules, which manage building the plugins and adding 90 | # them to the application. 91 | include(flutter/generated_plugins.cmake) 92 | 93 | 94 | # === Installation === 95 | # By default, "installing" just makes a relocatable bundle in the build 96 | # directory. 97 | set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") 98 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 99 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) 100 | endif() 101 | 102 | # Start with a clean build bundle directory every time. 103 | install(CODE " 104 | file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") 105 | " COMPONENT Runtime) 106 | 107 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") 108 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") 109 | 110 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" 111 | COMPONENT Runtime) 112 | 113 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 114 | COMPONENT Runtime) 115 | 116 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 117 | COMPONENT Runtime) 118 | 119 | foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) 120 | install(FILES "${bundled_library}" 121 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 122 | COMPONENT Runtime) 123 | endforeach(bundled_library) 124 | 125 | # Fully re-copy the assets directory on each build to avoid having stale files 126 | # from a previous install. 127 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets") 128 | install(CODE " 129 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") 130 | " COMPONENT Runtime) 131 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" 132 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) 133 | 134 | # Install the AOT library on non-Debug builds only. 135 | if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") 136 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 137 | COMPONENT Runtime) 138 | endif() 139 | -------------------------------------------------------------------------------- /linux/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file controls Flutter-level build steps. It should not be edited. 2 | cmake_minimum_required(VERSION 3.10) 3 | 4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 5 | 6 | # Configuration provided via flutter tool. 7 | include(${EPHEMERAL_DIR}/generated_config.cmake) 8 | 9 | # TODO: Move the rest of this into files in ephemeral. See 10 | # https://github.com/flutter/flutter/issues/57146. 11 | 12 | # Serves the same purpose as list(TRANSFORM ... PREPEND ...), 13 | # which isn't available in 3.10. 14 | function(list_prepend LIST_NAME PREFIX) 15 | set(NEW_LIST "") 16 | foreach(element ${${LIST_NAME}}) 17 | list(APPEND NEW_LIST "${PREFIX}${element}") 18 | endforeach(element) 19 | set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) 20 | endfunction() 21 | 22 | # === Flutter Library === 23 | # System-level dependencies. 24 | find_package(PkgConfig REQUIRED) 25 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) 26 | pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) 27 | pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) 28 | 29 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") 30 | 31 | # Published to parent scope for install step. 32 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 33 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 34 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 35 | set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) 36 | 37 | list(APPEND FLUTTER_LIBRARY_HEADERS 38 | "fl_basic_message_channel.h" 39 | "fl_binary_codec.h" 40 | "fl_binary_messenger.h" 41 | "fl_dart_project.h" 42 | "fl_engine.h" 43 | "fl_json_message_codec.h" 44 | "fl_json_method_codec.h" 45 | "fl_message_codec.h" 46 | "fl_method_call.h" 47 | "fl_method_channel.h" 48 | "fl_method_codec.h" 49 | "fl_method_response.h" 50 | "fl_plugin_registrar.h" 51 | "fl_plugin_registry.h" 52 | "fl_standard_message_codec.h" 53 | "fl_standard_method_codec.h" 54 | "fl_string_codec.h" 55 | "fl_value.h" 56 | "fl_view.h" 57 | "flutter_linux.h" 58 | ) 59 | list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") 60 | add_library(flutter INTERFACE) 61 | target_include_directories(flutter INTERFACE 62 | "${EPHEMERAL_DIR}" 63 | ) 64 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") 65 | target_link_libraries(flutter INTERFACE 66 | PkgConfig::GTK 67 | PkgConfig::GLIB 68 | PkgConfig::GIO 69 | ) 70 | add_dependencies(flutter flutter_assemble) 71 | 72 | # === Flutter tool backend === 73 | # _phony_ is a non-existent file to force this command to run every time, 74 | # since currently there's no way to get a full input/output list from the 75 | # flutter tool. 76 | add_custom_command( 77 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 78 | ${CMAKE_CURRENT_BINARY_DIR}/_phony_ 79 | COMMAND ${CMAKE_COMMAND} -E env 80 | ${FLUTTER_TOOL_ENVIRONMENT} 81 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" 82 | ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} 83 | VERBATIM 84 | ) 85 | add_custom_target(flutter_assemble DEPENDS 86 | "${FLUTTER_LIBRARY}" 87 | ${FLUTTER_LIBRARY_HEADERS} 88 | ) 89 | -------------------------------------------------------------------------------- /linux/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 | 11 | void fl_register_plugins(FlPluginRegistry* registry) { 12 | g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = 13 | fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); 14 | url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); 15 | } 16 | -------------------------------------------------------------------------------- /linux/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 fl_register_plugins(FlPluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | url_launcher_linux 7 | ) 8 | 9 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 10 | ) 11 | 12 | set(PLUGIN_BUNDLED_LIBRARIES) 13 | 14 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 15 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 16 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 19 | endforeach(plugin) 20 | 21 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 22 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) 23 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 24 | endforeach(ffi_plugin) 25 | -------------------------------------------------------------------------------- /linux/main.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | int main(int argc, char** argv) { 4 | g_autoptr(MyApplication) app = my_application_new(); 5 | return g_application_run(G_APPLICATION(app), argc, argv); 6 | } 7 | -------------------------------------------------------------------------------- /linux/my_application.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | #include 4 | #ifdef GDK_WINDOWING_X11 5 | #include 6 | #endif 7 | 8 | #include "flutter/generated_plugin_registrant.h" 9 | 10 | struct _MyApplication { 11 | GtkApplication parent_instance; 12 | char** dart_entrypoint_arguments; 13 | }; 14 | 15 | G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) 16 | 17 | // Implements GApplication::activate. 18 | static void my_application_activate(GApplication* application) { 19 | MyApplication* self = MY_APPLICATION(application); 20 | GtkWindow* window = 21 | GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); 22 | 23 | // Use a header bar when running in GNOME as this is the common style used 24 | // by applications and is the setup most users will be using (e.g. Ubuntu 25 | // desktop). 26 | // If running on X and not using GNOME then just use a traditional title bar 27 | // in case the window manager does more exotic layout, e.g. tiling. 28 | // If running on Wayland assume the header bar will work (may need changing 29 | // if future cases occur). 30 | gboolean use_header_bar = TRUE; 31 | #ifdef GDK_WINDOWING_X11 32 | GdkScreen* screen = gtk_window_get_screen(window); 33 | if (GDK_IS_X11_SCREEN(screen)) { 34 | const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); 35 | if (g_strcmp0(wm_name, "GNOME Shell") != 0) { 36 | use_header_bar = FALSE; 37 | } 38 | } 39 | #endif 40 | if (use_header_bar) { 41 | GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); 42 | gtk_widget_show(GTK_WIDGET(header_bar)); 43 | gtk_header_bar_set_title(header_bar, "vbaseproject"); 44 | gtk_header_bar_set_show_close_button(header_bar, TRUE); 45 | gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); 46 | } else { 47 | gtk_window_set_title(window, "vbaseproject"); 48 | } 49 | 50 | gtk_window_set_default_size(window, 1280, 720); 51 | gtk_widget_show(GTK_WIDGET(window)); 52 | 53 | g_autoptr(FlDartProject) project = fl_dart_project_new(); 54 | fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); 55 | 56 | FlView* view = fl_view_new(project); 57 | gtk_widget_show(GTK_WIDGET(view)); 58 | gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); 59 | 60 | fl_register_plugins(FL_PLUGIN_REGISTRY(view)); 61 | 62 | gtk_widget_grab_focus(GTK_WIDGET(view)); 63 | } 64 | 65 | // Implements GApplication::local_command_line. 66 | static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) { 67 | MyApplication* self = MY_APPLICATION(application); 68 | // Strip out the first argument as it is the binary name. 69 | self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); 70 | 71 | g_autoptr(GError) error = nullptr; 72 | if (!g_application_register(application, nullptr, &error)) { 73 | g_warning("Failed to register: %s", error->message); 74 | *exit_status = 1; 75 | return TRUE; 76 | } 77 | 78 | g_application_activate(application); 79 | *exit_status = 0; 80 | 81 | return TRUE; 82 | } 83 | 84 | // Implements GObject::dispose. 85 | static void my_application_dispose(GObject* object) { 86 | MyApplication* self = MY_APPLICATION(object); 87 | g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); 88 | G_OBJECT_CLASS(my_application_parent_class)->dispose(object); 89 | } 90 | 91 | static void my_application_class_init(MyApplicationClass* klass) { 92 | G_APPLICATION_CLASS(klass)->activate = my_application_activate; 93 | G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; 94 | G_OBJECT_CLASS(klass)->dispose = my_application_dispose; 95 | } 96 | 97 | static void my_application_init(MyApplication* self) {} 98 | 99 | MyApplication* my_application_new() { 100 | return MY_APPLICATION(g_object_new(my_application_get_type(), 101 | "application-id", APPLICATION_ID, 102 | "flags", G_APPLICATION_NON_UNIQUE, 103 | nullptr)); 104 | } 105 | -------------------------------------------------------------------------------- /linux/my_application.h: -------------------------------------------------------------------------------- 1 | #ifndef FLUTTER_MY_APPLICATION_H_ 2 | #define FLUTTER_MY_APPLICATION_H_ 3 | 4 | #include 5 | 6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, 7 | GtkApplication) 8 | 9 | /** 10 | * my_application_new: 11 | * 12 | * Creates a new Flutter-based application. 13 | * 14 | * Returns: a new #MyApplication. 15 | */ 16 | MyApplication* my_application_new(); 17 | 18 | #endif // FLUTTER_MY_APPLICATION_H_ 19 | -------------------------------------------------------------------------------- /macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /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/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | import cloud_firestore 9 | import device_info_plus 10 | import firebase_core 11 | import package_info_plus 12 | import path_provider_foundation 13 | import share_plus 14 | import shared_preferences_foundation 15 | import syncfusion_pdfviewer_macos 16 | import url_launcher_macos 17 | 18 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 19 | FLTFirebaseFirestorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseFirestorePlugin")) 20 | DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) 21 | FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) 22 | FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin")) 23 | PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) 24 | SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin")) 25 | SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) 26 | SyncfusionFlutterPdfViewerPlugin.register(with: registry.registrar(forPlugin: "SyncfusionFlutterPdfViewerPlugin")) 27 | UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) 28 | } 29 | -------------------------------------------------------------------------------- /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 | end 35 | 36 | post_install do |installer| 37 | installer.pods_project.targets.each do |target| 38 | flutter_additional_macos_build_settings(target) 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "app_icon_16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "app_icon_32.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "app_icon_32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "app_icon_64.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "app_icon_128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "app_icon_256.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "app_icon_256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "app_icon_512.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "app_icon_512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "app_icon_1024.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /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 = vbaseproject 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.vbaseproject 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2023 com.example. All rights reserved. 15 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /macos/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | $(PRODUCT_COPYRIGHT) 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController.init() 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 | -------------------------------------------------------------------------------- /macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/firebase_app_id_file.json: -------------------------------------------------------------------------------- 1 | { 2 | "file_generated_by": "FlutterFire CLI", 3 | "purpose": "FirebaseAppID & ProjectID for this Firebase app in this directory", 4 | "GOOGLE_APP_ID": "1:586124679457:ios:1e992f93eb3ecd58fac660", 5 | "FIREBASE_PROJECT_ID": "quickstart-1568413054322", 6 | "GCM_SENDER_ID": "586124679457" 7 | } -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: vbaseproject 2 | description: A new Flutter project. 3 | publish_to: "none" # Remove this line if you wish to publish to pub.dev 4 | 5 | version: 1.0.0+3 6 | 7 | environment: 8 | sdk: ">=3.0.0 <4.0.0" 9 | 10 | dependencies: 11 | flutter: 12 | sdk: flutter 13 | 14 | cloud_firestore: ^4.4.2 15 | cupertino_icons: ^1.0.2 16 | easy_localization: ^3.0.1 17 | equatable: ^2.0.5 18 | firebase_core: ^2.6.1 19 | flutter_riverpod: ^2.1.3 20 | font_awesome_flutter: ^10.3.0 21 | 22 | json_annotation: ^4.8.0 23 | kartal: ^3.4.1 24 | responsive_builder: ^0.7.0 25 | responsive_framework: ^1.1.0 26 | syncfusion_flutter_pdfviewer: ^22.2.11 27 | textfield_tags: ^2.0.2 28 | webview_flutter: ^4.0.2 29 | 30 | flutter_icons: 31 | android: "launcher_icon" 32 | ios: true 33 | remove_alpha_ios: true 34 | image_path: "assets/app/app_icon.jpg" 35 | 36 | dev_dependencies: 37 | build_runner: ^2.3.3 38 | flutter_gen_runner: ^5.2.0 39 | flutter_launcher_icons: ^0.13.1 40 | flutter_test: 41 | sdk: flutter 42 | logger: ^2.0.1 43 | json_serializable: ^6.6.1 44 | very_good_analysis: ^5.1.0 45 | 46 | flutter_gen: 47 | output: lib/product/generated/ 48 | 49 | flutter: 50 | uses-material-design: true 51 | 52 | assets: 53 | - assets/translations/ 54 | - assets/icons/ 55 | - assets/docs/ 56 | -------------------------------------------------------------------------------- /scripts/andorid_build.sh: -------------------------------------------------------------------------------- 1 | if [ $3 == "bundle" ] 2 | then 3 | flutter build appbundle --build-name=$1 --build-number=$2 4 | open build/app/outputs/bundle/release 5 | else 6 | flutter build apk --build-name=$1 --build-number=$2 7 | open build/app/outputs/flutter-apk 8 | fi 9 | 10 | 11 | # gradle ./gradlew signingReport 12 | -------------------------------------------------------------------------------- /scripts/build.sh: -------------------------------------------------------------------------------- 1 | if [ "$1" = "force" ] 2 | then 3 | flutter packages pub run build_runner build --delete-conflicting-outputs 4 | else 5 | flutter packages pub run build_runner build 6 | fi 7 | -------------------------------------------------------------------------------- /scripts/deep_clean.sh: -------------------------------------------------------------------------------- 1 | #rm -rf ~/Library/Developer/Xcode/DerivedData/* 2 | #rm -rf ~/Library/Caches/CocoaPods 3 | flutter clean 4 | rm pubspec.lock 5 | cd ios 6 | rm -rf Pods 7 | rm Podfile.lock 8 | pod deintegrate 9 | flutter pub get 10 | pod setup 11 | pod install 12 | cd .. 13 | #flutter build ios 14 | #flutter build appbundle 15 | -------------------------------------------------------------------------------- /scripts/icon.sh: -------------------------------------------------------------------------------- 1 | flutter pub run flutter_launcher_icons:main 2 | -------------------------------------------------------------------------------- /scripts/install-arm.sh: -------------------------------------------------------------------------------- 1 | #This script was created for Apple M1 Silicon Chip 2 | #arch -x86_64 sudo gem install ffi #Option 1 3 | sudo arch -x86_64 gem install ffi #Option 2 -------------------------------------------------------------------------------- /scripts/lang.sh: -------------------------------------------------------------------------------- 1 | flutter pub run easy_localization:generate -O lib/product/init/language -f keys -o locale_keys.g.dart --source-dir assets/translations 2 | -------------------------------------------------------------------------------- /scripts/pod-install-arm.sh: -------------------------------------------------------------------------------- 1 | cd ios 2 | arch -x86_64 pod install 3 | cd .. -------------------------------------------------------------------------------- /scripts/pod-update-arm.sh: -------------------------------------------------------------------------------- 1 | arch -x86_64 pod update -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility in the flutter_test package. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:vbaseproject/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(const MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /web/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/web/favicon.ico -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/web/favicon.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/web/icons/Icon-512.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 11 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | SESİNİDUYDUM 46 | 47 | 48 | 52 | 53 | 54 | 55 | 97 | 98 | 99 |
100 |
101 |
102 | 103 | 107 | 108 | 109 | 127 | 128 | 129 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vbaseproject", 3 | "short_name": "vbaseproject", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 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 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /windows/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Project-level configuration. 2 | cmake_minimum_required(VERSION 3.14) 3 | project(vbaseproject LANGUAGES CXX) 4 | 5 | # The name of the executable created for the application. Change this to change 6 | # the on-disk name of your application. 7 | set(BINARY_NAME "vbaseproject") 8 | 9 | # Explicitly opt in to modern CMake behaviors to avoid warnings with recent 10 | # versions of CMake. 11 | cmake_policy(SET CMP0063 NEW) 12 | 13 | # Define build configuration option. 14 | get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) 15 | if(IS_MULTICONFIG) 16 | set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" 17 | CACHE STRING "" FORCE) 18 | else() 19 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 20 | set(CMAKE_BUILD_TYPE "Debug" CACHE 21 | STRING "Flutter build mode" FORCE) 22 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS 23 | "Debug" "Profile" "Release") 24 | endif() 25 | endif() 26 | # Define settings for the Profile build mode. 27 | set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") 28 | set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") 29 | set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") 30 | set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") 31 | 32 | # Use Unicode for all projects. 33 | add_definitions(-DUNICODE -D_UNICODE) 34 | 35 | # Compilation settings that should be applied to most targets. 36 | # 37 | # Be cautious about adding new options here, as plugins use this function by 38 | # default. In most cases, you should add new options to specific targets instead 39 | # of modifying this function. 40 | function(APPLY_STANDARD_SETTINGS TARGET) 41 | target_compile_features(${TARGET} PUBLIC cxx_std_17) 42 | target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") 43 | target_compile_options(${TARGET} PRIVATE /EHsc) 44 | target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") 45 | target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") 46 | endfunction() 47 | 48 | # Flutter library and tool build rules. 49 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") 50 | add_subdirectory(${FLUTTER_MANAGED_DIR}) 51 | 52 | # Application build; see runner/CMakeLists.txt. 53 | add_subdirectory("runner") 54 | 55 | # Generated plugin build rules, which manage building the plugins and adding 56 | # them to the application. 57 | include(flutter/generated_plugins.cmake) 58 | 59 | 60 | # === Installation === 61 | # Support files are copied into place next to the executable, so that it can 62 | # run in place. This is done instead of making a separate bundle (as on Linux) 63 | # so that building and running from within Visual Studio will work. 64 | set(BUILD_BUNDLE_DIR "$") 65 | # Make the "install" step default, as it's required to run. 66 | set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) 67 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 68 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) 69 | endif() 70 | 71 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") 72 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") 73 | 74 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" 75 | COMPONENT Runtime) 76 | 77 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 78 | COMPONENT Runtime) 79 | 80 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 81 | COMPONENT Runtime) 82 | 83 | if(PLUGIN_BUNDLED_LIBRARIES) 84 | install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" 85 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 86 | COMPONENT Runtime) 87 | endif() 88 | 89 | # Fully re-copy the assets directory on each build to avoid having stale files 90 | # from a previous install. 91 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets") 92 | install(CODE " 93 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") 94 | " COMPONENT Runtime) 95 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" 96 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) 97 | 98 | # Install the AOT library on non-Debug builds only. 99 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 100 | CONFIGURATIONS Profile;Release 101 | COMPONENT Runtime) 102 | -------------------------------------------------------------------------------- /windows/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file controls Flutter-level build steps. It should not be edited. 2 | cmake_minimum_required(VERSION 3.14) 3 | 4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 5 | 6 | # Configuration provided via flutter tool. 7 | include(${EPHEMERAL_DIR}/generated_config.cmake) 8 | 9 | # TODO: Move the rest of this into files in ephemeral. See 10 | # https://github.com/flutter/flutter/issues/57146. 11 | set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") 12 | 13 | # === Flutter Library === 14 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") 15 | 16 | # Published to parent scope for install step. 17 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 18 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 19 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 20 | set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) 21 | 22 | list(APPEND FLUTTER_LIBRARY_HEADERS 23 | "flutter_export.h" 24 | "flutter_windows.h" 25 | "flutter_messenger.h" 26 | "flutter_plugin_registrar.h" 27 | "flutter_texture_registrar.h" 28 | ) 29 | list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") 30 | add_library(flutter INTERFACE) 31 | target_include_directories(flutter INTERFACE 32 | "${EPHEMERAL_DIR}" 33 | ) 34 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") 35 | add_dependencies(flutter flutter_assemble) 36 | 37 | # === Wrapper === 38 | list(APPEND CPP_WRAPPER_SOURCES_CORE 39 | "core_implementations.cc" 40 | "standard_codec.cc" 41 | ) 42 | list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") 43 | list(APPEND CPP_WRAPPER_SOURCES_PLUGIN 44 | "plugin_registrar.cc" 45 | ) 46 | list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") 47 | list(APPEND CPP_WRAPPER_SOURCES_APP 48 | "flutter_engine.cc" 49 | "flutter_view_controller.cc" 50 | ) 51 | list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") 52 | 53 | # Wrapper sources needed for a plugin. 54 | add_library(flutter_wrapper_plugin STATIC 55 | ${CPP_WRAPPER_SOURCES_CORE} 56 | ${CPP_WRAPPER_SOURCES_PLUGIN} 57 | ) 58 | apply_standard_settings(flutter_wrapper_plugin) 59 | set_target_properties(flutter_wrapper_plugin PROPERTIES 60 | POSITION_INDEPENDENT_CODE ON) 61 | set_target_properties(flutter_wrapper_plugin PROPERTIES 62 | CXX_VISIBILITY_PRESET hidden) 63 | target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) 64 | target_include_directories(flutter_wrapper_plugin PUBLIC 65 | "${WRAPPER_ROOT}/include" 66 | ) 67 | add_dependencies(flutter_wrapper_plugin flutter_assemble) 68 | 69 | # Wrapper sources needed for the runner. 70 | add_library(flutter_wrapper_app STATIC 71 | ${CPP_WRAPPER_SOURCES_CORE} 72 | ${CPP_WRAPPER_SOURCES_APP} 73 | ) 74 | apply_standard_settings(flutter_wrapper_app) 75 | target_link_libraries(flutter_wrapper_app PUBLIC flutter) 76 | target_include_directories(flutter_wrapper_app PUBLIC 77 | "${WRAPPER_ROOT}/include" 78 | ) 79 | add_dependencies(flutter_wrapper_app flutter_assemble) 80 | 81 | # === Flutter tool backend === 82 | # _phony_ is a non-existent file to force this command to run every time, 83 | # since currently there's no way to get a full input/output list from the 84 | # flutter tool. 85 | set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") 86 | set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) 87 | add_custom_command( 88 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 89 | ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} 90 | ${CPP_WRAPPER_SOURCES_APP} 91 | ${PHONY_OUTPUT} 92 | COMMAND ${CMAKE_COMMAND} -E env 93 | ${FLUTTER_TOOL_ENVIRONMENT} 94 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" 95 | windows-x64 $ 96 | VERBATIM 97 | ) 98 | add_custom_target(flutter_assemble DEPENDS 99 | "${FLUTTER_LIBRARY}" 100 | ${FLUTTER_LIBRARY_HEADERS} 101 | ${CPP_WRAPPER_SOURCES_CORE} 102 | ${CPP_WRAPPER_SOURCES_PLUGIN} 103 | ${CPP_WRAPPER_SOURCES_APP} 104 | ) 105 | -------------------------------------------------------------------------------- /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 | #include 13 | 14 | void RegisterPlugins(flutter::PluginRegistry* registry) { 15 | FirebaseCorePluginCApiRegisterWithRegistrar( 16 | registry->GetRegistrarForPlugin("FirebaseCorePluginCApi")); 17 | SharePlusWindowsPluginCApiRegisterWithRegistrar( 18 | registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi")); 19 | SyncfusionPdfviewerWindowsPluginRegisterWithRegistrar( 20 | registry->GetRegistrarForPlugin("SyncfusionPdfviewerWindowsPlugin")); 21 | UrlLauncherWindowsRegisterWithRegistrar( 22 | registry->GetRegistrarForPlugin("UrlLauncherWindows")); 23 | } 24 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | firebase_core 7 | share_plus 8 | syncfusion_pdfviewer_windows 9 | url_launcher_windows 10 | ) 11 | 12 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 13 | ) 14 | 15 | set(PLUGIN_BUNDLED_LIBRARIES) 16 | 17 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 18 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 19 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 20 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 21 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 22 | endforeach(plugin) 23 | 24 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 25 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 26 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 27 | endforeach(ffi_plugin) 28 | -------------------------------------------------------------------------------- /windows/runner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | project(runner LANGUAGES CXX) 3 | 4 | # Define the application target. To change its name, change BINARY_NAME in the 5 | # top-level CMakeLists.txt, not the value here, or `flutter run` will no longer 6 | # work. 7 | # 8 | # Any new source files that you add to the application should be added here. 9 | add_executable(${BINARY_NAME} WIN32 10 | "flutter_window.cpp" 11 | "main.cpp" 12 | "utils.cpp" 13 | "win32_window.cpp" 14 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 15 | "Runner.rc" 16 | "runner.exe.manifest" 17 | ) 18 | 19 | # Apply the standard set of build settings. This can be removed for applications 20 | # that need different build settings. 21 | apply_standard_settings(${BINARY_NAME}) 22 | 23 | # Add preprocessor definitions for the build version. 24 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"") 25 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}") 26 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}") 27 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}") 28 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}") 29 | 30 | # Disable Windows macros that collide with C++ standard library functions. 31 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") 32 | 33 | # Add dependency libraries and include directories. Add any application-specific 34 | # dependencies here. 35 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) 36 | target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib") 37 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 38 | 39 | # Run the Flutter tool portions of the build. This must not be removed. 40 | add_dependencies(${BINARY_NAME} flutter_assemble) 41 | -------------------------------------------------------------------------------- /windows/runner/Runner.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | #pragma code_page(65001) 4 | #include "resource.h" 5 | 6 | #define APSTUDIO_READONLY_SYMBOLS 7 | ///////////////////////////////////////////////////////////////////////////// 8 | // 9 | // Generated from the TEXTINCLUDE 2 resource. 10 | // 11 | #include "winres.h" 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | #undef APSTUDIO_READONLY_SYMBOLS 15 | 16 | ///////////////////////////////////////////////////////////////////////////// 17 | // English (United States) resources 18 | 19 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 21 | 22 | #ifdef APSTUDIO_INVOKED 23 | ///////////////////////////////////////////////////////////////////////////// 24 | // 25 | // TEXTINCLUDE 26 | // 27 | 28 | 1 TEXTINCLUDE 29 | BEGIN 30 | "resource.h\0" 31 | END 32 | 33 | 2 TEXTINCLUDE 34 | BEGIN 35 | "#include ""winres.h""\r\n" 36 | "\0" 37 | END 38 | 39 | 3 TEXTINCLUDE 40 | BEGIN 41 | "\r\n" 42 | "\0" 43 | END 44 | 45 | #endif // APSTUDIO_INVOKED 46 | 47 | 48 | ///////////////////////////////////////////////////////////////////////////// 49 | // 50 | // Icon 51 | // 52 | 53 | // Icon with lowest ID value placed first to ensure application icon 54 | // remains consistent on all systems. 55 | IDI_APP_ICON ICON "resources\\app_icon.ico" 56 | 57 | 58 | ///////////////////////////////////////////////////////////////////////////// 59 | // 60 | // Version 61 | // 62 | 63 | #if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD) 64 | #define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD 65 | #else 66 | #define VERSION_AS_NUMBER 1,0,0,0 67 | #endif 68 | 69 | #if defined(FLUTTER_VERSION) 70 | #define VERSION_AS_STRING FLUTTER_VERSION 71 | #else 72 | #define VERSION_AS_STRING "1.0.0" 73 | #endif 74 | 75 | VS_VERSION_INFO VERSIONINFO 76 | FILEVERSION VERSION_AS_NUMBER 77 | PRODUCTVERSION VERSION_AS_NUMBER 78 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 79 | #ifdef _DEBUG 80 | FILEFLAGS VS_FF_DEBUG 81 | #else 82 | FILEFLAGS 0x0L 83 | #endif 84 | FILEOS VOS__WINDOWS32 85 | FILETYPE VFT_APP 86 | FILESUBTYPE 0x0L 87 | BEGIN 88 | BLOCK "StringFileInfo" 89 | BEGIN 90 | BLOCK "040904e4" 91 | BEGIN 92 | VALUE "CompanyName", "com.example" "\0" 93 | VALUE "FileDescription", "vbaseproject" "\0" 94 | VALUE "FileVersion", VERSION_AS_STRING "\0" 95 | VALUE "InternalName", "vbaseproject" "\0" 96 | VALUE "LegalCopyright", "Copyright (C) 2023 com.example. All rights reserved." "\0" 97 | VALUE "OriginalFilename", "vbaseproject.exe" "\0" 98 | VALUE "ProductName", "vbaseproject" "\0" 99 | VALUE "ProductVersion", VERSION_AS_STRING "\0" 100 | END 101 | END 102 | BLOCK "VarFileInfo" 103 | BEGIN 104 | VALUE "Translation", 0x409, 1252 105 | END 106 | END 107 | 108 | #endif // English (United States) resources 109 | ///////////////////////////////////////////////////////////////////////////// 110 | 111 | 112 | 113 | #ifndef APSTUDIO_INVOKED 114 | ///////////////////////////////////////////////////////////////////////////// 115 | // 116 | // Generated from the TEXTINCLUDE 3 resource. 117 | // 118 | 119 | 120 | ///////////////////////////////////////////////////////////////////////////// 121 | #endif // not APSTUDIO_INVOKED 122 | -------------------------------------------------------------------------------- /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 | 30 | flutter_controller_->engine()->SetNextFrameCallback([&]() { 31 | this->Show(); 32 | }); 33 | 34 | return true; 35 | } 36 | 37 | void FlutterWindow::OnDestroy() { 38 | if (flutter_controller_) { 39 | flutter_controller_ = nullptr; 40 | } 41 | 42 | Win32Window::OnDestroy(); 43 | } 44 | 45 | LRESULT 46 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message, 47 | WPARAM const wparam, 48 | LPARAM const lparam) noexcept { 49 | // Give Flutter, including plugins, an opportunity to handle window messages. 50 | if (flutter_controller_) { 51 | std::optional result = 52 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, 53 | lparam); 54 | if (result) { 55 | return *result; 56 | } 57 | } 58 | 59 | switch (message) { 60 | case WM_FONTCHANGE: 61 | flutter_controller_->engine()->ReloadSystemFonts(); 62 | break; 63 | } 64 | 65 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam); 66 | } 67 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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.Create(L"vbaseproject", 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 | -------------------------------------------------------------------------------- /windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 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 | -------------------------------------------------------------------------------- /windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/flutter_base_firebase_riverpod/5624c7f396379e966a8209026919b3cc42a614dd/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | std::string utf8_string; 52 | if (target_length == 0 || target_length > utf8_string.max_size()) { 53 | return utf8_string; 54 | } 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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /windows/runner/win32_window.cpp: -------------------------------------------------------------------------------- 1 | #include "win32_window.h" 2 | 3 | #include 4 | #include 5 | 6 | #include "resource.h" 7 | 8 | namespace { 9 | 10 | /// Window attribute that enables dark mode window decorations. 11 | /// 12 | /// Redefined in case the developer's machine has a Windows SDK older than 13 | /// version 10.0.22000.0. 14 | /// See: https://docs.microsoft.com/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute 15 | #ifndef DWMWA_USE_IMMERSIVE_DARK_MODE 16 | #define DWMWA_USE_IMMERSIVE_DARK_MODE 20 17 | #endif 18 | 19 | constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW"; 20 | 21 | /// Registry key for app theme preference. 22 | /// 23 | /// A value of 0 indicates apps should use dark mode. A non-zero or missing 24 | /// value indicates apps should use light mode. 25 | constexpr const wchar_t kGetPreferredBrightnessRegKey[] = 26 | L"Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize"; 27 | constexpr const wchar_t kGetPreferredBrightnessRegValue[] = L"AppsUseLightTheme"; 28 | 29 | // The number of Win32Window objects that currently exist. 30 | static int g_active_window_count = 0; 31 | 32 | using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd); 33 | 34 | // Scale helper to convert logical scaler values to physical using passed in 35 | // scale factor 36 | int Scale(int source, double scale_factor) { 37 | return static_cast(source * scale_factor); 38 | } 39 | 40 | // Dynamically loads the |EnableNonClientDpiScaling| from the User32 module. 41 | // This API is only needed for PerMonitor V1 awareness mode. 42 | void EnableFullDpiSupportIfAvailable(HWND hwnd) { 43 | HMODULE user32_module = LoadLibraryA("User32.dll"); 44 | if (!user32_module) { 45 | return; 46 | } 47 | auto enable_non_client_dpi_scaling = 48 | reinterpret_cast( 49 | GetProcAddress(user32_module, "EnableNonClientDpiScaling")); 50 | if (enable_non_client_dpi_scaling != nullptr) { 51 | enable_non_client_dpi_scaling(hwnd); 52 | } 53 | FreeLibrary(user32_module); 54 | } 55 | 56 | } // namespace 57 | 58 | // Manages the Win32Window's window class registration. 59 | class WindowClassRegistrar { 60 | public: 61 | ~WindowClassRegistrar() = default; 62 | 63 | // Returns the singleton registar instance. 64 | static WindowClassRegistrar* GetInstance() { 65 | if (!instance_) { 66 | instance_ = new WindowClassRegistrar(); 67 | } 68 | return instance_; 69 | } 70 | 71 | // Returns the name of the window class, registering the class if it hasn't 72 | // previously been registered. 73 | const wchar_t* GetWindowClass(); 74 | 75 | // Unregisters the window class. Should only be called if there are no 76 | // instances of the window. 77 | void UnregisterWindowClass(); 78 | 79 | private: 80 | WindowClassRegistrar() = default; 81 | 82 | static WindowClassRegistrar* instance_; 83 | 84 | bool class_registered_ = false; 85 | }; 86 | 87 | WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr; 88 | 89 | const wchar_t* WindowClassRegistrar::GetWindowClass() { 90 | if (!class_registered_) { 91 | WNDCLASS window_class{}; 92 | window_class.hCursor = LoadCursor(nullptr, IDC_ARROW); 93 | window_class.lpszClassName = kWindowClassName; 94 | window_class.style = CS_HREDRAW | CS_VREDRAW; 95 | window_class.cbClsExtra = 0; 96 | window_class.cbWndExtra = 0; 97 | window_class.hInstance = GetModuleHandle(nullptr); 98 | window_class.hIcon = 99 | LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON)); 100 | window_class.hbrBackground = 0; 101 | window_class.lpszMenuName = nullptr; 102 | window_class.lpfnWndProc = Win32Window::WndProc; 103 | RegisterClass(&window_class); 104 | class_registered_ = true; 105 | } 106 | return kWindowClassName; 107 | } 108 | 109 | void WindowClassRegistrar::UnregisterWindowClass() { 110 | UnregisterClass(kWindowClassName, nullptr); 111 | class_registered_ = false; 112 | } 113 | 114 | Win32Window::Win32Window() { 115 | ++g_active_window_count; 116 | } 117 | 118 | Win32Window::~Win32Window() { 119 | --g_active_window_count; 120 | Destroy(); 121 | } 122 | 123 | bool Win32Window::Create(const std::wstring& title, 124 | const Point& origin, 125 | const Size& size) { 126 | Destroy(); 127 | 128 | const wchar_t* window_class = 129 | WindowClassRegistrar::GetInstance()->GetWindowClass(); 130 | 131 | const POINT target_point = {static_cast(origin.x), 132 | static_cast(origin.y)}; 133 | HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST); 134 | UINT dpi = FlutterDesktopGetDpiForMonitor(monitor); 135 | double scale_factor = dpi / 96.0; 136 | 137 | HWND window = CreateWindow( 138 | window_class, title.c_str(), WS_OVERLAPPEDWINDOW, 139 | Scale(origin.x, scale_factor), Scale(origin.y, scale_factor), 140 | Scale(size.width, scale_factor), Scale(size.height, scale_factor), 141 | nullptr, nullptr, GetModuleHandle(nullptr), this); 142 | 143 | if (!window) { 144 | return false; 145 | } 146 | 147 | UpdateTheme(window); 148 | 149 | return OnCreate(); 150 | } 151 | 152 | bool Win32Window::Show() { 153 | return ShowWindow(window_handle_, SW_SHOWNORMAL); 154 | } 155 | 156 | // static 157 | LRESULT CALLBACK Win32Window::WndProc(HWND const window, 158 | UINT const message, 159 | WPARAM const wparam, 160 | LPARAM const lparam) noexcept { 161 | if (message == WM_NCCREATE) { 162 | auto window_struct = reinterpret_cast(lparam); 163 | SetWindowLongPtr(window, GWLP_USERDATA, 164 | reinterpret_cast(window_struct->lpCreateParams)); 165 | 166 | auto that = static_cast(window_struct->lpCreateParams); 167 | EnableFullDpiSupportIfAvailable(window); 168 | that->window_handle_ = window; 169 | } else if (Win32Window* that = GetThisFromHandle(window)) { 170 | return that->MessageHandler(window, message, wparam, lparam); 171 | } 172 | 173 | return DefWindowProc(window, message, wparam, lparam); 174 | } 175 | 176 | LRESULT 177 | Win32Window::MessageHandler(HWND hwnd, 178 | UINT const message, 179 | WPARAM const wparam, 180 | LPARAM const lparam) noexcept { 181 | switch (message) { 182 | case WM_DESTROY: 183 | window_handle_ = nullptr; 184 | Destroy(); 185 | if (quit_on_close_) { 186 | PostQuitMessage(0); 187 | } 188 | return 0; 189 | 190 | case WM_DPICHANGED: { 191 | auto newRectSize = reinterpret_cast(lparam); 192 | LONG newWidth = newRectSize->right - newRectSize->left; 193 | LONG newHeight = newRectSize->bottom - newRectSize->top; 194 | 195 | SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth, 196 | newHeight, SWP_NOZORDER | SWP_NOACTIVATE); 197 | 198 | return 0; 199 | } 200 | case WM_SIZE: { 201 | RECT rect = GetClientArea(); 202 | if (child_content_ != nullptr) { 203 | // Size and position the child window. 204 | MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left, 205 | rect.bottom - rect.top, TRUE); 206 | } 207 | return 0; 208 | } 209 | 210 | case WM_ACTIVATE: 211 | if (child_content_ != nullptr) { 212 | SetFocus(child_content_); 213 | } 214 | return 0; 215 | 216 | case WM_DWMCOLORIZATIONCOLORCHANGED: 217 | UpdateTheme(hwnd); 218 | return 0; 219 | } 220 | 221 | return DefWindowProc(window_handle_, message, wparam, lparam); 222 | } 223 | 224 | void Win32Window::Destroy() { 225 | OnDestroy(); 226 | 227 | if (window_handle_) { 228 | DestroyWindow(window_handle_); 229 | window_handle_ = nullptr; 230 | } 231 | if (g_active_window_count == 0) { 232 | WindowClassRegistrar::GetInstance()->UnregisterWindowClass(); 233 | } 234 | } 235 | 236 | Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept { 237 | return reinterpret_cast( 238 | GetWindowLongPtr(window, GWLP_USERDATA)); 239 | } 240 | 241 | void Win32Window::SetChildContent(HWND content) { 242 | child_content_ = content; 243 | SetParent(content, window_handle_); 244 | RECT frame = GetClientArea(); 245 | 246 | MoveWindow(content, frame.left, frame.top, frame.right - frame.left, 247 | frame.bottom - frame.top, true); 248 | 249 | SetFocus(child_content_); 250 | } 251 | 252 | RECT Win32Window::GetClientArea() { 253 | RECT frame; 254 | GetClientRect(window_handle_, &frame); 255 | return frame; 256 | } 257 | 258 | HWND Win32Window::GetHandle() { 259 | return window_handle_; 260 | } 261 | 262 | void Win32Window::SetQuitOnClose(bool quit_on_close) { 263 | quit_on_close_ = quit_on_close; 264 | } 265 | 266 | bool Win32Window::OnCreate() { 267 | // No-op; provided for subclasses. 268 | return true; 269 | } 270 | 271 | void Win32Window::OnDestroy() { 272 | // No-op; provided for subclasses. 273 | } 274 | 275 | void Win32Window::UpdateTheme(HWND const window) { 276 | DWORD light_mode; 277 | DWORD light_mode_size = sizeof(light_mode); 278 | LSTATUS result = RegGetValue(HKEY_CURRENT_USER, kGetPreferredBrightnessRegKey, 279 | kGetPreferredBrightnessRegValue, 280 | RRF_RT_REG_DWORD, nullptr, &light_mode, 281 | &light_mode_size); 282 | 283 | if (result == ERROR_SUCCESS) { 284 | BOOL enable_dark_mode = light_mode == 0; 285 | DwmSetWindowAttribute(window, DWMWA_USE_IMMERSIVE_DARK_MODE, 286 | &enable_dark_mode, sizeof(enable_dark_mode)); 287 | } 288 | } 289 | -------------------------------------------------------------------------------- /windows/runner/win32_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_WIN32_WINDOW_H_ 2 | #define RUNNER_WIN32_WINDOW_H_ 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | // A class abstraction for a high DPI-aware Win32 Window. Intended to be 11 | // inherited from by classes that wish to specialize with custom 12 | // rendering and input handling 13 | class Win32Window { 14 | public: 15 | struct Point { 16 | unsigned int x; 17 | unsigned int y; 18 | Point(unsigned int x, unsigned int y) : x(x), y(y) {} 19 | }; 20 | 21 | struct Size { 22 | unsigned int width; 23 | unsigned int height; 24 | Size(unsigned int width, unsigned int height) 25 | : width(width), height(height) {} 26 | }; 27 | 28 | Win32Window(); 29 | virtual ~Win32Window(); 30 | 31 | // Creates a win32 window with |title| that is positioned and sized using 32 | // |origin| and |size|. New windows are created on the default monitor. Window 33 | // sizes are specified to the OS in physical pixels, hence to ensure a 34 | // consistent size this function will scale the inputted width and height as 35 | // as appropriate for the default monitor. The window is invisible until 36 | // |Show| is called. Returns true if the window was created successfully. 37 | bool Create(const std::wstring& title, const Point& origin, const Size& size); 38 | 39 | // Show the current window. Returns true if the window was successfully shown. 40 | bool Show(); 41 | 42 | // Release OS resources associated with window. 43 | void Destroy(); 44 | 45 | // Inserts |content| into the window tree. 46 | void SetChildContent(HWND content); 47 | 48 | // Returns the backing Window handle to enable clients to set icon and other 49 | // window properties. Returns nullptr if the window has been destroyed. 50 | HWND GetHandle(); 51 | 52 | // If true, closing this window will quit the application. 53 | void SetQuitOnClose(bool quit_on_close); 54 | 55 | // Return a RECT representing the bounds of the current client area. 56 | RECT GetClientArea(); 57 | 58 | protected: 59 | // Processes and route salient window messages for mouse handling, 60 | // size change and DPI. Delegates handling of these to member overloads that 61 | // inheriting classes can handle. 62 | virtual LRESULT MessageHandler(HWND window, 63 | UINT const message, 64 | WPARAM const wparam, 65 | LPARAM const lparam) noexcept; 66 | 67 | // Called when CreateAndShow is called, allowing subclass window-related 68 | // setup. Subclasses should return false if setup fails. 69 | virtual bool OnCreate(); 70 | 71 | // Called when Destroy is called. 72 | virtual void OnDestroy(); 73 | 74 | private: 75 | friend class WindowClassRegistrar; 76 | 77 | // OS callback called by message pump. Handles the WM_NCCREATE message which 78 | // is passed when the non-client area is being created and enables automatic 79 | // non-client DPI scaling so that the non-client area automatically 80 | // responsponds to changes in DPI. All other messages are handled by 81 | // MessageHandler. 82 | static LRESULT CALLBACK WndProc(HWND const window, 83 | UINT const message, 84 | WPARAM const wparam, 85 | LPARAM const lparam) noexcept; 86 | 87 | // Retrieves a class instance pointer for |window| 88 | static Win32Window* GetThisFromHandle(HWND const window) noexcept; 89 | 90 | // Update the window frame's theme to match the system theme. 91 | static void UpdateTheme(HWND const window); 92 | 93 | bool quit_on_close_ = false; 94 | 95 | // window handle for top level window. 96 | HWND window_handle_ = nullptr; 97 | 98 | // window handle for hosted content. 99 | HWND child_content_ = nullptr; 100 | }; 101 | 102 | #endif // RUNNER_WIN32_WINDOW_H_ 103 | --------------------------------------------------------------------------------