├── .gitignore ├── .metadata ├── CHANGELOG.md ├── LICENSE ├── README.md ├── analysis_options.yaml ├── assets └── images │ ├── apple.png │ └── google.png ├── example ├── .gitignore ├── .metadata ├── README.md ├── analysis_options.yaml ├── android │ ├── .gitignore │ ├── app │ │ ├── build.gradle │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── example │ │ │ │ │ └── MainActivity.kt │ │ │ └── res │ │ │ │ ├── drawable-v21 │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable │ │ │ │ └── launch_background.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── values-night │ │ │ │ └── styles.xml │ │ │ │ └── values │ │ │ │ └── styles.xml │ │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ └── settings.gradle ├── assets │ ├── fonts │ │ ├── Caveat-Bold.ttf │ │ ├── Caveat-Medium.ttf │ │ ├── Caveat-Regular.ttf │ │ ├── Caveat-SemiBold.ttf │ │ ├── Geist-Black.ttf │ │ ├── Geist-Bold.ttf │ │ ├── Geist-ExtraBold.ttf │ │ ├── Geist-ExtraLight.ttf │ │ ├── Geist-Light.ttf │ │ ├── Geist-Medium.ttf │ │ ├── Geist-Regular.ttf │ │ ├── Geist-SemiBold.ttf │ │ ├── Geist-Thin.ttf │ │ ├── SpaceGrotesk-Bold.ttf │ │ ├── SpaceGrotesk-Light.ttf │ │ ├── SpaceGrotesk-Medium.ttf │ │ ├── SpaceGrotesk-Regular.ttf │ │ └── SpaceGrotesk-SemiBold.ttf │ └── images │ │ ├── arrow-down.png │ │ ├── fluo.png │ │ ├── lando.png │ │ ├── mclaren.png │ │ └── oscar.png ├── ios │ ├── .gitignore │ ├── Flutter │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ └── Release.xcconfig │ ├── Podfile │ ├── Podfile.lock │ ├── 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-60x60@2x.png │ │ │ │ ├── Icon-App-60x60@3x.png │ │ │ │ ├── Icon-App-76x76@1x.png │ │ │ │ ├── Icon-App-76x76@2x.png │ │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ │ └── LaunchImage.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── LaunchImage.png │ │ │ │ ├── LaunchImage@2x.png │ │ │ │ ├── LaunchImage@3x.png │ │ │ │ └── README.md │ │ ├── Base.lproj │ │ │ ├── LaunchScreen.storyboard │ │ │ └── Main.storyboard │ │ ├── Info.plist │ │ ├── Runner-Bridging-Header.h │ │ └── Runner.entitlements │ ├── RunnerTests │ │ └── RunnerTests.swift │ └── build │ │ └── .last_build_id ├── l10n.yaml ├── lib │ ├── l10n │ │ ├── app_en.arb │ │ ├── app_localizations.dart │ │ └── app_localizations_en.dart │ ├── main.dart │ ├── main_macos.dart │ ├── main_mclaren.dart │ └── main_web.dart ├── 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 │ ├── Podfile.lock │ ├── 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 │ └── RunnerTests │ │ └── RunnerTests.swift ├── pubspec.yaml ├── web │ ├── 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 ├── l10n.yaml ├── lib ├── api │ ├── api_client.dart │ └── models │ │ ├── api_error.dart │ │ ├── api_error.freezed.dart │ │ ├── api_error.g.dart │ │ ├── app_config.dart │ │ ├── app_config.freezed.dart │ │ ├── app_config.g.dart │ │ ├── auth_method.dart │ │ ├── auth_method.freezed.dart │ │ ├── auth_method.g.dart │ │ ├── google_client_id.dart │ │ ├── google_client_id.freezed.dart │ │ ├── google_client_id.g.dart │ │ ├── partial_session.dart │ │ ├── partial_session.freezed.dart │ │ ├── partial_session.g.dart │ │ ├── registration_step.dart │ │ ├── registration_step.freezed.dart │ │ ├── registration_step.g.dart │ │ ├── session.dart │ │ ├── session.freezed.dart │ │ ├── session.g.dart │ │ ├── user.dart │ │ ├── user.freezed.dart │ │ └── user.g.dart ├── fluo.dart ├── fluo_onboarding.dart ├── l10n │ ├── fluo_de.arb │ ├── fluo_en.arb │ ├── fluo_es.arb │ ├── fluo_fa.arb │ ├── fluo_fr.arb │ ├── fluo_it.arb │ ├── fluo_localizations.dart │ ├── fluo_localizations_de.dart │ ├── fluo_localizations_en.dart │ ├── fluo_localizations_es.dart │ ├── fluo_localizations_fa.dart │ ├── fluo_localizations_fr.dart │ ├── fluo_localizations_it.dart │ ├── fluo_localizations_pt.dart │ ├── fluo_localized_models.dart │ ├── fluo_pt.arb │ └── fluo_pt_BR.arb ├── managers │ └── session_manager.dart ├── presentation │ ├── auth │ │ ├── auth_navigator.dart │ │ ├── enter_code_screen.dart │ │ ├── enter_email_screen.dart │ │ └── enter_mobile_screen.dart │ └── register │ │ ├── enter_first_name_screen.dart │ │ ├── enter_last_name_screen.dart │ │ └── register_navigator.dart ├── stubs │ └── google_sign_in_web_stub.dart ├── theme.dart └── widgets │ ├── clear_suffix_button.dart │ ├── next_button.dart │ ├── round_button.dart │ ├── single_input_screen.dart │ └── webview.dart └── pubspec.yaml /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | **/ios/Flutter/.last_build_id 27 | .dart_tool/ 28 | .flutter-plugins 29 | .flutter-plugins-dependencies 30 | .pub-cache/ 31 | .pub/ 32 | pubspec.lock 33 | /build/ 34 | 35 | # Symbolication related 36 | app.*.symbols 37 | 38 | # Obfuscation related 39 | app.*.map.json 40 | 41 | # Android Studio will place build artifacts here 42 | /android/app/debug 43 | /android/app/profile 44 | /android/app/release 45 | 46 | # Local Netlify folder 47 | .netlify 48 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: "5874a72aa4c779a02553007c47dacbefba2374dc" 8 | channel: "stable" 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.11.0 2 | 3 | - Migrate to intl 0.20.2 to improve pub score 4 | 5 | ## 0.10.0 6 | 7 | - Make sure we've got support for macOS 8 | - Improve pub.dev score 9 | 10 | ## 0.9.0 11 | 12 | - Support for Web, super excited about that! See it live at https://fluo-website-demo.netlify.app 13 | - Introducing a dedicated theme `FluoTheme.web()` 14 | 15 | ## 0.8.1 16 | 17 | - The underline decoration of the legal text (terms & privacy) is not set to the color of the text 18 | 19 | ## 0.8.0 20 | 21 | - Support for "Sign in with Apple" 22 | - More customizations for connect buttons in the FluoTheme 23 | 24 | ## 0.7.0 25 | 26 | - Add localizations for German, Portuguese and Brazilian Portuguese 27 | 28 | ## 0.6.1 29 | 30 | - Fixed a bug which was always showing the enter first and last name screens no matter what was selected from the dashboard. 31 | 32 | ## 0.6.0 33 | 34 | - You can now let your users connect with Google sign-in. Set it up on https://dashboard.fluo.dev 35 | 36 | ## 0.5.0 37 | 38 | - Introducing the FluoTheme: customize the look & feel of the fluo sdk. 39 | 40 | ## 0.4.0 41 | 42 | - Don't need the user's last name? This version introduces "dynamic registration steps" allowing you to choose which registration steps you want 43 | - Folder structure has been reviewed to organize screens in flows, structurally speaking 44 | 45 | ## 0.3.1 46 | 47 | - Add `fluo.supabaseSession` to set the session on the supabase flutter client 48 | 49 | ## 0.3.0 50 | 51 | - Breaking change: you have to use this version now 52 | - Resume user registration if not complete 53 | - Add `introBuilder` and `onInitError` in `FluoOnboarding` 54 | 55 | ## 0.2.1 56 | 57 | - Update readme to use a remote url for the screenshot 58 | 59 | ## 0.2.0 60 | 61 | - Change the entrypoint with a much simpler approach: the FluoOnboarding component 62 | 63 | ## 0.1.4 64 | 65 | - Send the language to the server to send emails in different languages 66 | - Ensure generated localization files are correctly formatted 67 | 68 | ## 0.1.3 69 | 70 | - Migrate to flutter_inappwebview to support more platforms 71 | 72 | ## 0.1.2 73 | 74 | - Make userProfileComplete required on the session model 75 | 76 | ## 0.1.1 77 | 78 | - Small modifications to look better on pub.dev 79 | 80 | ## 0.1.0 81 | 82 | - Initial release of fluo sdk 83 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Jordan Bonnet 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | # Additional information about this file can be found at 4 | # https://dart.dev/guides/language/analysis-options 5 | 6 | linter: 7 | rules: 8 | - file_names 9 | - prefer_single_quotes 10 | - sort_constructors_first 11 | - directives_ordering 12 | 13 | analyzer: 14 | errors: 15 | invalid_annotation_target: ignore 16 | avoid_classes_with_only_static_members: ignore 17 | -------------------------------------------------------------------------------- /assets/images/apple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/assets/images/apple.png -------------------------------------------------------------------------------- /assets/images/google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/assets/images/google.png -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .build/ 9 | .buildlog/ 10 | .history 11 | .svn/ 12 | .swiftpm/ 13 | migrate_working_dir/ 14 | 15 | # IntelliJ related 16 | *.iml 17 | *.ipr 18 | *.iws 19 | .idea/ 20 | 21 | # The .vscode folder contains launch configuration and tasks you configure in 22 | # VS Code which you may wish to be included in version control, so this line 23 | # is commented out by default. 24 | #.vscode/ 25 | 26 | # Flutter/Dart/Pub related 27 | **/doc/api/ 28 | **/ios/Flutter/.last_build_id 29 | .dart_tool/ 30 | .flutter-plugins 31 | .flutter-plugins-dependencies 32 | .pub-cache/ 33 | .pub/ 34 | /build/ 35 | 36 | # Symbolication related 37 | app.*.symbols 38 | 39 | # Obfuscation related 40 | app.*.map.json 41 | 42 | # Android Studio will place build artifacts here 43 | /android/app/debug 44 | /android/app/profile 45 | /android/app/release 46 | 47 | # Local configuration 48 | lib/config.dart 49 | -------------------------------------------------------------------------------- /example/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: "5874a72aa4c779a02553007c47dacbefba2374dc" 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: 5874a72aa4c779a02553007c47dacbefba2374dc 17 | base_revision: 5874a72aa4c779a02553007c47dacbefba2374dc 18 | - platform: android 19 | create_revision: 5874a72aa4c779a02553007c47dacbefba2374dc 20 | base_revision: 5874a72aa4c779a02553007c47dacbefba2374dc 21 | - platform: ios 22 | create_revision: 5874a72aa4c779a02553007c47dacbefba2374dc 23 | base_revision: 5874a72aa4c779a02553007c47dacbefba2374dc 24 | - platform: linux 25 | create_revision: 5874a72aa4c779a02553007c47dacbefba2374dc 26 | base_revision: 5874a72aa4c779a02553007c47dacbefba2374dc 27 | - platform: macos 28 | create_revision: 5874a72aa4c779a02553007c47dacbefba2374dc 29 | base_revision: 5874a72aa4c779a02553007c47dacbefba2374dc 30 | - platform: web 31 | create_revision: 5874a72aa4c779a02553007c47dacbefba2374dc 32 | base_revision: 5874a72aa4c779a02553007c47dacbefba2374dc 33 | - platform: windows 34 | create_revision: 5874a72aa4c779a02553007c47dacbefba2374dc 35 | base_revision: 5874a72aa4c779a02553007c47dacbefba2374dc 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 | -------------------------------------------------------------------------------- /example/README.md: -------------------------------------------------------------------------------- 1 | # Fluo Example 2 | 3 | This is a playground project to showcase the Fluo SDK. 4 | 5 | ## Run 6 | 7 | ```bash 8 | cd example 9 | flutter run 10 | ``` 11 | 12 | ## Deploy to web 13 | 14 | ```bash 15 | flutter build web && netlify deploy --prod -d build/web 16 | ``` 17 | -------------------------------------------------------------------------------- /example/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | # Additional information about this file can be found at 4 | # https://dart.dev/guides/language/analysis-options 5 | 6 | linter: 7 | rules: 8 | - file_names 9 | - prefer_single_quotes 10 | - sort_constructors_first 11 | - directives_ordering 12 | 13 | analyzer: 14 | errors: 15 | invalid_annotation_target: ignore 16 | -------------------------------------------------------------------------------- /example/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/to/reference-keystore 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id "com.android.application" 3 | id "kotlin-android" 4 | // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. 5 | id "dev.flutter.flutter-gradle-plugin" 6 | } 7 | 8 | android { 9 | namespace = "com.example.example" 10 | compileSdk = flutter.compileSdkVersion 11 | ndkVersion = flutter.ndkVersion 12 | 13 | compileOptions { 14 | sourceCompatibility = JavaVersion.VERSION_1_8 15 | targetCompatibility = JavaVersion.VERSION_1_8 16 | } 17 | 18 | kotlinOptions { 19 | jvmTarget = JavaVersion.VERSION_1_8 20 | } 21 | 22 | defaultConfig { 23 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 24 | applicationId = "com.example.example" 25 | // You can update the following values to match your application needs. 26 | // For more information, see: https://flutter.dev/to/review-gradle-config. 27 | minSdk = flutter.minSdkVersion 28 | targetSdk = flutter.targetSdkVersion 29 | versionCode = flutter.versionCode 30 | versionName = flutter.versionName 31 | } 32 | 33 | buildTypes { 34 | release { 35 | // TODO: Add your own signing config for the release build. 36 | // Signing with the debug keys for now, so `flutter run --release` works. 37 | signingConfig = signingConfigs.debug 38 | } 39 | } 40 | } 41 | 42 | flutter { 43 | source = "../.." 44 | } 45 | -------------------------------------------------------------------------------- /example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 16 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | 31 | 34 | 35 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /example/android/app/src/main/kotlin/com/example/example/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.example 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() 6 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/android/build.gradle: -------------------------------------------------------------------------------- 1 | allprojects { 2 | repositories { 3 | google() 4 | mavenCentral() 5 | } 6 | } 7 | 8 | rootProject.buildDir = "../build" 9 | subprojects { 10 | project.buildDir = "${rootProject.buildDir}/${project.name}" 11 | } 12 | subprojects { 13 | project.evaluationDependsOn(":app") 14 | } 15 | 16 | tasks.register("clean", Delete) { 17 | delete rootProject.buildDir 18 | } 19 | -------------------------------------------------------------------------------- /example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /example/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-8.5-all.zip 6 | -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | def flutterSdkPath = { 3 | def properties = new Properties() 4 | file("local.properties").withInputStream { properties.load(it) } 5 | def flutterSdkPath = properties.getProperty("flutter.sdk") 6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 7 | return flutterSdkPath 8 | }() 9 | 10 | includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") 11 | 12 | repositories { 13 | google() 14 | mavenCentral() 15 | gradlePluginPortal() 16 | } 17 | } 18 | 19 | plugins { 20 | id "dev.flutter.flutter-plugin-loader" version "1.0.0" 21 | id "com.android.application" version "8.3.1" apply false 22 | id "org.jetbrains.kotlin.android" version "1.9.23" apply false 23 | } 24 | 25 | include ":app" 26 | -------------------------------------------------------------------------------- /example/assets/fonts/Caveat-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/assets/fonts/Caveat-Bold.ttf -------------------------------------------------------------------------------- /example/assets/fonts/Caveat-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/assets/fonts/Caveat-Medium.ttf -------------------------------------------------------------------------------- /example/assets/fonts/Caveat-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/assets/fonts/Caveat-Regular.ttf -------------------------------------------------------------------------------- /example/assets/fonts/Caveat-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/assets/fonts/Caveat-SemiBold.ttf -------------------------------------------------------------------------------- /example/assets/fonts/Geist-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/assets/fonts/Geist-Black.ttf -------------------------------------------------------------------------------- /example/assets/fonts/Geist-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/assets/fonts/Geist-Bold.ttf -------------------------------------------------------------------------------- /example/assets/fonts/Geist-ExtraBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/assets/fonts/Geist-ExtraBold.ttf -------------------------------------------------------------------------------- /example/assets/fonts/Geist-ExtraLight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/assets/fonts/Geist-ExtraLight.ttf -------------------------------------------------------------------------------- /example/assets/fonts/Geist-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/assets/fonts/Geist-Light.ttf -------------------------------------------------------------------------------- /example/assets/fonts/Geist-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/assets/fonts/Geist-Medium.ttf -------------------------------------------------------------------------------- /example/assets/fonts/Geist-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/assets/fonts/Geist-Regular.ttf -------------------------------------------------------------------------------- /example/assets/fonts/Geist-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/assets/fonts/Geist-SemiBold.ttf -------------------------------------------------------------------------------- /example/assets/fonts/Geist-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/assets/fonts/Geist-Thin.ttf -------------------------------------------------------------------------------- /example/assets/fonts/SpaceGrotesk-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/assets/fonts/SpaceGrotesk-Bold.ttf -------------------------------------------------------------------------------- /example/assets/fonts/SpaceGrotesk-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/assets/fonts/SpaceGrotesk-Light.ttf -------------------------------------------------------------------------------- /example/assets/fonts/SpaceGrotesk-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/assets/fonts/SpaceGrotesk-Medium.ttf -------------------------------------------------------------------------------- /example/assets/fonts/SpaceGrotesk-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/assets/fonts/SpaceGrotesk-Regular.ttf -------------------------------------------------------------------------------- /example/assets/fonts/SpaceGrotesk-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/assets/fonts/SpaceGrotesk-SemiBold.ttf -------------------------------------------------------------------------------- /example/assets/images/arrow-down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/assets/images/arrow-down.png -------------------------------------------------------------------------------- /example/assets/images/fluo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/assets/images/fluo.png -------------------------------------------------------------------------------- /example/assets/images/lando.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/assets/images/lando.png -------------------------------------------------------------------------------- /example/assets/images/mclaren.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/assets/images/mclaren.png -------------------------------------------------------------------------------- /example/assets/images/oscar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/assets/images/oscar.png -------------------------------------------------------------------------------- /example/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 | -------------------------------------------------------------------------------- /example/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 | 12.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example/ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | platform :ios, '12.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! 32 | use_modular_headers! 33 | 34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35 | target 'RunnerTests' do 36 | inherit! :search_paths 37 | end 38 | end 39 | 40 | post_install do |installer| 41 | installer.pods_project.targets.each do |target| 42 | flutter_additional_ios_build_settings(target) 43 | end 44 | end 45 | -------------------------------------------------------------------------------- /example/ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - AppAuth (1.7.6): 3 | - AppAuth/Core (= 1.7.6) 4 | - AppAuth/ExternalUserAgent (= 1.7.6) 5 | - AppAuth/Core (1.7.6) 6 | - AppAuth/ExternalUserAgent (1.7.6): 7 | - AppAuth/Core 8 | - AppCheckCore (11.2.0): 9 | - GoogleUtilities/Environment (~> 8.0) 10 | - GoogleUtilities/UserDefaults (~> 8.0) 11 | - PromisesObjC (~> 2.4) 12 | - Flutter (1.0.0) 13 | - flutter_inappwebview_ios (0.0.1): 14 | - Flutter 15 | - flutter_inappwebview_ios/Core (= 0.0.1) 16 | - OrderedSet (~> 6.0.3) 17 | - flutter_inappwebview_ios/Core (0.0.1): 18 | - Flutter 19 | - OrderedSet (~> 6.0.3) 20 | - flutter_secure_storage (6.0.0): 21 | - Flutter 22 | - google_sign_in_ios (0.0.1): 23 | - AppAuth (>= 1.7.4) 24 | - Flutter 25 | - FlutterMacOS 26 | - GoogleSignIn (~> 8.0) 27 | - GTMSessionFetcher (>= 3.4.0) 28 | - GoogleSignIn (8.0.0): 29 | - AppAuth (< 2.0, >= 1.7.3) 30 | - AppCheckCore (~> 11.0) 31 | - GTMAppAuth (< 5.0, >= 4.1.1) 32 | - GTMSessionFetcher/Core (~> 3.3) 33 | - GoogleUtilities/Environment (8.1.0): 34 | - GoogleUtilities/Privacy 35 | - GoogleUtilities/Logger (8.1.0): 36 | - GoogleUtilities/Environment 37 | - GoogleUtilities/Privacy 38 | - GoogleUtilities/Privacy (8.1.0) 39 | - GoogleUtilities/UserDefaults (8.1.0): 40 | - GoogleUtilities/Logger 41 | - GoogleUtilities/Privacy 42 | - GTMAppAuth (4.1.1): 43 | - AppAuth/Core (~> 1.7) 44 | - GTMSessionFetcher/Core (< 4.0, >= 3.3) 45 | - GTMSessionFetcher (3.5.0): 46 | - GTMSessionFetcher/Full (= 3.5.0) 47 | - GTMSessionFetcher/Core (3.5.0) 48 | - GTMSessionFetcher/Full (3.5.0): 49 | - GTMSessionFetcher/Core 50 | - OrderedSet (6.0.3) 51 | - path_provider_foundation (0.0.1): 52 | - Flutter 53 | - FlutterMacOS 54 | - PromisesObjC (2.4.0) 55 | - sign_in_with_apple (0.0.1): 56 | - Flutter 57 | - url_launcher_ios (0.0.1): 58 | - Flutter 59 | - webview_flutter_wkwebview (0.0.1): 60 | - Flutter 61 | - FlutterMacOS 62 | 63 | DEPENDENCIES: 64 | - Flutter (from `Flutter`) 65 | - flutter_inappwebview_ios (from `.symlinks/plugins/flutter_inappwebview_ios/ios`) 66 | - flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`) 67 | - google_sign_in_ios (from `.symlinks/plugins/google_sign_in_ios/darwin`) 68 | - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) 69 | - sign_in_with_apple (from `.symlinks/plugins/sign_in_with_apple/ios`) 70 | - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) 71 | - webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/darwin`) 72 | 73 | SPEC REPOS: 74 | trunk: 75 | - AppAuth 76 | - AppCheckCore 77 | - GoogleSignIn 78 | - GoogleUtilities 79 | - GTMAppAuth 80 | - GTMSessionFetcher 81 | - OrderedSet 82 | - PromisesObjC 83 | 84 | EXTERNAL SOURCES: 85 | Flutter: 86 | :path: Flutter 87 | flutter_inappwebview_ios: 88 | :path: ".symlinks/plugins/flutter_inappwebview_ios/ios" 89 | flutter_secure_storage: 90 | :path: ".symlinks/plugins/flutter_secure_storage/ios" 91 | google_sign_in_ios: 92 | :path: ".symlinks/plugins/google_sign_in_ios/darwin" 93 | path_provider_foundation: 94 | :path: ".symlinks/plugins/path_provider_foundation/darwin" 95 | sign_in_with_apple: 96 | :path: ".symlinks/plugins/sign_in_with_apple/ios" 97 | url_launcher_ios: 98 | :path: ".symlinks/plugins/url_launcher_ios/ios" 99 | webview_flutter_wkwebview: 100 | :path: ".symlinks/plugins/webview_flutter_wkwebview/darwin" 101 | 102 | SPEC CHECKSUMS: 103 | AppAuth: d4f13a8fe0baf391b2108511793e4b479691fb73 104 | AppCheckCore: cc8fd0a3a230ddd401f326489c99990b013f0c4f 105 | Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 106 | flutter_inappwebview_ios: b89ba3482b96fb25e00c967aae065701b66e9b99 107 | flutter_secure_storage: 1ed9476fba7e7a782b22888f956cce43e2c62f13 108 | google_sign_in_ios: b48bb9af78576358a168361173155596c845f0b9 109 | GoogleSignIn: ce8c89bb9b37fb624b92e7514cc67335d1e277e4 110 | GoogleUtilities: 00c88b9a86066ef77f0da2fab05f65d7768ed8e1 111 | GTMAppAuth: f69bd07d68cd3b766125f7e072c45d7340dea0de 112 | GTMSessionFetcher: 5aea5ba6bd522a239e236100971f10cb71b96ab6 113 | OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94 114 | path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564 115 | PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 116 | sign_in_with_apple: c5dcc141574c8c54d5ac99dd2163c0c72ad22418 117 | url_launcher_ios: 694010445543906933d732453a59da0a173ae33d 118 | webview_flutter_wkwebview: 1821ceac936eba6f7984d89a9f3bcb4dea99ebb2 119 | 120 | PODFILE CHECKSUM: 7be2f5f74864d463a8ad433546ed1de7e0f29aef 121 | 122 | COCOAPODS: 1.16.2 123 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 38 | 39 | 40 | 41 | 44 | 50 | 51 | 52 | 53 | 54 | 66 | 68 | 74 | 75 | 76 | 77 | 83 | 85 | 91 | 92 | 93 | 94 | 96 | 97 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | 4 | @main 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /example/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 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /example/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 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /example/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. -------------------------------------------------------------------------------- /example/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 | -------------------------------------------------------------------------------- /example/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 | -------------------------------------------------------------------------------- /example/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CADisableMinimumFrameDurationOnPhone 6 | 7 | CFBundleDevelopmentRegion 8 | $(DEVELOPMENT_LANGUAGE) 9 | CFBundleDisplayName 10 | Example 11 | CFBundleExecutable 12 | $(EXECUTABLE_NAME) 13 | CFBundleIdentifier 14 | $(PRODUCT_BUNDLE_IDENTIFIER) 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | example 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | $(FLUTTER_BUILD_NAME) 23 | CFBundleSignature 24 | ???? 25 | CFBundleURLTypes 26 | 27 | 28 | CFBundleURLSchemes 29 | 30 | com.googleusercontent.apps.618094075079-fk4c2arr9md9b7jjc4m5dh7gd96lj5e8 31 | 32 | 33 | 34 | CFBundleVersion 35 | $(FLUTTER_BUILD_NUMBER) 36 | LSRequiresIPhoneOS 37 | 38 | UIApplicationSupportsIndirectInputEvents 39 | 40 | UILaunchStoryboardName 41 | LaunchScreen 42 | UIMainStoryboardFile 43 | Main 44 | UISupportedInterfaceOrientations 45 | 46 | UIInterfaceOrientationPortrait 47 | UIInterfaceOrientationLandscapeLeft 48 | UIInterfaceOrientationLandscapeRight 49 | 50 | UISupportedInterfaceOrientations~ipad 51 | 52 | UIInterfaceOrientationPortrait 53 | UIInterfaceOrientationPortraitUpsideDown 54 | UIInterfaceOrientationLandscapeLeft 55 | UIInterfaceOrientationLandscapeRight 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /example/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /example/ios/Runner/Runner.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.developer.applesignin 6 | 7 | Default 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/ios/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /example/ios/build/.last_build_id: -------------------------------------------------------------------------------- 1 | f8e6092111d47a75924e9753ea96c968 -------------------------------------------------------------------------------- /example/l10n.yaml: -------------------------------------------------------------------------------- 1 | arb-dir: lib/l10n 2 | template-arb-file: app_en.arb 3 | output-localization-file: app_localizations.dart 4 | -------------------------------------------------------------------------------- /example/lib/l10n/app_en.arb: -------------------------------------------------------------------------------- 1 | { 2 | "@@locale": "en" 3 | } -------------------------------------------------------------------------------- /example/lib/l10n/app_localizations_en.dart: -------------------------------------------------------------------------------- 1 | // ignore: unused_import 2 | import 'package:intl/intl.dart' as intl; 3 | import 'app_localizations.dart'; 4 | 5 | // ignore_for_file: type=lint 6 | 7 | /// The translations for English (`en`). 8 | class AppLocalizationsEn extends AppLocalizations { 9 | AppLocalizationsEn([String locale = 'en']) : super(locale); 10 | } 11 | -------------------------------------------------------------------------------- /example/linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /example/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 | -------------------------------------------------------------------------------- /example/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 | #include 11 | 12 | void fl_register_plugins(FlPluginRegistry* registry) { 13 | g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar = 14 | fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin"); 15 | flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar); 16 | g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = 17 | fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); 18 | url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); 19 | } 20 | -------------------------------------------------------------------------------- /example/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 | -------------------------------------------------------------------------------- /example/linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | flutter_secure_storage_linux 7 | url_launcher_linux 8 | ) 9 | 10 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 11 | ) 12 | 13 | set(PLUGIN_BUNDLED_LIBRARIES) 14 | 15 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 16 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 17 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 19 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 20 | endforeach(plugin) 21 | 22 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 23 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) 24 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 25 | endforeach(ffi_plugin) 26 | -------------------------------------------------------------------------------- /example/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 | -------------------------------------------------------------------------------- /example/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 | -------------------------------------------------------------------------------- /example/macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /example/macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example/macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example/macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | import flutter_inappwebview_macos 9 | import flutter_secure_storage_macos 10 | import google_sign_in_ios 11 | import path_provider_foundation 12 | import sign_in_with_apple 13 | import url_launcher_macos 14 | import webview_flutter_wkwebview 15 | 16 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 17 | InAppWebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "InAppWebViewFlutterPlugin")) 18 | FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin")) 19 | FLTGoogleSignInPlugin.register(with: registry.registrar(forPlugin: "FLTGoogleSignInPlugin")) 20 | PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) 21 | SignInWithApplePlugin.register(with: registry.registrar(forPlugin: "SignInWithApplePlugin")) 22 | UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) 23 | WebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "WebViewFlutterPlugin")) 24 | } 25 | -------------------------------------------------------------------------------- /example/macos/Podfile: -------------------------------------------------------------------------------- 1 | platform :macos, '10.15' 2 | 3 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 4 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 5 | 6 | project 'Runner', { 7 | 'Debug' => :debug, 8 | 'Profile' => :release, 9 | 'Release' => :release, 10 | } 11 | 12 | def flutter_root 13 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) 14 | unless File.exist?(generated_xcode_build_settings_path) 15 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" 16 | end 17 | 18 | File.foreach(generated_xcode_build_settings_path) do |line| 19 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 20 | return matches[1].strip if matches 21 | end 22 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" 23 | end 24 | 25 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 26 | 27 | flutter_macos_podfile_setup 28 | 29 | target 'Runner' do 30 | use_frameworks! 31 | use_modular_headers! 32 | 33 | flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) 34 | target 'RunnerTests' do 35 | inherit! :search_paths 36 | end 37 | end 38 | 39 | post_install do |installer| 40 | installer.pods_project.targets.each do |target| 41 | flutter_additional_macos_build_settings(target) 42 | target.build_configurations.each do |config| 43 | config.build_settings['MACOSX_DEPLOYMENT_TARGET'] = '10.15' 44 | end 45 | end 46 | end 47 | -------------------------------------------------------------------------------- /example/macos/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - AppAuth (1.7.6): 3 | - AppAuth/Core (= 1.7.6) 4 | - AppAuth/ExternalUserAgent (= 1.7.6) 5 | - AppAuth/Core (1.7.6) 6 | - AppAuth/ExternalUserAgent (1.7.6): 7 | - AppAuth/Core 8 | - flutter_inappwebview_macos (0.0.1): 9 | - FlutterMacOS 10 | - OrderedSet (~> 6.0.3) 11 | - flutter_secure_storage_macos (6.1.1): 12 | - FlutterMacOS 13 | - FlutterMacOS (1.0.0) 14 | - google_sign_in_ios (0.0.1): 15 | - AppAuth (>= 1.7.4) 16 | - Flutter 17 | - FlutterMacOS 18 | - GoogleSignIn (~> 7.1) 19 | - GTMSessionFetcher (>= 3.4.0) 20 | - GoogleSignIn (7.1.0): 21 | - AppAuth (< 2.0, >= 1.7.3) 22 | - GTMAppAuth (< 5.0, >= 4.1.1) 23 | - GTMSessionFetcher/Core (~> 3.3) 24 | - GTMAppAuth (4.1.1): 25 | - AppAuth/Core (~> 1.7) 26 | - GTMSessionFetcher/Core (< 4.0, >= 3.3) 27 | - GTMSessionFetcher (3.5.0): 28 | - GTMSessionFetcher/Full (= 3.5.0) 29 | - GTMSessionFetcher/Core (3.5.0) 30 | - GTMSessionFetcher/Full (3.5.0): 31 | - GTMSessionFetcher/Core 32 | - OrderedSet (6.0.3) 33 | - path_provider_foundation (0.0.1): 34 | - Flutter 35 | - FlutterMacOS 36 | - sign_in_with_apple (0.0.1): 37 | - FlutterMacOS 38 | - url_launcher_macos (0.0.1): 39 | - FlutterMacOS 40 | - webview_flutter_wkwebview (0.0.1): 41 | - Flutter 42 | - FlutterMacOS 43 | 44 | DEPENDENCIES: 45 | - flutter_inappwebview_macos (from `Flutter/ephemeral/.symlinks/plugins/flutter_inappwebview_macos/macos`) 46 | - flutter_secure_storage_macos (from `Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos`) 47 | - FlutterMacOS (from `Flutter/ephemeral`) 48 | - google_sign_in_ios (from `Flutter/ephemeral/.symlinks/plugins/google_sign_in_ios/darwin`) 49 | - path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`) 50 | - sign_in_with_apple (from `Flutter/ephemeral/.symlinks/plugins/sign_in_with_apple/macos`) 51 | - url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`) 52 | - webview_flutter_wkwebview (from `Flutter/ephemeral/.symlinks/plugins/webview_flutter_wkwebview/darwin`) 53 | 54 | SPEC REPOS: 55 | trunk: 56 | - AppAuth 57 | - GoogleSignIn 58 | - GTMAppAuth 59 | - GTMSessionFetcher 60 | - OrderedSet 61 | 62 | EXTERNAL SOURCES: 63 | flutter_inappwebview_macos: 64 | :path: Flutter/ephemeral/.symlinks/plugins/flutter_inappwebview_macos/macos 65 | flutter_secure_storage_macos: 66 | :path: Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos 67 | FlutterMacOS: 68 | :path: Flutter/ephemeral 69 | google_sign_in_ios: 70 | :path: Flutter/ephemeral/.symlinks/plugins/google_sign_in_ios/darwin 71 | path_provider_foundation: 72 | :path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin 73 | sign_in_with_apple: 74 | :path: Flutter/ephemeral/.symlinks/plugins/sign_in_with_apple/macos 75 | url_launcher_macos: 76 | :path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos 77 | webview_flutter_wkwebview: 78 | :path: Flutter/ephemeral/.symlinks/plugins/webview_flutter_wkwebview/darwin 79 | 80 | SPEC CHECKSUMS: 81 | AppAuth: d4f13a8fe0baf391b2108511793e4b479691fb73 82 | flutter_inappwebview_macos: c2d68649f9f8f1831bfcd98d73fd6256366d9d1d 83 | flutter_secure_storage_macos: b2d62a774c23b060f0b99d0173b0b36abb4a8632 84 | FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 85 | google_sign_in_ios: 19297361f2c51d7d8ac0201b866ef1fa5d1f94a8 86 | GoogleSignIn: d4281ab6cf21542b1cfaff85c191f230b399d2db 87 | GTMAppAuth: f69bd07d68cd3b766125f7e072c45d7340dea0de 88 | GTMSessionFetcher: 5aea5ba6bd522a239e236100971f10cb71b96ab6 89 | OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94 90 | path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564 91 | sign_in_with_apple: 6673c03c9e3643f6c8d33601943fbfa9ae99f94e 92 | url_launcher_macos: 0fba8ddabfc33ce0a9afe7c5fef5aab3d8d2d673 93 | webview_flutter_wkwebview: 1821ceac936eba6f7984d89a9f3bcb4dea99ebb2 94 | 95 | PODFILE CHECKSUM: b5ffa9503532876f9cd2101f366e041058301a37 96 | 97 | COCOAPODS: 1.16.2 98 | -------------------------------------------------------------------------------- /example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 43 | 49 | 50 | 51 | 52 | 53 | 64 | 66 | 72 | 73 | 74 | 75 | 81 | 83 | 89 | 90 | 91 | 92 | 94 | 95 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /example/macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @main 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | 10 | override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool { 11 | return true 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /example/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 | -------------------------------------------------------------------------------- /example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /example/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 = example 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2024 com.example. All rights reserved. 15 | -------------------------------------------------------------------------------- /example/macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /example/macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /example/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 | -------------------------------------------------------------------------------- /example/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 | com.apple.security.network.client 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /example/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 | -------------------------------------------------------------------------------- /example/macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /example/macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.network.client 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/macos/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: example 2 | description: "A new Flutter project." 3 | # The following line prevents the package from being accidentally published to 4 | # pub.dev using `flutter pub publish`. This is preferred for private packages. 5 | publish_to: "none" # Remove this line if you wish to publish to pub.dev 6 | 7 | # The following defines the version and build number for your application. 8 | # A version number is three numbers separated by dots, like 1.2.43 9 | # followed by an optional build number separated by a +. 10 | # Both the version and the builder number may be overridden in flutter 11 | # build by specifying --build-name and --build-number, respectively. 12 | # In Android, build-name is used as versionName while build-number used as versionCode. 13 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 14 | # In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. 15 | # Read more about iOS versioning at 16 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 17 | # In Windows, build-name is used as the major, minor, and patch parts 18 | # of the product and file versions while build-number is used as the build suffix. 19 | version: 1.0.0+1 20 | 21 | environment: 22 | sdk: ^3.5.1 23 | 24 | dependencies: 25 | cupertino_icons: ^1.0.0 26 | flutter: 27 | sdk: flutter 28 | fluo: 29 | path: ../ 30 | provider: ^6.1.2 31 | flutter_localizations: 32 | sdk: flutter 33 | intl: any 34 | flutter_inappwebview: ^6.1.5 35 | 36 | dev_dependencies: 37 | build_runner: ^2.4.12 38 | flutter_test: 39 | sdk: flutter 40 | flutter_lints: ^4.0.0 41 | 42 | flutter: 43 | uses-material-design: true 44 | generate: true 45 | assets: 46 | - assets/images/ 47 | fonts: 48 | - family: Caveat 49 | fonts: 50 | - asset: assets/fonts/Caveat-Regular.ttf 51 | weight: 400 52 | - asset: assets/fonts/Caveat-Medium.ttf 53 | weight: 500 54 | - asset: assets/fonts/Caveat-Semibold.ttf 55 | weight: 600 56 | - asset: assets/fonts/Caveat-Bold.ttf 57 | weight: 700 58 | - family: Geist 59 | fonts: 60 | - asset: assets/fonts/Geist-ExtraLight.ttf 61 | weight: 100 62 | - asset: assets/fonts/Geist-Thin.ttf 63 | weight: 200 64 | - asset: assets/fonts/Geist-Light.ttf 65 | weight: 300 66 | - asset: assets/fonts/Geist-Regular.ttf 67 | weight: 400 68 | - asset: assets/fonts/Geist-Medium.ttf 69 | weight: 500 70 | - asset: assets/fonts/Geist-SemiBold.ttf 71 | weight: 600 72 | - asset: assets/fonts/Geist-Bold.ttf 73 | weight: 700 74 | - asset: assets/fonts/Geist-ExtraBold.ttf 75 | weight: 800 76 | - asset: assets/fonts/Geist-Black.ttf 77 | weight: 900 78 | - family: SpaceGrotesk 79 | fonts: 80 | - asset: assets/fonts/SpaceGrotesk-Light.ttf 81 | weight: 300 82 | - asset: assets/fonts/SpaceGrotesk-Regular.ttf 83 | weight: 400 84 | - asset: assets/fonts/SpaceGrotesk-Medium.ttf 85 | weight: 500 86 | - asset: assets/fonts/SpaceGrotesk-SemiBold.ttf 87 | weight: 600 88 | - asset: assets/fonts/SpaceGrotesk-Bold.ttf 89 | weight: 700 90 | -------------------------------------------------------------------------------- /example/web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/web/favicon.png -------------------------------------------------------------------------------- /example/web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/web/icons/Icon-192.png -------------------------------------------------------------------------------- /example/web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/web/icons/Icon-512.png -------------------------------------------------------------------------------- /example/web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /example/web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /example/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | example 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /example/web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example", 3 | "short_name": "example", 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 | -------------------------------------------------------------------------------- /example/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 | -------------------------------------------------------------------------------- /example/windows/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Project-level configuration. 2 | cmake_minimum_required(VERSION 3.14) 3 | project(example 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 "example") 8 | 9 | # Explicitly opt in to modern CMake behaviors to avoid warnings with recent 10 | # versions of CMake. 11 | cmake_policy(VERSION 3.14...3.25) 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 | 56 | # Generated plugin build rules, which manage building the plugins and adding 57 | # them to the application. 58 | include(flutter/generated_plugins.cmake) 59 | 60 | 61 | # === Installation === 62 | # Support files are copied into place next to the executable, so that it can 63 | # run in place. This is done instead of making a separate bundle (as on Linux) 64 | # so that building and running from within Visual Studio will work. 65 | set(BUILD_BUNDLE_DIR "$") 66 | # Make the "install" step default, as it's required to run. 67 | set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) 68 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 69 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) 70 | endif() 71 | 72 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") 73 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") 74 | 75 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" 76 | COMPONENT Runtime) 77 | 78 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 79 | COMPONENT Runtime) 80 | 81 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 82 | COMPONENT Runtime) 83 | 84 | if(PLUGIN_BUNDLED_LIBRARIES) 85 | install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" 86 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 87 | COMPONENT Runtime) 88 | endif() 89 | 90 | # Copy the native assets provided by the build.dart from all packages. 91 | set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/windows/") 92 | install(DIRECTORY "${NATIVE_ASSETS_DIR}" 93 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 94 | COMPONENT Runtime) 95 | 96 | # Fully re-copy the assets directory on each build to avoid having stale files 97 | # from a previous install. 98 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets") 99 | install(CODE " 100 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") 101 | " COMPONENT Runtime) 102 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" 103 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) 104 | 105 | # Install the AOT library on non-Debug builds only. 106 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 107 | CONFIGURATIONS Profile;Release 108 | COMPONENT Runtime) 109 | -------------------------------------------------------------------------------- /example/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 | # Set fallback configurations for older versions of the flutter tool. 14 | if (NOT DEFINED FLUTTER_TARGET_PLATFORM) 15 | set(FLUTTER_TARGET_PLATFORM "windows-x64") 16 | endif() 17 | 18 | # === Flutter Library === 19 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") 20 | 21 | # Published to parent scope for install step. 22 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 23 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 24 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 25 | set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) 26 | 27 | list(APPEND FLUTTER_LIBRARY_HEADERS 28 | "flutter_export.h" 29 | "flutter_windows.h" 30 | "flutter_messenger.h" 31 | "flutter_plugin_registrar.h" 32 | "flutter_texture_registrar.h" 33 | ) 34 | list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") 35 | add_library(flutter INTERFACE) 36 | target_include_directories(flutter INTERFACE 37 | "${EPHEMERAL_DIR}" 38 | ) 39 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") 40 | add_dependencies(flutter flutter_assemble) 41 | 42 | # === Wrapper === 43 | list(APPEND CPP_WRAPPER_SOURCES_CORE 44 | "core_implementations.cc" 45 | "standard_codec.cc" 46 | ) 47 | list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") 48 | list(APPEND CPP_WRAPPER_SOURCES_PLUGIN 49 | "plugin_registrar.cc" 50 | ) 51 | list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") 52 | list(APPEND CPP_WRAPPER_SOURCES_APP 53 | "flutter_engine.cc" 54 | "flutter_view_controller.cc" 55 | ) 56 | list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") 57 | 58 | # Wrapper sources needed for a plugin. 59 | add_library(flutter_wrapper_plugin STATIC 60 | ${CPP_WRAPPER_SOURCES_CORE} 61 | ${CPP_WRAPPER_SOURCES_PLUGIN} 62 | ) 63 | apply_standard_settings(flutter_wrapper_plugin) 64 | set_target_properties(flutter_wrapper_plugin PROPERTIES 65 | POSITION_INDEPENDENT_CODE ON) 66 | set_target_properties(flutter_wrapper_plugin PROPERTIES 67 | CXX_VISIBILITY_PRESET hidden) 68 | target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) 69 | target_include_directories(flutter_wrapper_plugin PUBLIC 70 | "${WRAPPER_ROOT}/include" 71 | ) 72 | add_dependencies(flutter_wrapper_plugin flutter_assemble) 73 | 74 | # Wrapper sources needed for the runner. 75 | add_library(flutter_wrapper_app STATIC 76 | ${CPP_WRAPPER_SOURCES_CORE} 77 | ${CPP_WRAPPER_SOURCES_APP} 78 | ) 79 | apply_standard_settings(flutter_wrapper_app) 80 | target_link_libraries(flutter_wrapper_app PUBLIC flutter) 81 | target_include_directories(flutter_wrapper_app PUBLIC 82 | "${WRAPPER_ROOT}/include" 83 | ) 84 | add_dependencies(flutter_wrapper_app flutter_assemble) 85 | 86 | # === Flutter tool backend === 87 | # _phony_ is a non-existent file to force this command to run every time, 88 | # since currently there's no way to get a full input/output list from the 89 | # flutter tool. 90 | set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") 91 | set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) 92 | add_custom_command( 93 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 94 | ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} 95 | ${CPP_WRAPPER_SOURCES_APP} 96 | ${PHONY_OUTPUT} 97 | COMMAND ${CMAKE_COMMAND} -E env 98 | ${FLUTTER_TOOL_ENVIRONMENT} 99 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" 100 | ${FLUTTER_TARGET_PLATFORM} $ 101 | VERBATIM 102 | ) 103 | add_custom_target(flutter_assemble DEPENDS 104 | "${FLUTTER_LIBRARY}" 105 | ${FLUTTER_LIBRARY_HEADERS} 106 | ${CPP_WRAPPER_SOURCES_CORE} 107 | ${CPP_WRAPPER_SOURCES_PLUGIN} 108 | ${CPP_WRAPPER_SOURCES_APP} 109 | ) 110 | -------------------------------------------------------------------------------- /example/windows/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | void RegisterPlugins(flutter::PluginRegistry* registry) { 14 | FlutterInappwebviewWindowsPluginCApiRegisterWithRegistrar( 15 | registry->GetRegistrarForPlugin("FlutterInappwebviewWindowsPluginCApi")); 16 | FlutterSecureStorageWindowsPluginRegisterWithRegistrar( 17 | registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin")); 18 | UrlLauncherWindowsRegisterWithRegistrar( 19 | registry->GetRegistrarForPlugin("UrlLauncherWindows")); 20 | } 21 | -------------------------------------------------------------------------------- /example/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 | -------------------------------------------------------------------------------- /example/windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | flutter_inappwebview_windows 7 | flutter_secure_storage_windows 8 | url_launcher_windows 9 | ) 10 | 11 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 12 | ) 13 | 14 | set(PLUGIN_BUNDLED_LIBRARIES) 15 | 16 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 17 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 18 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 19 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 20 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 21 | endforeach(plugin) 22 | 23 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 24 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 25 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 26 | endforeach(ffi_plugin) 27 | -------------------------------------------------------------------------------- /example/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 | -------------------------------------------------------------------------------- /example/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", "example" "\0" 94 | VALUE "FileVersion", VERSION_AS_STRING "\0" 95 | VALUE "InternalName", "example" "\0" 96 | VALUE "LegalCopyright", "Copyright (C) 2024 com.example. All rights reserved." "\0" 97 | VALUE "OriginalFilename", "example.exe" "\0" 98 | VALUE "ProductName", "example" "\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 | -------------------------------------------------------------------------------- /example/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 | // Flutter can complete the first frame before the "show window" callback is 35 | // registered. The following call ensures a frame is pending to ensure the 36 | // window is shown. It is a no-op if the first frame hasn't completed yet. 37 | flutter_controller_->ForceRedraw(); 38 | 39 | return true; 40 | } 41 | 42 | void FlutterWindow::OnDestroy() { 43 | if (flutter_controller_) { 44 | flutter_controller_ = nullptr; 45 | } 46 | 47 | Win32Window::OnDestroy(); 48 | } 49 | 50 | LRESULT 51 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message, 52 | WPARAM const wparam, 53 | LPARAM const lparam) noexcept { 54 | // Give Flutter, including plugins, an opportunity to handle window messages. 55 | if (flutter_controller_) { 56 | std::optional result = 57 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, 58 | lparam); 59 | if (result) { 60 | return *result; 61 | } 62 | } 63 | 64 | switch (message) { 65 | case WM_FONTCHANGE: 66 | flutter_controller_->engine()->ReloadSystemFonts(); 67 | break; 68 | } 69 | 70 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam); 71 | } 72 | -------------------------------------------------------------------------------- /example/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 | -------------------------------------------------------------------------------- /example/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"example", 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 | -------------------------------------------------------------------------------- /example/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 | -------------------------------------------------------------------------------- /example/windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluo-dev/flutter-sdk/1ae72ef7030fae8f45dc27eede6d893f08e97c97/example/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /example/windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /example/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 | unsigned int target_length = ::WideCharToMultiByte( 49 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 50 | -1, nullptr, 0, nullptr, nullptr) 51 | -1; // remove the trailing null character 52 | int input_length = (int)wcslen(utf16_string); 53 | std::string utf8_string; 54 | if (target_length == 0 || target_length > utf8_string.max_size()) { 55 | return utf8_string; 56 | } 57 | utf8_string.resize(target_length); 58 | int converted_length = ::WideCharToMultiByte( 59 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 60 | input_length, utf8_string.data(), target_length, nullptr, nullptr); 61 | if (converted_length == 0) { 62 | return std::string(); 63 | } 64 | return utf8_string; 65 | } 66 | -------------------------------------------------------------------------------- /example/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 | -------------------------------------------------------------------------------- /example/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 | // responds 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 | -------------------------------------------------------------------------------- /l10n.yaml: -------------------------------------------------------------------------------- 1 | arb-dir: lib/l10n 2 | template-arb-file: fluo_en.arb 3 | output-localization-file: fluo_localizations.dart 4 | output-class: FluoLocalizations 5 | synthetic-package: false 6 | format: true 7 | -------------------------------------------------------------------------------- /lib/api/models/api_error.dart: -------------------------------------------------------------------------------- 1 | import 'package:freezed_annotation/freezed_annotation.dart'; 2 | 3 | part 'api_error.freezed.dart'; 4 | part 'api_error.g.dart'; 5 | 6 | @Freezed() 7 | class ApiError with _$ApiError { 8 | const factory ApiError({ 9 | required int code, 10 | required String message, 11 | required dynamic data, 12 | }) = _ApiError; 13 | 14 | factory ApiError.fromJson(Map json) => 15 | _$ApiErrorFromJson(json); 16 | } 17 | -------------------------------------------------------------------------------- /lib/api/models/api_error.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'api_error.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | _$ApiErrorImpl _$$ApiErrorImplFromJson(Map json) => 10 | _$ApiErrorImpl( 11 | code: (json['code'] as num).toInt(), 12 | message: json['message'] as String, 13 | data: json['data'], 14 | ); 15 | 16 | Map _$$ApiErrorImplToJson(_$ApiErrorImpl instance) => 17 | { 18 | 'code': instance.code, 19 | 'message': instance.message, 20 | 'data': instance.data, 21 | }; 22 | -------------------------------------------------------------------------------- /lib/api/models/app_config.dart: -------------------------------------------------------------------------------- 1 | import 'package:fluo/api/models/auth_method.dart'; 2 | import 'package:fluo/api/models/registration_step.dart'; 3 | import 'package:freezed_annotation/freezed_annotation.dart'; 4 | 5 | part 'app_config.freezed.dart'; 6 | part 'app_config.g.dart'; 7 | 8 | @Freezed() 9 | class AppConfig with _$AppConfig { 10 | const factory AppConfig({ 11 | required String termsUrl, 12 | required String privacyUrl, 13 | required List registrationSteps, 14 | required List authMethods, 15 | }) = _AppConfig; 16 | 17 | factory AppConfig.fromJson(Map json) => 18 | _$AppConfigFromJson(json); 19 | } 20 | -------------------------------------------------------------------------------- /lib/api/models/app_config.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'app_config.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | _$AppConfigImpl _$$AppConfigImplFromJson(Map json) => 10 | _$AppConfigImpl( 11 | termsUrl: json['termsUrl'] as String, 12 | privacyUrl: json['privacyUrl'] as String, 13 | registrationSteps: (json['registrationSteps'] as List) 14 | .map((e) => RegistrationStep.fromJson(e as Map)) 15 | .toList(), 16 | authMethods: (json['authMethods'] as List) 17 | .map((e) => AuthMethod.fromJson(e as Map)) 18 | .toList(), 19 | ); 20 | 21 | Map _$$AppConfigImplToJson(_$AppConfigImpl instance) => 22 | { 23 | 'termsUrl': instance.termsUrl, 24 | 'privacyUrl': instance.privacyUrl, 25 | 'registrationSteps': instance.registrationSteps, 26 | 'authMethods': instance.authMethods, 27 | }; 28 | -------------------------------------------------------------------------------- /lib/api/models/auth_method.dart: -------------------------------------------------------------------------------- 1 | import 'package:fluo/api/models/google_client_id.dart'; 2 | import 'package:freezed_annotation/freezed_annotation.dart'; 3 | 4 | part 'auth_method.freezed.dart'; 5 | part 'auth_method.g.dart'; 6 | 7 | abstract class AuthMethodId { 8 | static const String email = 'email'; 9 | static const String mobile = 'mobile'; 10 | static const String google = 'google'; 11 | static const String apple = 'apple'; 12 | } 13 | 14 | @Freezed() 15 | class AuthMethod with _$AuthMethod { 16 | const factory AuthMethod({ 17 | required String id, 18 | required bool selected, 19 | GoogleClientId? googleClientId, 20 | }) = _AuthMethod; 21 | 22 | factory AuthMethod.fromJson(Map json) => 23 | _$AuthMethodFromJson(json); 24 | } 25 | -------------------------------------------------------------------------------- /lib/api/models/auth_method.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'auth_method.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | _$AuthMethodImpl _$$AuthMethodImplFromJson(Map json) => 10 | _$AuthMethodImpl( 11 | id: json['id'] as String, 12 | selected: json['selected'] as bool, 13 | googleClientId: json['googleClientId'] == null 14 | ? null 15 | : GoogleClientId.fromJson( 16 | json['googleClientId'] as Map), 17 | ); 18 | 19 | Map _$$AuthMethodImplToJson(_$AuthMethodImpl instance) => 20 | { 21 | 'id': instance.id, 22 | 'selected': instance.selected, 23 | 'googleClientId': instance.googleClientId, 24 | }; 25 | -------------------------------------------------------------------------------- /lib/api/models/google_client_id.dart: -------------------------------------------------------------------------------- 1 | import 'package:freezed_annotation/freezed_annotation.dart'; 2 | 3 | part 'google_client_id.freezed.dart'; 4 | part 'google_client_id.g.dart'; 5 | 6 | @Freezed() 7 | class GoogleClientId with _$GoogleClientId { 8 | const factory GoogleClientId({ 9 | required String ios, 10 | required String android, 11 | required String web, 12 | }) = _GoogleClientId; 13 | 14 | factory GoogleClientId.fromJson(Map json) => 15 | _$GoogleClientIdFromJson(json); 16 | } 17 | -------------------------------------------------------------------------------- /lib/api/models/google_client_id.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'google_client_id.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | _$GoogleClientIdImpl _$$GoogleClientIdImplFromJson(Map json) => 10 | _$GoogleClientIdImpl( 11 | ios: json['ios'] as String, 12 | android: json['android'] as String, 13 | web: json['web'] as String, 14 | ); 15 | 16 | Map _$$GoogleClientIdImplToJson( 17 | _$GoogleClientIdImpl instance) => 18 | { 19 | 'ios': instance.ios, 20 | 'android': instance.android, 21 | 'web': instance.web, 22 | }; 23 | -------------------------------------------------------------------------------- /lib/api/models/partial_session.dart: -------------------------------------------------------------------------------- 1 | import 'package:freezed_annotation/freezed_annotation.dart'; 2 | 3 | part 'partial_session.freezed.dart'; 4 | part 'partial_session.g.dart'; 5 | 6 | @Freezed() 7 | class PartialSession with _$PartialSession { 8 | const factory PartialSession({ 9 | required String id, 10 | String? email, 11 | }) = _PartialSession; 12 | 13 | factory PartialSession.fromJson(Map json) => 14 | _$PartialSessionFromJson(json); 15 | } 16 | -------------------------------------------------------------------------------- /lib/api/models/partial_session.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'partial_session.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | _$PartialSessionImpl _$$PartialSessionImplFromJson(Map json) => 10 | _$PartialSessionImpl( 11 | id: json['id'] as String, 12 | email: json['email'] as String?, 13 | ); 14 | 15 | Map _$$PartialSessionImplToJson( 16 | _$PartialSessionImpl instance) => 17 | { 18 | 'id': instance.id, 19 | 'email': instance.email, 20 | }; 21 | -------------------------------------------------------------------------------- /lib/api/models/registration_step.dart: -------------------------------------------------------------------------------- 1 | import 'package:freezed_annotation/freezed_annotation.dart'; 2 | 3 | part 'registration_step.freezed.dart'; 4 | part 'registration_step.g.dart'; 5 | 6 | @Freezed() 7 | class RegistrationStep with _$RegistrationStep { 8 | const factory RegistrationStep({ 9 | required String id, 10 | required String fieldKey, 11 | required String path, 12 | required bool selected, 13 | }) = _RegistrationStep; 14 | 15 | factory RegistrationStep.fromJson(Map json) => 16 | _$RegistrationStepFromJson(json); 17 | } 18 | -------------------------------------------------------------------------------- /lib/api/models/registration_step.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'registration_step.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | _$RegistrationStepImpl _$$RegistrationStepImplFromJson( 10 | Map json) => 11 | _$RegistrationStepImpl( 12 | id: json['id'] as String, 13 | fieldKey: json['fieldKey'] as String, 14 | path: json['path'] as String, 15 | selected: json['selected'] as bool, 16 | ); 17 | 18 | Map _$$RegistrationStepImplToJson( 19 | _$RegistrationStepImpl instance) => 20 | { 21 | 'id': instance.id, 22 | 'fieldKey': instance.fieldKey, 23 | 'path': instance.path, 24 | 'selected': instance.selected, 25 | }; 26 | -------------------------------------------------------------------------------- /lib/api/models/session.dart: -------------------------------------------------------------------------------- 1 | import 'package:fluo/api/models/user.dart'; 2 | import 'package:freezed_annotation/freezed_annotation.dart'; 3 | 4 | part 'session.freezed.dart'; 5 | part 'session.g.dart'; 6 | 7 | @Freezed() 8 | class Session with _$Session { 9 | const factory Session({ 10 | required String id, 11 | required String accessToken, 12 | required int expiresAt, 13 | required String refreshToken, 14 | String? firebaseToken, 15 | String? supabaseToken, 16 | String? supabaseSession, 17 | required User user, 18 | }) = _Session; 19 | 20 | factory Session.fromJson(Map json) => 21 | _$SessionFromJson(json); 22 | } 23 | -------------------------------------------------------------------------------- /lib/api/models/session.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'session.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | _$SessionImpl _$$SessionImplFromJson(Map json) => 10 | _$SessionImpl( 11 | id: json['id'] as String, 12 | accessToken: json['accessToken'] as String, 13 | expiresAt: (json['expiresAt'] as num).toInt(), 14 | refreshToken: json['refreshToken'] as String, 15 | firebaseToken: json['firebaseToken'] as String?, 16 | supabaseToken: json['supabaseToken'] as String?, 17 | supabaseSession: json['supabaseSession'] as String?, 18 | user: User.fromJson(json['user'] as Map), 19 | ); 20 | 21 | Map _$$SessionImplToJson(_$SessionImpl instance) => 22 | { 23 | 'id': instance.id, 24 | 'accessToken': instance.accessToken, 25 | 'expiresAt': instance.expiresAt, 26 | 'refreshToken': instance.refreshToken, 27 | 'firebaseToken': instance.firebaseToken, 28 | 'supabaseToken': instance.supabaseToken, 29 | 'supabaseSession': instance.supabaseSession, 30 | 'user': instance.user, 31 | }; 32 | -------------------------------------------------------------------------------- /lib/api/models/user.dart: -------------------------------------------------------------------------------- 1 | import 'package:freezed_annotation/freezed_annotation.dart'; 2 | 3 | part 'user.freezed.dart'; 4 | part 'user.g.dart'; 5 | 6 | @Freezed() 7 | class User with _$User { 8 | const factory User({ 9 | required String id, 10 | required String email, 11 | String? firstName, 12 | String? lastName, 13 | }) = _User; 14 | 15 | factory User.fromJson(Map json) => _$UserFromJson(json); 16 | } 17 | -------------------------------------------------------------------------------- /lib/api/models/user.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'user.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | _$UserImpl _$$UserImplFromJson(Map json) => _$UserImpl( 10 | id: json['id'] as String, 11 | email: json['email'] as String, 12 | firstName: json['firstName'] as String?, 13 | lastName: json['lastName'] as String?, 14 | ); 15 | 16 | Map _$$UserImplToJson(_$UserImpl instance) => 17 | { 18 | 'id': instance.id, 19 | 'email': instance.email, 20 | 'firstName': instance.firstName, 21 | 'lastName': instance.lastName, 22 | }; 23 | -------------------------------------------------------------------------------- /lib/l10n/fluo_de.arb: -------------------------------------------------------------------------------- 1 | { 2 | "@@locale": "de", 3 | "acceptTerms": "Mit dem Fortfahren akzeptieren Sie unsere Geschäftsbedingungen und unsere Datenschutzrichtlinie.", 4 | "enterCode": "Bestätigungscode eingeben", 5 | "enterCodeHelper": "Der Code wurde an {email} gesendet. Falls Sie keine E-Mail erhalten haben, überprüfen Sie bitte Ihren Spam-Ordner.", 6 | "@enterCodeHelper": { 7 | "placeholders": { 8 | "email": { 9 | "type": "String" 10 | } 11 | } 12 | }, 13 | "enterEmail": "Geben Sie Ihre E-Mail-Adresse ein", 14 | "enterEmailPlaceholder": "beispiel@domain.de", 15 | "enterFirstName": "Geben Sie Ihren Vornamen ein", 16 | "enterFirstNamePlaceholder": "Vorname", 17 | "enterLastName": "Geben Sie Ihren Nachnamen ein", 18 | "enterLastNamePlaceholder": "Nachname", 19 | "errorUnknown": "Bei der Verarbeitung Ihrer Anfrage ist ein Fehler aufgetreten.", 20 | "errorCodeExpired": "Der Code ist abgelaufen.", 21 | "errorCodeInvalid": "Der Code ist ungültig.", 22 | "errorInternal": "Ein interner Serverfehler ist aufgetreten.", 23 | "errorNotFound": "Die Ressource konnte nicht gefunden werden.", 24 | "errorParameterInvalid": "Der gesendete Wert ist ungültig.", 25 | "errorParameterMissing": "Der Anfrage fehlen Parameter.", 26 | "errorSessionRevoked": "Ihre Sitzung wurde widerrufen.", 27 | "errorUnauthorized": "Sie haben nicht die richtigen Berechtigungen.", 28 | "next": "Weiter", 29 | "continueWithEmail": "Mit E-Mail fortfahren", 30 | "termsAndConditions": "Geschäftsbedingungen", 31 | "privacyPolicy": "Datenschutzrichtlinie", 32 | "continueWithGoogle": "Mit Google fortfahren", 33 | "continueWithApple": "Mit Apple fortfahren", 34 | "continueWithMobile": "Mit Handy fortfahren", 35 | "enterMobile": "Geben Sie Ihre Handynummer ein" 36 | } -------------------------------------------------------------------------------- /lib/l10n/fluo_en.arb: -------------------------------------------------------------------------------- 1 | { 2 | "@@locale": "en", 3 | "acceptTerms": "By continuing, you accept our terms & conditions and our privacy policy.", 4 | "enterCode": "Enter the verification code", 5 | "enterCodeHelper": "The code was sent to {email}. If you did not receive an email, you may check your spam folder.", 6 | "@enterCodeHelper": { 7 | "placeholders": { 8 | "email": { 9 | "type": "String" 10 | } 11 | } 12 | }, 13 | "enterEmail": "Enter your e-mail address", 14 | "enterEmailPlaceholder": "example@domain.com", 15 | "enterFirstName": "Enter your first name", 16 | "enterFirstNamePlaceholder": "First Name", 17 | "enterLastName": "Enter your last name", 18 | "enterLastNamePlaceholder": "Last Name", 19 | "errorUnknown": "There was an error processing your request.", 20 | "errorCodeExpired": "The code has expired.", 21 | "errorCodeInvalid": "The code is not valid.", 22 | "errorInternal": "There was an internal server error.", 23 | "errorNotFound": "The resource could not be found.", 24 | "errorParameterInvalid": "The value sent is not valid.", 25 | "errorParameterMissing": "The request is missing parameters.", 26 | "errorSessionRevoked": "Your session was revoked.", 27 | "errorUnauthorized": "You do not have the right permissions.", 28 | "next": "Next", 29 | "continueWithEmail": "Continue with email", 30 | "termsAndConditions": "Terms and conditions", 31 | "privacyPolicy": "Privacy policy", 32 | "continueWithGoogle": "Continue with Google", 33 | "continueWithApple": "Continue with Apple", 34 | "continueWithMobile": "Continue with mobile", 35 | "enterMobile": "Enter your mobile number" 36 | } -------------------------------------------------------------------------------- /lib/l10n/fluo_es.arb: -------------------------------------------------------------------------------- 1 | { 2 | "@@locale": "es", 3 | "acceptTerms": "Al continuar, aceptas nuestros términos y condiciones y nuestra política de privacidad.", 4 | "enterCode": "Introduce el código de verificación", 5 | "enterCodeHelper": "El código se envió a {email}. Si no recibiste el correo electrónico, revisa tu carpeta de spam.", 6 | "@enterCodeHelper": { 7 | "placeholders": { 8 | "email": { 9 | "type": "String" 10 | } 11 | } 12 | }, 13 | "enterEmail": "Introduce tu dirección de correo electrónico", 14 | "enterEmailPlaceholder": "ejemplo@dominio.es", 15 | "enterFirstName": "Introduce tu nombre", 16 | "enterFirstNamePlaceholder": "Nombre", 17 | "enterLastName": "Introduce tu apellido", 18 | "enterLastNamePlaceholder": "Apellido", 19 | "errorUnknown": "Hubo un error al procesar tu solicitud.", 20 | "errorCodeExpired": "El código ha expirado.", 21 | "errorCodeInvalid": "El código no es válido.", 22 | "errorInternal": "Hubo un error interno del servidor.", 23 | "errorNotFound": "El recurso no se encontró.", 24 | "errorParameterInvalid": "El valor enviado no es válido.", 25 | "errorParameterMissing": "Faltan parámetros en la solicitud.", 26 | "errorSessionRevoked": "Tu sesión ha sido revocada.", 27 | "errorUnauthorized": "No tienes los permisos necesarios.", 28 | "next": "Siguiente", 29 | "continueWithEmail": "Continuar con el correo", 30 | "termsAndConditions": "Términos y condiciones", 31 | "privacyPolicy": "Política de privacidad", 32 | "continueWithGoogle": "Continuar con Google", 33 | "continueWithApple": "Continuar con Apple", 34 | "continueWithMobile": "Continuar con móvil", 35 | "enterMobile": "Introduce tu número de móvil" 36 | } -------------------------------------------------------------------------------- /lib/l10n/fluo_fa.arb: -------------------------------------------------------------------------------- 1 | { 2 | "@@locale": "fa", 3 | "acceptTerms": "با ادامه، شما شرایط و ضوابط و سیاست حریم خصوصی ما را می‌پذیرید.", 4 | "enterCode": "کد تأیید را وارد کنید", 5 | "enterCodeHelper": "کد به {email} ارسال شد. اگر ایمیلی دریافت نکردید، پوشه اسپم خود را بررسی کنید.", 6 | "@enterCodeHelper": { 7 | "placeholders": { 8 | "email": { 9 | "type": "String" 10 | } 11 | } 12 | }, 13 | "enterEmail": "آدرس ایمیل خود را وارد کنید", 14 | "enterEmailPlaceholder": "example@domain.com", 15 | "enterFirstName": "نام خود را وارد کنید", 16 | "enterFirstNamePlaceholder": "نام", 17 | "enterLastName": "نام خانوادگی خود را وارد کنید", 18 | "enterLastNamePlaceholder": "نام خانوادگی", 19 | "errorUnknown": "خطایی در پردازش درخواست شما رخ داد.", 20 | "errorCodeExpired": "کد منقضی شده است.", 21 | "errorCodeInvalid": "کد معتبر نیست.", 22 | "errorInternal": "خطای داخلی سرور رخ داده است.", 23 | "errorNotFound": "منبع مورد نظر یافت نشد.", 24 | "errorParameterInvalid": "مقدار ارسال‌ شده معتبر نیست.", 25 | "errorParameterMissing": "درخواست شامل پارامترهای ناقص است.", 26 | "errorSessionRevoked": "نشست شما لغو شده است.", 27 | "errorUnauthorized": "شما مجوز لازم را ندارید.", 28 | "next": "بعدی", 29 | "continueWithEmail": "ادامه با ایمیل", 30 | "termsAndConditions": "شرایط و ضوابط", 31 | "privacyPolicy": "سیاست حریم خصوصی", 32 | "continueWithGoogle": "ادامه با گوگل", 33 | "continueWithApple": "ادامه با اپل", 34 | "continueWithMobile": "ادامه با موبایل", 35 | "enterMobile": "شماره موبایل خود را وارد کنید" 36 | } 37 | -------------------------------------------------------------------------------- /lib/l10n/fluo_fr.arb: -------------------------------------------------------------------------------- 1 | { 2 | "@@locale": "fr", 3 | "acceptTerms": "En continuant, vous acceptez nos conditions générales et notre politique de confidentialité.", 4 | "enterCode": "Entrez le code de vérification", 5 | "enterCodeHelper": "Le code a été envoyé à {email}. Si vous n'avez pas reçu d'e-mail, vous pouvez vérifier votre dossier de spam.", 6 | "@enterCodeHelper": { 7 | "placeholders": { 8 | "email": { 9 | "type": "String" 10 | } 11 | } 12 | }, 13 | "enterEmail": "Entrez votre adresse e-mail", 14 | "enterEmailPlaceholder": "exemple@domaine.fr", 15 | "enterFirstName": "Entrez votre prénom", 16 | "enterFirstNamePlaceholder": "Prénom", 17 | "enterLastName": "Entrez votre nom", 18 | "enterLastNamePlaceholder": "Nom", 19 | "errorUnknown": "Une erreur est survenue lors du traitement de votre demande.", 20 | "errorCodeExpired": "Le code a expiré.", 21 | "errorCodeInvalid": "Le code n'est pas valide.", 22 | "errorInternal": "Une erreur interne au serveur est survenue.", 23 | "errorNotFound": "La ressource est introuvable.", 24 | "errorParameterInvalid": "La valeur envoyée n'est pas valide.", 25 | "errorParameterMissing": "Des paramètres sont manquants dans la requête.", 26 | "errorSessionRevoked": "Votre session n'est plus valide.", 27 | "errorUnauthorized": "Vous n'avez pas les autorisations nécessaires.", 28 | "next": "Suivant", 29 | "continueWithEmail": "Continuer avec l'e-mail", 30 | "termsAndConditions": "Conditions générales", 31 | "privacyPolicy": "Politique de confidentialité", 32 | "continueWithGoogle": "Continuer avec Google", 33 | "continueWithApple": "Continuer avec Apple", 34 | "continueWithMobile": "Continuer avec le mobile", 35 | "enterMobile": "Entrez votre numéro de mobile" 36 | } -------------------------------------------------------------------------------- /lib/l10n/fluo_it.arb: -------------------------------------------------------------------------------- 1 | { 2 | "@@locale": "it", 3 | "acceptTerms": "Continuando, accetti i nostri termini e condizioni e la nostra informativa sulla privacy.", 4 | "enterCode": "Inserisci il codice di verifica", 5 | "enterCodeHelper": "Il codice è stato inviato a {email}. Se non hai ricevuto l'e-mail, controlla la cartella spam.", 6 | "@enterCodeHelper": { 7 | "placeholders": { 8 | "email": { 9 | "type": "String" 10 | } 11 | } 12 | }, 13 | "enterEmail": "Inserisci il tuo indirizzo e-mail", 14 | "enterEmailPlaceholder": "esempio@dominio.it", 15 | "enterFirstName": "Inserisci il tuo nome", 16 | "enterFirstNamePlaceholder": "Nome", 17 | "enterLastName": "Inserisci il tuo cognome", 18 | "enterLastNamePlaceholder": "Cognome", 19 | "errorUnknown": "Si è verificato un errore durante l'elaborazione della tua richiesta.", 20 | "errorCodeExpired": "Il codice è scaduto.", 21 | "errorCodeInvalid": "Il codice non è valido.", 22 | "errorInternal": "Si è verificato un errore interno del server.", 23 | "errorNotFound": "La risorsa non è stata trovata.", 24 | "errorParameterInvalid": "Il valore inviato non è valido.", 25 | "errorParameterMissing": "Mancano dei parametri nella richiesta.", 26 | "errorSessionRevoked": "La tua sessione è stata revocata.", 27 | "errorUnauthorized": "Non hai i permessi necessari.", 28 | "next": "Avanti", 29 | "continueWithEmail": "Continua con l'email", 30 | "termsAndConditions": "Termini e condizioni", 31 | "privacyPolicy": "Informativa sulla privacy", 32 | "continueWithGoogle": "Continua con Google", 33 | "continueWithApple": "Continua con Apple", 34 | "continueWithMobile": "Continua con cellulare", 35 | "enterMobile": "Inserisci il tuo numero di cellulare" 36 | } -------------------------------------------------------------------------------- /lib/l10n/fluo_localizations_de.dart: -------------------------------------------------------------------------------- 1 | // ignore: unused_import 2 | import 'package:intl/intl.dart' as intl; 3 | import 'fluo_localizations.dart'; 4 | 5 | // ignore_for_file: type=lint 6 | 7 | /// The translations for German (`de`). 8 | class FluoLocalizationsDe extends FluoLocalizations { 9 | FluoLocalizationsDe([String locale = 'de']) : super(locale); 10 | 11 | @override 12 | String get acceptTerms => 13 | 'Mit dem Fortfahren akzeptieren Sie unsere Geschäftsbedingungen und unsere Datenschutzrichtlinie.'; 14 | 15 | @override 16 | String get enterCode => 'Bestätigungscode eingeben'; 17 | 18 | @override 19 | String enterCodeHelper(String email) { 20 | return 'Der Code wurde an $email gesendet. Falls Sie keine E-Mail erhalten haben, überprüfen Sie bitte Ihren Spam-Ordner.'; 21 | } 22 | 23 | @override 24 | String get enterEmail => 'Geben Sie Ihre E-Mail-Adresse ein'; 25 | 26 | @override 27 | String get enterEmailPlaceholder => 'beispiel@domain.de'; 28 | 29 | @override 30 | String get enterFirstName => 'Geben Sie Ihren Vornamen ein'; 31 | 32 | @override 33 | String get enterFirstNamePlaceholder => 'Vorname'; 34 | 35 | @override 36 | String get enterLastName => 'Geben Sie Ihren Nachnamen ein'; 37 | 38 | @override 39 | String get enterLastNamePlaceholder => 'Nachname'; 40 | 41 | @override 42 | String get errorUnknown => 43 | 'Bei der Verarbeitung Ihrer Anfrage ist ein Fehler aufgetreten.'; 44 | 45 | @override 46 | String get errorCodeExpired => 'Der Code ist abgelaufen.'; 47 | 48 | @override 49 | String get errorCodeInvalid => 'Der Code ist ungültig.'; 50 | 51 | @override 52 | String get errorInternal => 'Ein interner Serverfehler ist aufgetreten.'; 53 | 54 | @override 55 | String get errorNotFound => 'Die Ressource konnte nicht gefunden werden.'; 56 | 57 | @override 58 | String get errorParameterInvalid => 'Der gesendete Wert ist ungültig.'; 59 | 60 | @override 61 | String get errorParameterMissing => 'Der Anfrage fehlen Parameter.'; 62 | 63 | @override 64 | String get errorSessionRevoked => 'Ihre Sitzung wurde widerrufen.'; 65 | 66 | @override 67 | String get errorUnauthorized => 68 | 'Sie haben nicht die richtigen Berechtigungen.'; 69 | 70 | @override 71 | String get next => 'Weiter'; 72 | 73 | @override 74 | String get continueWithEmail => 'Mit E-Mail fortfahren'; 75 | 76 | @override 77 | String get termsAndConditions => 'Geschäftsbedingungen'; 78 | 79 | @override 80 | String get privacyPolicy => 'Datenschutzrichtlinie'; 81 | 82 | @override 83 | String get continueWithGoogle => 'Mit Google fortfahren'; 84 | 85 | @override 86 | String get continueWithApple => 'Mit Apple fortfahren'; 87 | 88 | @override 89 | String get continueWithMobile => 'Mit Handy fortfahren'; 90 | 91 | @override 92 | String get enterMobile => 'Geben Sie Ihre Handynummer ein'; 93 | } 94 | -------------------------------------------------------------------------------- /lib/l10n/fluo_localizations_en.dart: -------------------------------------------------------------------------------- 1 | // ignore: unused_import 2 | import 'package:intl/intl.dart' as intl; 3 | import 'fluo_localizations.dart'; 4 | 5 | // ignore_for_file: type=lint 6 | 7 | /// The translations for English (`en`). 8 | class FluoLocalizationsEn extends FluoLocalizations { 9 | FluoLocalizationsEn([String locale = 'en']) : super(locale); 10 | 11 | @override 12 | String get acceptTerms => 13 | 'By continuing, you accept our terms & conditions and our privacy policy.'; 14 | 15 | @override 16 | String get enterCode => 'Enter the verification code'; 17 | 18 | @override 19 | String enterCodeHelper(String email) { 20 | return 'The code was sent to $email. If you did not receive an email, you may check your spam folder.'; 21 | } 22 | 23 | @override 24 | String get enterEmail => 'Enter your e-mail address'; 25 | 26 | @override 27 | String get enterEmailPlaceholder => 'example@domain.com'; 28 | 29 | @override 30 | String get enterFirstName => 'Enter your first name'; 31 | 32 | @override 33 | String get enterFirstNamePlaceholder => 'First Name'; 34 | 35 | @override 36 | String get enterLastName => 'Enter your last name'; 37 | 38 | @override 39 | String get enterLastNamePlaceholder => 'Last Name'; 40 | 41 | @override 42 | String get errorUnknown => 'There was an error processing your request.'; 43 | 44 | @override 45 | String get errorCodeExpired => 'The code has expired.'; 46 | 47 | @override 48 | String get errorCodeInvalid => 'The code is not valid.'; 49 | 50 | @override 51 | String get errorInternal => 'There was an internal server error.'; 52 | 53 | @override 54 | String get errorNotFound => 'The resource could not be found.'; 55 | 56 | @override 57 | String get errorParameterInvalid => 'The value sent is not valid.'; 58 | 59 | @override 60 | String get errorParameterMissing => 'The request is missing parameters.'; 61 | 62 | @override 63 | String get errorSessionRevoked => 'Your session was revoked.'; 64 | 65 | @override 66 | String get errorUnauthorized => 'You do not have the right permissions.'; 67 | 68 | @override 69 | String get next => 'Next'; 70 | 71 | @override 72 | String get continueWithEmail => 'Continue with email'; 73 | 74 | @override 75 | String get termsAndConditions => 'Terms and conditions'; 76 | 77 | @override 78 | String get privacyPolicy => 'Privacy policy'; 79 | 80 | @override 81 | String get continueWithGoogle => 'Continue with Google'; 82 | 83 | @override 84 | String get continueWithApple => 'Continue with Apple'; 85 | 86 | @override 87 | String get continueWithMobile => 'Continue with mobile'; 88 | 89 | @override 90 | String get enterMobile => 'Enter your mobile number'; 91 | } 92 | -------------------------------------------------------------------------------- /lib/l10n/fluo_localizations_es.dart: -------------------------------------------------------------------------------- 1 | // ignore: unused_import 2 | import 'package:intl/intl.dart' as intl; 3 | import 'fluo_localizations.dart'; 4 | 5 | // ignore_for_file: type=lint 6 | 7 | /// The translations for Spanish Castilian (`es`). 8 | class FluoLocalizationsEs extends FluoLocalizations { 9 | FluoLocalizationsEs([String locale = 'es']) : super(locale); 10 | 11 | @override 12 | String get acceptTerms => 13 | 'Al continuar, aceptas nuestros términos y condiciones y nuestra política de privacidad.'; 14 | 15 | @override 16 | String get enterCode => 'Introduce el código de verificación'; 17 | 18 | @override 19 | String enterCodeHelper(String email) { 20 | return 'El código se envió a $email. Si no recibiste el correo electrónico, revisa tu carpeta de spam.'; 21 | } 22 | 23 | @override 24 | String get enterEmail => 'Introduce tu dirección de correo electrónico'; 25 | 26 | @override 27 | String get enterEmailPlaceholder => 'ejemplo@dominio.es'; 28 | 29 | @override 30 | String get enterFirstName => 'Introduce tu nombre'; 31 | 32 | @override 33 | String get enterFirstNamePlaceholder => 'Nombre'; 34 | 35 | @override 36 | String get enterLastName => 'Introduce tu apellido'; 37 | 38 | @override 39 | String get enterLastNamePlaceholder => 'Apellido'; 40 | 41 | @override 42 | String get errorUnknown => 'Hubo un error al procesar tu solicitud.'; 43 | 44 | @override 45 | String get errorCodeExpired => 'El código ha expirado.'; 46 | 47 | @override 48 | String get errorCodeInvalid => 'El código no es válido.'; 49 | 50 | @override 51 | String get errorInternal => 'Hubo un error interno del servidor.'; 52 | 53 | @override 54 | String get errorNotFound => 'El recurso no se encontró.'; 55 | 56 | @override 57 | String get errorParameterInvalid => 'El valor enviado no es válido.'; 58 | 59 | @override 60 | String get errorParameterMissing => 'Faltan parámetros en la solicitud.'; 61 | 62 | @override 63 | String get errorSessionRevoked => 'Tu sesión ha sido revocada.'; 64 | 65 | @override 66 | String get errorUnauthorized => 'No tienes los permisos necesarios.'; 67 | 68 | @override 69 | String get next => 'Siguiente'; 70 | 71 | @override 72 | String get continueWithEmail => 'Continuar con el correo'; 73 | 74 | @override 75 | String get termsAndConditions => 'Términos y condiciones'; 76 | 77 | @override 78 | String get privacyPolicy => 'Política de privacidad'; 79 | 80 | @override 81 | String get continueWithGoogle => 'Continuar con Google'; 82 | 83 | @override 84 | String get continueWithApple => 'Continuar con Apple'; 85 | 86 | @override 87 | String get continueWithMobile => 'Continuar con móvil'; 88 | 89 | @override 90 | String get enterMobile => 'Introduce tu número de móvil'; 91 | } 92 | -------------------------------------------------------------------------------- /lib/l10n/fluo_localizations_fa.dart: -------------------------------------------------------------------------------- 1 | // ignore: unused_import 2 | import 'package:intl/intl.dart' as intl; 3 | import 'fluo_localizations.dart'; 4 | 5 | // ignore_for_file: type=lint 6 | 7 | /// The translations for Persian (`fa`). 8 | class FluoLocalizationsFa extends FluoLocalizations { 9 | FluoLocalizationsFa([String locale = 'fa']) : super(locale); 10 | 11 | @override 12 | String get acceptTerms => 13 | 'با ادامه، شما شرایط و ضوابط و سیاست حریم خصوصی ما را می‌پذیرید.'; 14 | 15 | @override 16 | String get enterCode => 'کد تأیید را وارد کنید'; 17 | 18 | @override 19 | String enterCodeHelper(String email) { 20 | return 'کد به $email ارسال شد. اگر ایمیلی دریافت نکردید، پوشه اسپم خود را بررسی کنید.'; 21 | } 22 | 23 | @override 24 | String get enterEmail => 'آدرس ایمیل خود را وارد کنید'; 25 | 26 | @override 27 | String get enterEmailPlaceholder => 'example@domain.com'; 28 | 29 | @override 30 | String get enterFirstName => 'نام خود را وارد کنید'; 31 | 32 | @override 33 | String get enterFirstNamePlaceholder => 'نام'; 34 | 35 | @override 36 | String get enterLastName => 'نام خانوادگی خود را وارد کنید'; 37 | 38 | @override 39 | String get enterLastNamePlaceholder => 'نام خانوادگی'; 40 | 41 | @override 42 | String get errorUnknown => 'خطایی در پردازش درخواست شما رخ داد.'; 43 | 44 | @override 45 | String get errorCodeExpired => 'کد منقضی شده است.'; 46 | 47 | @override 48 | String get errorCodeInvalid => 'کد معتبر نیست.'; 49 | 50 | @override 51 | String get errorInternal => 'خطای داخلی سرور رخ داده است.'; 52 | 53 | @override 54 | String get errorNotFound => 'منبع مورد نظر یافت نشد.'; 55 | 56 | @override 57 | String get errorParameterInvalid => 'مقدار ارسال‌ شده معتبر نیست.'; 58 | 59 | @override 60 | String get errorParameterMissing => 'درخواست شامل پارامترهای ناقص است.'; 61 | 62 | @override 63 | String get errorSessionRevoked => 'نشست شما لغو شده است.'; 64 | 65 | @override 66 | String get errorUnauthorized => 'شما مجوز لازم را ندارید.'; 67 | 68 | @override 69 | String get next => 'بعدی'; 70 | 71 | @override 72 | String get continueWithEmail => 'ادامه با ایمیل'; 73 | 74 | @override 75 | String get termsAndConditions => 'شرایط و ضوابط'; 76 | 77 | @override 78 | String get privacyPolicy => 'سیاست حریم خصوصی'; 79 | 80 | @override 81 | String get continueWithGoogle => 'ادامه با گوگل'; 82 | 83 | @override 84 | String get continueWithApple => 'ادامه با اپل'; 85 | 86 | @override 87 | String get continueWithMobile => 'ادامه با موبایل'; 88 | 89 | @override 90 | String get enterMobile => 'شماره موبایل خود را وارد کنید'; 91 | } 92 | -------------------------------------------------------------------------------- /lib/l10n/fluo_localizations_fr.dart: -------------------------------------------------------------------------------- 1 | // ignore: unused_import 2 | import 'package:intl/intl.dart' as intl; 3 | import 'fluo_localizations.dart'; 4 | 5 | // ignore_for_file: type=lint 6 | 7 | /// The translations for French (`fr`). 8 | class FluoLocalizationsFr extends FluoLocalizations { 9 | FluoLocalizationsFr([String locale = 'fr']) : super(locale); 10 | 11 | @override 12 | String get acceptTerms => 13 | 'En continuant, vous acceptez nos conditions générales et notre politique de confidentialité.'; 14 | 15 | @override 16 | String get enterCode => 'Entrez le code de vérification'; 17 | 18 | @override 19 | String enterCodeHelper(String email) { 20 | return 'Le code a été envoyé à $email. Si vous n\'avez pas reçu d\'e-mail, vous pouvez vérifier votre dossier de spam.'; 21 | } 22 | 23 | @override 24 | String get enterEmail => 'Entrez votre adresse e-mail'; 25 | 26 | @override 27 | String get enterEmailPlaceholder => 'exemple@domaine.fr'; 28 | 29 | @override 30 | String get enterFirstName => 'Entrez votre prénom'; 31 | 32 | @override 33 | String get enterFirstNamePlaceholder => 'Prénom'; 34 | 35 | @override 36 | String get enterLastName => 'Entrez votre nom'; 37 | 38 | @override 39 | String get enterLastNamePlaceholder => 'Nom'; 40 | 41 | @override 42 | String get errorUnknown => 43 | 'Une erreur est survenue lors du traitement de votre demande.'; 44 | 45 | @override 46 | String get errorCodeExpired => 'Le code a expiré.'; 47 | 48 | @override 49 | String get errorCodeInvalid => 'Le code n\'est pas valide.'; 50 | 51 | @override 52 | String get errorInternal => 'Une erreur interne au serveur est survenue.'; 53 | 54 | @override 55 | String get errorNotFound => 'La ressource est introuvable.'; 56 | 57 | @override 58 | String get errorParameterInvalid => 'La valeur envoyée n\'est pas valide.'; 59 | 60 | @override 61 | String get errorParameterMissing => 62 | 'Des paramètres sont manquants dans la requête.'; 63 | 64 | @override 65 | String get errorSessionRevoked => 'Votre session n\'est plus valide.'; 66 | 67 | @override 68 | String get errorUnauthorized => 69 | 'Vous n\'avez pas les autorisations nécessaires.'; 70 | 71 | @override 72 | String get next => 'Suivant'; 73 | 74 | @override 75 | String get continueWithEmail => 'Continuer avec l\'e-mail'; 76 | 77 | @override 78 | String get termsAndConditions => 'Conditions générales'; 79 | 80 | @override 81 | String get privacyPolicy => 'Politique de confidentialité'; 82 | 83 | @override 84 | String get continueWithGoogle => 'Continuer avec Google'; 85 | 86 | @override 87 | String get continueWithApple => 'Continuer avec Apple'; 88 | 89 | @override 90 | String get continueWithMobile => 'Continuer avec le mobile'; 91 | 92 | @override 93 | String get enterMobile => 'Entrez votre numéro de mobile'; 94 | } 95 | -------------------------------------------------------------------------------- /lib/l10n/fluo_localizations_it.dart: -------------------------------------------------------------------------------- 1 | // ignore: unused_import 2 | import 'package:intl/intl.dart' as intl; 3 | import 'fluo_localizations.dart'; 4 | 5 | // ignore_for_file: type=lint 6 | 7 | /// The translations for Italian (`it`). 8 | class FluoLocalizationsIt extends FluoLocalizations { 9 | FluoLocalizationsIt([String locale = 'it']) : super(locale); 10 | 11 | @override 12 | String get acceptTerms => 13 | 'Continuando, accetti i nostri termini e condizioni e la nostra informativa sulla privacy.'; 14 | 15 | @override 16 | String get enterCode => 'Inserisci il codice di verifica'; 17 | 18 | @override 19 | String enterCodeHelper(String email) { 20 | return 'Il codice è stato inviato a $email. Se non hai ricevuto l\'e-mail, controlla la cartella spam.'; 21 | } 22 | 23 | @override 24 | String get enterEmail => 'Inserisci il tuo indirizzo e-mail'; 25 | 26 | @override 27 | String get enterEmailPlaceholder => 'esempio@dominio.it'; 28 | 29 | @override 30 | String get enterFirstName => 'Inserisci il tuo nome'; 31 | 32 | @override 33 | String get enterFirstNamePlaceholder => 'Nome'; 34 | 35 | @override 36 | String get enterLastName => 'Inserisci il tuo cognome'; 37 | 38 | @override 39 | String get enterLastNamePlaceholder => 'Cognome'; 40 | 41 | @override 42 | String get errorUnknown => 43 | 'Si è verificato un errore durante l\'elaborazione della tua richiesta.'; 44 | 45 | @override 46 | String get errorCodeExpired => 'Il codice è scaduto.'; 47 | 48 | @override 49 | String get errorCodeInvalid => 'Il codice non è valido.'; 50 | 51 | @override 52 | String get errorInternal => 'Si è verificato un errore interno del server.'; 53 | 54 | @override 55 | String get errorNotFound => 'La risorsa non è stata trovata.'; 56 | 57 | @override 58 | String get errorParameterInvalid => 'Il valore inviato non è valido.'; 59 | 60 | @override 61 | String get errorParameterMissing => 'Mancano dei parametri nella richiesta.'; 62 | 63 | @override 64 | String get errorSessionRevoked => 'La tua sessione è stata revocata.'; 65 | 66 | @override 67 | String get errorUnauthorized => 'Non hai i permessi necessari.'; 68 | 69 | @override 70 | String get next => 'Avanti'; 71 | 72 | @override 73 | String get continueWithEmail => 'Continua con l\'email'; 74 | 75 | @override 76 | String get termsAndConditions => 'Termini e condizioni'; 77 | 78 | @override 79 | String get privacyPolicy => 'Informativa sulla privacy'; 80 | 81 | @override 82 | String get continueWithGoogle => 'Continua con Google'; 83 | 84 | @override 85 | String get continueWithApple => 'Continua con Apple'; 86 | 87 | @override 88 | String get continueWithMobile => 'Continua con cellulare'; 89 | 90 | @override 91 | String get enterMobile => 'Inserisci il tuo numero di cellulare'; 92 | } 93 | -------------------------------------------------------------------------------- /lib/l10n/fluo_localized_models.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'fluo_localizations.dart'; 4 | 5 | class FluoLocalizedModels { 6 | static String error(BuildContext context, String messageId) { 7 | final fluoLocalizations = FluoLocalizations.of(context)!; 8 | switch (messageId) { 9 | case 'unauthorized': 10 | return fluoLocalizations.errorUnauthorized; 11 | case 'parameter_missing': 12 | return fluoLocalizations.errorParameterMissing; 13 | case 'parameter_invalid': 14 | return fluoLocalizations.errorParameterInvalid; 15 | case 'not_found': 16 | return fluoLocalizations.errorNotFound; 17 | case 'internal': 18 | return fluoLocalizations.errorInternal; 19 | case 'session_revoked': 20 | return fluoLocalizations.errorSessionRevoked; 21 | case 'code_expired': 22 | return fluoLocalizations.errorCodeExpired; 23 | case 'code_invalid': 24 | return fluoLocalizations.errorCodeInvalid; 25 | } 26 | return fluoLocalizations.errorUnknown; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/l10n/fluo_pt.arb: -------------------------------------------------------------------------------- 1 | { 2 | "@@locale": "pt", 3 | "acceptTerms": "Ao continuar, aceita os nossos termos e condições e a nossa política de privacidade.", 4 | "enterCode": "Introduza o código de verificação", 5 | "enterCodeHelper": "O código foi enviado para {email}. Se não recebeu um email, pode verificar a sua pasta de spam.", 6 | "@enterCodeHelper": { 7 | "placeholders": { 8 | "email": { 9 | "type": "String" 10 | } 11 | } 12 | }, 13 | "enterEmail": "Introduza o seu endereço de email", 14 | "enterEmailPlaceholder": "exemplo@dominio.com", 15 | "enterFirstName": "Introduza o seu primeiro nome", 16 | "enterFirstNamePlaceholder": "Primeiro Nome", 17 | "enterLastName": "Introduza o seu apelido", 18 | "enterLastNamePlaceholder": "Apelido", 19 | "errorUnknown": "Ocorreu um erro ao processar o seu pedido.", 20 | "errorCodeExpired": "O código expirou.", 21 | "errorCodeInvalid": "O código não é válido.", 22 | "errorInternal": "Ocorreu um erro interno do servidor.", 23 | "errorNotFound": "Não foi possível encontrar o recurso.", 24 | "errorParameterInvalid": "O valor enviado não é válido.", 25 | "errorParameterMissing": "O pedido não tem os parâmetros necessários.", 26 | "errorSessionRevoked": "A sua sessão foi revogada.", 27 | "errorUnauthorized": "Não tem as permissões necessárias.", 28 | "next": "Seguinte", 29 | "continueWithEmail": "Continuar com o e-mail", 30 | "termsAndConditions": "Termos e condições", 31 | "privacyPolicy": "Política de privacidade", 32 | "continueWithGoogle": "Continuar com Google", 33 | "continueWithApple": "Continuar com Apple", 34 | "continueWithMobile": "Continuar com celular", 35 | "enterMobile": "Digite seu número de celular" 36 | } -------------------------------------------------------------------------------- /lib/l10n/fluo_pt_BR.arb: -------------------------------------------------------------------------------- 1 | { 2 | "@@locale": "pt_BR", 3 | "acceptTerms": "Ao continuar, você aceita nossos termos e condições e nossa política de privacidade.", 4 | "enterCode": "Digite o código de verificação", 5 | "enterCodeHelper": "O código foi enviado para {email}. Se você não recebeu um e-mail, pode verificar sua pasta de spam.", 6 | "@enterCodeHelper": { 7 | "placeholders": { 8 | "email": { 9 | "type": "String" 10 | } 11 | } 12 | }, 13 | "enterEmail": "Digite seu endereço de e-mail", 14 | "enterEmailPlaceholder": "exemplo@dominio.com", 15 | "enterFirstName": "Digite seu primeiro nome", 16 | "enterFirstNamePlaceholder": "Nome", 17 | "enterLastName": "Digite seu sobrenome", 18 | "enterLastNamePlaceholder": "Sobrenome", 19 | "errorUnknown": "Ocorreu um erro ao processar sua solicitação.", 20 | "errorCodeExpired": "O código expirou.", 21 | "errorCodeInvalid": "O código não é válido.", 22 | "errorInternal": "Ocorreu um erro interno do servidor.", 23 | "errorNotFound": "O recurso não pôde ser encontrado.", 24 | "errorParameterInvalid": "O valor enviado não é válido.", 25 | "errorParameterMissing": "A solicitação está faltando parâmetros.", 26 | "errorSessionRevoked": "Sua sessão foi revogada.", 27 | "errorUnauthorized": "Você não tem as permissões corretas.", 28 | "next": "Próximo", 29 | "continueWithEmail": "Continuar com o e-mail", 30 | "termsAndConditions": "Termos e condições", 31 | "privacyPolicy": "Política de privacidade", 32 | "continueWithGoogle": "Continuar com Google", 33 | "continueWithApple": "Continuar com Apple", 34 | "continueWithMobile": "Continuar com o celular" 35 | } -------------------------------------------------------------------------------- /lib/managers/session_manager.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:fluo/api/api_client.dart'; 4 | import 'package:fluo/api/models/api_error.dart'; 5 | import 'package:fluo/api/models/session.dart'; 6 | import 'package:flutter_secure_storage/flutter_secure_storage.dart'; 7 | 8 | class SessionManager { 9 | SessionManager._(Session? session) : _session = session; 10 | 11 | Session? _session; 12 | 13 | Session? get session => _session; 14 | 15 | static Future init() async { 16 | final session = await _readSession(); 17 | return SessionManager._(session); 18 | } 19 | 20 | Future getSession({ 21 | required ApiClient apiClient, 22 | bool forceRefresh = false, 23 | }) async { 24 | var session = _session; 25 | if (session == null) { 26 | return null; 27 | } 28 | 29 | if (!forceRefresh && !_hasExpired(session.expiresAt)) { 30 | return session; 31 | } 32 | 33 | try { 34 | session = await apiClient.refreshSession( 35 | sessionId: session.id, 36 | refreshToken: session.refreshToken, 37 | ); 38 | } on ApiError catch (_) { 39 | await clearSession(); 40 | return null; 41 | } 42 | 43 | await _writeSession(session); 44 | 45 | _session = session; 46 | 47 | return session; 48 | } 49 | 50 | Future setSession(Session session) async { 51 | await _writeSession(session); 52 | _session = session; 53 | } 54 | 55 | Future clearSession() async { 56 | await _writeSession(null); 57 | _session = null; 58 | } 59 | 60 | // Helpers 61 | 62 | static bool _hasExpired(int expEpochInSeconds) { 63 | return expEpochInSeconds < DateTime.now().millisecondsSinceEpoch ~/ 1000; 64 | } 65 | 66 | // Secure storage for sensitive data 67 | 68 | static const _sessionKey = 'sessionKey'; 69 | 70 | static Future _writeSession(Session? session) async { 71 | const secureStorage = FlutterSecureStorage(); 72 | await secureStorage.write( 73 | key: _sessionKey, 74 | value: session == null ? null : jsonEncode(session), 75 | ); 76 | } 77 | 78 | static Future _readSession() async { 79 | const secureStorage = FlutterSecureStorage(); 80 | final json = await secureStorage.read(key: _sessionKey); 81 | if (json == null) { 82 | return null; 83 | } 84 | return Session.fromJson(jsonDecode(json)); 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /lib/presentation/auth/auth_navigator.dart: -------------------------------------------------------------------------------- 1 | import 'package:fluo/api/models/partial_session.dart'; 2 | import 'package:fluo/managers/session_manager.dart'; 3 | import 'package:fluo/presentation/auth/enter_code_screen.dart'; 4 | import 'package:fluo/presentation/auth/enter_email_screen.dart'; 5 | import 'package:fluo/presentation/auth/enter_mobile_screen.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:provider/provider.dart'; 8 | 9 | class AuthNavigator extends StatefulWidget { 10 | const AuthNavigator({ 11 | super.key, 12 | required this.initialRoute, 13 | required this.onExit, 14 | required this.onUserAuthenticated, 15 | }); 16 | 17 | static const routeEnterEmail = '/enter-email'; 18 | static const routeEnterMobile = '/enter-mobile'; 19 | static const routeEnterCode = '/enter-code'; 20 | 21 | final String initialRoute; 22 | final Function() onExit; 23 | final Function() onUserAuthenticated; 24 | 25 | @override 26 | State createState() => AuthNavigatorState(); 27 | } 28 | 29 | class AuthNavigatorState extends State { 30 | final _navigatorKey = GlobalKey(); 31 | 32 | PartialSession? _partialSession; 33 | 34 | @override 35 | Widget build(BuildContext context) { 36 | return Navigator( 37 | key: _navigatorKey, 38 | initialRoute: widget.initialRoute, 39 | onGenerateRoute: _onGenerateRoute, 40 | ); 41 | } 42 | 43 | NavigatorState _navigator() { 44 | return _navigatorKey.currentState!; 45 | } 46 | 47 | Route _onGenerateRoute(RouteSettings settings) { 48 | late Widget page; 49 | 50 | if (settings.name == AuthNavigator.routeEnterEmail) { 51 | page = EnterEmailScreen( 52 | onBackButtonPressed: () { 53 | widget.onExit(); 54 | }, 55 | onEmailSubmitted: (partialSession) { 56 | _partialSession = partialSession; 57 | _navigator().pushNamed(AuthNavigator.routeEnterCode); 58 | }, 59 | ); 60 | } else if (settings.name == AuthNavigator.routeEnterMobile) { 61 | page = EnterMobileScreen( 62 | onBackButtonPressed: () { 63 | widget.onExit(); 64 | }, 65 | onMobileSubmitted: (partialSession) { 66 | _partialSession = partialSession; 67 | _navigator().pushNamed(AuthNavigator.routeEnterCode); 68 | }, 69 | ); 70 | } else if (settings.name == AuthNavigator.routeEnterCode) { 71 | page = EnterCodeScreen( 72 | partialSession: _partialSession!, 73 | onBackButtonPressed: _navigator().pop, 74 | onCodeVerified: (session) async { 75 | await context.read().setSession(session); 76 | widget.onUserAuthenticated(); 77 | }, 78 | ); 79 | } 80 | 81 | return MaterialPageRoute( 82 | builder: (context) { 83 | return page; 84 | }, 85 | settings: settings, 86 | ); 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /lib/presentation/auth/enter_code_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:fluo/api/api_client.dart'; 2 | import 'package:fluo/api/models/api_error.dart'; 3 | import 'package:fluo/api/models/partial_session.dart'; 4 | import 'package:fluo/api/models/session.dart'; 5 | import 'package:fluo/l10n/fluo_localizations.dart'; 6 | import 'package:fluo/l10n/fluo_localized_models.dart'; 7 | import 'package:fluo/theme.dart'; 8 | import 'package:fluo/widgets/single_input_screen.dart'; 9 | import 'package:flutter/material.dart'; 10 | import 'package:pinput/pinput.dart'; 11 | import 'package:provider/provider.dart'; 12 | import 'package:styled_text/styled_text.dart'; 13 | 14 | class EnterCodeScreen extends StatefulWidget { 15 | const EnterCodeScreen({ 16 | super.key, 17 | required this.partialSession, 18 | required this.onBackButtonPressed, 19 | required this.onCodeVerified, 20 | }); 21 | 22 | final PartialSession partialSession; 23 | final Function() onBackButtonPressed; 24 | final Function(Session session) onCodeVerified; 25 | 26 | @override 27 | State createState() => _EnterEmailScreenState(); 28 | } 29 | 30 | class _EnterEmailScreenState extends State { 31 | final TextEditingController _codeController = TextEditingController(); 32 | String? _errorText; 33 | bool _loading = false; 34 | bool _isCodeComplete = false; 35 | 36 | @override 37 | void initState() { 38 | super.initState(); 39 | 40 | _codeController.addListener(() { 41 | if (_isCodeComplete && _errorText != null) { 42 | _codeController.setText(''); 43 | } 44 | setState(() { 45 | _isCodeComplete = _codeController.text.length == 6; 46 | _errorText = null; 47 | }); 48 | }); 49 | } 50 | 51 | @override 52 | void dispose() { 53 | _codeController.dispose(); 54 | super.dispose(); 55 | } 56 | 57 | @override 58 | Widget build(BuildContext context) { 59 | final theme = context.read(); 60 | return SingleInputScreen( 61 | inputTitle: FluoLocalizations.of(context)!.enterCode, 62 | inputWidget: Pinput( 63 | length: 6, 64 | controller: _codeController, 65 | showCursor: true, 66 | autofocus: true, 67 | enabled: !_loading, 68 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 69 | defaultPinTheme: theme.codeInputThemeDefault, 70 | focusedPinTheme: theme.codeInputThemeFocused, 71 | submittedPinTheme: theme.codeInputThemeSubmitted, 72 | followingPinTheme: theme.codeInputThemeFollowing, 73 | disabledPinTheme: theme.codeInputThemeDisabled, 74 | errorPinTheme: theme.codeInputThemeError, 75 | onCompleted: (_) => _onNext(), 76 | ), 77 | onBackButtonPressed: widget.onBackButtonPressed, 78 | onNextButtonPressed: _onNext, 79 | nextButtonEnabled: _isCodeComplete, 80 | helperWidget: StyledText( 81 | text: FluoLocalizations.of(context)! 82 | .enterCodeHelper(widget.partialSession.email!), 83 | style: Theme.of(context).textTheme.bodyMedium, 84 | tags: { 85 | 'email': StyledTextTag( 86 | style: const TextStyle(fontWeight: FontWeight.bold), 87 | ), 88 | }, 89 | ), 90 | errorText: _errorText, 91 | loading: _loading, 92 | ); 93 | } 94 | 95 | void _onNext() async { 96 | try { 97 | setState(() => _loading = true); 98 | final apiClient = context.read(); 99 | final session = await apiClient.verifyPartialSession( 100 | partialSessionId: widget.partialSession.id, 101 | code: _codeController.text, 102 | ); 103 | widget.onCodeVerified(session); 104 | } on ApiError catch (apiError) { 105 | setState(() { 106 | _errorText = FluoLocalizedModels.error(context, apiError.message); 107 | }); 108 | } catch (error) { 109 | setState(() { 110 | _errorText = FluoLocalizations.of(context)!.errorUnknown; 111 | }); 112 | } finally { 113 | setState(() => _loading = false); 114 | } 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /lib/presentation/auth/enter_email_screen.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:fluo/api/api_client.dart'; 4 | import 'package:fluo/api/models/api_error.dart'; 5 | import 'package:fluo/api/models/partial_session.dart'; 6 | import 'package:fluo/l10n/fluo_localizations.dart'; 7 | import 'package:fluo/l10n/fluo_localized_models.dart'; 8 | import 'package:fluo/theme.dart'; 9 | import 'package:fluo/widgets/clear_suffix_button.dart'; 10 | import 'package:fluo/widgets/single_input_screen.dart'; 11 | import 'package:flutter/material.dart'; 12 | import 'package:provider/provider.dart'; 13 | 14 | final RegExp emailRegex = RegExp(r'^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$'); 15 | 16 | class EnterEmailScreen extends StatefulWidget { 17 | const EnterEmailScreen({ 18 | super.key, 19 | required this.onBackButtonPressed, 20 | required this.onEmailSubmitted, 21 | }); 22 | 23 | final Function() onBackButtonPressed; 24 | final Function(PartialSession partialSession) onEmailSubmitted; 25 | 26 | @override 27 | State createState() => _EnterEmailScreenState(); 28 | } 29 | 30 | class _EnterEmailScreenState extends State { 31 | final TextEditingController _emailController = TextEditingController(); 32 | final FocusNode _focusNode = FocusNode(); 33 | String? _errorText; 34 | bool _loading = false; 35 | bool _isEmailValid = false; 36 | 37 | @override 38 | void initState() { 39 | super.initState(); 40 | 41 | _emailController.addListener(() { 42 | setState(() { 43 | _errorText = null; 44 | _isEmailValid = emailRegex.hasMatch(_emailController.text); 45 | }); 46 | }); 47 | 48 | Timer(const Duration(milliseconds: 600), () { 49 | if (mounted) { 50 | _focusNode.requestFocus(); 51 | } 52 | }); 53 | } 54 | 55 | @override 56 | void dispose() { 57 | _emailController.dispose(); 58 | _focusNode.dispose(); 59 | super.dispose(); 60 | } 61 | 62 | @override 63 | Widget build(BuildContext context) { 64 | final theme = context.read(); 65 | return SingleInputScreen( 66 | inputTitle: FluoLocalizations.of(context)!.enterEmail, 67 | inputWidget: TextField( 68 | controller: _emailController, 69 | focusNode: _focusNode, 70 | style: theme.inputTextStyle, 71 | textAlignVertical: theme.inputTextAlignVertical, 72 | decoration: theme.inputDecoration.copyWith( 73 | hintText: FluoLocalizations.of(context)!.enterEmailPlaceholder, 74 | suffixIcon: ClearSuffixButton(controller: _emailController), 75 | ), 76 | onSubmitted: (_) => _onNext(), 77 | autocorrect: false, 78 | textInputAction: TextInputAction.next, 79 | keyboardType: TextInputType.emailAddress, 80 | autofillHints: const [ 81 | AutofillHints.email, 82 | ], 83 | ), 84 | onBackButtonPressed: widget.onBackButtonPressed, 85 | onNextButtonPressed: _onNext, 86 | nextButtonEnabled: _isEmailValid, 87 | errorText: _errorText, 88 | loading: _loading, 89 | ); 90 | } 91 | 92 | void _onNext() async { 93 | try { 94 | setState(() => _loading = true); 95 | final apiClient = context.read(); 96 | final partialSession = await apiClient.createPartialSession( 97 | email: _emailController.text, 98 | ); 99 | widget.onEmailSubmitted(partialSession); 100 | } on ApiError catch (apiError) { 101 | setState(() { 102 | _errorText = FluoLocalizedModels.error(context, apiError.message); 103 | }); 104 | } catch (error) { 105 | setState(() { 106 | _errorText = FluoLocalizations.of(context)!.errorUnknown; 107 | }); 108 | } finally { 109 | setState(() => _loading = false); 110 | } 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /lib/presentation/auth/enter_mobile_screen.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:fluo/api/api_client.dart'; 4 | import 'package:fluo/api/models/api_error.dart'; 5 | import 'package:fluo/api/models/partial_session.dart'; 6 | import 'package:fluo/l10n/fluo_localizations.dart'; 7 | import 'package:fluo/l10n/fluo_localized_models.dart'; 8 | import 'package:fluo/theme.dart'; 9 | import 'package:fluo/widgets/clear_suffix_button.dart'; 10 | import 'package:fluo/widgets/single_input_screen.dart'; 11 | import 'package:flutter/material.dart'; 12 | import 'package:provider/provider.dart'; 13 | 14 | class EnterMobileScreen extends StatefulWidget { 15 | const EnterMobileScreen({ 16 | super.key, 17 | required this.onBackButtonPressed, 18 | required this.onMobileSubmitted, 19 | }); 20 | 21 | final Function() onBackButtonPressed; 22 | final Function(PartialSession partialSession) onMobileSubmitted; 23 | 24 | @override 25 | State createState() => _EnterMobileScreenState(); 26 | } 27 | 28 | class _EnterMobileScreenState extends State { 29 | final TextEditingController _mobileController = TextEditingController(); 30 | final FocusNode _focusNode = FocusNode(); 31 | String? _errorText; 32 | bool _loading = false; 33 | final bool _isMobileValid = false; 34 | 35 | @override 36 | void initState() { 37 | super.initState(); 38 | 39 | _mobileController.addListener(() { 40 | setState(() { 41 | _errorText = null; 42 | // _isMobileValid = do it 43 | }); 44 | }); 45 | 46 | Timer(const Duration(milliseconds: 600), () { 47 | if (mounted) { 48 | _focusNode.requestFocus(); 49 | } 50 | }); 51 | } 52 | 53 | @override 54 | void dispose() { 55 | _mobileController.dispose(); 56 | _focusNode.dispose(); 57 | super.dispose(); 58 | } 59 | 60 | @override 61 | Widget build(BuildContext context) { 62 | final theme = context.read(); 63 | return SingleInputScreen( 64 | inputTitle: FluoLocalizations.of(context)!.enterMobile, 65 | inputWidget: TextField( 66 | controller: _mobileController, 67 | focusNode: _focusNode, 68 | style: theme.inputTextStyle, 69 | textAlignVertical: theme.inputTextAlignVertical, 70 | decoration: theme.inputDecoration.copyWith( 71 | // hintText: do it 72 | suffixIcon: ClearSuffixButton(controller: _mobileController), 73 | ), 74 | onSubmitted: (_) => _onNext(), 75 | autocorrect: false, 76 | textInputAction: TextInputAction.next, 77 | keyboardType: TextInputType.phone, 78 | autofillHints: const [ 79 | AutofillHints.telephoneNumber, 80 | ], 81 | ), 82 | onBackButtonPressed: widget.onBackButtonPressed, 83 | onNextButtonPressed: _onNext, 84 | nextButtonEnabled: _isMobileValid, 85 | errorText: _errorText, 86 | loading: _loading, 87 | ); 88 | } 89 | 90 | void _onNext() async { 91 | try { 92 | setState(() => _loading = true); 93 | final apiClient = context.read(); 94 | final partialSession = await apiClient.createPartialSession( 95 | mobileNumberE164: '', 96 | mobileNumberIso2: '', 97 | ); 98 | widget.onMobileSubmitted(partialSession); 99 | } on ApiError catch (apiError) { 100 | setState(() { 101 | _errorText = FluoLocalizedModels.error(context, apiError.message); 102 | }); 103 | } catch (error) { 104 | setState(() { 105 | _errorText = FluoLocalizations.of(context)!.errorUnknown; 106 | }); 107 | } finally { 108 | setState(() => _loading = false); 109 | } 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /lib/presentation/register/enter_first_name_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:fluo/api/api_client.dart'; 2 | import 'package:fluo/api/models/api_error.dart'; 3 | import 'package:fluo/l10n/fluo_localizations.dart'; 4 | import 'package:fluo/l10n/fluo_localized_models.dart'; 5 | import 'package:fluo/managers/session_manager.dart'; 6 | import 'package:fluo/theme.dart'; 7 | import 'package:fluo/widgets/clear_suffix_button.dart'; 8 | import 'package:fluo/widgets/single_input_screen.dart'; 9 | import 'package:flutter/material.dart'; 10 | import 'package:provider/provider.dart'; 11 | 12 | class EnterFirstNameScreen extends StatefulWidget { 13 | const EnterFirstNameScreen({ 14 | super.key, 15 | required this.onBackButtonPressed, 16 | required this.onFirstNameSubmitted, 17 | }); 18 | 19 | final Function()? onBackButtonPressed; 20 | final Function() onFirstNameSubmitted; 21 | 22 | @override 23 | State createState() => _EnterFirstNameScreenState(); 24 | } 25 | 26 | class _EnterFirstNameScreenState extends State { 27 | final TextEditingController _firstNameController = TextEditingController(); 28 | String? _errorText; 29 | bool _loading = false; 30 | bool _isFirstNameValid = false; 31 | 32 | @override 33 | void initState() { 34 | super.initState(); 35 | 36 | final session = context.read().session; 37 | if (session != null) { 38 | final firstName = session.user.firstName; 39 | if (firstName != null) { 40 | _firstNameController.text = firstName; 41 | } 42 | } 43 | 44 | _firstNameController.addListener(() { 45 | setState(() { 46 | _errorText = null; 47 | _isFirstNameValid = _firstNameController.text.length >= 2; 48 | }); 49 | }); 50 | } 51 | 52 | @override 53 | void dispose() { 54 | _firstNameController.dispose(); 55 | super.dispose(); 56 | } 57 | 58 | @override 59 | Widget build(BuildContext context) { 60 | final theme = context.read(); 61 | return SingleInputScreen( 62 | inputTitle: FluoLocalizations.of(context)!.enterFirstName, 63 | inputWidget: TextField( 64 | controller: _firstNameController, 65 | style: theme.inputTextStyle, 66 | textAlignVertical: theme.inputTextAlignVertical, 67 | decoration: theme.inputDecoration.copyWith( 68 | hintText: FluoLocalizations.of(context)!.enterFirstNamePlaceholder, 69 | suffixIcon: ClearSuffixButton(controller: _firstNameController), 70 | ), 71 | onSubmitted: (_) => _onNext(), 72 | autofocus: true, 73 | autocorrect: false, 74 | textCapitalization: TextCapitalization.words, 75 | textInputAction: TextInputAction.next, 76 | keyboardType: TextInputType.text, 77 | autofillHints: const [ 78 | AutofillHints.givenName, 79 | ], 80 | ), 81 | onBackButtonPressed: widget.onBackButtonPressed, 82 | onNextButtonPressed: _onNext, 83 | nextButtonEnabled: _isFirstNameValid, 84 | errorText: _errorText, 85 | loading: _loading, 86 | ); 87 | } 88 | 89 | void _onNext() async { 90 | try { 91 | setState(() => _loading = true); 92 | final apiClient = context.read(); 93 | final sessionManager = context.read(); 94 | final session = await sessionManager.getSession(apiClient: apiClient); 95 | await apiClient.updateUser( 96 | accessToken: session!.accessToken, 97 | firstName: _firstNameController.text, 98 | ); 99 | widget.onFirstNameSubmitted(); 100 | } on ApiError catch (apiError) { 101 | setState(() { 102 | _errorText = FluoLocalizedModels.error(context, apiError.message); 103 | }); 104 | } catch (error) { 105 | setState(() { 106 | _errorText = FluoLocalizations.of(context)!.errorUnknown; 107 | }); 108 | } finally { 109 | setState(() => _loading = false); 110 | } 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /lib/presentation/register/enter_last_name_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:fluo/api/api_client.dart'; 2 | import 'package:fluo/api/models/api_error.dart'; 3 | import 'package:fluo/l10n/fluo_localizations.dart'; 4 | import 'package:fluo/l10n/fluo_localized_models.dart'; 5 | import 'package:fluo/managers/session_manager.dart'; 6 | import 'package:fluo/theme.dart'; 7 | import 'package:fluo/widgets/clear_suffix_button.dart'; 8 | import 'package:fluo/widgets/single_input_screen.dart'; 9 | import 'package:flutter/material.dart'; 10 | import 'package:provider/provider.dart'; 11 | 12 | class EnterLastNameScreen extends StatefulWidget { 13 | const EnterLastNameScreen({ 14 | super.key, 15 | required this.onBackButtonPressed, 16 | required this.onLastNameSubmitted, 17 | }); 18 | 19 | final Function()? onBackButtonPressed; 20 | final Function() onLastNameSubmitted; 21 | 22 | @override 23 | State createState() => _EnterLastNameScreenState(); 24 | } 25 | 26 | class _EnterLastNameScreenState extends State { 27 | final TextEditingController _lastNameController = TextEditingController(); 28 | String? _errorText; 29 | bool _loading = false; 30 | bool _isLastNameValid = false; 31 | 32 | @override 33 | void initState() { 34 | super.initState(); 35 | 36 | final session = context.read().session; 37 | if (session != null) { 38 | final lastName = session.user.lastName; 39 | if (lastName != null) { 40 | _lastNameController.text = lastName; 41 | } 42 | } 43 | 44 | _lastNameController.addListener(() { 45 | setState(() { 46 | _errorText = null; 47 | _isLastNameValid = _lastNameController.text.length >= 2; 48 | }); 49 | }); 50 | } 51 | 52 | @override 53 | void dispose() { 54 | _lastNameController.dispose(); 55 | super.dispose(); 56 | } 57 | 58 | @override 59 | Widget build(BuildContext context) { 60 | final theme = context.read(); 61 | return SingleInputScreen( 62 | inputTitle: FluoLocalizations.of(context)!.enterLastName, 63 | inputWidget: TextField( 64 | controller: _lastNameController, 65 | style: theme.inputTextStyle, 66 | textAlignVertical: theme.inputTextAlignVertical, 67 | decoration: theme.inputDecoration.copyWith( 68 | hintText: FluoLocalizations.of(context)!.enterLastNamePlaceholder, 69 | suffixIcon: ClearSuffixButton(controller: _lastNameController), 70 | ), 71 | onSubmitted: (_) => _onNext(), 72 | autofocus: true, 73 | autocorrect: false, 74 | textCapitalization: TextCapitalization.words, 75 | textInputAction: TextInputAction.next, 76 | keyboardType: TextInputType.text, 77 | autofillHints: const [ 78 | AutofillHints.familyName, 79 | ], 80 | ), 81 | onBackButtonPressed: widget.onBackButtonPressed, 82 | onNextButtonPressed: _onNext, 83 | nextButtonEnabled: _isLastNameValid, 84 | errorText: _errorText, 85 | loading: _loading, 86 | ); 87 | } 88 | 89 | void _onNext() async { 90 | try { 91 | setState(() => _loading = true); 92 | final apiClient = context.read(); 93 | final sessionManager = context.read(); 94 | final session = await sessionManager.getSession(apiClient: apiClient); 95 | await apiClient.updateUser( 96 | accessToken: session!.accessToken, 97 | lastName: _lastNameController.text, 98 | ); 99 | widget.onLastNameSubmitted(); 100 | } on ApiError catch (apiError) { 101 | setState(() { 102 | _errorText = FluoLocalizedModels.error(context, apiError.message); 103 | }); 104 | } catch (error) { 105 | setState(() { 106 | _errorText = FluoLocalizations.of(context)!.errorUnknown; 107 | }); 108 | } finally { 109 | setState(() => _loading = false); 110 | } 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /lib/presentation/register/register_navigator.dart: -------------------------------------------------------------------------------- 1 | import 'package:fluo/api/models/app_config.dart'; 2 | import 'package:fluo/presentation/register/enter_first_name_screen.dart'; 3 | import 'package:fluo/presentation/register/enter_last_name_screen.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:provider/provider.dart'; 6 | 7 | const routeEnterFirstName = '/'; 8 | const routeEnterLastName = '/enter-last-name'; 9 | 10 | class RegisterNavigator extends StatefulWidget { 11 | const RegisterNavigator({ 12 | super.key, 13 | required this.onUserReady, 14 | }); 15 | 16 | final Function() onUserReady; 17 | 18 | @override 19 | State createState() => RegisterNavigatorState(); 20 | } 21 | 22 | class RegisterNavigatorState extends State { 23 | final _navigatorKey = GlobalKey(); 24 | late final AppConfig _config; 25 | 26 | @override 27 | void initState() { 28 | super.initState(); 29 | _config = context.read(); 30 | } 31 | 32 | @override 33 | Widget build(BuildContext context) { 34 | return Navigator( 35 | key: _navigatorKey, 36 | onGenerateRoute: _onGenerateRoute, 37 | ); 38 | } 39 | 40 | NavigatorState _navigator() { 41 | return _navigatorKey.currentState!; 42 | } 43 | 44 | Route _onGenerateRoute(RouteSettings settings) { 45 | final screen = _screenForRouteName(settings.name!); 46 | 47 | return MaterialPageRoute( 48 | settings: settings, 49 | builder: (context) { 50 | return screen; 51 | }, 52 | ); 53 | } 54 | 55 | Widget _screenForRouteName(String routeName) { 56 | late Widget screen; 57 | 58 | final steps = _config.registrationSteps; 59 | final stepIndex = _stepIndexForRouteName(routeName); 60 | 61 | Function()? onBackButtonPressed; 62 | if (stepIndex > 0) { 63 | onBackButtonPressed = () => _navigator().pop(); 64 | } 65 | 66 | onStepComplete() { 67 | final nextStepIndex = stepIndex + 1; 68 | if (nextStepIndex < steps.length) { 69 | final nextStep = steps[nextStepIndex]; 70 | _navigator().pushNamed(nextStep.path); 71 | } else { 72 | FocusManager.instance.primaryFocus?.unfocus(); 73 | widget.onUserReady(); 74 | } 75 | } 76 | 77 | final step = steps[stepIndex]; 78 | if (step.id == 'firstName' && step.selected) { 79 | screen = EnterFirstNameScreen( 80 | onBackButtonPressed: onBackButtonPressed, 81 | onFirstNameSubmitted: onStepComplete, 82 | ); 83 | } else if (step.id == 'lastName' && step.selected) { 84 | screen = EnterLastNameScreen( 85 | onBackButtonPressed: onBackButtonPressed, 86 | onLastNameSubmitted: onStepComplete, 87 | ); 88 | } 89 | 90 | return screen; 91 | } 92 | 93 | int _stepIndexForRouteName(String routeName) { 94 | final steps = _config.registrationSteps; 95 | if (steps.isEmpty) { 96 | return -1; 97 | } 98 | 99 | if (routeName == '/') { 100 | return 0; 101 | } 102 | 103 | for (var i = 0; i < steps.length; ++i) { 104 | if (steps[i].path == routeName) { 105 | return i; 106 | } 107 | } 108 | 109 | return -1; 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /lib/stubs/google_sign_in_web_stub.dart: -------------------------------------------------------------------------------- 1 | class GoogleSignInPlugin { 2 | Future init({ 3 | required String clientId, 4 | required List scopes, 5 | }) async {} 6 | Stream? get userDataEvents => null; 7 | dynamic renderButton({dynamic configuration}) => null; 8 | } 9 | 10 | // Stub classes for button configuration (if you use them) 11 | class GSIButtonConfiguration { 12 | const GSIButtonConfiguration({ 13 | this.theme, 14 | this.type, 15 | this.shape, 16 | this.text, 17 | this.size, 18 | this.locale, 19 | this.logoAlignment, 20 | this.minimumWidth, 21 | }); 22 | 23 | final dynamic theme; 24 | final dynamic type; 25 | final dynamic shape; 26 | final dynamic text; 27 | final dynamic size; 28 | final dynamic locale; 29 | final dynamic logoAlignment; 30 | final dynamic minimumWidth; 31 | } 32 | 33 | class GSIButtonTheme { 34 | static const outline = null; 35 | } 36 | 37 | class GSIButtonType { 38 | static const standard = null; 39 | } 40 | 41 | class GSIButtonShape { 42 | static const rectangular = null; 43 | } 44 | 45 | class GSIButtonText { 46 | static const continueWith = null; 47 | } 48 | 49 | class GSIButtonSize { 50 | static const large = null; 51 | } 52 | 53 | class GSIButtonLogoAlignment { 54 | static const center = null; 55 | } 56 | -------------------------------------------------------------------------------- /lib/widgets/clear_suffix_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ClearSuffixButton extends StatefulWidget { 4 | const ClearSuffixButton({ 5 | super.key, 6 | required this.controller, 7 | }); 8 | 9 | final TextEditingController controller; 10 | 11 | @override 12 | State createState() => _ClearSuffixButtonState(); 13 | } 14 | 15 | class _ClearSuffixButtonState extends State { 16 | bool _isEmpty = true; 17 | 18 | @override 19 | void initState() { 20 | super.initState(); 21 | 22 | setState(() { 23 | _isEmpty = widget.controller.text.isEmpty; 24 | }); 25 | 26 | widget.controller.addListener(_onTextFieldChanged); 27 | } 28 | 29 | @override 30 | void dispose() { 31 | widget.controller.removeListener(_onTextFieldChanged); 32 | super.dispose(); 33 | } 34 | 35 | @override 36 | Widget build(BuildContext context) { 37 | if (_isEmpty) { 38 | return Container(width: 0.0); 39 | } 40 | 41 | final theme = Theme.of(context); 42 | final isDark = theme.brightness == Brightness.dark; 43 | final surfaceColor = theme.colorScheme.surface; 44 | 45 | return MouseRegion( 46 | cursor: SystemMouseCursors.click, 47 | child: GestureDetector( 48 | onTap: widget.controller.clear, 49 | child: Container( 50 | margin: const EdgeInsets.only(left: 10.0, right: 15.0), 51 | decoration: BoxDecoration( 52 | color: isDark ? Colors.white24 : Colors.black.withAlpha(50), 53 | borderRadius: BorderRadius.circular(30), 54 | ), 55 | padding: const EdgeInsets.all(2.0), 56 | child: Icon( 57 | Icons.close_rounded, 58 | color: surfaceColor, 59 | ), 60 | ), 61 | ), 62 | ); 63 | } 64 | 65 | void _onTextFieldChanged() { 66 | setState(() { 67 | _isEmpty = widget.controller.text.isEmpty; 68 | }); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /lib/widgets/next_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:fluo/l10n/fluo_localizations.dart'; 2 | import 'package:fluo/theme.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:provider/provider.dart'; 5 | 6 | class NextButton extends StatelessWidget { 7 | const NextButton({ 8 | super.key, 9 | required this.onPressed, 10 | this.loading = false, 11 | this.enabled = true, 12 | }); 13 | 14 | final Function() onPressed; 15 | final bool loading; 16 | final bool enabled; 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | final theme = context.read(); 21 | 22 | Widget? loadingIndicator; 23 | if (loading) { 24 | loadingIndicator = SizedBox( 25 | width: theme.nextButtonProgressIndicatorSize.width, 26 | height: theme.nextButtonProgressIndicatorSize.height, 27 | child: CircularProgressIndicator( 28 | color: theme.nextButtonProgressIndicatorColor, 29 | strokeWidth: theme.nextButtonProgressIndicatorStrokeWidth, 30 | ), 31 | ); 32 | } 33 | 34 | return FilledButton( 35 | style: theme.nextButtonStyle, 36 | onPressed: enabled ? _onPressedIfNotLoading : null, 37 | child: Row( 38 | mainAxisSize: MainAxisSize.min, 39 | children: [ 40 | Padding( 41 | padding: const EdgeInsets.symmetric(horizontal: 15.0), 42 | child: Text(FluoLocalizations.of(context)!.next), 43 | ), 44 | if (loadingIndicator != null) loadingIndicator, 45 | ], 46 | ), 47 | ); 48 | } 49 | 50 | _onPressedIfNotLoading() { 51 | if (!loading) { 52 | onPressed(); 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /lib/widgets/round_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class RoundButton extends StatefulWidget { 4 | const RoundButton({ 5 | super.key, 6 | required this.onPressed, 7 | required this.color, 8 | this.iconData = Icons.arrow_back_rounded, 9 | }); 10 | 11 | final Function()? onPressed; 12 | final Color color; 13 | final IconData iconData; 14 | 15 | @override 16 | State createState() => _RoundButtonState(); 17 | } 18 | 19 | class _RoundButtonState extends State { 20 | Color? _backgroundColor; 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | final bgColorNormal = widget.color.withAlpha(20); 25 | final bgColorPressed = widget.color.withAlpha(40); 26 | return MouseRegion( 27 | cursor: SystemMouseCursors.click, 28 | child: GestureDetector( 29 | onTapDown: (details) { 30 | setState(() { 31 | _backgroundColor = bgColorPressed; 32 | }); 33 | }, 34 | onTapUp: (details) { 35 | setState(() { 36 | _backgroundColor = bgColorNormal; 37 | }); 38 | if (widget.onPressed != null) { 39 | widget.onPressed!(); 40 | } 41 | }, 42 | onTapCancel: () { 43 | setState(() { 44 | _backgroundColor = bgColorNormal; 45 | }); 46 | }, 47 | child: Container( 48 | decoration: BoxDecoration( 49 | color: widget.onPressed != null 50 | ? _backgroundColor ?? bgColorNormal 51 | : Colors.transparent, 52 | borderRadius: BorderRadius.circular(30), 53 | ), 54 | padding: const EdgeInsets.all(8.0), 55 | child: Icon( 56 | widget.iconData, 57 | color: widget.onPressed != null ? widget.color : Colors.transparent, 58 | size: 20.0, 59 | ), 60 | ), 61 | ), 62 | ); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /lib/widgets/single_input_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:fluo/theme.dart'; 2 | import 'package:fluo/widgets/next_button.dart'; 3 | import 'package:fluo/widgets/round_button.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:provider/provider.dart'; 6 | 7 | class SingleInputScreen extends StatelessWidget { 8 | const SingleInputScreen({ 9 | super.key, 10 | required this.inputTitle, 11 | required this.inputWidget, 12 | this.onBackButtonPressed, 13 | this.onNextButtonPressed, 14 | this.nextButtonEnabled = true, 15 | this.helperWidget, 16 | this.errorText, 17 | this.loading = false, 18 | }); 19 | 20 | final String inputTitle; 21 | final Widget inputWidget; 22 | final Function()? onBackButtonPressed; 23 | final Function()? onNextButtonPressed; 24 | final bool nextButtonEnabled; 25 | final Widget? helperWidget; 26 | final String? errorText; 27 | final bool loading; 28 | 29 | @override 30 | Widget build(BuildContext context) { 31 | final theme = context.read(); 32 | return Scaffold( 33 | body: SafeArea( 34 | child: Padding( 35 | padding: theme.screenPadding, 36 | child: Column( 37 | mainAxisSize: MainAxisSize.min, 38 | crossAxisAlignment: CrossAxisAlignment.start, 39 | children: [ 40 | RoundButton( 41 | onPressed: onBackButtonPressed, 42 | color: theme.primaryColor, 43 | ), 44 | const SizedBox(height: 30.0), 45 | Text( 46 | inputTitle, 47 | style: theme.titleStyle, 48 | ), 49 | const SizedBox(height: 20.0), 50 | inputWidget, 51 | const SizedBox(height: 10.0), 52 | if (errorText != null || helperWidget != null) ...{ 53 | const SizedBox(height: 10.0), 54 | if (errorText != null) 55 | Text( 56 | errorText!, 57 | style: theme.inputErrorStyle, 58 | ), 59 | if (errorText == null && helperWidget != null) ...{ 60 | helperWidget! 61 | }, 62 | }, 63 | if (errorText != null || helperWidget != null) ...{ 64 | const SizedBox(height: 20.0), 65 | }, 66 | const Spacer(), 67 | if (onNextButtonPressed != null) ...{ 68 | NextButton( 69 | onPressed: onNextButtonPressed!, 70 | loading: loading, 71 | enabled: nextButtonEnabled, 72 | ), 73 | }, 74 | ], 75 | ), 76 | ), 77 | ), 78 | ); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /lib/widgets/webview.dart: -------------------------------------------------------------------------------- 1 | import 'package:fluo/theme.dart'; 2 | import 'package:fluo/widgets/round_button.dart'; 3 | import 'package:flutter/foundation.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:provider/provider.dart'; 6 | import 'package:url_launcher/url_launcher.dart'; 7 | import 'package:webview_flutter/webview_flutter.dart'; 8 | 9 | class Webview extends StatelessWidget { 10 | const Webview({ 11 | super.key, 12 | required this.title, 13 | required this.url, 14 | required this.onClosePressed, 15 | }); 16 | 17 | final String title; 18 | final String url; 19 | final Function() onClosePressed; 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | final theme = context.read(); 24 | return Column( 25 | children: [ 26 | Padding( 27 | padding: const EdgeInsets.symmetric( 28 | horizontal: 20.0, 29 | vertical: 15.0, 30 | ), 31 | child: Row( 32 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 33 | children: [ 34 | Text( 35 | title, 36 | style: theme.modalTitleTextStyle, 37 | ), 38 | RoundButton( 39 | onPressed: onClosePressed, 40 | color: theme.primaryColor, 41 | iconData: Icons.close_rounded, 42 | ), 43 | ], 44 | ), 45 | ), 46 | Expanded( 47 | child: WebViewWidget( 48 | controller: WebViewController()..loadRequest(Uri.parse(url)), 49 | ), 50 | ), 51 | ], 52 | ); 53 | } 54 | } 55 | 56 | void openWebPage({ 57 | required BuildContext context, 58 | required FluoTheme theme, 59 | required String title, 60 | required String url, 61 | }) { 62 | if (kIsWeb) { 63 | launchUrl(Uri.parse(url)); 64 | return; 65 | } 66 | 67 | showModalBottomSheet( 68 | context: context, 69 | useSafeArea: true, 70 | isScrollControlled: true, 71 | enableDrag: false, 72 | builder: (context) { 73 | return Provider( 74 | create: (_) => theme, 75 | child: Webview( 76 | title: title, 77 | url: url, 78 | onClosePressed: () => Navigator.of(context).pop(), 79 | ), 80 | ); 81 | }, 82 | ); 83 | } 84 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: fluo 2 | description: User onboarding for app makers. Only 5 lines of code. Complete UI flows in less than 5 minutes. 3 | version: 0.11.0 4 | homepage: https://fluo.dev 5 | repository: https://github.com/fluo-dev/flutter-sdk 6 | 7 | environment: 8 | sdk: ">=3.5.1 <4.0.0" 9 | flutter: ">=3.22.0" 10 | 11 | platforms: 12 | android: 13 | ios: 14 | web: 15 | macos: 16 | 17 | topics: 18 | - user-onboarding 19 | - user-authentication 20 | - user-registration 21 | - social-login 22 | - authentication-sdk 23 | 24 | dependencies: 25 | flutter: 26 | sdk: flutter 27 | flutter_localizations: 28 | sdk: flutter 29 | flutter_secure_storage: ^9.2.2 30 | freezed_annotation: ^2.4.4 31 | google_sign_in: ^6.3.0 32 | google_sign_in_web: ^0.12.4+4 33 | http: ^1.2.2 34 | intl: ^0.20.2 35 | json_annotation: ^4.9.0 36 | pinput: ^5.0.0 37 | provider: ^6.1.2 38 | sign_in_with_apple: ^7.0.1 39 | styled_text: ^8.1.0 40 | url_launcher: ^6.3.1 41 | webview_flutter: ^4.13.0 42 | 43 | dev_dependencies: 44 | build_runner: ^2.4.12 45 | flutter_lints: ^4.0.0 46 | flutter_test: 47 | sdk: flutter 48 | freezed: ^2.5.7 49 | json_serializable: ^6.8.0 50 | 51 | flutter: 52 | generate: true 53 | assets: 54 | - assets/images/ 55 | --------------------------------------------------------------------------------