├── .github └── dependabot.yml ├── .gitignore ├── .metadata ├── README.md ├── analysis_options.yaml ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── firebase_authentication_flutter_ddd │ │ │ │ └── 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 ├── 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 └── RunnerTests │ └── RunnerTests.swift ├── lib ├── app.dart ├── application │ └── authentication │ │ ├── auth_events.dart │ │ ├── auth_events.freezed.dart │ │ ├── auth_state_controller.dart │ │ ├── auth_states.dart │ │ └── auth_states.freezed.dart ├── domain │ ├── authentication │ │ ├── auth_failures.dart │ │ ├── auth_failures.freezed.dart │ │ ├── auth_value_failures.dart │ │ ├── auth_value_failures.freezed.dart │ │ ├── auth_value_objects.dart │ │ ├── auth_value_validators.dart │ │ └── i_auth_facade.dart │ └── core │ │ ├── errors.dart │ │ └── value_object.dart ├── firebase_options.dart ├── main.dart ├── screens │ ├── home_page.dart │ ├── login_page.dart │ └── utils │ │ └── custom_snackbar.dart └── services │ └── authentication │ └── firebase_auth_facade.dart ├── pubspec.lock └── pubspec.yaml /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "pub" # See documentation for possible values 9 | directory: "/" # Location of package manifests 10 | schedule: 11 | interval: "weekly" 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Android Studio will place build artifacts here 44 | /android/app/debug 45 | /android/app/profile 46 | /android/app/release 47 | /android/app/google-services.json 48 | 49 | .idea 50 | .dart_tool 51 | 52 | ios/firebase_app_id_file.json 53 | -------------------------------------------------------------------------------- /.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: "2e9cb0aa71a386a91f73f7088d115c0d96654829" 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: 2e9cb0aa71a386a91f73f7088d115c0d96654829 17 | base_revision: 2e9cb0aa71a386a91f73f7088d115c0d96654829 18 | - platform: android 19 | create_revision: 2e9cb0aa71a386a91f73f7088d115c0d96654829 20 | base_revision: 2e9cb0aa71a386a91f73f7088d115c0d96654829 21 | - platform: ios 22 | create_revision: 2e9cb0aa71a386a91f73f7088d115c0d96654829 23 | base_revision: 2e9cb0aa71a386a91f73f7088d115c0d96654829 24 | - platform: linux 25 | create_revision: 2e9cb0aa71a386a91f73f7088d115c0d96654829 26 | base_revision: 2e9cb0aa71a386a91f73f7088d115c0d96654829 27 | - platform: macos 28 | create_revision: 2e9cb0aa71a386a91f73f7088d115c0d96654829 29 | base_revision: 2e9cb0aa71a386a91f73f7088d115c0d96654829 30 | - platform: web 31 | create_revision: 2e9cb0aa71a386a91f73f7088d115c0d96654829 32 | base_revision: 2e9cb0aa71a386a91f73f7088d115c0d96654829 33 | - platform: windows 34 | create_revision: 2e9cb0aa71a386a91f73f7088d115c0d96654829 35 | base_revision: 2e9cb0aa71a386a91f73f7088d115c0d96654829 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # firebase_auth_flutter_ddd 2 | 3 | Firebase authentication example with Hooks Riverpod and Freezed following Flutter DDD architecture 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | analyzer: 4 | exclude: 5 | - lib/generated_plugin_registrant.dart 6 | - lib/**.freezed.dart 7 | - lib/**.g.dart 8 | - lib/**.config.dart 9 | - lib/**.gen.dart 10 | errors: 11 | prefer_const_constructors: error 12 | annotate_overrides: error 13 | prefer_double_quotes: error 14 | sort_pub_dependencies: error 15 | invalid_annotation_target: ignore 16 | 17 | 18 | 19 | linter: 20 | rules: 21 | prefer_double_quotes: true 22 | sort_pub_dependencies: true 23 | annotate_overrides: true 24 | file_names: false 25 | overridden_fields: false 26 | prefer_single_quotes: false 27 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id "com.android.application" 3 | id "kotlin-android" 4 | id "dev.flutter.flutter-gradle-plugin" 5 | } 6 | 7 | def localProperties = new Properties() 8 | def localPropertiesFile = rootProject.file('local.properties') 9 | if (localPropertiesFile.exists()) { 10 | localPropertiesFile.withReader('UTF-8') { reader -> 11 | localProperties.load(reader) 12 | } 13 | } 14 | 15 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 16 | if (flutterVersionCode == null) { 17 | flutterVersionCode = '1' 18 | } 19 | 20 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 21 | if (flutterVersionName == null) { 22 | flutterVersionName = '1.0' 23 | } 24 | 25 | android { 26 | namespace "com.example.firebase_authentication_flutter_ddd" 27 | compileSdkVersion flutter.compileSdkVersion 28 | ndkVersion flutter.ndkVersion 29 | 30 | compileOptions { 31 | sourceCompatibility JavaVersion.VERSION_1_8 32 | targetCompatibility JavaVersion.VERSION_1_8 33 | } 34 | 35 | kotlinOptions { 36 | jvmTarget = '1.8' 37 | } 38 | 39 | sourceSets { 40 | main.java.srcDirs += 'src/main/kotlin' 41 | } 42 | 43 | defaultConfig { 44 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 45 | applicationId "com.example.firebase_authentication_flutter_ddd" 46 | // You can update the following values to match your application needs. 47 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. 48 | minSdkVersion flutter.minSdkVersion 49 | targetSdkVersion flutter.targetSdkVersion 50 | versionCode flutterVersionCode.toInteger() 51 | versionName flutterVersionName 52 | } 53 | 54 | buildTypes { 55 | release { 56 | // TODO: Add your own signing config for the release build. 57 | // Signing with the debug keys for now, so `flutter run --release` works. 58 | signingConfig signingConfigs.debug 59 | } 60 | } 61 | } 62 | 63 | flutter { 64 | source '../..' 65 | } 66 | 67 | dependencies {} 68 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 14 | 18 | 22 | 23 | 24 | 25 | 26 | 27 | 29 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/firebase_authentication_flutter_ddd/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.firebase_authentication_flutter_ddd 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pythonhubdev/firebase_authentication_flutter_DDD/17217ed8bb84a6527b1e4099946b8962fcf5cc9f/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pythonhubdev/firebase_authentication_flutter_DDD/17217ed8bb84a6527b1e4099946b8962fcf5cc9f/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pythonhubdev/firebase_authentication_flutter_DDD/17217ed8bb84a6527b1e4099946b8962fcf5cc9f/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pythonhubdev/firebase_authentication_flutter_DDD/17217ed8bb84a6527b1e4099946b8962fcf5cc9f/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pythonhubdev/firebase_authentication_flutter_DDD/17217ed8bb84a6527b1e4099946b8962fcf5cc9f/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.7.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 10 | } 11 | } 12 | 13 | allprojects { 14 | repositories { 15 | google() 16 | mavenCentral() 17 | } 18 | } 19 | 20 | rootProject.buildDir = '../build' 21 | subprojects { 22 | project.buildDir = "${rootProject.buildDir}/${project.name}" 23 | } 24 | subprojects { 25 | project.evaluationDependsOn(':app') 26 | } 27 | 28 | tasks.register("clean", Delete) { 29 | delete rootProject.buildDir 30 | } 31 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx4G 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip 6 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | 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 | settings.ext.flutterSdkPath = flutterSdkPath() 10 | 11 | includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") 12 | 13 | repositories { 14 | google() 15 | mavenCentral() 16 | gradlePluginPortal() 17 | } 18 | 19 | plugins { 20 | id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false 21 | } 22 | } 23 | 24 | plugins { 25 | id "dev.flutter.flutter-plugin-loader" version "1.0.0" 26 | id "com.android.application" version "7.3.0" apply false 27 | } 28 | 29 | include ":app" 30 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/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 | -------------------------------------------------------------------------------- /ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Firebase/Auth (10.24.0): 3 | - Firebase/CoreOnly 4 | - FirebaseAuth (~> 10.24.0) 5 | - Firebase/CoreOnly (10.24.0): 6 | - FirebaseCore (= 10.24.0) 7 | - firebase_auth (4.19.4): 8 | - Firebase/Auth (= 10.24.0) 9 | - firebase_core 10 | - Flutter 11 | - firebase_core (2.30.1): 12 | - Firebase/CoreOnly (= 10.24.0) 13 | - Flutter 14 | - FirebaseAppCheckInterop (10.24.0) 15 | - FirebaseAuth (10.24.0): 16 | - FirebaseAppCheckInterop (~> 10.17) 17 | - FirebaseCore (~> 10.0) 18 | - GoogleUtilities/AppDelegateSwizzler (~> 7.8) 19 | - GoogleUtilities/Environment (~> 7.8) 20 | - GTMSessionFetcher/Core (< 4.0, >= 2.1) 21 | - RecaptchaInterop (~> 100.0) 22 | - FirebaseCore (10.24.0): 23 | - FirebaseCoreInternal (~> 10.0) 24 | - GoogleUtilities/Environment (~> 7.12) 25 | - GoogleUtilities/Logger (~> 7.12) 26 | - FirebaseCoreInternal (10.24.0): 27 | - "GoogleUtilities/NSData+zlib (~> 7.8)" 28 | - Flutter (1.0.0) 29 | - GoogleUtilities/AppDelegateSwizzler (7.13.0): 30 | - GoogleUtilities/Environment 31 | - GoogleUtilities/Logger 32 | - GoogleUtilities/Network 33 | - GoogleUtilities/Privacy 34 | - GoogleUtilities/Environment (7.13.0): 35 | - GoogleUtilities/Privacy 36 | - PromisesObjC (< 3.0, >= 1.2) 37 | - GoogleUtilities/Logger (7.13.0): 38 | - GoogleUtilities/Environment 39 | - GoogleUtilities/Privacy 40 | - GoogleUtilities/Network (7.13.0): 41 | - GoogleUtilities/Logger 42 | - "GoogleUtilities/NSData+zlib" 43 | - GoogleUtilities/Privacy 44 | - GoogleUtilities/Reachability 45 | - "GoogleUtilities/NSData+zlib (7.13.0)": 46 | - GoogleUtilities/Privacy 47 | - GoogleUtilities/Privacy (7.13.0) 48 | - GoogleUtilities/Reachability (7.13.0): 49 | - GoogleUtilities/Logger 50 | - GoogleUtilities/Privacy 51 | - GTMSessionFetcher/Core (3.4.1) 52 | - PromisesObjC (2.4.0) 53 | - RecaptchaInterop (100.0.0) 54 | 55 | DEPENDENCIES: 56 | - firebase_auth (from `.symlinks/plugins/firebase_auth/ios`) 57 | - firebase_core (from `.symlinks/plugins/firebase_core/ios`) 58 | - Flutter (from `Flutter`) 59 | 60 | SPEC REPOS: 61 | trunk: 62 | - Firebase 63 | - FirebaseAppCheckInterop 64 | - FirebaseAuth 65 | - FirebaseCore 66 | - FirebaseCoreInternal 67 | - GoogleUtilities 68 | - GTMSessionFetcher 69 | - PromisesObjC 70 | - RecaptchaInterop 71 | 72 | EXTERNAL SOURCES: 73 | firebase_auth: 74 | :path: ".symlinks/plugins/firebase_auth/ios" 75 | firebase_core: 76 | :path: ".symlinks/plugins/firebase_core/ios" 77 | Flutter: 78 | :path: Flutter 79 | 80 | SPEC CHECKSUMS: 81 | Firebase: 91fefd38712feb9186ea8996af6cbdef41473442 82 | firebase_auth: b782567cafd5cfd64debf54638a9f29b63abd7bf 83 | firebase_core: 7f1e1156934d0da3be260174812842df9420e4ab 84 | FirebaseAppCheckInterop: fecc08c89936c8acb1428d8088313aabedb348e4 85 | FirebaseAuth: 711d01cccefaf10035b3090a92956d0dd4f99088 86 | FirebaseCore: 11dc8a16dfb7c5e3c3f45ba0e191a33ac4f50894 87 | FirebaseCoreInternal: bcb5acffd4ea05e12a783ecf835f2210ce3dc6af 88 | Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 89 | GoogleUtilities: d053d902a8edaa9904e1bd00c37535385b8ed152 90 | GTMSessionFetcher: 8000756fc1c19d2e5697b90311f7832d2e33f6cd 91 | PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 92 | RecaptchaInterop: 7d1a4a01a6b2cb1610a47ef3f85f0c411434cb21 93 | 94 | PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796 95 | 96 | COCOAPODS: 1.15.2 97 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 54; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 169350EA1453084344C3E95C /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FC58A4034EE377BD4A809768 /* Pods_RunnerTests.framework */; }; 12 | 2BFC4DF56BE68DC7406F7D84 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 19DBE8E0A9B661ADE7B919C1 /* Pods_Runner.framework */; }; 13 | 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; 14 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 15 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 16 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 17 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 18 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXContainerItemProxy section */ 22 | 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { 23 | isa = PBXContainerItemProxy; 24 | containerPortal = 97C146E61CF9000F007C117D /* Project object */; 25 | proxyType = 1; 26 | remoteGlobalIDString = 97C146ED1CF9000F007C117D; 27 | remoteInfo = Runner; 28 | }; 29 | /* End PBXContainerItemProxy section */ 30 | 31 | /* Begin PBXCopyFilesBuildPhase section */ 32 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 33 | isa = PBXCopyFilesBuildPhase; 34 | buildActionMask = 2147483647; 35 | dstPath = ""; 36 | dstSubfolderSpec = 10; 37 | files = ( 38 | ); 39 | name = "Embed Frameworks"; 40 | runOnlyForDeploymentPostprocessing = 0; 41 | }; 42 | /* End PBXCopyFilesBuildPhase section */ 43 | 44 | /* Begin PBXFileReference section */ 45 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 46 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 47 | 19DBE8E0A9B661ADE7B919C1 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 48 | 1E865329ADE86705AEE044EE /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 49 | 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; 50 | 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 51 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 52 | 649E5D498F95879EE263BD67 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; 53 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 54 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 55 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 56 | 92E38A95DD46C7FD98390A48 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 57 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 58 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 59 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 60 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 61 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 62 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 63 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 64 | AD92C89EF0B7521EA5AEEF55 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 65 | B02DDC88A4BC78035572730D /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; 66 | D719BF58877C0364F3FC0539 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; 67 | FC58A4034EE377BD4A809768 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 68 | /* End PBXFileReference section */ 69 | 70 | /* Begin PBXFrameworksBuildPhase section */ 71 | 8299B3DE420E17B88654AD20 /* Frameworks */ = { 72 | isa = PBXFrameworksBuildPhase; 73 | buildActionMask = 2147483647; 74 | files = ( 75 | 169350EA1453084344C3E95C /* Pods_RunnerTests.framework in Frameworks */, 76 | ); 77 | runOnlyForDeploymentPostprocessing = 0; 78 | }; 79 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 80 | isa = PBXFrameworksBuildPhase; 81 | buildActionMask = 2147483647; 82 | files = ( 83 | 2BFC4DF56BE68DC7406F7D84 /* Pods_Runner.framework in Frameworks */, 84 | ); 85 | runOnlyForDeploymentPostprocessing = 0; 86 | }; 87 | /* End PBXFrameworksBuildPhase section */ 88 | 89 | /* Begin PBXGroup section */ 90 | 331C8082294A63A400263BE5 /* RunnerTests */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | 331C807B294A618700263BE5 /* RunnerTests.swift */, 94 | ); 95 | path = RunnerTests; 96 | sourceTree = ""; 97 | }; 98 | 9740EEB11CF90186004384FC /* Flutter */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 102 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 103 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 104 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 105 | ); 106 | name = Flutter; 107 | sourceTree = ""; 108 | }; 109 | 97C146E51CF9000F007C117D = { 110 | isa = PBXGroup; 111 | children = ( 112 | 9740EEB11CF90186004384FC /* Flutter */, 113 | 97C146F01CF9000F007C117D /* Runner */, 114 | 97C146EF1CF9000F007C117D /* Products */, 115 | 331C8082294A63A400263BE5 /* RunnerTests */, 116 | B23A6E1E62782997B8D9B2DB /* Pods */, 117 | ABFB6CEF45F592DCD2AFFD1A /* Frameworks */, 118 | ); 119 | sourceTree = ""; 120 | }; 121 | 97C146EF1CF9000F007C117D /* Products */ = { 122 | isa = PBXGroup; 123 | children = ( 124 | 97C146EE1CF9000F007C117D /* Runner.app */, 125 | 331C8081294A63A400263BE5 /* RunnerTests.xctest */, 126 | ); 127 | name = Products; 128 | sourceTree = ""; 129 | }; 130 | 97C146F01CF9000F007C117D /* Runner */ = { 131 | isa = PBXGroup; 132 | children = ( 133 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 134 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 135 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 136 | 97C147021CF9000F007C117D /* Info.plist */, 137 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 138 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 139 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 140 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 141 | ); 142 | path = Runner; 143 | sourceTree = ""; 144 | }; 145 | ABFB6CEF45F592DCD2AFFD1A /* Frameworks */ = { 146 | isa = PBXGroup; 147 | children = ( 148 | 19DBE8E0A9B661ADE7B919C1 /* Pods_Runner.framework */, 149 | FC58A4034EE377BD4A809768 /* Pods_RunnerTests.framework */, 150 | ); 151 | name = Frameworks; 152 | sourceTree = ""; 153 | }; 154 | B23A6E1E62782997B8D9B2DB /* Pods */ = { 155 | isa = PBXGroup; 156 | children = ( 157 | 1E865329ADE86705AEE044EE /* Pods-Runner.debug.xcconfig */, 158 | 92E38A95DD46C7FD98390A48 /* Pods-Runner.release.xcconfig */, 159 | AD92C89EF0B7521EA5AEEF55 /* Pods-Runner.profile.xcconfig */, 160 | B02DDC88A4BC78035572730D /* Pods-RunnerTests.debug.xcconfig */, 161 | D719BF58877C0364F3FC0539 /* Pods-RunnerTests.release.xcconfig */, 162 | 649E5D498F95879EE263BD67 /* Pods-RunnerTests.profile.xcconfig */, 163 | ); 164 | name = Pods; 165 | path = Pods; 166 | sourceTree = ""; 167 | }; 168 | /* End PBXGroup section */ 169 | 170 | /* Begin PBXNativeTarget section */ 171 | 331C8080294A63A400263BE5 /* RunnerTests */ = { 172 | isa = PBXNativeTarget; 173 | buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; 174 | buildPhases = ( 175 | F08B2836316A2DCF03697C3D /* [CP] Check Pods Manifest.lock */, 176 | 331C807D294A63A400263BE5 /* Sources */, 177 | 331C807F294A63A400263BE5 /* Resources */, 178 | 8299B3DE420E17B88654AD20 /* Frameworks */, 179 | ); 180 | buildRules = ( 181 | ); 182 | dependencies = ( 183 | 331C8086294A63A400263BE5 /* PBXTargetDependency */, 184 | ); 185 | name = RunnerTests; 186 | productName = RunnerTests; 187 | productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; 188 | productType = "com.apple.product-type.bundle.unit-test"; 189 | }; 190 | 97C146ED1CF9000F007C117D /* Runner */ = { 191 | isa = PBXNativeTarget; 192 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 193 | buildPhases = ( 194 | 7A31C098CD893AE287D35FA1 /* [CP] Check Pods Manifest.lock */, 195 | 9740EEB61CF901F6004384FC /* Run Script */, 196 | 97C146EA1CF9000F007C117D /* Sources */, 197 | 97C146EB1CF9000F007C117D /* Frameworks */, 198 | 97C146EC1CF9000F007C117D /* Resources */, 199 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 200 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 201 | 59DF0BB7237342A2DED225E1 /* [CP] Embed Pods Frameworks */, 202 | ); 203 | buildRules = ( 204 | ); 205 | dependencies = ( 206 | ); 207 | name = Runner; 208 | productName = Runner; 209 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 210 | productType = "com.apple.product-type.application"; 211 | }; 212 | /* End PBXNativeTarget section */ 213 | 214 | /* Begin PBXProject section */ 215 | 97C146E61CF9000F007C117D /* Project object */ = { 216 | isa = PBXProject; 217 | attributes = { 218 | BuildIndependentTargetsInParallel = YES; 219 | LastUpgradeCheck = 1510; 220 | ORGANIZATIONNAME = ""; 221 | TargetAttributes = { 222 | 331C8080294A63A400263BE5 = { 223 | CreatedOnToolsVersion = 14.0; 224 | TestTargetID = 97C146ED1CF9000F007C117D; 225 | }; 226 | 97C146ED1CF9000F007C117D = { 227 | CreatedOnToolsVersion = 7.3.1; 228 | LastSwiftMigration = 1100; 229 | }; 230 | }; 231 | }; 232 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 233 | compatibilityVersion = "Xcode 9.3"; 234 | developmentRegion = en; 235 | hasScannedForEncodings = 0; 236 | knownRegions = ( 237 | en, 238 | Base, 239 | ); 240 | mainGroup = 97C146E51CF9000F007C117D; 241 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 242 | projectDirPath = ""; 243 | projectRoot = ""; 244 | targets = ( 245 | 97C146ED1CF9000F007C117D /* Runner */, 246 | 331C8080294A63A400263BE5 /* RunnerTests */, 247 | ); 248 | }; 249 | /* End PBXProject section */ 250 | 251 | /* Begin PBXResourcesBuildPhase section */ 252 | 331C807F294A63A400263BE5 /* Resources */ = { 253 | isa = PBXResourcesBuildPhase; 254 | buildActionMask = 2147483647; 255 | files = ( 256 | ); 257 | runOnlyForDeploymentPostprocessing = 0; 258 | }; 259 | 97C146EC1CF9000F007C117D /* Resources */ = { 260 | isa = PBXResourcesBuildPhase; 261 | buildActionMask = 2147483647; 262 | files = ( 263 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 264 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 265 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 266 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 267 | ); 268 | runOnlyForDeploymentPostprocessing = 0; 269 | }; 270 | /* End PBXResourcesBuildPhase section */ 271 | 272 | /* Begin PBXShellScriptBuildPhase section */ 273 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 274 | isa = PBXShellScriptBuildPhase; 275 | alwaysOutOfDate = 1; 276 | buildActionMask = 2147483647; 277 | files = ( 278 | ); 279 | inputPaths = ( 280 | "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", 281 | ); 282 | name = "Thin Binary"; 283 | outputPaths = ( 284 | ); 285 | runOnlyForDeploymentPostprocessing = 0; 286 | shellPath = /bin/sh; 287 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 288 | }; 289 | 59DF0BB7237342A2DED225E1 /* [CP] Embed Pods Frameworks */ = { 290 | isa = PBXShellScriptBuildPhase; 291 | buildActionMask = 2147483647; 292 | files = ( 293 | ); 294 | inputFileListPaths = ( 295 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", 296 | ); 297 | name = "[CP] Embed Pods Frameworks"; 298 | outputFileListPaths = ( 299 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", 300 | ); 301 | runOnlyForDeploymentPostprocessing = 0; 302 | shellPath = /bin/sh; 303 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; 304 | showEnvVarsInLog = 0; 305 | }; 306 | 7A31C098CD893AE287D35FA1 /* [CP] Check Pods Manifest.lock */ = { 307 | isa = PBXShellScriptBuildPhase; 308 | buildActionMask = 2147483647; 309 | files = ( 310 | ); 311 | inputFileListPaths = ( 312 | ); 313 | inputPaths = ( 314 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 315 | "${PODS_ROOT}/Manifest.lock", 316 | ); 317 | name = "[CP] Check Pods Manifest.lock"; 318 | outputFileListPaths = ( 319 | ); 320 | outputPaths = ( 321 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", 322 | ); 323 | runOnlyForDeploymentPostprocessing = 0; 324 | shellPath = /bin/sh; 325 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 326 | showEnvVarsInLog = 0; 327 | }; 328 | 9740EEB61CF901F6004384FC /* Run Script */ = { 329 | isa = PBXShellScriptBuildPhase; 330 | alwaysOutOfDate = 1; 331 | buildActionMask = 2147483647; 332 | files = ( 333 | ); 334 | inputPaths = ( 335 | ); 336 | name = "Run Script"; 337 | outputPaths = ( 338 | ); 339 | runOnlyForDeploymentPostprocessing = 0; 340 | shellPath = /bin/sh; 341 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 342 | }; 343 | F08B2836316A2DCF03697C3D /* [CP] Check Pods Manifest.lock */ = { 344 | isa = PBXShellScriptBuildPhase; 345 | buildActionMask = 2147483647; 346 | files = ( 347 | ); 348 | inputFileListPaths = ( 349 | ); 350 | inputPaths = ( 351 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 352 | "${PODS_ROOT}/Manifest.lock", 353 | ); 354 | name = "[CP] Check Pods Manifest.lock"; 355 | outputFileListPaths = ( 356 | ); 357 | outputPaths = ( 358 | "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", 359 | ); 360 | runOnlyForDeploymentPostprocessing = 0; 361 | shellPath = /bin/sh; 362 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 363 | showEnvVarsInLog = 0; 364 | }; 365 | /* End PBXShellScriptBuildPhase section */ 366 | 367 | /* Begin PBXSourcesBuildPhase section */ 368 | 331C807D294A63A400263BE5 /* Sources */ = { 369 | isa = PBXSourcesBuildPhase; 370 | buildActionMask = 2147483647; 371 | files = ( 372 | 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, 373 | ); 374 | runOnlyForDeploymentPostprocessing = 0; 375 | }; 376 | 97C146EA1CF9000F007C117D /* Sources */ = { 377 | isa = PBXSourcesBuildPhase; 378 | buildActionMask = 2147483647; 379 | files = ( 380 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 381 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 382 | ); 383 | runOnlyForDeploymentPostprocessing = 0; 384 | }; 385 | /* End PBXSourcesBuildPhase section */ 386 | 387 | /* Begin PBXTargetDependency section */ 388 | 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { 389 | isa = PBXTargetDependency; 390 | target = 97C146ED1CF9000F007C117D /* Runner */; 391 | targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; 392 | }; 393 | /* End PBXTargetDependency section */ 394 | 395 | /* Begin PBXVariantGroup section */ 396 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 397 | isa = PBXVariantGroup; 398 | children = ( 399 | 97C146FB1CF9000F007C117D /* Base */, 400 | ); 401 | name = Main.storyboard; 402 | sourceTree = ""; 403 | }; 404 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 405 | isa = PBXVariantGroup; 406 | children = ( 407 | 97C147001CF9000F007C117D /* Base */, 408 | ); 409 | name = LaunchScreen.storyboard; 410 | sourceTree = ""; 411 | }; 412 | /* End PBXVariantGroup section */ 413 | 414 | /* Begin XCBuildConfiguration section */ 415 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 416 | isa = XCBuildConfiguration; 417 | buildSettings = { 418 | ALWAYS_SEARCH_USER_PATHS = NO; 419 | CLANG_ANALYZER_NONNULL = YES; 420 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 421 | CLANG_CXX_LIBRARY = "libc++"; 422 | CLANG_ENABLE_MODULES = YES; 423 | CLANG_ENABLE_OBJC_ARC = YES; 424 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 425 | CLANG_WARN_BOOL_CONVERSION = YES; 426 | CLANG_WARN_COMMA = YES; 427 | CLANG_WARN_CONSTANT_CONVERSION = YES; 428 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 429 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 430 | CLANG_WARN_EMPTY_BODY = YES; 431 | CLANG_WARN_ENUM_CONVERSION = YES; 432 | CLANG_WARN_INFINITE_RECURSION = YES; 433 | CLANG_WARN_INT_CONVERSION = YES; 434 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 435 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 436 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 437 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 438 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 439 | CLANG_WARN_STRICT_PROTOTYPES = YES; 440 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 441 | CLANG_WARN_UNREACHABLE_CODE = YES; 442 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 443 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 444 | COPY_PHASE_STRIP = NO; 445 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 446 | ENABLE_NS_ASSERTIONS = NO; 447 | ENABLE_STRICT_OBJC_MSGSEND = YES; 448 | GCC_C_LANGUAGE_STANDARD = gnu99; 449 | GCC_NO_COMMON_BLOCKS = YES; 450 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 451 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 452 | GCC_WARN_UNDECLARED_SELECTOR = YES; 453 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 454 | GCC_WARN_UNUSED_FUNCTION = YES; 455 | GCC_WARN_UNUSED_VARIABLE = YES; 456 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 457 | MTL_ENABLE_DEBUG_INFO = NO; 458 | SDKROOT = iphoneos; 459 | SUPPORTED_PLATFORMS = iphoneos; 460 | TARGETED_DEVICE_FAMILY = "1,2"; 461 | VALIDATE_PRODUCT = YES; 462 | }; 463 | name = Profile; 464 | }; 465 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 466 | isa = XCBuildConfiguration; 467 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 468 | buildSettings = { 469 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 470 | CLANG_ENABLE_MODULES = YES; 471 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 472 | ENABLE_BITCODE = NO; 473 | INFOPLIST_FILE = Runner/Info.plist; 474 | LD_RUNPATH_SEARCH_PATHS = ( 475 | "$(inherited)", 476 | "@executable_path/Frameworks", 477 | ); 478 | PRODUCT_BUNDLE_IDENTIFIER = com.example.firebaseAuthenticationFlutterDdd; 479 | PRODUCT_NAME = "$(TARGET_NAME)"; 480 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 481 | SWIFT_VERSION = 5.0; 482 | VERSIONING_SYSTEM = "apple-generic"; 483 | }; 484 | name = Profile; 485 | }; 486 | 331C8088294A63A400263BE5 /* Debug */ = { 487 | isa = XCBuildConfiguration; 488 | baseConfigurationReference = B02DDC88A4BC78035572730D /* Pods-RunnerTests.debug.xcconfig */; 489 | buildSettings = { 490 | BUNDLE_LOADER = "$(TEST_HOST)"; 491 | CODE_SIGN_STYLE = Automatic; 492 | CURRENT_PROJECT_VERSION = 1; 493 | GENERATE_INFOPLIST_FILE = YES; 494 | MARKETING_VERSION = 1.0; 495 | PRODUCT_BUNDLE_IDENTIFIER = com.example.firebaseAuthenticationFlutterDdd.RunnerTests; 496 | PRODUCT_NAME = "$(TARGET_NAME)"; 497 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 498 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 499 | SWIFT_VERSION = 5.0; 500 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; 501 | }; 502 | name = Debug; 503 | }; 504 | 331C8089294A63A400263BE5 /* Release */ = { 505 | isa = XCBuildConfiguration; 506 | baseConfigurationReference = D719BF58877C0364F3FC0539 /* Pods-RunnerTests.release.xcconfig */; 507 | buildSettings = { 508 | BUNDLE_LOADER = "$(TEST_HOST)"; 509 | CODE_SIGN_STYLE = Automatic; 510 | CURRENT_PROJECT_VERSION = 1; 511 | GENERATE_INFOPLIST_FILE = YES; 512 | MARKETING_VERSION = 1.0; 513 | PRODUCT_BUNDLE_IDENTIFIER = com.example.firebaseAuthenticationFlutterDdd.RunnerTests; 514 | PRODUCT_NAME = "$(TARGET_NAME)"; 515 | SWIFT_VERSION = 5.0; 516 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; 517 | }; 518 | name = Release; 519 | }; 520 | 331C808A294A63A400263BE5 /* Profile */ = { 521 | isa = XCBuildConfiguration; 522 | baseConfigurationReference = 649E5D498F95879EE263BD67 /* Pods-RunnerTests.profile.xcconfig */; 523 | buildSettings = { 524 | BUNDLE_LOADER = "$(TEST_HOST)"; 525 | CODE_SIGN_STYLE = Automatic; 526 | CURRENT_PROJECT_VERSION = 1; 527 | GENERATE_INFOPLIST_FILE = YES; 528 | MARKETING_VERSION = 1.0; 529 | PRODUCT_BUNDLE_IDENTIFIER = com.example.firebaseAuthenticationFlutterDdd.RunnerTests; 530 | PRODUCT_NAME = "$(TARGET_NAME)"; 531 | SWIFT_VERSION = 5.0; 532 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; 533 | }; 534 | name = Profile; 535 | }; 536 | 97C147031CF9000F007C117D /* Debug */ = { 537 | isa = XCBuildConfiguration; 538 | buildSettings = { 539 | ALWAYS_SEARCH_USER_PATHS = NO; 540 | CLANG_ANALYZER_NONNULL = YES; 541 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 542 | CLANG_CXX_LIBRARY = "libc++"; 543 | CLANG_ENABLE_MODULES = YES; 544 | CLANG_ENABLE_OBJC_ARC = YES; 545 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 546 | CLANG_WARN_BOOL_CONVERSION = YES; 547 | CLANG_WARN_COMMA = YES; 548 | CLANG_WARN_CONSTANT_CONVERSION = YES; 549 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 550 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 551 | CLANG_WARN_EMPTY_BODY = YES; 552 | CLANG_WARN_ENUM_CONVERSION = YES; 553 | CLANG_WARN_INFINITE_RECURSION = YES; 554 | CLANG_WARN_INT_CONVERSION = YES; 555 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 556 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 557 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 558 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 559 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 560 | CLANG_WARN_STRICT_PROTOTYPES = YES; 561 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 562 | CLANG_WARN_UNREACHABLE_CODE = YES; 563 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 564 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 565 | COPY_PHASE_STRIP = NO; 566 | DEBUG_INFORMATION_FORMAT = dwarf; 567 | ENABLE_STRICT_OBJC_MSGSEND = YES; 568 | ENABLE_TESTABILITY = YES; 569 | GCC_C_LANGUAGE_STANDARD = gnu99; 570 | GCC_DYNAMIC_NO_PIC = NO; 571 | GCC_NO_COMMON_BLOCKS = YES; 572 | GCC_OPTIMIZATION_LEVEL = 0; 573 | GCC_PREPROCESSOR_DEFINITIONS = ( 574 | "DEBUG=1", 575 | "$(inherited)", 576 | ); 577 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 578 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 579 | GCC_WARN_UNDECLARED_SELECTOR = YES; 580 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 581 | GCC_WARN_UNUSED_FUNCTION = YES; 582 | GCC_WARN_UNUSED_VARIABLE = YES; 583 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 584 | MTL_ENABLE_DEBUG_INFO = YES; 585 | ONLY_ACTIVE_ARCH = YES; 586 | SDKROOT = iphoneos; 587 | TARGETED_DEVICE_FAMILY = "1,2"; 588 | }; 589 | name = Debug; 590 | }; 591 | 97C147041CF9000F007C117D /* Release */ = { 592 | isa = XCBuildConfiguration; 593 | buildSettings = { 594 | ALWAYS_SEARCH_USER_PATHS = NO; 595 | CLANG_ANALYZER_NONNULL = YES; 596 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 597 | CLANG_CXX_LIBRARY = "libc++"; 598 | CLANG_ENABLE_MODULES = YES; 599 | CLANG_ENABLE_OBJC_ARC = YES; 600 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 601 | CLANG_WARN_BOOL_CONVERSION = YES; 602 | CLANG_WARN_COMMA = YES; 603 | CLANG_WARN_CONSTANT_CONVERSION = YES; 604 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 605 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 606 | CLANG_WARN_EMPTY_BODY = YES; 607 | CLANG_WARN_ENUM_CONVERSION = YES; 608 | CLANG_WARN_INFINITE_RECURSION = YES; 609 | CLANG_WARN_INT_CONVERSION = YES; 610 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 611 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 612 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 613 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 614 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 615 | CLANG_WARN_STRICT_PROTOTYPES = YES; 616 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 617 | CLANG_WARN_UNREACHABLE_CODE = YES; 618 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 619 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 620 | COPY_PHASE_STRIP = NO; 621 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 622 | ENABLE_NS_ASSERTIONS = NO; 623 | ENABLE_STRICT_OBJC_MSGSEND = YES; 624 | GCC_C_LANGUAGE_STANDARD = gnu99; 625 | GCC_NO_COMMON_BLOCKS = YES; 626 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 627 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 628 | GCC_WARN_UNDECLARED_SELECTOR = YES; 629 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 630 | GCC_WARN_UNUSED_FUNCTION = YES; 631 | GCC_WARN_UNUSED_VARIABLE = YES; 632 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 633 | MTL_ENABLE_DEBUG_INFO = NO; 634 | SDKROOT = iphoneos; 635 | SUPPORTED_PLATFORMS = iphoneos; 636 | SWIFT_COMPILATION_MODE = wholemodule; 637 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 638 | TARGETED_DEVICE_FAMILY = "1,2"; 639 | VALIDATE_PRODUCT = YES; 640 | }; 641 | name = Release; 642 | }; 643 | 97C147061CF9000F007C117D /* Debug */ = { 644 | isa = XCBuildConfiguration; 645 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 646 | buildSettings = { 647 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 648 | CLANG_ENABLE_MODULES = YES; 649 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 650 | ENABLE_BITCODE = NO; 651 | INFOPLIST_FILE = Runner/Info.plist; 652 | LD_RUNPATH_SEARCH_PATHS = ( 653 | "$(inherited)", 654 | "@executable_path/Frameworks", 655 | ); 656 | PRODUCT_BUNDLE_IDENTIFIER = com.example.firebaseAuthenticationFlutterDdd; 657 | PRODUCT_NAME = "$(TARGET_NAME)"; 658 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 659 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 660 | SWIFT_VERSION = 5.0; 661 | VERSIONING_SYSTEM = "apple-generic"; 662 | }; 663 | name = Debug; 664 | }; 665 | 97C147071CF9000F007C117D /* Release */ = { 666 | isa = XCBuildConfiguration; 667 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 668 | buildSettings = { 669 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 670 | CLANG_ENABLE_MODULES = YES; 671 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 672 | ENABLE_BITCODE = NO; 673 | INFOPLIST_FILE = Runner/Info.plist; 674 | LD_RUNPATH_SEARCH_PATHS = ( 675 | "$(inherited)", 676 | "@executable_path/Frameworks", 677 | ); 678 | PRODUCT_BUNDLE_IDENTIFIER = com.example.firebaseAuthenticationFlutterDdd; 679 | PRODUCT_NAME = "$(TARGET_NAME)"; 680 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 681 | SWIFT_VERSION = 5.0; 682 | VERSIONING_SYSTEM = "apple-generic"; 683 | }; 684 | name = Release; 685 | }; 686 | /* End XCBuildConfiguration section */ 687 | 688 | /* Begin XCConfigurationList section */ 689 | 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { 690 | isa = XCConfigurationList; 691 | buildConfigurations = ( 692 | 331C8088294A63A400263BE5 /* Debug */, 693 | 331C8089294A63A400263BE5 /* Release */, 694 | 331C808A294A63A400263BE5 /* Profile */, 695 | ); 696 | defaultConfigurationIsVisible = 0; 697 | defaultConfigurationName = Release; 698 | }; 699 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 700 | isa = XCConfigurationList; 701 | buildConfigurations = ( 702 | 97C147031CF9000F007C117D /* Debug */, 703 | 97C147041CF9000F007C117D /* Release */, 704 | 249021D3217E4FDB00AE95B9 /* Profile */, 705 | ); 706 | defaultConfigurationIsVisible = 0; 707 | defaultConfigurationName = Release; 708 | }; 709 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 710 | isa = XCConfigurationList; 711 | buildConfigurations = ( 712 | 97C147061CF9000F007C117D /* Debug */, 713 | 97C147071CF9000F007C117D /* Release */, 714 | 249021D4217E4FDB00AE95B9 /* Profile */, 715 | ); 716 | defaultConfigurationIsVisible = 0; 717 | defaultConfigurationName = Release; 718 | }; 719 | /* End XCConfigurationList section */ 720 | }; 721 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 722 | } 723 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 43 | 49 | 50 | 51 | 52 | 53 | 63 | 65 | 71 | 72 | 73 | 74 | 80 | 82 | 88 | 89 | 90 | 91 | 93 | 94 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pythonhubdev/firebase_authentication_flutter_DDD/17217ed8bb84a6527b1e4099946b8962fcf5cc9f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pythonhubdev/firebase_authentication_flutter_DDD/17217ed8bb84a6527b1e4099946b8962fcf5cc9f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pythonhubdev/firebase_authentication_flutter_DDD/17217ed8bb84a6527b1e4099946b8962fcf5cc9f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pythonhubdev/firebase_authentication_flutter_DDD/17217ed8bb84a6527b1e4099946b8962fcf5cc9f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pythonhubdev/firebase_authentication_flutter_DDD/17217ed8bb84a6527b1e4099946b8962fcf5cc9f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pythonhubdev/firebase_authentication_flutter_DDD/17217ed8bb84a6527b1e4099946b8962fcf5cc9f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pythonhubdev/firebase_authentication_flutter_DDD/17217ed8bb84a6527b1e4099946b8962fcf5cc9f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pythonhubdev/firebase_authentication_flutter_DDD/17217ed8bb84a6527b1e4099946b8962fcf5cc9f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pythonhubdev/firebase_authentication_flutter_DDD/17217ed8bb84a6527b1e4099946b8962fcf5cc9f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pythonhubdev/firebase_authentication_flutter_DDD/17217ed8bb84a6527b1e4099946b8962fcf5cc9f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pythonhubdev/firebase_authentication_flutter_DDD/17217ed8bb84a6527b1e4099946b8962fcf5cc9f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pythonhubdev/firebase_authentication_flutter_DDD/17217ed8bb84a6527b1e4099946b8962fcf5cc9f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pythonhubdev/firebase_authentication_flutter_DDD/17217ed8bb84a6527b1e4099946b8962fcf5cc9f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pythonhubdev/firebase_authentication_flutter_DDD/17217ed8bb84a6527b1e4099946b8962fcf5cc9f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pythonhubdev/firebase_authentication_flutter_DDD/17217ed8bb84a6527b1e4099946b8962fcf5cc9f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pythonhubdev/firebase_authentication_flutter_DDD/17217ed8bb84a6527b1e4099946b8962fcf5cc9f/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pythonhubdev/firebase_authentication_flutter_DDD/17217ed8bb84a6527b1e4099946b8962fcf5cc9f/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pythonhubdev/firebase_authentication_flutter_DDD/17217ed8bb84a6527b1e4099946b8962fcf5cc9f/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Firebase Authentication Flutter Ddd 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | firebase_authentication_flutter_ddd 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | CADisableMinimumFrameDurationOnPhone 45 | 46 | UIApplicationSupportsIndirectInputEvents 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/app.dart: -------------------------------------------------------------------------------- 1 | import "package:flutter/foundation.dart"; 2 | import "package:flutter/material.dart"; 3 | 4 | import "Screens/login_page.dart"; 5 | 6 | class FirebaseAuthenticationDDD extends StatelessWidget { 7 | const FirebaseAuthenticationDDD({Key? key}) : super(key: key); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return MaterialApp( 12 | debugShowCheckedModeBanner: kDebugMode, 13 | theme: ThemeData( 14 | useMaterial3: true, 15 | ), 16 | home: LoginPage(), 17 | ); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/application/authentication/auth_events.dart: -------------------------------------------------------------------------------- 1 | import "package:freezed_annotation/freezed_annotation.dart"; 2 | 3 | part "auth_events.freezed.dart"; 4 | 5 | @freezed 6 | class AuthEvents with _$AuthEvents { 7 | const factory AuthEvents.emailChanged({required String? email}) = 8 | EmailChanged; 9 | 10 | const factory AuthEvents.passwordChanged({required String? password}) = 11 | PasswordChanged; 12 | 13 | const factory AuthEvents.signUpWithEmailAndPasswordPressed() = 14 | SignUPWithEmailAndPasswordPressed; 15 | 16 | const factory AuthEvents.signInWithEmailAndPasswordPressed() = 17 | SignInWithEmailAndPasswordPressed; 18 | } 19 | -------------------------------------------------------------------------------- /lib/application/authentication/auth_events.freezed.dart: -------------------------------------------------------------------------------- 1 | // coverage:ignore-file 2 | // GENERATED CODE - DO NOT MODIFY BY HAND 3 | // ignore_for_file: type=lint 4 | // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark 5 | 6 | part of 'auth_events.dart'; 7 | 8 | // ************************************************************************** 9 | // FreezedGenerator 10 | // ************************************************************************** 11 | 12 | T _$identity(T value) => value; 13 | 14 | final _privateConstructorUsedError = UnsupportedError( 15 | 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); 16 | 17 | /// @nodoc 18 | mixin _$AuthEvents { 19 | @optionalTypeArgs 20 | TResult when({ 21 | required TResult Function(String? email) emailChanged, 22 | required TResult Function(String? password) passwordChanged, 23 | required TResult Function() signUpWithEmailAndPasswordPressed, 24 | required TResult Function() signInWithEmailAndPasswordPressed, 25 | }) => 26 | throw _privateConstructorUsedError; 27 | @optionalTypeArgs 28 | TResult? whenOrNull({ 29 | TResult? Function(String? email)? emailChanged, 30 | TResult? Function(String? password)? passwordChanged, 31 | TResult? Function()? signUpWithEmailAndPasswordPressed, 32 | TResult? Function()? signInWithEmailAndPasswordPressed, 33 | }) => 34 | throw _privateConstructorUsedError; 35 | @optionalTypeArgs 36 | TResult maybeWhen({ 37 | TResult Function(String? email)? emailChanged, 38 | TResult Function(String? password)? passwordChanged, 39 | TResult Function()? signUpWithEmailAndPasswordPressed, 40 | TResult Function()? signInWithEmailAndPasswordPressed, 41 | required TResult orElse(), 42 | }) => 43 | throw _privateConstructorUsedError; 44 | @optionalTypeArgs 45 | TResult map({ 46 | required TResult Function(EmailChanged value) emailChanged, 47 | required TResult Function(PasswordChanged value) passwordChanged, 48 | required TResult Function(SignUPWithEmailAndPasswordPressed value) 49 | signUpWithEmailAndPasswordPressed, 50 | required TResult Function(SignInWithEmailAndPasswordPressed value) 51 | signInWithEmailAndPasswordPressed, 52 | }) => 53 | throw _privateConstructorUsedError; 54 | @optionalTypeArgs 55 | TResult? mapOrNull({ 56 | TResult? Function(EmailChanged value)? emailChanged, 57 | TResult? Function(PasswordChanged value)? passwordChanged, 58 | TResult? Function(SignUPWithEmailAndPasswordPressed value)? 59 | signUpWithEmailAndPasswordPressed, 60 | TResult? Function(SignInWithEmailAndPasswordPressed value)? 61 | signInWithEmailAndPasswordPressed, 62 | }) => 63 | throw _privateConstructorUsedError; 64 | @optionalTypeArgs 65 | TResult maybeMap({ 66 | TResult Function(EmailChanged value)? emailChanged, 67 | TResult Function(PasswordChanged value)? passwordChanged, 68 | TResult Function(SignUPWithEmailAndPasswordPressed value)? 69 | signUpWithEmailAndPasswordPressed, 70 | TResult Function(SignInWithEmailAndPasswordPressed value)? 71 | signInWithEmailAndPasswordPressed, 72 | required TResult orElse(), 73 | }) => 74 | throw _privateConstructorUsedError; 75 | } 76 | 77 | /// @nodoc 78 | abstract class $AuthEventsCopyWith<$Res> { 79 | factory $AuthEventsCopyWith( 80 | AuthEvents value, $Res Function(AuthEvents) then) = 81 | _$AuthEventsCopyWithImpl<$Res, AuthEvents>; 82 | } 83 | 84 | /// @nodoc 85 | class _$AuthEventsCopyWithImpl<$Res, $Val extends AuthEvents> 86 | implements $AuthEventsCopyWith<$Res> { 87 | _$AuthEventsCopyWithImpl(this._value, this._then); 88 | 89 | // ignore: unused_field 90 | final $Val _value; 91 | // ignore: unused_field 92 | final $Res Function($Val) _then; 93 | } 94 | 95 | /// @nodoc 96 | abstract class _$$EmailChangedImplCopyWith<$Res> { 97 | factory _$$EmailChangedImplCopyWith( 98 | _$EmailChangedImpl value, $Res Function(_$EmailChangedImpl) then) = 99 | __$$EmailChangedImplCopyWithImpl<$Res>; 100 | @useResult 101 | $Res call({String? email}); 102 | } 103 | 104 | /// @nodoc 105 | class __$$EmailChangedImplCopyWithImpl<$Res> 106 | extends _$AuthEventsCopyWithImpl<$Res, _$EmailChangedImpl> 107 | implements _$$EmailChangedImplCopyWith<$Res> { 108 | __$$EmailChangedImplCopyWithImpl( 109 | _$EmailChangedImpl _value, $Res Function(_$EmailChangedImpl) _then) 110 | : super(_value, _then); 111 | 112 | @pragma('vm:prefer-inline') 113 | @override 114 | $Res call({ 115 | Object? email = freezed, 116 | }) { 117 | return _then(_$EmailChangedImpl( 118 | email: freezed == email 119 | ? _value.email 120 | : email // ignore: cast_nullable_to_non_nullable 121 | as String?, 122 | )); 123 | } 124 | } 125 | 126 | /// @nodoc 127 | 128 | class _$EmailChangedImpl implements EmailChanged { 129 | const _$EmailChangedImpl({required this.email}); 130 | 131 | @override 132 | final String? email; 133 | 134 | @override 135 | String toString() { 136 | return 'AuthEvents.emailChanged(email: $email)'; 137 | } 138 | 139 | @override 140 | bool operator ==(Object other) { 141 | return identical(this, other) || 142 | (other.runtimeType == runtimeType && 143 | other is _$EmailChangedImpl && 144 | (identical(other.email, email) || other.email == email)); 145 | } 146 | 147 | @override 148 | int get hashCode => Object.hash(runtimeType, email); 149 | 150 | @JsonKey(ignore: true) 151 | @override 152 | @pragma('vm:prefer-inline') 153 | _$$EmailChangedImplCopyWith<_$EmailChangedImpl> get copyWith => 154 | __$$EmailChangedImplCopyWithImpl<_$EmailChangedImpl>(this, _$identity); 155 | 156 | @override 157 | @optionalTypeArgs 158 | TResult when({ 159 | required TResult Function(String? email) emailChanged, 160 | required TResult Function(String? password) passwordChanged, 161 | required TResult Function() signUpWithEmailAndPasswordPressed, 162 | required TResult Function() signInWithEmailAndPasswordPressed, 163 | }) { 164 | return emailChanged(email); 165 | } 166 | 167 | @override 168 | @optionalTypeArgs 169 | TResult? whenOrNull({ 170 | TResult? Function(String? email)? emailChanged, 171 | TResult? Function(String? password)? passwordChanged, 172 | TResult? Function()? signUpWithEmailAndPasswordPressed, 173 | TResult? Function()? signInWithEmailAndPasswordPressed, 174 | }) { 175 | return emailChanged?.call(email); 176 | } 177 | 178 | @override 179 | @optionalTypeArgs 180 | TResult maybeWhen({ 181 | TResult Function(String? email)? emailChanged, 182 | TResult Function(String? password)? passwordChanged, 183 | TResult Function()? signUpWithEmailAndPasswordPressed, 184 | TResult Function()? signInWithEmailAndPasswordPressed, 185 | required TResult orElse(), 186 | }) { 187 | if (emailChanged != null) { 188 | return emailChanged(email); 189 | } 190 | return orElse(); 191 | } 192 | 193 | @override 194 | @optionalTypeArgs 195 | TResult map({ 196 | required TResult Function(EmailChanged value) emailChanged, 197 | required TResult Function(PasswordChanged value) passwordChanged, 198 | required TResult Function(SignUPWithEmailAndPasswordPressed value) 199 | signUpWithEmailAndPasswordPressed, 200 | required TResult Function(SignInWithEmailAndPasswordPressed value) 201 | signInWithEmailAndPasswordPressed, 202 | }) { 203 | return emailChanged(this); 204 | } 205 | 206 | @override 207 | @optionalTypeArgs 208 | TResult? mapOrNull({ 209 | TResult? Function(EmailChanged value)? emailChanged, 210 | TResult? Function(PasswordChanged value)? passwordChanged, 211 | TResult? Function(SignUPWithEmailAndPasswordPressed value)? 212 | signUpWithEmailAndPasswordPressed, 213 | TResult? Function(SignInWithEmailAndPasswordPressed value)? 214 | signInWithEmailAndPasswordPressed, 215 | }) { 216 | return emailChanged?.call(this); 217 | } 218 | 219 | @override 220 | @optionalTypeArgs 221 | TResult maybeMap({ 222 | TResult Function(EmailChanged value)? emailChanged, 223 | TResult Function(PasswordChanged value)? passwordChanged, 224 | TResult Function(SignUPWithEmailAndPasswordPressed value)? 225 | signUpWithEmailAndPasswordPressed, 226 | TResult Function(SignInWithEmailAndPasswordPressed value)? 227 | signInWithEmailAndPasswordPressed, 228 | required TResult orElse(), 229 | }) { 230 | if (emailChanged != null) { 231 | return emailChanged(this); 232 | } 233 | return orElse(); 234 | } 235 | } 236 | 237 | abstract class EmailChanged implements AuthEvents { 238 | const factory EmailChanged({required final String? email}) = 239 | _$EmailChangedImpl; 240 | 241 | String? get email; 242 | @JsonKey(ignore: true) 243 | _$$EmailChangedImplCopyWith<_$EmailChangedImpl> get copyWith => 244 | throw _privateConstructorUsedError; 245 | } 246 | 247 | /// @nodoc 248 | abstract class _$$PasswordChangedImplCopyWith<$Res> { 249 | factory _$$PasswordChangedImplCopyWith(_$PasswordChangedImpl value, 250 | $Res Function(_$PasswordChangedImpl) then) = 251 | __$$PasswordChangedImplCopyWithImpl<$Res>; 252 | @useResult 253 | $Res call({String? password}); 254 | } 255 | 256 | /// @nodoc 257 | class __$$PasswordChangedImplCopyWithImpl<$Res> 258 | extends _$AuthEventsCopyWithImpl<$Res, _$PasswordChangedImpl> 259 | implements _$$PasswordChangedImplCopyWith<$Res> { 260 | __$$PasswordChangedImplCopyWithImpl( 261 | _$PasswordChangedImpl _value, $Res Function(_$PasswordChangedImpl) _then) 262 | : super(_value, _then); 263 | 264 | @pragma('vm:prefer-inline') 265 | @override 266 | $Res call({ 267 | Object? password = freezed, 268 | }) { 269 | return _then(_$PasswordChangedImpl( 270 | password: freezed == password 271 | ? _value.password 272 | : password // ignore: cast_nullable_to_non_nullable 273 | as String?, 274 | )); 275 | } 276 | } 277 | 278 | /// @nodoc 279 | 280 | class _$PasswordChangedImpl implements PasswordChanged { 281 | const _$PasswordChangedImpl({required this.password}); 282 | 283 | @override 284 | final String? password; 285 | 286 | @override 287 | String toString() { 288 | return 'AuthEvents.passwordChanged(password: $password)'; 289 | } 290 | 291 | @override 292 | bool operator ==(Object other) { 293 | return identical(this, other) || 294 | (other.runtimeType == runtimeType && 295 | other is _$PasswordChangedImpl && 296 | (identical(other.password, password) || 297 | other.password == password)); 298 | } 299 | 300 | @override 301 | int get hashCode => Object.hash(runtimeType, password); 302 | 303 | @JsonKey(ignore: true) 304 | @override 305 | @pragma('vm:prefer-inline') 306 | _$$PasswordChangedImplCopyWith<_$PasswordChangedImpl> get copyWith => 307 | __$$PasswordChangedImplCopyWithImpl<_$PasswordChangedImpl>( 308 | this, _$identity); 309 | 310 | @override 311 | @optionalTypeArgs 312 | TResult when({ 313 | required TResult Function(String? email) emailChanged, 314 | required TResult Function(String? password) passwordChanged, 315 | required TResult Function() signUpWithEmailAndPasswordPressed, 316 | required TResult Function() signInWithEmailAndPasswordPressed, 317 | }) { 318 | return passwordChanged(password); 319 | } 320 | 321 | @override 322 | @optionalTypeArgs 323 | TResult? whenOrNull({ 324 | TResult? Function(String? email)? emailChanged, 325 | TResult? Function(String? password)? passwordChanged, 326 | TResult? Function()? signUpWithEmailAndPasswordPressed, 327 | TResult? Function()? signInWithEmailAndPasswordPressed, 328 | }) { 329 | return passwordChanged?.call(password); 330 | } 331 | 332 | @override 333 | @optionalTypeArgs 334 | TResult maybeWhen({ 335 | TResult Function(String? email)? emailChanged, 336 | TResult Function(String? password)? passwordChanged, 337 | TResult Function()? signUpWithEmailAndPasswordPressed, 338 | TResult Function()? signInWithEmailAndPasswordPressed, 339 | required TResult orElse(), 340 | }) { 341 | if (passwordChanged != null) { 342 | return passwordChanged(password); 343 | } 344 | return orElse(); 345 | } 346 | 347 | @override 348 | @optionalTypeArgs 349 | TResult map({ 350 | required TResult Function(EmailChanged value) emailChanged, 351 | required TResult Function(PasswordChanged value) passwordChanged, 352 | required TResult Function(SignUPWithEmailAndPasswordPressed value) 353 | signUpWithEmailAndPasswordPressed, 354 | required TResult Function(SignInWithEmailAndPasswordPressed value) 355 | signInWithEmailAndPasswordPressed, 356 | }) { 357 | return passwordChanged(this); 358 | } 359 | 360 | @override 361 | @optionalTypeArgs 362 | TResult? mapOrNull({ 363 | TResult? Function(EmailChanged value)? emailChanged, 364 | TResult? Function(PasswordChanged value)? passwordChanged, 365 | TResult? Function(SignUPWithEmailAndPasswordPressed value)? 366 | signUpWithEmailAndPasswordPressed, 367 | TResult? Function(SignInWithEmailAndPasswordPressed value)? 368 | signInWithEmailAndPasswordPressed, 369 | }) { 370 | return passwordChanged?.call(this); 371 | } 372 | 373 | @override 374 | @optionalTypeArgs 375 | TResult maybeMap({ 376 | TResult Function(EmailChanged value)? emailChanged, 377 | TResult Function(PasswordChanged value)? passwordChanged, 378 | TResult Function(SignUPWithEmailAndPasswordPressed value)? 379 | signUpWithEmailAndPasswordPressed, 380 | TResult Function(SignInWithEmailAndPasswordPressed value)? 381 | signInWithEmailAndPasswordPressed, 382 | required TResult orElse(), 383 | }) { 384 | if (passwordChanged != null) { 385 | return passwordChanged(this); 386 | } 387 | return orElse(); 388 | } 389 | } 390 | 391 | abstract class PasswordChanged implements AuthEvents { 392 | const factory PasswordChanged({required final String? password}) = 393 | _$PasswordChangedImpl; 394 | 395 | String? get password; 396 | @JsonKey(ignore: true) 397 | _$$PasswordChangedImplCopyWith<_$PasswordChangedImpl> get copyWith => 398 | throw _privateConstructorUsedError; 399 | } 400 | 401 | /// @nodoc 402 | abstract class _$$SignUPWithEmailAndPasswordPressedImplCopyWith<$Res> { 403 | factory _$$SignUPWithEmailAndPasswordPressedImplCopyWith( 404 | _$SignUPWithEmailAndPasswordPressedImpl value, 405 | $Res Function(_$SignUPWithEmailAndPasswordPressedImpl) then) = 406 | __$$SignUPWithEmailAndPasswordPressedImplCopyWithImpl<$Res>; 407 | } 408 | 409 | /// @nodoc 410 | class __$$SignUPWithEmailAndPasswordPressedImplCopyWithImpl<$Res> 411 | extends _$AuthEventsCopyWithImpl<$Res, 412 | _$SignUPWithEmailAndPasswordPressedImpl> 413 | implements _$$SignUPWithEmailAndPasswordPressedImplCopyWith<$Res> { 414 | __$$SignUPWithEmailAndPasswordPressedImplCopyWithImpl( 415 | _$SignUPWithEmailAndPasswordPressedImpl _value, 416 | $Res Function(_$SignUPWithEmailAndPasswordPressedImpl) _then) 417 | : super(_value, _then); 418 | } 419 | 420 | /// @nodoc 421 | 422 | class _$SignUPWithEmailAndPasswordPressedImpl 423 | implements SignUPWithEmailAndPasswordPressed { 424 | const _$SignUPWithEmailAndPasswordPressedImpl(); 425 | 426 | @override 427 | String toString() { 428 | return 'AuthEvents.signUpWithEmailAndPasswordPressed()'; 429 | } 430 | 431 | @override 432 | bool operator ==(Object other) { 433 | return identical(this, other) || 434 | (other.runtimeType == runtimeType && 435 | other is _$SignUPWithEmailAndPasswordPressedImpl); 436 | } 437 | 438 | @override 439 | int get hashCode => runtimeType.hashCode; 440 | 441 | @override 442 | @optionalTypeArgs 443 | TResult when({ 444 | required TResult Function(String? email) emailChanged, 445 | required TResult Function(String? password) passwordChanged, 446 | required TResult Function() signUpWithEmailAndPasswordPressed, 447 | required TResult Function() signInWithEmailAndPasswordPressed, 448 | }) { 449 | return signUpWithEmailAndPasswordPressed(); 450 | } 451 | 452 | @override 453 | @optionalTypeArgs 454 | TResult? whenOrNull({ 455 | TResult? Function(String? email)? emailChanged, 456 | TResult? Function(String? password)? passwordChanged, 457 | TResult? Function()? signUpWithEmailAndPasswordPressed, 458 | TResult? Function()? signInWithEmailAndPasswordPressed, 459 | }) { 460 | return signUpWithEmailAndPasswordPressed?.call(); 461 | } 462 | 463 | @override 464 | @optionalTypeArgs 465 | TResult maybeWhen({ 466 | TResult Function(String? email)? emailChanged, 467 | TResult Function(String? password)? passwordChanged, 468 | TResult Function()? signUpWithEmailAndPasswordPressed, 469 | TResult Function()? signInWithEmailAndPasswordPressed, 470 | required TResult orElse(), 471 | }) { 472 | if (signUpWithEmailAndPasswordPressed != null) { 473 | return signUpWithEmailAndPasswordPressed(); 474 | } 475 | return orElse(); 476 | } 477 | 478 | @override 479 | @optionalTypeArgs 480 | TResult map({ 481 | required TResult Function(EmailChanged value) emailChanged, 482 | required TResult Function(PasswordChanged value) passwordChanged, 483 | required TResult Function(SignUPWithEmailAndPasswordPressed value) 484 | signUpWithEmailAndPasswordPressed, 485 | required TResult Function(SignInWithEmailAndPasswordPressed value) 486 | signInWithEmailAndPasswordPressed, 487 | }) { 488 | return signUpWithEmailAndPasswordPressed(this); 489 | } 490 | 491 | @override 492 | @optionalTypeArgs 493 | TResult? mapOrNull({ 494 | TResult? Function(EmailChanged value)? emailChanged, 495 | TResult? Function(PasswordChanged value)? passwordChanged, 496 | TResult? Function(SignUPWithEmailAndPasswordPressed value)? 497 | signUpWithEmailAndPasswordPressed, 498 | TResult? Function(SignInWithEmailAndPasswordPressed value)? 499 | signInWithEmailAndPasswordPressed, 500 | }) { 501 | return signUpWithEmailAndPasswordPressed?.call(this); 502 | } 503 | 504 | @override 505 | @optionalTypeArgs 506 | TResult maybeMap({ 507 | TResult Function(EmailChanged value)? emailChanged, 508 | TResult Function(PasswordChanged value)? passwordChanged, 509 | TResult Function(SignUPWithEmailAndPasswordPressed value)? 510 | signUpWithEmailAndPasswordPressed, 511 | TResult Function(SignInWithEmailAndPasswordPressed value)? 512 | signInWithEmailAndPasswordPressed, 513 | required TResult orElse(), 514 | }) { 515 | if (signUpWithEmailAndPasswordPressed != null) { 516 | return signUpWithEmailAndPasswordPressed(this); 517 | } 518 | return orElse(); 519 | } 520 | } 521 | 522 | abstract class SignUPWithEmailAndPasswordPressed implements AuthEvents { 523 | const factory SignUPWithEmailAndPasswordPressed() = 524 | _$SignUPWithEmailAndPasswordPressedImpl; 525 | } 526 | 527 | /// @nodoc 528 | abstract class _$$SignInWithEmailAndPasswordPressedImplCopyWith<$Res> { 529 | factory _$$SignInWithEmailAndPasswordPressedImplCopyWith( 530 | _$SignInWithEmailAndPasswordPressedImpl value, 531 | $Res Function(_$SignInWithEmailAndPasswordPressedImpl) then) = 532 | __$$SignInWithEmailAndPasswordPressedImplCopyWithImpl<$Res>; 533 | } 534 | 535 | /// @nodoc 536 | class __$$SignInWithEmailAndPasswordPressedImplCopyWithImpl<$Res> 537 | extends _$AuthEventsCopyWithImpl<$Res, 538 | _$SignInWithEmailAndPasswordPressedImpl> 539 | implements _$$SignInWithEmailAndPasswordPressedImplCopyWith<$Res> { 540 | __$$SignInWithEmailAndPasswordPressedImplCopyWithImpl( 541 | _$SignInWithEmailAndPasswordPressedImpl _value, 542 | $Res Function(_$SignInWithEmailAndPasswordPressedImpl) _then) 543 | : super(_value, _then); 544 | } 545 | 546 | /// @nodoc 547 | 548 | class _$SignInWithEmailAndPasswordPressedImpl 549 | implements SignInWithEmailAndPasswordPressed { 550 | const _$SignInWithEmailAndPasswordPressedImpl(); 551 | 552 | @override 553 | String toString() { 554 | return 'AuthEvents.signInWithEmailAndPasswordPressed()'; 555 | } 556 | 557 | @override 558 | bool operator ==(Object other) { 559 | return identical(this, other) || 560 | (other.runtimeType == runtimeType && 561 | other is _$SignInWithEmailAndPasswordPressedImpl); 562 | } 563 | 564 | @override 565 | int get hashCode => runtimeType.hashCode; 566 | 567 | @override 568 | @optionalTypeArgs 569 | TResult when({ 570 | required TResult Function(String? email) emailChanged, 571 | required TResult Function(String? password) passwordChanged, 572 | required TResult Function() signUpWithEmailAndPasswordPressed, 573 | required TResult Function() signInWithEmailAndPasswordPressed, 574 | }) { 575 | return signInWithEmailAndPasswordPressed(); 576 | } 577 | 578 | @override 579 | @optionalTypeArgs 580 | TResult? whenOrNull({ 581 | TResult? Function(String? email)? emailChanged, 582 | TResult? Function(String? password)? passwordChanged, 583 | TResult? Function()? signUpWithEmailAndPasswordPressed, 584 | TResult? Function()? signInWithEmailAndPasswordPressed, 585 | }) { 586 | return signInWithEmailAndPasswordPressed?.call(); 587 | } 588 | 589 | @override 590 | @optionalTypeArgs 591 | TResult maybeWhen({ 592 | TResult Function(String? email)? emailChanged, 593 | TResult Function(String? password)? passwordChanged, 594 | TResult Function()? signUpWithEmailAndPasswordPressed, 595 | TResult Function()? signInWithEmailAndPasswordPressed, 596 | required TResult orElse(), 597 | }) { 598 | if (signInWithEmailAndPasswordPressed != null) { 599 | return signInWithEmailAndPasswordPressed(); 600 | } 601 | return orElse(); 602 | } 603 | 604 | @override 605 | @optionalTypeArgs 606 | TResult map({ 607 | required TResult Function(EmailChanged value) emailChanged, 608 | required TResult Function(PasswordChanged value) passwordChanged, 609 | required TResult Function(SignUPWithEmailAndPasswordPressed value) 610 | signUpWithEmailAndPasswordPressed, 611 | required TResult Function(SignInWithEmailAndPasswordPressed value) 612 | signInWithEmailAndPasswordPressed, 613 | }) { 614 | return signInWithEmailAndPasswordPressed(this); 615 | } 616 | 617 | @override 618 | @optionalTypeArgs 619 | TResult? mapOrNull({ 620 | TResult? Function(EmailChanged value)? emailChanged, 621 | TResult? Function(PasswordChanged value)? passwordChanged, 622 | TResult? Function(SignUPWithEmailAndPasswordPressed value)? 623 | signUpWithEmailAndPasswordPressed, 624 | TResult? Function(SignInWithEmailAndPasswordPressed value)? 625 | signInWithEmailAndPasswordPressed, 626 | }) { 627 | return signInWithEmailAndPasswordPressed?.call(this); 628 | } 629 | 630 | @override 631 | @optionalTypeArgs 632 | TResult maybeMap({ 633 | TResult Function(EmailChanged value)? emailChanged, 634 | TResult Function(PasswordChanged value)? passwordChanged, 635 | TResult Function(SignUPWithEmailAndPasswordPressed value)? 636 | signUpWithEmailAndPasswordPressed, 637 | TResult Function(SignInWithEmailAndPasswordPressed value)? 638 | signInWithEmailAndPasswordPressed, 639 | required TResult orElse(), 640 | }) { 641 | if (signInWithEmailAndPasswordPressed != null) { 642 | return signInWithEmailAndPasswordPressed(this); 643 | } 644 | return orElse(); 645 | } 646 | } 647 | 648 | abstract class SignInWithEmailAndPasswordPressed implements AuthEvents { 649 | const factory SignInWithEmailAndPasswordPressed() = 650 | _$SignInWithEmailAndPasswordPressedImpl; 651 | } 652 | -------------------------------------------------------------------------------- /lib/application/authentication/auth_state_controller.dart: -------------------------------------------------------------------------------- 1 | import "package:firebase_auth_flutter_ddd/Domain/Authentication/auth_failures.dart"; 2 | import "package:flutter_riverpod/flutter_riverpod.dart"; 3 | import "package:fpdart/fpdart.dart"; 4 | 5 | import "../../Domain/Authentication/auth_value_objects.dart"; 6 | import "../../Domain/Authentication/i_auth_facade.dart"; 7 | import "auth_events.dart"; 8 | import "auth_states.dart"; 9 | 10 | class AuthStateController extends StateNotifier { 11 | AuthStateController(this._authFacade) : super(AuthStates.initial()); 12 | 13 | final IAuthFacade _authFacade; 14 | 15 | Future mapEventsToStates(AuthEvents events) async { 16 | return events.map( 17 | emailChanged: (value) async { 18 | state = state.copyWith( 19 | emailAddress: EmailAddress( 20 | email: value.email, 21 | ), 22 | authFailureOrSuccess: none()); 23 | return null; 24 | }, 25 | passwordChanged: (value) async { 26 | state = state.copyWith( 27 | password: Password( 28 | password: value.password, 29 | ), 30 | authFailureOrSuccess: none(), 31 | ); 32 | return null; 33 | }, 34 | signUpWithEmailAndPasswordPressed: (value) async { 35 | await _performAuthAction( 36 | _authFacade.registerWithEmailAndPassword, 37 | ); 38 | return null; 39 | }, 40 | signInWithEmailAndPasswordPressed: (value) async { 41 | await _performAuthAction( 42 | _authFacade.signInWithEmailAndPassword, 43 | ); 44 | return null; 45 | }, 46 | ); 47 | } 48 | 49 | Future _performAuthAction( 50 | Future> Function( 51 | {required EmailAddress emailAddress, required Password password}) 52 | forwardCall, 53 | ) async { 54 | final isEmailValid = state.emailAddress.isValid(); 55 | final isPasswordValid = state.password.isValid(); 56 | Either? failureOrSuccess; 57 | if (isEmailValid && isPasswordValid) { 58 | state = state.copyWith( 59 | isSubmitting: true, 60 | authFailureOrSuccess: none(), 61 | ); 62 | failureOrSuccess = await forwardCall( 63 | emailAddress: state.emailAddress, 64 | password: state.password, 65 | ); 66 | } 67 | state = state.copyWith( 68 | isSubmitting: false, 69 | showError: true, 70 | authFailureOrSuccess: optionOf(failureOrSuccess), 71 | ); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /lib/application/authentication/auth_states.dart: -------------------------------------------------------------------------------- 1 | import "package:fpdart/fpdart.dart"; 2 | import "package:freezed_annotation/freezed_annotation.dart"; 3 | 4 | import "../../Domain/Authentication/auth_failures.dart"; 5 | import "../../Domain/Authentication/auth_value_objects.dart"; 6 | 7 | part "auth_states.freezed.dart"; 8 | 9 | @freezed 10 | class AuthStates with _$AuthStates { 11 | const factory AuthStates({ 12 | required EmailAddress emailAddress, 13 | required Password password, 14 | required bool isSubmitting, 15 | required bool showError, 16 | required Option> authFailureOrSuccess, 17 | }) = _AuthStates; 18 | 19 | factory AuthStates.initial() => AuthStates( 20 | emailAddress: EmailAddress(email: ""), 21 | password: Password(password: ""), 22 | showError: false, 23 | isSubmitting: false, 24 | authFailureOrSuccess: none()); 25 | } 26 | -------------------------------------------------------------------------------- /lib/application/authentication/auth_states.freezed.dart: -------------------------------------------------------------------------------- 1 | // coverage:ignore-file 2 | // GENERATED CODE - DO NOT MODIFY BY HAND 3 | // ignore_for_file: type=lint 4 | // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark 5 | 6 | part of 'auth_states.dart'; 7 | 8 | // ************************************************************************** 9 | // FreezedGenerator 10 | // ************************************************************************** 11 | 12 | T _$identity(T value) => value; 13 | 14 | final _privateConstructorUsedError = UnsupportedError( 15 | 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); 16 | 17 | /// @nodoc 18 | mixin _$AuthStates { 19 | EmailAddress get emailAddress => throw _privateConstructorUsedError; 20 | Password get password => throw _privateConstructorUsedError; 21 | bool get isSubmitting => throw _privateConstructorUsedError; 22 | bool get showError => throw _privateConstructorUsedError; 23 | Option> get authFailureOrSuccess => 24 | throw _privateConstructorUsedError; 25 | 26 | @JsonKey(ignore: true) 27 | $AuthStatesCopyWith get copyWith => 28 | throw _privateConstructorUsedError; 29 | } 30 | 31 | /// @nodoc 32 | abstract class $AuthStatesCopyWith<$Res> { 33 | factory $AuthStatesCopyWith( 34 | AuthStates value, $Res Function(AuthStates) then) = 35 | _$AuthStatesCopyWithImpl<$Res, AuthStates>; 36 | @useResult 37 | $Res call( 38 | {EmailAddress emailAddress, 39 | Password password, 40 | bool isSubmitting, 41 | bool showError, 42 | Option> authFailureOrSuccess}); 43 | } 44 | 45 | /// @nodoc 46 | class _$AuthStatesCopyWithImpl<$Res, $Val extends AuthStates> 47 | implements $AuthStatesCopyWith<$Res> { 48 | _$AuthStatesCopyWithImpl(this._value, this._then); 49 | 50 | // ignore: unused_field 51 | final $Val _value; 52 | // ignore: unused_field 53 | final $Res Function($Val) _then; 54 | 55 | @pragma('vm:prefer-inline') 56 | @override 57 | $Res call({ 58 | Object? emailAddress = freezed, 59 | Object? password = freezed, 60 | Object? isSubmitting = null, 61 | Object? showError = null, 62 | Object? authFailureOrSuccess = null, 63 | }) { 64 | return _then(_value.copyWith( 65 | emailAddress: freezed == emailAddress 66 | ? _value.emailAddress 67 | : emailAddress // ignore: cast_nullable_to_non_nullable 68 | as EmailAddress, 69 | password: freezed == password 70 | ? _value.password 71 | : password // ignore: cast_nullable_to_non_nullable 72 | as Password, 73 | isSubmitting: null == isSubmitting 74 | ? _value.isSubmitting 75 | : isSubmitting // ignore: cast_nullable_to_non_nullable 76 | as bool, 77 | showError: null == showError 78 | ? _value.showError 79 | : showError // ignore: cast_nullable_to_non_nullable 80 | as bool, 81 | authFailureOrSuccess: null == authFailureOrSuccess 82 | ? _value.authFailureOrSuccess 83 | : authFailureOrSuccess // ignore: cast_nullable_to_non_nullable 84 | as Option>, 85 | ) as $Val); 86 | } 87 | } 88 | 89 | /// @nodoc 90 | abstract class _$$AuthStatesImplCopyWith<$Res> 91 | implements $AuthStatesCopyWith<$Res> { 92 | factory _$$AuthStatesImplCopyWith( 93 | _$AuthStatesImpl value, $Res Function(_$AuthStatesImpl) then) = 94 | __$$AuthStatesImplCopyWithImpl<$Res>; 95 | @override 96 | @useResult 97 | $Res call( 98 | {EmailAddress emailAddress, 99 | Password password, 100 | bool isSubmitting, 101 | bool showError, 102 | Option> authFailureOrSuccess}); 103 | } 104 | 105 | /// @nodoc 106 | class __$$AuthStatesImplCopyWithImpl<$Res> 107 | extends _$AuthStatesCopyWithImpl<$Res, _$AuthStatesImpl> 108 | implements _$$AuthStatesImplCopyWith<$Res> { 109 | __$$AuthStatesImplCopyWithImpl( 110 | _$AuthStatesImpl _value, $Res Function(_$AuthStatesImpl) _then) 111 | : super(_value, _then); 112 | 113 | @pragma('vm:prefer-inline') 114 | @override 115 | $Res call({ 116 | Object? emailAddress = freezed, 117 | Object? password = freezed, 118 | Object? isSubmitting = null, 119 | Object? showError = null, 120 | Object? authFailureOrSuccess = null, 121 | }) { 122 | return _then(_$AuthStatesImpl( 123 | emailAddress: freezed == emailAddress 124 | ? _value.emailAddress 125 | : emailAddress // ignore: cast_nullable_to_non_nullable 126 | as EmailAddress, 127 | password: freezed == password 128 | ? _value.password 129 | : password // ignore: cast_nullable_to_non_nullable 130 | as Password, 131 | isSubmitting: null == isSubmitting 132 | ? _value.isSubmitting 133 | : isSubmitting // ignore: cast_nullable_to_non_nullable 134 | as bool, 135 | showError: null == showError 136 | ? _value.showError 137 | : showError // ignore: cast_nullable_to_non_nullable 138 | as bool, 139 | authFailureOrSuccess: null == authFailureOrSuccess 140 | ? _value.authFailureOrSuccess 141 | : authFailureOrSuccess // ignore: cast_nullable_to_non_nullable 142 | as Option>, 143 | )); 144 | } 145 | } 146 | 147 | /// @nodoc 148 | 149 | class _$AuthStatesImpl implements _AuthStates { 150 | const _$AuthStatesImpl( 151 | {required this.emailAddress, 152 | required this.password, 153 | required this.isSubmitting, 154 | required this.showError, 155 | required this.authFailureOrSuccess}); 156 | 157 | @override 158 | final EmailAddress emailAddress; 159 | @override 160 | final Password password; 161 | @override 162 | final bool isSubmitting; 163 | @override 164 | final bool showError; 165 | @override 166 | final Option> authFailureOrSuccess; 167 | 168 | @override 169 | String toString() { 170 | return 'AuthStates(emailAddress: $emailAddress, password: $password, isSubmitting: $isSubmitting, showError: $showError, authFailureOrSuccess: $authFailureOrSuccess)'; 171 | } 172 | 173 | @override 174 | bool operator ==(Object other) { 175 | return identical(this, other) || 176 | (other.runtimeType == runtimeType && 177 | other is _$AuthStatesImpl && 178 | const DeepCollectionEquality() 179 | .equals(other.emailAddress, emailAddress) && 180 | const DeepCollectionEquality().equals(other.password, password) && 181 | (identical(other.isSubmitting, isSubmitting) || 182 | other.isSubmitting == isSubmitting) && 183 | (identical(other.showError, showError) || 184 | other.showError == showError) && 185 | (identical(other.authFailureOrSuccess, authFailureOrSuccess) || 186 | other.authFailureOrSuccess == authFailureOrSuccess)); 187 | } 188 | 189 | @override 190 | int get hashCode => Object.hash( 191 | runtimeType, 192 | const DeepCollectionEquality().hash(emailAddress), 193 | const DeepCollectionEquality().hash(password), 194 | isSubmitting, 195 | showError, 196 | authFailureOrSuccess); 197 | 198 | @JsonKey(ignore: true) 199 | @override 200 | @pragma('vm:prefer-inline') 201 | _$$AuthStatesImplCopyWith<_$AuthStatesImpl> get copyWith => 202 | __$$AuthStatesImplCopyWithImpl<_$AuthStatesImpl>(this, _$identity); 203 | } 204 | 205 | abstract class _AuthStates implements AuthStates { 206 | const factory _AuthStates( 207 | {required final EmailAddress emailAddress, 208 | required final Password password, 209 | required final bool isSubmitting, 210 | required final bool showError, 211 | required final Option> 212 | authFailureOrSuccess}) = _$AuthStatesImpl; 213 | 214 | @override 215 | EmailAddress get emailAddress; 216 | @override 217 | Password get password; 218 | @override 219 | bool get isSubmitting; 220 | @override 221 | bool get showError; 222 | @override 223 | Option> get authFailureOrSuccess; 224 | @override 225 | @JsonKey(ignore: true) 226 | _$$AuthStatesImplCopyWith<_$AuthStatesImpl> get copyWith => 227 | throw _privateConstructorUsedError; 228 | } 229 | -------------------------------------------------------------------------------- /lib/domain/authentication/auth_failures.dart: -------------------------------------------------------------------------------- 1 | import "package:freezed_annotation/freezed_annotation.dart"; 2 | 3 | part "auth_failures.freezed.dart"; 4 | 5 | @freezed 6 | class AuthFailures with _$AuthFailures { 7 | const factory AuthFailures.serverError() = ServerError; 8 | 9 | const factory AuthFailures.emailAlreadyInUse() = EmailAlreadyInUse; 10 | 11 | const factory AuthFailures.invalidEmailAndPasswordCombination() = 12 | InavalidEmailAndPasswordCombination; 13 | } 14 | -------------------------------------------------------------------------------- /lib/domain/authentication/auth_failures.freezed.dart: -------------------------------------------------------------------------------- 1 | // coverage:ignore-file 2 | // GENERATED CODE - DO NOT MODIFY BY HAND 3 | // ignore_for_file: type=lint 4 | // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark 5 | 6 | part of 'auth_failures.dart'; 7 | 8 | // ************************************************************************** 9 | // FreezedGenerator 10 | // ************************************************************************** 11 | 12 | T _$identity(T value) => value; 13 | 14 | final _privateConstructorUsedError = UnsupportedError( 15 | 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); 16 | 17 | /// @nodoc 18 | mixin _$AuthFailures { 19 | @optionalTypeArgs 20 | TResult when({ 21 | required TResult Function() serverError, 22 | required TResult Function() emailAlreadyInUse, 23 | required TResult Function() invalidEmailAndPasswordCombination, 24 | }) => 25 | throw _privateConstructorUsedError; 26 | @optionalTypeArgs 27 | TResult? whenOrNull({ 28 | TResult? Function()? serverError, 29 | TResult? Function()? emailAlreadyInUse, 30 | TResult? Function()? invalidEmailAndPasswordCombination, 31 | }) => 32 | throw _privateConstructorUsedError; 33 | @optionalTypeArgs 34 | TResult maybeWhen({ 35 | TResult Function()? serverError, 36 | TResult Function()? emailAlreadyInUse, 37 | TResult Function()? invalidEmailAndPasswordCombination, 38 | required TResult orElse(), 39 | }) => 40 | throw _privateConstructorUsedError; 41 | @optionalTypeArgs 42 | TResult map({ 43 | required TResult Function(ServerError value) serverError, 44 | required TResult Function(EmailAlreadyInUse value) emailAlreadyInUse, 45 | required TResult Function(InavalidEmailAndPasswordCombination value) 46 | invalidEmailAndPasswordCombination, 47 | }) => 48 | throw _privateConstructorUsedError; 49 | @optionalTypeArgs 50 | TResult? mapOrNull({ 51 | TResult? Function(ServerError value)? serverError, 52 | TResult? Function(EmailAlreadyInUse value)? emailAlreadyInUse, 53 | TResult? Function(InavalidEmailAndPasswordCombination value)? 54 | invalidEmailAndPasswordCombination, 55 | }) => 56 | throw _privateConstructorUsedError; 57 | @optionalTypeArgs 58 | TResult maybeMap({ 59 | TResult Function(ServerError value)? serverError, 60 | TResult Function(EmailAlreadyInUse value)? emailAlreadyInUse, 61 | TResult Function(InavalidEmailAndPasswordCombination value)? 62 | invalidEmailAndPasswordCombination, 63 | required TResult orElse(), 64 | }) => 65 | throw _privateConstructorUsedError; 66 | } 67 | 68 | /// @nodoc 69 | abstract class $AuthFailuresCopyWith<$Res> { 70 | factory $AuthFailuresCopyWith( 71 | AuthFailures value, $Res Function(AuthFailures) then) = 72 | _$AuthFailuresCopyWithImpl<$Res, AuthFailures>; 73 | } 74 | 75 | /// @nodoc 76 | class _$AuthFailuresCopyWithImpl<$Res, $Val extends AuthFailures> 77 | implements $AuthFailuresCopyWith<$Res> { 78 | _$AuthFailuresCopyWithImpl(this._value, this._then); 79 | 80 | // ignore: unused_field 81 | final $Val _value; 82 | // ignore: unused_field 83 | final $Res Function($Val) _then; 84 | } 85 | 86 | /// @nodoc 87 | abstract class _$$ServerErrorImplCopyWith<$Res> { 88 | factory _$$ServerErrorImplCopyWith( 89 | _$ServerErrorImpl value, $Res Function(_$ServerErrorImpl) then) = 90 | __$$ServerErrorImplCopyWithImpl<$Res>; 91 | } 92 | 93 | /// @nodoc 94 | class __$$ServerErrorImplCopyWithImpl<$Res> 95 | extends _$AuthFailuresCopyWithImpl<$Res, _$ServerErrorImpl> 96 | implements _$$ServerErrorImplCopyWith<$Res> { 97 | __$$ServerErrorImplCopyWithImpl( 98 | _$ServerErrorImpl _value, $Res Function(_$ServerErrorImpl) _then) 99 | : super(_value, _then); 100 | } 101 | 102 | /// @nodoc 103 | 104 | class _$ServerErrorImpl implements ServerError { 105 | const _$ServerErrorImpl(); 106 | 107 | @override 108 | String toString() { 109 | return 'AuthFailures.serverError()'; 110 | } 111 | 112 | @override 113 | bool operator ==(Object other) { 114 | return identical(this, other) || 115 | (other.runtimeType == runtimeType && other is _$ServerErrorImpl); 116 | } 117 | 118 | @override 119 | int get hashCode => runtimeType.hashCode; 120 | 121 | @override 122 | @optionalTypeArgs 123 | TResult when({ 124 | required TResult Function() serverError, 125 | required TResult Function() emailAlreadyInUse, 126 | required TResult Function() invalidEmailAndPasswordCombination, 127 | }) { 128 | return serverError(); 129 | } 130 | 131 | @override 132 | @optionalTypeArgs 133 | TResult? whenOrNull({ 134 | TResult? Function()? serverError, 135 | TResult? Function()? emailAlreadyInUse, 136 | TResult? Function()? invalidEmailAndPasswordCombination, 137 | }) { 138 | return serverError?.call(); 139 | } 140 | 141 | @override 142 | @optionalTypeArgs 143 | TResult maybeWhen({ 144 | TResult Function()? serverError, 145 | TResult Function()? emailAlreadyInUse, 146 | TResult Function()? invalidEmailAndPasswordCombination, 147 | required TResult orElse(), 148 | }) { 149 | if (serverError != null) { 150 | return serverError(); 151 | } 152 | return orElse(); 153 | } 154 | 155 | @override 156 | @optionalTypeArgs 157 | TResult map({ 158 | required TResult Function(ServerError value) serverError, 159 | required TResult Function(EmailAlreadyInUse value) emailAlreadyInUse, 160 | required TResult Function(InavalidEmailAndPasswordCombination value) 161 | invalidEmailAndPasswordCombination, 162 | }) { 163 | return serverError(this); 164 | } 165 | 166 | @override 167 | @optionalTypeArgs 168 | TResult? mapOrNull({ 169 | TResult? Function(ServerError value)? serverError, 170 | TResult? Function(EmailAlreadyInUse value)? emailAlreadyInUse, 171 | TResult? Function(InavalidEmailAndPasswordCombination value)? 172 | invalidEmailAndPasswordCombination, 173 | }) { 174 | return serverError?.call(this); 175 | } 176 | 177 | @override 178 | @optionalTypeArgs 179 | TResult maybeMap({ 180 | TResult Function(ServerError value)? serverError, 181 | TResult Function(EmailAlreadyInUse value)? emailAlreadyInUse, 182 | TResult Function(InavalidEmailAndPasswordCombination value)? 183 | invalidEmailAndPasswordCombination, 184 | required TResult orElse(), 185 | }) { 186 | if (serverError != null) { 187 | return serverError(this); 188 | } 189 | return orElse(); 190 | } 191 | } 192 | 193 | abstract class ServerError implements AuthFailures { 194 | const factory ServerError() = _$ServerErrorImpl; 195 | } 196 | 197 | /// @nodoc 198 | abstract class _$$EmailAlreadyInUseImplCopyWith<$Res> { 199 | factory _$$EmailAlreadyInUseImplCopyWith(_$EmailAlreadyInUseImpl value, 200 | $Res Function(_$EmailAlreadyInUseImpl) then) = 201 | __$$EmailAlreadyInUseImplCopyWithImpl<$Res>; 202 | } 203 | 204 | /// @nodoc 205 | class __$$EmailAlreadyInUseImplCopyWithImpl<$Res> 206 | extends _$AuthFailuresCopyWithImpl<$Res, _$EmailAlreadyInUseImpl> 207 | implements _$$EmailAlreadyInUseImplCopyWith<$Res> { 208 | __$$EmailAlreadyInUseImplCopyWithImpl(_$EmailAlreadyInUseImpl _value, 209 | $Res Function(_$EmailAlreadyInUseImpl) _then) 210 | : super(_value, _then); 211 | } 212 | 213 | /// @nodoc 214 | 215 | class _$EmailAlreadyInUseImpl implements EmailAlreadyInUse { 216 | const _$EmailAlreadyInUseImpl(); 217 | 218 | @override 219 | String toString() { 220 | return 'AuthFailures.emailAlreadyInUse()'; 221 | } 222 | 223 | @override 224 | bool operator ==(Object other) { 225 | return identical(this, other) || 226 | (other.runtimeType == runtimeType && other is _$EmailAlreadyInUseImpl); 227 | } 228 | 229 | @override 230 | int get hashCode => runtimeType.hashCode; 231 | 232 | @override 233 | @optionalTypeArgs 234 | TResult when({ 235 | required TResult Function() serverError, 236 | required TResult Function() emailAlreadyInUse, 237 | required TResult Function() invalidEmailAndPasswordCombination, 238 | }) { 239 | return emailAlreadyInUse(); 240 | } 241 | 242 | @override 243 | @optionalTypeArgs 244 | TResult? whenOrNull({ 245 | TResult? Function()? serverError, 246 | TResult? Function()? emailAlreadyInUse, 247 | TResult? Function()? invalidEmailAndPasswordCombination, 248 | }) { 249 | return emailAlreadyInUse?.call(); 250 | } 251 | 252 | @override 253 | @optionalTypeArgs 254 | TResult maybeWhen({ 255 | TResult Function()? serverError, 256 | TResult Function()? emailAlreadyInUse, 257 | TResult Function()? invalidEmailAndPasswordCombination, 258 | required TResult orElse(), 259 | }) { 260 | if (emailAlreadyInUse != null) { 261 | return emailAlreadyInUse(); 262 | } 263 | return orElse(); 264 | } 265 | 266 | @override 267 | @optionalTypeArgs 268 | TResult map({ 269 | required TResult Function(ServerError value) serverError, 270 | required TResult Function(EmailAlreadyInUse value) emailAlreadyInUse, 271 | required TResult Function(InavalidEmailAndPasswordCombination value) 272 | invalidEmailAndPasswordCombination, 273 | }) { 274 | return emailAlreadyInUse(this); 275 | } 276 | 277 | @override 278 | @optionalTypeArgs 279 | TResult? mapOrNull({ 280 | TResult? Function(ServerError value)? serverError, 281 | TResult? Function(EmailAlreadyInUse value)? emailAlreadyInUse, 282 | TResult? Function(InavalidEmailAndPasswordCombination value)? 283 | invalidEmailAndPasswordCombination, 284 | }) { 285 | return emailAlreadyInUse?.call(this); 286 | } 287 | 288 | @override 289 | @optionalTypeArgs 290 | TResult maybeMap({ 291 | TResult Function(ServerError value)? serverError, 292 | TResult Function(EmailAlreadyInUse value)? emailAlreadyInUse, 293 | TResult Function(InavalidEmailAndPasswordCombination value)? 294 | invalidEmailAndPasswordCombination, 295 | required TResult orElse(), 296 | }) { 297 | if (emailAlreadyInUse != null) { 298 | return emailAlreadyInUse(this); 299 | } 300 | return orElse(); 301 | } 302 | } 303 | 304 | abstract class EmailAlreadyInUse implements AuthFailures { 305 | const factory EmailAlreadyInUse() = _$EmailAlreadyInUseImpl; 306 | } 307 | 308 | /// @nodoc 309 | abstract class _$$InavalidEmailAndPasswordCombinationImplCopyWith<$Res> { 310 | factory _$$InavalidEmailAndPasswordCombinationImplCopyWith( 311 | _$InavalidEmailAndPasswordCombinationImpl value, 312 | $Res Function(_$InavalidEmailAndPasswordCombinationImpl) then) = 313 | __$$InavalidEmailAndPasswordCombinationImplCopyWithImpl<$Res>; 314 | } 315 | 316 | /// @nodoc 317 | class __$$InavalidEmailAndPasswordCombinationImplCopyWithImpl<$Res> 318 | extends _$AuthFailuresCopyWithImpl<$Res, 319 | _$InavalidEmailAndPasswordCombinationImpl> 320 | implements _$$InavalidEmailAndPasswordCombinationImplCopyWith<$Res> { 321 | __$$InavalidEmailAndPasswordCombinationImplCopyWithImpl( 322 | _$InavalidEmailAndPasswordCombinationImpl _value, 323 | $Res Function(_$InavalidEmailAndPasswordCombinationImpl) _then) 324 | : super(_value, _then); 325 | } 326 | 327 | /// @nodoc 328 | 329 | class _$InavalidEmailAndPasswordCombinationImpl 330 | implements InavalidEmailAndPasswordCombination { 331 | const _$InavalidEmailAndPasswordCombinationImpl(); 332 | 333 | @override 334 | String toString() { 335 | return 'AuthFailures.invalidEmailAndPasswordCombination()'; 336 | } 337 | 338 | @override 339 | bool operator ==(Object other) { 340 | return identical(this, other) || 341 | (other.runtimeType == runtimeType && 342 | other is _$InavalidEmailAndPasswordCombinationImpl); 343 | } 344 | 345 | @override 346 | int get hashCode => runtimeType.hashCode; 347 | 348 | @override 349 | @optionalTypeArgs 350 | TResult when({ 351 | required TResult Function() serverError, 352 | required TResult Function() emailAlreadyInUse, 353 | required TResult Function() invalidEmailAndPasswordCombination, 354 | }) { 355 | return invalidEmailAndPasswordCombination(); 356 | } 357 | 358 | @override 359 | @optionalTypeArgs 360 | TResult? whenOrNull({ 361 | TResult? Function()? serverError, 362 | TResult? Function()? emailAlreadyInUse, 363 | TResult? Function()? invalidEmailAndPasswordCombination, 364 | }) { 365 | return invalidEmailAndPasswordCombination?.call(); 366 | } 367 | 368 | @override 369 | @optionalTypeArgs 370 | TResult maybeWhen({ 371 | TResult Function()? serverError, 372 | TResult Function()? emailAlreadyInUse, 373 | TResult Function()? invalidEmailAndPasswordCombination, 374 | required TResult orElse(), 375 | }) { 376 | if (invalidEmailAndPasswordCombination != null) { 377 | return invalidEmailAndPasswordCombination(); 378 | } 379 | return orElse(); 380 | } 381 | 382 | @override 383 | @optionalTypeArgs 384 | TResult map({ 385 | required TResult Function(ServerError value) serverError, 386 | required TResult Function(EmailAlreadyInUse value) emailAlreadyInUse, 387 | required TResult Function(InavalidEmailAndPasswordCombination value) 388 | invalidEmailAndPasswordCombination, 389 | }) { 390 | return invalidEmailAndPasswordCombination(this); 391 | } 392 | 393 | @override 394 | @optionalTypeArgs 395 | TResult? mapOrNull({ 396 | TResult? Function(ServerError value)? serverError, 397 | TResult? Function(EmailAlreadyInUse value)? emailAlreadyInUse, 398 | TResult? Function(InavalidEmailAndPasswordCombination value)? 399 | invalidEmailAndPasswordCombination, 400 | }) { 401 | return invalidEmailAndPasswordCombination?.call(this); 402 | } 403 | 404 | @override 405 | @optionalTypeArgs 406 | TResult maybeMap({ 407 | TResult Function(ServerError value)? serverError, 408 | TResult Function(EmailAlreadyInUse value)? emailAlreadyInUse, 409 | TResult Function(InavalidEmailAndPasswordCombination value)? 410 | invalidEmailAndPasswordCombination, 411 | required TResult orElse(), 412 | }) { 413 | if (invalidEmailAndPasswordCombination != null) { 414 | return invalidEmailAndPasswordCombination(this); 415 | } 416 | return orElse(); 417 | } 418 | } 419 | 420 | abstract class InavalidEmailAndPasswordCombination implements AuthFailures { 421 | const factory InavalidEmailAndPasswordCombination() = 422 | _$InavalidEmailAndPasswordCombinationImpl; 423 | } 424 | -------------------------------------------------------------------------------- /lib/domain/authentication/auth_value_failures.dart: -------------------------------------------------------------------------------- 1 | // Package imports: 2 | import "package:freezed_annotation/freezed_annotation.dart"; 3 | 4 | part "auth_value_failures.freezed.dart"; 5 | 6 | @freezed 7 | class AuthValueFailures with _$AuthValueFailures { 8 | const factory AuthValueFailures.invalidEmail({required String? failedValue}) = 9 | InvalidEmail; 10 | 11 | const factory AuthValueFailures.shortPassword( 12 | {required String? failedValue}) = ShortPassword; 13 | 14 | const factory AuthValueFailures.noSpecialSymbol( 15 | {required String? failedValue}) = NoSpecialSymbol; 16 | 17 | const factory AuthValueFailures.noUpperCase({required String? failedValue}) = 18 | NoUpperCase; 19 | 20 | const factory AuthValueFailures.noNumber({required String? failedValue}) = 21 | NoNumber; 22 | } 23 | -------------------------------------------------------------------------------- /lib/domain/authentication/auth_value_failures.freezed.dart: -------------------------------------------------------------------------------- 1 | // coverage:ignore-file 2 | // GENERATED CODE - DO NOT MODIFY BY HAND 3 | // ignore_for_file: type=lint 4 | // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark 5 | 6 | part of 'auth_value_failures.dart'; 7 | 8 | // ************************************************************************** 9 | // FreezedGenerator 10 | // ************************************************************************** 11 | 12 | T _$identity(T value) => value; 13 | 14 | final _privateConstructorUsedError = UnsupportedError( 15 | 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); 16 | 17 | /// @nodoc 18 | mixin _$AuthValueFailures { 19 | String? get failedValue => throw _privateConstructorUsedError; 20 | @optionalTypeArgs 21 | TResult when({ 22 | required TResult Function(String? failedValue) invalidEmail, 23 | required TResult Function(String? failedValue) shortPassword, 24 | required TResult Function(String? failedValue) noSpecialSymbol, 25 | required TResult Function(String? failedValue) noUpperCase, 26 | required TResult Function(String? failedValue) noNumber, 27 | }) => 28 | throw _privateConstructorUsedError; 29 | @optionalTypeArgs 30 | TResult? whenOrNull({ 31 | TResult? Function(String? failedValue)? invalidEmail, 32 | TResult? Function(String? failedValue)? shortPassword, 33 | TResult? Function(String? failedValue)? noSpecialSymbol, 34 | TResult? Function(String? failedValue)? noUpperCase, 35 | TResult? Function(String? failedValue)? noNumber, 36 | }) => 37 | throw _privateConstructorUsedError; 38 | @optionalTypeArgs 39 | TResult maybeWhen({ 40 | TResult Function(String? failedValue)? invalidEmail, 41 | TResult Function(String? failedValue)? shortPassword, 42 | TResult Function(String? failedValue)? noSpecialSymbol, 43 | TResult Function(String? failedValue)? noUpperCase, 44 | TResult Function(String? failedValue)? noNumber, 45 | required TResult orElse(), 46 | }) => 47 | throw _privateConstructorUsedError; 48 | @optionalTypeArgs 49 | TResult map({ 50 | required TResult Function(InvalidEmail value) invalidEmail, 51 | required TResult Function(ShortPassword value) shortPassword, 52 | required TResult Function(NoSpecialSymbol value) noSpecialSymbol, 53 | required TResult Function(NoUpperCase value) noUpperCase, 54 | required TResult Function(NoNumber value) noNumber, 55 | }) => 56 | throw _privateConstructorUsedError; 57 | @optionalTypeArgs 58 | TResult? mapOrNull({ 59 | TResult? Function(InvalidEmail value)? invalidEmail, 60 | TResult? Function(ShortPassword value)? shortPassword, 61 | TResult? Function(NoSpecialSymbol value)? noSpecialSymbol, 62 | TResult? Function(NoUpperCase value)? noUpperCase, 63 | TResult? Function(NoNumber value)? noNumber, 64 | }) => 65 | throw _privateConstructorUsedError; 66 | @optionalTypeArgs 67 | TResult maybeMap({ 68 | TResult Function(InvalidEmail value)? invalidEmail, 69 | TResult Function(ShortPassword value)? shortPassword, 70 | TResult Function(NoSpecialSymbol value)? noSpecialSymbol, 71 | TResult Function(NoUpperCase value)? noUpperCase, 72 | TResult Function(NoNumber value)? noNumber, 73 | required TResult orElse(), 74 | }) => 75 | throw _privateConstructorUsedError; 76 | 77 | @JsonKey(ignore: true) 78 | $AuthValueFailuresCopyWith> get copyWith => 79 | throw _privateConstructorUsedError; 80 | } 81 | 82 | /// @nodoc 83 | abstract class $AuthValueFailuresCopyWith { 84 | factory $AuthValueFailuresCopyWith(AuthValueFailures value, 85 | $Res Function(AuthValueFailures) then) = 86 | _$AuthValueFailuresCopyWithImpl>; 87 | @useResult 88 | $Res call({String? failedValue}); 89 | } 90 | 91 | /// @nodoc 92 | class _$AuthValueFailuresCopyWithImpl> 94 | implements $AuthValueFailuresCopyWith { 95 | _$AuthValueFailuresCopyWithImpl(this._value, this._then); 96 | 97 | // ignore: unused_field 98 | final $Val _value; 99 | // ignore: unused_field 100 | final $Res Function($Val) _then; 101 | 102 | @pragma('vm:prefer-inline') 103 | @override 104 | $Res call({ 105 | Object? failedValue = freezed, 106 | }) { 107 | return _then(_value.copyWith( 108 | failedValue: freezed == failedValue 109 | ? _value.failedValue 110 | : failedValue // ignore: cast_nullable_to_non_nullable 111 | as String?, 112 | ) as $Val); 113 | } 114 | } 115 | 116 | /// @nodoc 117 | abstract class _$$InvalidEmailImplCopyWith 118 | implements $AuthValueFailuresCopyWith { 119 | factory _$$InvalidEmailImplCopyWith(_$InvalidEmailImpl value, 120 | $Res Function(_$InvalidEmailImpl) then) = 121 | __$$InvalidEmailImplCopyWithImpl; 122 | @override 123 | @useResult 124 | $Res call({String? failedValue}); 125 | } 126 | 127 | /// @nodoc 128 | class __$$InvalidEmailImplCopyWithImpl 129 | extends _$AuthValueFailuresCopyWithImpl> 130 | implements _$$InvalidEmailImplCopyWith { 131 | __$$InvalidEmailImplCopyWithImpl( 132 | _$InvalidEmailImpl _value, $Res Function(_$InvalidEmailImpl) _then) 133 | : super(_value, _then); 134 | 135 | @pragma('vm:prefer-inline') 136 | @override 137 | $Res call({ 138 | Object? failedValue = freezed, 139 | }) { 140 | return _then(_$InvalidEmailImpl( 141 | failedValue: freezed == failedValue 142 | ? _value.failedValue 143 | : failedValue // ignore: cast_nullable_to_non_nullable 144 | as String?, 145 | )); 146 | } 147 | } 148 | 149 | /// @nodoc 150 | 151 | class _$InvalidEmailImpl implements InvalidEmail { 152 | const _$InvalidEmailImpl({required this.failedValue}); 153 | 154 | @override 155 | final String? failedValue; 156 | 157 | @override 158 | String toString() { 159 | return 'AuthValueFailures<$T>.invalidEmail(failedValue: $failedValue)'; 160 | } 161 | 162 | @override 163 | bool operator ==(Object other) { 164 | return identical(this, other) || 165 | (other.runtimeType == runtimeType && 166 | other is _$InvalidEmailImpl && 167 | (identical(other.failedValue, failedValue) || 168 | other.failedValue == failedValue)); 169 | } 170 | 171 | @override 172 | int get hashCode => Object.hash(runtimeType, failedValue); 173 | 174 | @JsonKey(ignore: true) 175 | @override 176 | @pragma('vm:prefer-inline') 177 | _$$InvalidEmailImplCopyWith> get copyWith => 178 | __$$InvalidEmailImplCopyWithImpl>( 179 | this, _$identity); 180 | 181 | @override 182 | @optionalTypeArgs 183 | TResult when({ 184 | required TResult Function(String? failedValue) invalidEmail, 185 | required TResult Function(String? failedValue) shortPassword, 186 | required TResult Function(String? failedValue) noSpecialSymbol, 187 | required TResult Function(String? failedValue) noUpperCase, 188 | required TResult Function(String? failedValue) noNumber, 189 | }) { 190 | return invalidEmail(failedValue); 191 | } 192 | 193 | @override 194 | @optionalTypeArgs 195 | TResult? whenOrNull({ 196 | TResult? Function(String? failedValue)? invalidEmail, 197 | TResult? Function(String? failedValue)? shortPassword, 198 | TResult? Function(String? failedValue)? noSpecialSymbol, 199 | TResult? Function(String? failedValue)? noUpperCase, 200 | TResult? Function(String? failedValue)? noNumber, 201 | }) { 202 | return invalidEmail?.call(failedValue); 203 | } 204 | 205 | @override 206 | @optionalTypeArgs 207 | TResult maybeWhen({ 208 | TResult Function(String? failedValue)? invalidEmail, 209 | TResult Function(String? failedValue)? shortPassword, 210 | TResult Function(String? failedValue)? noSpecialSymbol, 211 | TResult Function(String? failedValue)? noUpperCase, 212 | TResult Function(String? failedValue)? noNumber, 213 | required TResult orElse(), 214 | }) { 215 | if (invalidEmail != null) { 216 | return invalidEmail(failedValue); 217 | } 218 | return orElse(); 219 | } 220 | 221 | @override 222 | @optionalTypeArgs 223 | TResult map({ 224 | required TResult Function(InvalidEmail value) invalidEmail, 225 | required TResult Function(ShortPassword value) shortPassword, 226 | required TResult Function(NoSpecialSymbol value) noSpecialSymbol, 227 | required TResult Function(NoUpperCase value) noUpperCase, 228 | required TResult Function(NoNumber value) noNumber, 229 | }) { 230 | return invalidEmail(this); 231 | } 232 | 233 | @override 234 | @optionalTypeArgs 235 | TResult? mapOrNull({ 236 | TResult? Function(InvalidEmail value)? invalidEmail, 237 | TResult? Function(ShortPassword value)? shortPassword, 238 | TResult? Function(NoSpecialSymbol value)? noSpecialSymbol, 239 | TResult? Function(NoUpperCase value)? noUpperCase, 240 | TResult? Function(NoNumber value)? noNumber, 241 | }) { 242 | return invalidEmail?.call(this); 243 | } 244 | 245 | @override 246 | @optionalTypeArgs 247 | TResult maybeMap({ 248 | TResult Function(InvalidEmail value)? invalidEmail, 249 | TResult Function(ShortPassword value)? shortPassword, 250 | TResult Function(NoSpecialSymbol value)? noSpecialSymbol, 251 | TResult Function(NoUpperCase value)? noUpperCase, 252 | TResult Function(NoNumber value)? noNumber, 253 | required TResult orElse(), 254 | }) { 255 | if (invalidEmail != null) { 256 | return invalidEmail(this); 257 | } 258 | return orElse(); 259 | } 260 | } 261 | 262 | abstract class InvalidEmail implements AuthValueFailures { 263 | const factory InvalidEmail({required final String? failedValue}) = 264 | _$InvalidEmailImpl; 265 | 266 | @override 267 | String? get failedValue; 268 | @override 269 | @JsonKey(ignore: true) 270 | _$$InvalidEmailImplCopyWith> get copyWith => 271 | throw _privateConstructorUsedError; 272 | } 273 | 274 | /// @nodoc 275 | abstract class _$$ShortPasswordImplCopyWith 276 | implements $AuthValueFailuresCopyWith { 277 | factory _$$ShortPasswordImplCopyWith(_$ShortPasswordImpl value, 278 | $Res Function(_$ShortPasswordImpl) then) = 279 | __$$ShortPasswordImplCopyWithImpl; 280 | @override 281 | @useResult 282 | $Res call({String? failedValue}); 283 | } 284 | 285 | /// @nodoc 286 | class __$$ShortPasswordImplCopyWithImpl 287 | extends _$AuthValueFailuresCopyWithImpl> 288 | implements _$$ShortPasswordImplCopyWith { 289 | __$$ShortPasswordImplCopyWithImpl(_$ShortPasswordImpl _value, 290 | $Res Function(_$ShortPasswordImpl) _then) 291 | : super(_value, _then); 292 | 293 | @pragma('vm:prefer-inline') 294 | @override 295 | $Res call({ 296 | Object? failedValue = freezed, 297 | }) { 298 | return _then(_$ShortPasswordImpl( 299 | failedValue: freezed == failedValue 300 | ? _value.failedValue 301 | : failedValue // ignore: cast_nullable_to_non_nullable 302 | as String?, 303 | )); 304 | } 305 | } 306 | 307 | /// @nodoc 308 | 309 | class _$ShortPasswordImpl implements ShortPassword { 310 | const _$ShortPasswordImpl({required this.failedValue}); 311 | 312 | @override 313 | final String? failedValue; 314 | 315 | @override 316 | String toString() { 317 | return 'AuthValueFailures<$T>.shortPassword(failedValue: $failedValue)'; 318 | } 319 | 320 | @override 321 | bool operator ==(Object other) { 322 | return identical(this, other) || 323 | (other.runtimeType == runtimeType && 324 | other is _$ShortPasswordImpl && 325 | (identical(other.failedValue, failedValue) || 326 | other.failedValue == failedValue)); 327 | } 328 | 329 | @override 330 | int get hashCode => Object.hash(runtimeType, failedValue); 331 | 332 | @JsonKey(ignore: true) 333 | @override 334 | @pragma('vm:prefer-inline') 335 | _$$ShortPasswordImplCopyWith> get copyWith => 336 | __$$ShortPasswordImplCopyWithImpl>( 337 | this, _$identity); 338 | 339 | @override 340 | @optionalTypeArgs 341 | TResult when({ 342 | required TResult Function(String? failedValue) invalidEmail, 343 | required TResult Function(String? failedValue) shortPassword, 344 | required TResult Function(String? failedValue) noSpecialSymbol, 345 | required TResult Function(String? failedValue) noUpperCase, 346 | required TResult Function(String? failedValue) noNumber, 347 | }) { 348 | return shortPassword(failedValue); 349 | } 350 | 351 | @override 352 | @optionalTypeArgs 353 | TResult? whenOrNull({ 354 | TResult? Function(String? failedValue)? invalidEmail, 355 | TResult? Function(String? failedValue)? shortPassword, 356 | TResult? Function(String? failedValue)? noSpecialSymbol, 357 | TResult? Function(String? failedValue)? noUpperCase, 358 | TResult? Function(String? failedValue)? noNumber, 359 | }) { 360 | return shortPassword?.call(failedValue); 361 | } 362 | 363 | @override 364 | @optionalTypeArgs 365 | TResult maybeWhen({ 366 | TResult Function(String? failedValue)? invalidEmail, 367 | TResult Function(String? failedValue)? shortPassword, 368 | TResult Function(String? failedValue)? noSpecialSymbol, 369 | TResult Function(String? failedValue)? noUpperCase, 370 | TResult Function(String? failedValue)? noNumber, 371 | required TResult orElse(), 372 | }) { 373 | if (shortPassword != null) { 374 | return shortPassword(failedValue); 375 | } 376 | return orElse(); 377 | } 378 | 379 | @override 380 | @optionalTypeArgs 381 | TResult map({ 382 | required TResult Function(InvalidEmail value) invalidEmail, 383 | required TResult Function(ShortPassword value) shortPassword, 384 | required TResult Function(NoSpecialSymbol value) noSpecialSymbol, 385 | required TResult Function(NoUpperCase value) noUpperCase, 386 | required TResult Function(NoNumber value) noNumber, 387 | }) { 388 | return shortPassword(this); 389 | } 390 | 391 | @override 392 | @optionalTypeArgs 393 | TResult? mapOrNull({ 394 | TResult? Function(InvalidEmail value)? invalidEmail, 395 | TResult? Function(ShortPassword value)? shortPassword, 396 | TResult? Function(NoSpecialSymbol value)? noSpecialSymbol, 397 | TResult? Function(NoUpperCase value)? noUpperCase, 398 | TResult? Function(NoNumber value)? noNumber, 399 | }) { 400 | return shortPassword?.call(this); 401 | } 402 | 403 | @override 404 | @optionalTypeArgs 405 | TResult maybeMap({ 406 | TResult Function(InvalidEmail value)? invalidEmail, 407 | TResult Function(ShortPassword value)? shortPassword, 408 | TResult Function(NoSpecialSymbol value)? noSpecialSymbol, 409 | TResult Function(NoUpperCase value)? noUpperCase, 410 | TResult Function(NoNumber value)? noNumber, 411 | required TResult orElse(), 412 | }) { 413 | if (shortPassword != null) { 414 | return shortPassword(this); 415 | } 416 | return orElse(); 417 | } 418 | } 419 | 420 | abstract class ShortPassword implements AuthValueFailures { 421 | const factory ShortPassword({required final String? failedValue}) = 422 | _$ShortPasswordImpl; 423 | 424 | @override 425 | String? get failedValue; 426 | @override 427 | @JsonKey(ignore: true) 428 | _$$ShortPasswordImplCopyWith> get copyWith => 429 | throw _privateConstructorUsedError; 430 | } 431 | 432 | /// @nodoc 433 | abstract class _$$NoSpecialSymbolImplCopyWith 434 | implements $AuthValueFailuresCopyWith { 435 | factory _$$NoSpecialSymbolImplCopyWith(_$NoSpecialSymbolImpl value, 436 | $Res Function(_$NoSpecialSymbolImpl) then) = 437 | __$$NoSpecialSymbolImplCopyWithImpl; 438 | @override 439 | @useResult 440 | $Res call({String? failedValue}); 441 | } 442 | 443 | /// @nodoc 444 | class __$$NoSpecialSymbolImplCopyWithImpl 445 | extends _$AuthValueFailuresCopyWithImpl> 446 | implements _$$NoSpecialSymbolImplCopyWith { 447 | __$$NoSpecialSymbolImplCopyWithImpl(_$NoSpecialSymbolImpl _value, 448 | $Res Function(_$NoSpecialSymbolImpl) _then) 449 | : super(_value, _then); 450 | 451 | @pragma('vm:prefer-inline') 452 | @override 453 | $Res call({ 454 | Object? failedValue = freezed, 455 | }) { 456 | return _then(_$NoSpecialSymbolImpl( 457 | failedValue: freezed == failedValue 458 | ? _value.failedValue 459 | : failedValue // ignore: cast_nullable_to_non_nullable 460 | as String?, 461 | )); 462 | } 463 | } 464 | 465 | /// @nodoc 466 | 467 | class _$NoSpecialSymbolImpl implements NoSpecialSymbol { 468 | const _$NoSpecialSymbolImpl({required this.failedValue}); 469 | 470 | @override 471 | final String? failedValue; 472 | 473 | @override 474 | String toString() { 475 | return 'AuthValueFailures<$T>.noSpecialSymbol(failedValue: $failedValue)'; 476 | } 477 | 478 | @override 479 | bool operator ==(Object other) { 480 | return identical(this, other) || 481 | (other.runtimeType == runtimeType && 482 | other is _$NoSpecialSymbolImpl && 483 | (identical(other.failedValue, failedValue) || 484 | other.failedValue == failedValue)); 485 | } 486 | 487 | @override 488 | int get hashCode => Object.hash(runtimeType, failedValue); 489 | 490 | @JsonKey(ignore: true) 491 | @override 492 | @pragma('vm:prefer-inline') 493 | _$$NoSpecialSymbolImplCopyWith> get copyWith => 494 | __$$NoSpecialSymbolImplCopyWithImpl>( 495 | this, _$identity); 496 | 497 | @override 498 | @optionalTypeArgs 499 | TResult when({ 500 | required TResult Function(String? failedValue) invalidEmail, 501 | required TResult Function(String? failedValue) shortPassword, 502 | required TResult Function(String? failedValue) noSpecialSymbol, 503 | required TResult Function(String? failedValue) noUpperCase, 504 | required TResult Function(String? failedValue) noNumber, 505 | }) { 506 | return noSpecialSymbol(failedValue); 507 | } 508 | 509 | @override 510 | @optionalTypeArgs 511 | TResult? whenOrNull({ 512 | TResult? Function(String? failedValue)? invalidEmail, 513 | TResult? Function(String? failedValue)? shortPassword, 514 | TResult? Function(String? failedValue)? noSpecialSymbol, 515 | TResult? Function(String? failedValue)? noUpperCase, 516 | TResult? Function(String? failedValue)? noNumber, 517 | }) { 518 | return noSpecialSymbol?.call(failedValue); 519 | } 520 | 521 | @override 522 | @optionalTypeArgs 523 | TResult maybeWhen({ 524 | TResult Function(String? failedValue)? invalidEmail, 525 | TResult Function(String? failedValue)? shortPassword, 526 | TResult Function(String? failedValue)? noSpecialSymbol, 527 | TResult Function(String? failedValue)? noUpperCase, 528 | TResult Function(String? failedValue)? noNumber, 529 | required TResult orElse(), 530 | }) { 531 | if (noSpecialSymbol != null) { 532 | return noSpecialSymbol(failedValue); 533 | } 534 | return orElse(); 535 | } 536 | 537 | @override 538 | @optionalTypeArgs 539 | TResult map({ 540 | required TResult Function(InvalidEmail value) invalidEmail, 541 | required TResult Function(ShortPassword value) shortPassword, 542 | required TResult Function(NoSpecialSymbol value) noSpecialSymbol, 543 | required TResult Function(NoUpperCase value) noUpperCase, 544 | required TResult Function(NoNumber value) noNumber, 545 | }) { 546 | return noSpecialSymbol(this); 547 | } 548 | 549 | @override 550 | @optionalTypeArgs 551 | TResult? mapOrNull({ 552 | TResult? Function(InvalidEmail value)? invalidEmail, 553 | TResult? Function(ShortPassword value)? shortPassword, 554 | TResult? Function(NoSpecialSymbol value)? noSpecialSymbol, 555 | TResult? Function(NoUpperCase value)? noUpperCase, 556 | TResult? Function(NoNumber value)? noNumber, 557 | }) { 558 | return noSpecialSymbol?.call(this); 559 | } 560 | 561 | @override 562 | @optionalTypeArgs 563 | TResult maybeMap({ 564 | TResult Function(InvalidEmail value)? invalidEmail, 565 | TResult Function(ShortPassword value)? shortPassword, 566 | TResult Function(NoSpecialSymbol value)? noSpecialSymbol, 567 | TResult Function(NoUpperCase value)? noUpperCase, 568 | TResult Function(NoNumber value)? noNumber, 569 | required TResult orElse(), 570 | }) { 571 | if (noSpecialSymbol != null) { 572 | return noSpecialSymbol(this); 573 | } 574 | return orElse(); 575 | } 576 | } 577 | 578 | abstract class NoSpecialSymbol implements AuthValueFailures { 579 | const factory NoSpecialSymbol({required final String? failedValue}) = 580 | _$NoSpecialSymbolImpl; 581 | 582 | @override 583 | String? get failedValue; 584 | @override 585 | @JsonKey(ignore: true) 586 | _$$NoSpecialSymbolImplCopyWith> get copyWith => 587 | throw _privateConstructorUsedError; 588 | } 589 | 590 | /// @nodoc 591 | abstract class _$$NoUpperCaseImplCopyWith 592 | implements $AuthValueFailuresCopyWith { 593 | factory _$$NoUpperCaseImplCopyWith(_$NoUpperCaseImpl value, 594 | $Res Function(_$NoUpperCaseImpl) then) = 595 | __$$NoUpperCaseImplCopyWithImpl; 596 | @override 597 | @useResult 598 | $Res call({String? failedValue}); 599 | } 600 | 601 | /// @nodoc 602 | class __$$NoUpperCaseImplCopyWithImpl 603 | extends _$AuthValueFailuresCopyWithImpl> 604 | implements _$$NoUpperCaseImplCopyWith { 605 | __$$NoUpperCaseImplCopyWithImpl( 606 | _$NoUpperCaseImpl _value, $Res Function(_$NoUpperCaseImpl) _then) 607 | : super(_value, _then); 608 | 609 | @pragma('vm:prefer-inline') 610 | @override 611 | $Res call({ 612 | Object? failedValue = freezed, 613 | }) { 614 | return _then(_$NoUpperCaseImpl( 615 | failedValue: freezed == failedValue 616 | ? _value.failedValue 617 | : failedValue // ignore: cast_nullable_to_non_nullable 618 | as String?, 619 | )); 620 | } 621 | } 622 | 623 | /// @nodoc 624 | 625 | class _$NoUpperCaseImpl implements NoUpperCase { 626 | const _$NoUpperCaseImpl({required this.failedValue}); 627 | 628 | @override 629 | final String? failedValue; 630 | 631 | @override 632 | String toString() { 633 | return 'AuthValueFailures<$T>.noUpperCase(failedValue: $failedValue)'; 634 | } 635 | 636 | @override 637 | bool operator ==(Object other) { 638 | return identical(this, other) || 639 | (other.runtimeType == runtimeType && 640 | other is _$NoUpperCaseImpl && 641 | (identical(other.failedValue, failedValue) || 642 | other.failedValue == failedValue)); 643 | } 644 | 645 | @override 646 | int get hashCode => Object.hash(runtimeType, failedValue); 647 | 648 | @JsonKey(ignore: true) 649 | @override 650 | @pragma('vm:prefer-inline') 651 | _$$NoUpperCaseImplCopyWith> get copyWith => 652 | __$$NoUpperCaseImplCopyWithImpl>( 653 | this, _$identity); 654 | 655 | @override 656 | @optionalTypeArgs 657 | TResult when({ 658 | required TResult Function(String? failedValue) invalidEmail, 659 | required TResult Function(String? failedValue) shortPassword, 660 | required TResult Function(String? failedValue) noSpecialSymbol, 661 | required TResult Function(String? failedValue) noUpperCase, 662 | required TResult Function(String? failedValue) noNumber, 663 | }) { 664 | return noUpperCase(failedValue); 665 | } 666 | 667 | @override 668 | @optionalTypeArgs 669 | TResult? whenOrNull({ 670 | TResult? Function(String? failedValue)? invalidEmail, 671 | TResult? Function(String? failedValue)? shortPassword, 672 | TResult? Function(String? failedValue)? noSpecialSymbol, 673 | TResult? Function(String? failedValue)? noUpperCase, 674 | TResult? Function(String? failedValue)? noNumber, 675 | }) { 676 | return noUpperCase?.call(failedValue); 677 | } 678 | 679 | @override 680 | @optionalTypeArgs 681 | TResult maybeWhen({ 682 | TResult Function(String? failedValue)? invalidEmail, 683 | TResult Function(String? failedValue)? shortPassword, 684 | TResult Function(String? failedValue)? noSpecialSymbol, 685 | TResult Function(String? failedValue)? noUpperCase, 686 | TResult Function(String? failedValue)? noNumber, 687 | required TResult orElse(), 688 | }) { 689 | if (noUpperCase != null) { 690 | return noUpperCase(failedValue); 691 | } 692 | return orElse(); 693 | } 694 | 695 | @override 696 | @optionalTypeArgs 697 | TResult map({ 698 | required TResult Function(InvalidEmail value) invalidEmail, 699 | required TResult Function(ShortPassword value) shortPassword, 700 | required TResult Function(NoSpecialSymbol value) noSpecialSymbol, 701 | required TResult Function(NoUpperCase value) noUpperCase, 702 | required TResult Function(NoNumber value) noNumber, 703 | }) { 704 | return noUpperCase(this); 705 | } 706 | 707 | @override 708 | @optionalTypeArgs 709 | TResult? mapOrNull({ 710 | TResult? Function(InvalidEmail value)? invalidEmail, 711 | TResult? Function(ShortPassword value)? shortPassword, 712 | TResult? Function(NoSpecialSymbol value)? noSpecialSymbol, 713 | TResult? Function(NoUpperCase value)? noUpperCase, 714 | TResult? Function(NoNumber value)? noNumber, 715 | }) { 716 | return noUpperCase?.call(this); 717 | } 718 | 719 | @override 720 | @optionalTypeArgs 721 | TResult maybeMap({ 722 | TResult Function(InvalidEmail value)? invalidEmail, 723 | TResult Function(ShortPassword value)? shortPassword, 724 | TResult Function(NoSpecialSymbol value)? noSpecialSymbol, 725 | TResult Function(NoUpperCase value)? noUpperCase, 726 | TResult Function(NoNumber value)? noNumber, 727 | required TResult orElse(), 728 | }) { 729 | if (noUpperCase != null) { 730 | return noUpperCase(this); 731 | } 732 | return orElse(); 733 | } 734 | } 735 | 736 | abstract class NoUpperCase implements AuthValueFailures { 737 | const factory NoUpperCase({required final String? failedValue}) = 738 | _$NoUpperCaseImpl; 739 | 740 | @override 741 | String? get failedValue; 742 | @override 743 | @JsonKey(ignore: true) 744 | _$$NoUpperCaseImplCopyWith> get copyWith => 745 | throw _privateConstructorUsedError; 746 | } 747 | 748 | /// @nodoc 749 | abstract class _$$NoNumberImplCopyWith 750 | implements $AuthValueFailuresCopyWith { 751 | factory _$$NoNumberImplCopyWith( 752 | _$NoNumberImpl value, $Res Function(_$NoNumberImpl) then) = 753 | __$$NoNumberImplCopyWithImpl; 754 | @override 755 | @useResult 756 | $Res call({String? failedValue}); 757 | } 758 | 759 | /// @nodoc 760 | class __$$NoNumberImplCopyWithImpl 761 | extends _$AuthValueFailuresCopyWithImpl> 762 | implements _$$NoNumberImplCopyWith { 763 | __$$NoNumberImplCopyWithImpl( 764 | _$NoNumberImpl _value, $Res Function(_$NoNumberImpl) _then) 765 | : super(_value, _then); 766 | 767 | @pragma('vm:prefer-inline') 768 | @override 769 | $Res call({ 770 | Object? failedValue = freezed, 771 | }) { 772 | return _then(_$NoNumberImpl( 773 | failedValue: freezed == failedValue 774 | ? _value.failedValue 775 | : failedValue // ignore: cast_nullable_to_non_nullable 776 | as String?, 777 | )); 778 | } 779 | } 780 | 781 | /// @nodoc 782 | 783 | class _$NoNumberImpl implements NoNumber { 784 | const _$NoNumberImpl({required this.failedValue}); 785 | 786 | @override 787 | final String? failedValue; 788 | 789 | @override 790 | String toString() { 791 | return 'AuthValueFailures<$T>.noNumber(failedValue: $failedValue)'; 792 | } 793 | 794 | @override 795 | bool operator ==(Object other) { 796 | return identical(this, other) || 797 | (other.runtimeType == runtimeType && 798 | other is _$NoNumberImpl && 799 | (identical(other.failedValue, failedValue) || 800 | other.failedValue == failedValue)); 801 | } 802 | 803 | @override 804 | int get hashCode => Object.hash(runtimeType, failedValue); 805 | 806 | @JsonKey(ignore: true) 807 | @override 808 | @pragma('vm:prefer-inline') 809 | _$$NoNumberImplCopyWith> get copyWith => 810 | __$$NoNumberImplCopyWithImpl>(this, _$identity); 811 | 812 | @override 813 | @optionalTypeArgs 814 | TResult when({ 815 | required TResult Function(String? failedValue) invalidEmail, 816 | required TResult Function(String? failedValue) shortPassword, 817 | required TResult Function(String? failedValue) noSpecialSymbol, 818 | required TResult Function(String? failedValue) noUpperCase, 819 | required TResult Function(String? failedValue) noNumber, 820 | }) { 821 | return noNumber(failedValue); 822 | } 823 | 824 | @override 825 | @optionalTypeArgs 826 | TResult? whenOrNull({ 827 | TResult? Function(String? failedValue)? invalidEmail, 828 | TResult? Function(String? failedValue)? shortPassword, 829 | TResult? Function(String? failedValue)? noSpecialSymbol, 830 | TResult? Function(String? failedValue)? noUpperCase, 831 | TResult? Function(String? failedValue)? noNumber, 832 | }) { 833 | return noNumber?.call(failedValue); 834 | } 835 | 836 | @override 837 | @optionalTypeArgs 838 | TResult maybeWhen({ 839 | TResult Function(String? failedValue)? invalidEmail, 840 | TResult Function(String? failedValue)? shortPassword, 841 | TResult Function(String? failedValue)? noSpecialSymbol, 842 | TResult Function(String? failedValue)? noUpperCase, 843 | TResult Function(String? failedValue)? noNumber, 844 | required TResult orElse(), 845 | }) { 846 | if (noNumber != null) { 847 | return noNumber(failedValue); 848 | } 849 | return orElse(); 850 | } 851 | 852 | @override 853 | @optionalTypeArgs 854 | TResult map({ 855 | required TResult Function(InvalidEmail value) invalidEmail, 856 | required TResult Function(ShortPassword value) shortPassword, 857 | required TResult Function(NoSpecialSymbol value) noSpecialSymbol, 858 | required TResult Function(NoUpperCase value) noUpperCase, 859 | required TResult Function(NoNumber value) noNumber, 860 | }) { 861 | return noNumber(this); 862 | } 863 | 864 | @override 865 | @optionalTypeArgs 866 | TResult? mapOrNull({ 867 | TResult? Function(InvalidEmail value)? invalidEmail, 868 | TResult? Function(ShortPassword value)? shortPassword, 869 | TResult? Function(NoSpecialSymbol value)? noSpecialSymbol, 870 | TResult? Function(NoUpperCase value)? noUpperCase, 871 | TResult? Function(NoNumber value)? noNumber, 872 | }) { 873 | return noNumber?.call(this); 874 | } 875 | 876 | @override 877 | @optionalTypeArgs 878 | TResult maybeMap({ 879 | TResult Function(InvalidEmail value)? invalidEmail, 880 | TResult Function(ShortPassword value)? shortPassword, 881 | TResult Function(NoSpecialSymbol value)? noSpecialSymbol, 882 | TResult Function(NoUpperCase value)? noUpperCase, 883 | TResult Function(NoNumber value)? noNumber, 884 | required TResult orElse(), 885 | }) { 886 | if (noNumber != null) { 887 | return noNumber(this); 888 | } 889 | return orElse(); 890 | } 891 | } 892 | 893 | abstract class NoNumber implements AuthValueFailures { 894 | const factory NoNumber({required final String? failedValue}) = 895 | _$NoNumberImpl; 896 | 897 | @override 898 | String? get failedValue; 899 | @override 900 | @JsonKey(ignore: true) 901 | _$$NoNumberImplCopyWith> get copyWith => 902 | throw _privateConstructorUsedError; 903 | } 904 | -------------------------------------------------------------------------------- /lib/domain/authentication/auth_value_objects.dart: -------------------------------------------------------------------------------- 1 | import "package:firebase_auth_flutter_ddd/Domain/Authentication/auth_value_failures.dart"; 2 | import "package:firebase_auth_flutter_ddd/Domain/Authentication/auth_value_validators.dart"; 3 | import "package:firebase_auth_flutter_ddd/Domain/Core/value_object.dart"; 4 | import "package:fpdart/fpdart.dart"; 5 | 6 | class EmailAddress extends ValueObject { 7 | factory EmailAddress({String? email}) { 8 | return EmailAddress._(validateEmailAddress(email: email)); 9 | } 10 | 11 | const EmailAddress._(this.valueObject); 12 | 13 | @override 14 | final Either, String>? valueObject; 15 | } 16 | 17 | class Password extends ValueObject { 18 | factory Password({String? password}) { 19 | return Password._(validatePassword(password: password)); 20 | } 21 | 22 | const Password._(this.valueObject); 23 | 24 | @override 25 | final Either, String>? valueObject; 26 | } 27 | -------------------------------------------------------------------------------- /lib/domain/authentication/auth_value_validators.dart: -------------------------------------------------------------------------------- 1 | import "package:firebase_auth_flutter_ddd/Domain/Authentication/auth_value_failures.dart"; 2 | import "package:fpdart/fpdart.dart"; 3 | 4 | Either, String> validateEmailAddress({ 5 | required String? email, 6 | }) { 7 | final emailRegex = RegExp( 8 | r'^[a-zA-Z0-9.a-zA-Z0-9.!#$%&"*+-/=?^_`{|}~]+@[a-zA-Z0-9]+\.[a-zA-Z]+'); 9 | 10 | if (emailRegex.hasMatch(email!)) { 11 | return right(email); 12 | } else { 13 | return left( 14 | AuthValueFailures.invalidEmail(failedValue: email), 15 | ); 16 | } 17 | } 18 | 19 | Either, String> validatePassword({ 20 | required String? password, 21 | }) { 22 | final hasMinLength = password!.length > 6; 23 | final hasUppercase = password.contains(RegExp("[A-Z]")); 24 | final hasDigits = password.contains(RegExp("[0-9]")); 25 | final hasSpecialCharacters = 26 | password.contains(RegExp(r'[!@#$%^&*(),.?":{}|<>]')); 27 | if (!hasMinLength) { 28 | return left( 29 | AuthValueFailures.shortPassword(failedValue: password), 30 | ); 31 | } else if (!hasUppercase) { 32 | return left( 33 | AuthValueFailures.noUpperCase(failedValue: password), 34 | ); 35 | } else if (!hasDigits) { 36 | return left( 37 | AuthValueFailures.noNumber(failedValue: password), 38 | ); 39 | } else if (!hasSpecialCharacters) { 40 | return left( 41 | AuthValueFailures.noSpecialSymbol(failedValue: password), 42 | ); 43 | } else { 44 | return right(password); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /lib/domain/authentication/i_auth_facade.dart: -------------------------------------------------------------------------------- 1 | import "package:firebase_auth_flutter_ddd/Domain/Authentication/auth_failures.dart"; 2 | import "package:firebase_auth_flutter_ddd/Domain/Authentication/auth_value_objects.dart"; 3 | import "package:fpdart/fpdart.dart"; 4 | 5 | 6 | abstract class IAuthFacade { 7 | Future> registerWithEmailAndPassword( 8 | {required EmailAddress? emailAddress, required Password? password}); 9 | 10 | Future> signInWithEmailAndPassword( 11 | {required EmailAddress? emailAddress, required Password? password}); 12 | 13 | Future> getSignedInUser(); 14 | 15 | Future signOut(); 16 | } 17 | -------------------------------------------------------------------------------- /lib/domain/core/errors.dart: -------------------------------------------------------------------------------- 1 | import "package:firebase_auth_flutter_ddd/Domain/Authentication/auth_value_failures.dart"; 2 | 3 | class UnExpectedValueError extends Error { 4 | UnExpectedValueError(this.authValueFailures); 5 | 6 | final AuthValueFailures? authValueFailures; 7 | 8 | @override 9 | String toString() { 10 | return Error.safeToString( 11 | "UnExpectedValueError{authValueFailures: $authValueFailures}"); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/domain/core/value_object.dart: -------------------------------------------------------------------------------- 1 | import "package:firebase_auth_flutter_ddd/Domain/Authentication/auth_value_failures.dart"; 2 | import "package:flutter/cupertino.dart"; 3 | import "package:fpdart/fpdart.dart"; 4 | 5 | 6 | @immutable 7 | abstract class ValueObject { 8 | const ValueObject(); 9 | 10 | Either, T>? get valueObject; 11 | 12 | bool isValid() => valueObject!.isRight(); 13 | 14 | @override 15 | bool operator ==(Object other) => 16 | identical(this, other) || 17 | other is ValueObject && runtimeType == other.runtimeType; 18 | 19 | @override 20 | int get hashCode => 0; 21 | 22 | @override 23 | String toString() { 24 | return "AuthValueObjects{$valueObject}"; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/firebase_options.dart: -------------------------------------------------------------------------------- 1 | // File generated by FlutterFire CLI. 2 | // ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members 3 | import "package:firebase_core/firebase_core.dart" show FirebaseOptions; 4 | import "package:flutter/foundation.dart" 5 | show defaultTargetPlatform, kIsWeb, TargetPlatform; 6 | 7 | /// Default [FirebaseOptions] for use with your Firebase apps. 8 | /// 9 | /// Example: 10 | /// ```dart 11 | /// import 'firebase_options.dart'; 12 | /// // ... 13 | /// await Firebase.initializeApp( 14 | /// options: DefaultFirebaseOptions.currentPlatform, 15 | /// ); 16 | /// ``` 17 | class DefaultFirebaseOptions { 18 | static FirebaseOptions get currentPlatform { 19 | if (kIsWeb) { 20 | throw UnsupportedError( 21 | "DefaultFirebaseOptions have not been configured for web - " 22 | "you can reconfigure this by running the FlutterFire CLI again.", 23 | ); 24 | } 25 | switch (defaultTargetPlatform) { 26 | case TargetPlatform.android: 27 | return android; 28 | case TargetPlatform.iOS: 29 | return ios; 30 | case TargetPlatform.macOS: 31 | throw UnsupportedError( 32 | "DefaultFirebaseOptions have not been configured for macos - " 33 | "you can reconfigure this by running the FlutterFire CLI again.", 34 | ); 35 | case TargetPlatform.windows: 36 | throw UnsupportedError( 37 | "DefaultFirebaseOptions have not been configured for windows - " 38 | "you can reconfigure this by running the FlutterFire CLI again.", 39 | ); 40 | case TargetPlatform.linux: 41 | throw UnsupportedError( 42 | "DefaultFirebaseOptions have not been configured for linux - " 43 | "you can reconfigure this by running the FlutterFire CLI again.", 44 | ); 45 | default: 46 | throw UnsupportedError( 47 | "DefaultFirebaseOptions are not supported for this platform.", 48 | ); 49 | } 50 | } 51 | 52 | static const FirebaseOptions android = FirebaseOptions( 53 | apiKey: "AIzaSyBZMVnawoT-EeCyymhzl8DvSOC_xVGXbqY", 54 | appId: "1:846249838909:android:c59123c52149d476345d54", 55 | messagingSenderId: "846249838909", 56 | projectId: "edu-app-4717e", 57 | storageBucket: "edu-app-4717e.appspot.com", 58 | ); 59 | 60 | static const FirebaseOptions ios = FirebaseOptions( 61 | apiKey: "AIzaSyDbWt27RbXb_0zUq3v6hf6Gdr_ghQHn0Vg", 62 | appId: "1:846249838909:ios:8d8b184cfaac3a32345d54", 63 | messagingSenderId: "846249838909", 64 | projectId: "edu-app-4717e", 65 | storageBucket: "edu-app-4717e.appspot.com", 66 | androidClientId: "846249838909-jve30eor0thvaq7jdfl59gdikdiukj3r.apps.googleusercontent.com", 67 | iosClientId: "846249838909-ipe51fptev2i57sunfjn6a0can051t49.apps.googleusercontent.com", 68 | iosBundleId: "dev.pythonhub.firebaseAuthFlutterDdd", 69 | ); 70 | } 71 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import "package:firebase_auth_flutter_ddd/app.dart"; 2 | import "package:firebase_auth_flutter_ddd/firebase_options.dart"; 3 | import "package:firebase_core/firebase_core.dart"; 4 | import "package:flutter/material.dart"; 5 | import "package:hooks_riverpod/hooks_riverpod.dart"; 6 | 7 | Future main() async { 8 | WidgetsFlutterBinding.ensureInitialized(); 9 | await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform); 10 | runApp( 11 | const ProviderScope( 12 | child: FirebaseAuthenticationDDD(), 13 | ), 14 | ); 15 | } 16 | -------------------------------------------------------------------------------- /lib/screens/home_page.dart: -------------------------------------------------------------------------------- 1 | import "package:flutter/material.dart"; 2 | 3 | class HomePage extends StatelessWidget { 4 | const HomePage({super.key}); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return SafeArea( 9 | child: Scaffold( 10 | appBar: AppBar( 11 | title: const Text("Welcome"), 12 | elevation: 5, 13 | centerTitle: false, 14 | titleTextStyle: const TextStyle(fontSize: 25, color: Colors.black), 15 | ), 16 | body: Center( 17 | child: Text( 18 | "Home Page", 19 | style: Theme.of(context).textTheme.displayMedium, 20 | ), 21 | ), 22 | ), 23 | ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/screens/login_page.dart: -------------------------------------------------------------------------------- 1 | import "package:firebase_auth/firebase_auth.dart"; 2 | import "package:firebase_auth_flutter_ddd/Screens/home_page.dart"; 3 | import "package:flutter/cupertino.dart"; 4 | import "package:flutter/material.dart"; 5 | import "package:hooks_riverpod/hooks_riverpod.dart"; 6 | 7 | import "../Application/Authentication/auth_events.dart"; 8 | import "../Application/Authentication/auth_state_controller.dart"; 9 | import "../Application/Authentication/auth_states.dart"; 10 | import "../Services/Authentication/firebase_auth_facade.dart"; 11 | import "Utils/custom_snackbar.dart"; 12 | 13 | final loginProvider = 14 | StateNotifierProvider.autoDispose((ref) { 15 | final firebaseAuth = FirebaseAuth.instance; 16 | final firebaseAuthFacade = FirebaseAuthFacade(firebaseAuth); 17 | return AuthStateController(firebaseAuthFacade); 18 | }); 19 | 20 | class LoginPage extends HookConsumerWidget { 21 | LoginPage({Key? key}) : super(key: key); 22 | 23 | final formKey = GlobalKey(); 24 | 25 | @override 26 | Widget build(BuildContext context, WidgetRef ref) { 27 | final formStates = ref.watch(loginProvider); 28 | final formEvents = ref.watch(loginProvider.notifier); 29 | ref.listen(loginProvider, (previous, next) { 30 | next.authFailureOrSuccess.fold( 31 | () {}, 32 | (either) => either.fold( 33 | (failure) { 34 | buildCustomSnackBar( 35 | context: context, 36 | flashBackground: Colors.red, 37 | icon: Icons.warning_rounded, 38 | content: Text( 39 | failure.maybeMap( 40 | orElse: () => "", 41 | emailAlreadyInUse: (value) => "User already exists", 42 | serverError: (value) { 43 | return "Server error occurred"; 44 | }, 45 | invalidEmailAndPasswordCombination: (value) { 46 | return "Invalid email or password"; 47 | }), 48 | style: Theme.of(context) 49 | .textTheme 50 | .headlineSmall! 51 | .copyWith(color: Colors.white), 52 | )); 53 | }, 54 | (success) { 55 | buildCustomSnackBar( 56 | context: context, 57 | flashBackground: Colors.green, 58 | icon: CupertinoIcons.check_mark_circled_solid, 59 | content: Text( 60 | "Login successful", 61 | style: Theme.of(context) 62 | .textTheme 63 | .headlineSmall! 64 | .copyWith(color: Colors.white), 65 | )); 66 | Navigator.push( 67 | context, 68 | MaterialPageRoute( 69 | builder: (context) => const HomePage(), 70 | )); 71 | }, 72 | ), 73 | ); 74 | }); 75 | return SafeArea( 76 | child: GestureDetector( 77 | onTap: () { 78 | FocusScope.of(context).unfocus(); 79 | }, 80 | child: Scaffold( 81 | appBar: AppBar( 82 | title: const Text("Login"), 83 | elevation: 5, 84 | leading: const Icon( 85 | Icons.login_rounded, 86 | size: 25, 87 | ), 88 | titleTextStyle: const TextStyle( 89 | color: Colors.black, 90 | fontSize: 25, 91 | ), 92 | centerTitle: false, 93 | ), 94 | body: SizedBox.expand( 95 | child: Form( 96 | key: formKey, 97 | child: Center( 98 | child: SingleChildScrollView( 99 | reverse: true, 100 | padding: const EdgeInsets.all(20), 101 | child: Column( 102 | crossAxisAlignment: CrossAxisAlignment.start, 103 | children: [ 104 | Text( 105 | "Welcome !", 106 | style: Theme.of(context).textTheme.displayMedium, 107 | ), 108 | Padding( 109 | padding: const EdgeInsets.only(left: 8.0), 110 | child: Text( 111 | "Login or Signup to continue", 112 | style: Theme.of(context).textTheme.bodyMedium, 113 | ), 114 | ), 115 | const SizedBox( 116 | height: 40, 117 | ), 118 | TextFormField( 119 | autovalidateMode: AutovalidateMode.onUserInteraction, 120 | onChanged: (value) => formEvents.mapEventsToStates( 121 | AuthEvents.emailChanged(email: value.toString())), 122 | validator: (value) => 123 | formStates.emailAddress.valueObject!.fold( 124 | (failure) => failure.maybeMap( 125 | orElse: () => null, 126 | invalidEmail: (value) => "Invalid email"), 127 | (r) => null, 128 | ), 129 | textInputAction: TextInputAction.next, 130 | onEditingComplete: () => 131 | FocusScope.of(context).nextFocus(), 132 | decoration: const InputDecoration( 133 | labelText: "Email Address", 134 | border: OutlineInputBorder(), 135 | ), 136 | ), 137 | const SizedBox( 138 | height: 15, 139 | ), 140 | TextFormField( 141 | autovalidateMode: AutovalidateMode.onUserInteraction, 142 | textInputAction: TextInputAction.done, 143 | onEditingComplete: () => 144 | FocusScope.of(context).nextFocus(), 145 | validator: (value) => 146 | formStates.password.valueObject!.fold( 147 | (failure) => failure.maybeMap( 148 | orElse: () => null, 149 | shortPassword: (value) => "Very short password", 150 | noUpperCase: (value) => 151 | "Must contain an uppercase character", 152 | noNumber: (value) => "Must contain a number", 153 | noSpecialSymbol: (value) => 154 | "Must contain a special character", 155 | ), 156 | (r) => null, 157 | ), 158 | onChanged: (value) => formEvents.mapEventsToStates( 159 | AuthEvents.passwordChanged( 160 | password: value.toString()), 161 | ), 162 | obscureText: true, 163 | decoration: const InputDecoration( 164 | labelText: "Password", 165 | border: OutlineInputBorder(), 166 | ), 167 | ), 168 | const SizedBox( 169 | height: 20, 170 | ), 171 | Row( 172 | children: [ 173 | Expanded( 174 | child: SizedBox( 175 | height: 55, 176 | child: ElevatedButton( 177 | style: ElevatedButton.styleFrom( 178 | textStyle: 179 | Theme.of(context).textTheme.titleLarge, 180 | shape: RoundedRectangleBorder( 181 | borderRadius: 182 | BorderRadius.circular(12))), 183 | onPressed: () { 184 | if (formKey.currentState!.validate()) { 185 | formEvents.mapEventsToStates( 186 | const AuthEvents 187 | .signInWithEmailAndPasswordPressed(), 188 | ); 189 | } 190 | }, 191 | child: const Text("Login"), 192 | ), 193 | ), 194 | ), 195 | const SizedBox( 196 | width: 10, 197 | ), 198 | Expanded( 199 | child: SizedBox( 200 | height: 55, 201 | child: ElevatedButton( 202 | style: ElevatedButton.styleFrom( 203 | textStyle: 204 | Theme.of(context).textTheme.titleLarge, 205 | shape: RoundedRectangleBorder( 206 | borderRadius: BorderRadius.circular(12) 207 | ) 208 | ), 209 | onPressed: () { 210 | if (formKey.currentState!.validate()) { 211 | formEvents.mapEventsToStates( 212 | const AuthEvents 213 | .signUpWithEmailAndPasswordPressed(), 214 | ); 215 | } 216 | }, 217 | child: const Text("Sign Up"), 218 | ), 219 | ), 220 | ), 221 | ], 222 | ), 223 | if (formStates.isSubmitting) ...[ 224 | const SizedBox( 225 | height: 20, 226 | ), 227 | const LinearProgressIndicator( 228 | minHeight: 6, 229 | ) 230 | ] 231 | ], 232 | ), 233 | ), 234 | ), 235 | ), 236 | ), 237 | ), 238 | ), 239 | ); 240 | } 241 | } 242 | -------------------------------------------------------------------------------- /lib/screens/utils/custom_snackbar.dart: -------------------------------------------------------------------------------- 1 | import "package:flutter/material.dart"; 2 | 3 | ScaffoldFeatureController buildCustomSnackBar({ 4 | required BuildContext context, 5 | required Color flashBackground, 6 | required Text content, 7 | required IconData icon, 8 | }) { 9 | return ScaffoldMessenger.of(context).showSnackBar(SnackBar( 10 | backgroundColor: flashBackground, 11 | padding: const EdgeInsets.all(5), 12 | content: Padding( 13 | padding: const EdgeInsets.only(left: 20), 14 | child: Row( 15 | children: [ 16 | Icon( 17 | icon, 18 | color: Colors.white, 19 | ), 20 | const SizedBox( 21 | width: 20, 22 | ), 23 | content 24 | ], 25 | ), 26 | ))); 27 | } 28 | -------------------------------------------------------------------------------- /lib/services/authentication/firebase_auth_facade.dart: -------------------------------------------------------------------------------- 1 | import "package:firebase_auth/firebase_auth.dart"; 2 | import "package:fpdart/fpdart.dart"; 3 | 4 | import "../../Domain/Authentication/auth_failures.dart"; 5 | import "../../Domain/Authentication/auth_value_objects.dart"; 6 | import "../../Domain/Authentication/i_auth_facade.dart"; 7 | import "../../Domain/Core/errors.dart"; 8 | 9 | class FirebaseAuthFacade implements IAuthFacade { 10 | FirebaseAuthFacade(this._firebaseAuth); 11 | 12 | final FirebaseAuth _firebaseAuth; 13 | 14 | @override 15 | Future> registerWithEmailAndPassword( 16 | {required EmailAddress? emailAddress, 17 | required Password? password}) async { 18 | final emailAddressString = emailAddress!.valueObject! 19 | .fold((l) => throw UnExpectedValueError(l), (r) => r); 20 | final passwordString = 21 | password!.valueObject!.fold((l) => throw UnExpectedValueError(l), (r) => r); 22 | try { 23 | await _firebaseAuth.createUserWithEmailAndPassword( 24 | email: emailAddressString, password: passwordString); 25 | return right(unit); 26 | } on FirebaseAuthException catch (e) { 27 | if (e.code == "email-already-in-use") { 28 | return left(const AuthFailures.emailAlreadyInUse()); 29 | } else { 30 | return left(const AuthFailures.serverError()); 31 | } 32 | } 33 | } 34 | 35 | @override 36 | Future> signInWithEmailAndPassword( 37 | {required EmailAddress? emailAddress, 38 | required Password? password}) async { 39 | final emailAddressString = emailAddress!.valueObject! 40 | .fold((l) => throw UnExpectedValueError(l), (r) => r); 41 | final passwordString = 42 | password!.valueObject!.fold((l) => throw UnExpectedValueError(l), (r) => r); 43 | try { 44 | await _firebaseAuth.signInWithEmailAndPassword( 45 | email: emailAddressString, password: passwordString); 46 | return right(unit); 47 | } on FirebaseAuthException catch (e) { 48 | if (e.code == "wrong-password" || e.code == "user-not-found") { 49 | return left(const AuthFailures.invalidEmailAndPasswordCombination()); 50 | } else { 51 | return left(const AuthFailures.serverError()); 52 | } 53 | } 54 | } 55 | 56 | @override 57 | Future> getSignedInUser() async { 58 | return optionOf(_firebaseAuth.currentUser?.uid); 59 | } 60 | 61 | @override 62 | Future signOut() async { 63 | await _firebaseAuth.signOut(); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | _fe_analyzer_shared: 5 | dependency: transitive 6 | description: 7 | name: _fe_analyzer_shared 8 | sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" 9 | url: "https://pub.dev" 10 | source: hosted 11 | version: "67.0.0" 12 | _flutterfire_internals: 13 | dependency: transitive 14 | description: 15 | name: _flutterfire_internals 16 | sha256: "3dee3db3468c5f4640a4e8aa9c1e22561c298976d8c39ed2fdd456a9a3db26e1" 17 | url: "https://pub.dev" 18 | source: hosted 19 | version: "1.3.32" 20 | analyzer: 21 | dependency: transitive 22 | description: 23 | name: analyzer 24 | sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" 25 | url: "https://pub.dev" 26 | source: hosted 27 | version: "6.4.1" 28 | args: 29 | dependency: transitive 30 | description: 31 | name: args 32 | sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" 33 | url: "https://pub.dev" 34 | source: hosted 35 | version: "2.5.0" 36 | async: 37 | dependency: transitive 38 | description: 39 | name: async 40 | sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" 41 | url: "https://pub.dev" 42 | source: hosted 43 | version: "2.11.0" 44 | boolean_selector: 45 | dependency: transitive 46 | description: 47 | name: boolean_selector 48 | sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" 49 | url: "https://pub.dev" 50 | source: hosted 51 | version: "2.1.1" 52 | build: 53 | dependency: transitive 54 | description: 55 | name: build 56 | sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" 57 | url: "https://pub.dev" 58 | source: hosted 59 | version: "2.4.1" 60 | build_config: 61 | dependency: transitive 62 | description: 63 | name: build_config 64 | sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 65 | url: "https://pub.dev" 66 | source: hosted 67 | version: "1.1.1" 68 | build_daemon: 69 | dependency: transitive 70 | description: 71 | name: build_daemon 72 | sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" 73 | url: "https://pub.dev" 74 | source: hosted 75 | version: "4.0.1" 76 | build_resolvers: 77 | dependency: transitive 78 | description: 79 | name: build_resolvers 80 | sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" 81 | url: "https://pub.dev" 82 | source: hosted 83 | version: "2.4.2" 84 | build_runner: 85 | dependency: "direct dev" 86 | description: 87 | name: build_runner 88 | sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" 89 | url: "https://pub.dev" 90 | source: hosted 91 | version: "2.4.9" 92 | build_runner_core: 93 | dependency: transitive 94 | description: 95 | name: build_runner_core 96 | sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799" 97 | url: "https://pub.dev" 98 | source: hosted 99 | version: "7.3.0" 100 | built_collection: 101 | dependency: transitive 102 | description: 103 | name: built_collection 104 | sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" 105 | url: "https://pub.dev" 106 | source: hosted 107 | version: "5.1.1" 108 | built_value: 109 | dependency: transitive 110 | description: 111 | name: built_value 112 | sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb 113 | url: "https://pub.dev" 114 | source: hosted 115 | version: "8.9.2" 116 | characters: 117 | dependency: transitive 118 | description: 119 | name: characters 120 | sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" 121 | url: "https://pub.dev" 122 | source: hosted 123 | version: "1.3.0" 124 | checked_yaml: 125 | dependency: transitive 126 | description: 127 | name: checked_yaml 128 | sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff 129 | url: "https://pub.dev" 130 | source: hosted 131 | version: "2.0.3" 132 | clock: 133 | dependency: transitive 134 | description: 135 | name: clock 136 | sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf 137 | url: "https://pub.dev" 138 | source: hosted 139 | version: "1.1.1" 140 | code_builder: 141 | dependency: transitive 142 | description: 143 | name: code_builder 144 | sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 145 | url: "https://pub.dev" 146 | source: hosted 147 | version: "4.10.0" 148 | collection: 149 | dependency: transitive 150 | description: 151 | name: collection 152 | sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a 153 | url: "https://pub.dev" 154 | source: hosted 155 | version: "1.18.0" 156 | convert: 157 | dependency: transitive 158 | description: 159 | name: convert 160 | sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" 161 | url: "https://pub.dev" 162 | source: hosted 163 | version: "3.1.1" 164 | crypto: 165 | dependency: transitive 166 | description: 167 | name: crypto 168 | sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab 169 | url: "https://pub.dev" 170 | source: hosted 171 | version: "3.0.3" 172 | cupertino_icons: 173 | dependency: "direct main" 174 | description: 175 | name: cupertino_icons 176 | sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 177 | url: "https://pub.dev" 178 | source: hosted 179 | version: "1.0.8" 180 | dart_style: 181 | dependency: transitive 182 | description: 183 | name: dart_style 184 | sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9" 185 | url: "https://pub.dev" 186 | source: hosted 187 | version: "2.3.6" 188 | fake_async: 189 | dependency: transitive 190 | description: 191 | name: fake_async 192 | sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" 193 | url: "https://pub.dev" 194 | source: hosted 195 | version: "1.3.1" 196 | file: 197 | dependency: transitive 198 | description: 199 | name: file 200 | sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" 201 | url: "https://pub.dev" 202 | source: hosted 203 | version: "7.0.0" 204 | firebase_auth: 205 | dependency: "direct main" 206 | description: 207 | name: firebase_auth 208 | sha256: "63b4401c95ddb00fb272872c451147e33509e80eed43937369910ef6c34c00b7" 209 | url: "https://pub.dev" 210 | source: hosted 211 | version: "4.19.4" 212 | firebase_auth_platform_interface: 213 | dependency: transitive 214 | description: 215 | name: firebase_auth_platform_interface 216 | sha256: "4e204f9ef43d83ac9e7a324a9317e4dd2a1ddda2aa72b67bc6cc364f0b8492dc" 217 | url: "https://pub.dev" 218 | source: hosted 219 | version: "7.2.5" 220 | firebase_auth_web: 221 | dependency: transitive 222 | description: 223 | name: firebase_auth_web 224 | sha256: "809a2eb444d1a07c0a680b205b86d713bc7171a4b2627fd6c01cf05f2b6f93cd" 225 | url: "https://pub.dev" 226 | source: hosted 227 | version: "5.11.4" 228 | firebase_core: 229 | dependency: "direct main" 230 | description: 231 | name: firebase_core 232 | sha256: "4aef2a23d0f3265545807d68fbc2f76a6b994ca3c778d88453b99325abd63284" 233 | url: "https://pub.dev" 234 | source: hosted 235 | version: "2.30.1" 236 | firebase_core_platform_interface: 237 | dependency: transitive 238 | description: 239 | name: firebase_core_platform_interface 240 | sha256: c437ae5d17e6b5cc7981cf6fd458a5db4d12979905f9aafd1fea930428a9fe63 241 | url: "https://pub.dev" 242 | source: hosted 243 | version: "5.0.0" 244 | firebase_core_web: 245 | dependency: transitive 246 | description: 247 | name: firebase_core_web 248 | sha256: "67f2fcc600fc78c2f731c370a3a5e6c87ee862e3a2fba6f951eca6d5dafe5c29" 249 | url: "https://pub.dev" 250 | source: hosted 251 | version: "2.16.0" 252 | fixnum: 253 | dependency: transitive 254 | description: 255 | name: fixnum 256 | sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" 257 | url: "https://pub.dev" 258 | source: hosted 259 | version: "1.1.0" 260 | flutter: 261 | dependency: "direct main" 262 | description: flutter 263 | source: sdk 264 | version: "0.0.0" 265 | flutter_hooks: 266 | dependency: "direct main" 267 | description: 268 | name: flutter_hooks 269 | sha256: cde36b12f7188c85286fba9b38cc5a902e7279f36dd676967106c041dc9dde70 270 | url: "https://pub.dev" 271 | source: hosted 272 | version: "0.20.5" 273 | flutter_lints: 274 | dependency: "direct dev" 275 | description: 276 | name: flutter_lints 277 | sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" 278 | url: "https://pub.dev" 279 | source: hosted 280 | version: "3.0.2" 281 | flutter_riverpod: 282 | dependency: transitive 283 | description: 284 | name: flutter_riverpod 285 | sha256: "2fd9f58a39b7269cb3495b09245000fcd267243518157a7c2f832189fb64f013" 286 | url: "https://pub.dev" 287 | source: hosted 288 | version: "3.0.0-dev.3" 289 | flutter_test: 290 | dependency: "direct dev" 291 | description: flutter 292 | source: sdk 293 | version: "0.0.0" 294 | flutter_web_plugins: 295 | dependency: transitive 296 | description: flutter 297 | source: sdk 298 | version: "0.0.0" 299 | fpdart: 300 | dependency: "direct main" 301 | description: 302 | name: fpdart 303 | sha256: "7413acc5a6569a3fe8277928fc7487f3198530f0c4e635d0baef199ea36e8ee9" 304 | url: "https://pub.dev" 305 | source: hosted 306 | version: "1.1.0" 307 | freezed: 308 | dependency: "direct dev" 309 | description: 310 | name: freezed 311 | sha256: a434911f643466d78462625df76fd9eb13e57348ff43fe1f77bbe909522c67a1 312 | url: "https://pub.dev" 313 | source: hosted 314 | version: "2.5.2" 315 | freezed_annotation: 316 | dependency: "direct main" 317 | description: 318 | name: freezed_annotation 319 | sha256: c3fd9336eb55a38cc1bbd79ab17573113a8deccd0ecbbf926cca3c62803b5c2d 320 | url: "https://pub.dev" 321 | source: hosted 322 | version: "2.4.1" 323 | frontend_server_client: 324 | dependency: transitive 325 | description: 326 | name: frontend_server_client 327 | sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 328 | url: "https://pub.dev" 329 | source: hosted 330 | version: "4.0.0" 331 | glob: 332 | dependency: transitive 333 | description: 334 | name: glob 335 | sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" 336 | url: "https://pub.dev" 337 | source: hosted 338 | version: "2.1.2" 339 | graphs: 340 | dependency: transitive 341 | description: 342 | name: graphs 343 | sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 344 | url: "https://pub.dev" 345 | source: hosted 346 | version: "2.3.1" 347 | hooks_riverpod: 348 | dependency: "direct main" 349 | description: 350 | name: hooks_riverpod 351 | sha256: "169d7bf1d61c749c065e09388841906b2ff963794b932867372ed4f423a8d877" 352 | url: "https://pub.dev" 353 | source: hosted 354 | version: "3.0.0-dev.3" 355 | http_multi_server: 356 | dependency: transitive 357 | description: 358 | name: http_multi_server 359 | sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" 360 | url: "https://pub.dev" 361 | source: hosted 362 | version: "3.2.1" 363 | http_parser: 364 | dependency: transitive 365 | description: 366 | name: http_parser 367 | sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" 368 | url: "https://pub.dev" 369 | source: hosted 370 | version: "4.0.2" 371 | io: 372 | dependency: transitive 373 | description: 374 | name: io 375 | sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" 376 | url: "https://pub.dev" 377 | source: hosted 378 | version: "1.0.4" 379 | js: 380 | dependency: transitive 381 | description: 382 | name: js 383 | sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf 384 | url: "https://pub.dev" 385 | source: hosted 386 | version: "0.7.1" 387 | json_annotation: 388 | dependency: transitive 389 | description: 390 | name: json_annotation 391 | sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 392 | url: "https://pub.dev" 393 | source: hosted 394 | version: "4.8.1" 395 | leak_tracker: 396 | dependency: transitive 397 | description: 398 | name: leak_tracker 399 | sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" 400 | url: "https://pub.dev" 401 | source: hosted 402 | version: "10.0.0" 403 | leak_tracker_flutter_testing: 404 | dependency: transitive 405 | description: 406 | name: leak_tracker_flutter_testing 407 | sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 408 | url: "https://pub.dev" 409 | source: hosted 410 | version: "2.0.1" 411 | leak_tracker_testing: 412 | dependency: transitive 413 | description: 414 | name: leak_tracker_testing 415 | sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 416 | url: "https://pub.dev" 417 | source: hosted 418 | version: "2.0.1" 419 | lints: 420 | dependency: transitive 421 | description: 422 | name: lints 423 | sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 424 | url: "https://pub.dev" 425 | source: hosted 426 | version: "3.0.0" 427 | logging: 428 | dependency: transitive 429 | description: 430 | name: logging 431 | sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" 432 | url: "https://pub.dev" 433 | source: hosted 434 | version: "1.2.0" 435 | matcher: 436 | dependency: transitive 437 | description: 438 | name: matcher 439 | sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb 440 | url: "https://pub.dev" 441 | source: hosted 442 | version: "0.12.16+1" 443 | material_color_utilities: 444 | dependency: transitive 445 | description: 446 | name: material_color_utilities 447 | sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" 448 | url: "https://pub.dev" 449 | source: hosted 450 | version: "0.8.0" 451 | meta: 452 | dependency: transitive 453 | description: 454 | name: meta 455 | sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 456 | url: "https://pub.dev" 457 | source: hosted 458 | version: "1.11.0" 459 | mime: 460 | dependency: transitive 461 | description: 462 | name: mime 463 | sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" 464 | url: "https://pub.dev" 465 | source: hosted 466 | version: "1.0.5" 467 | package_config: 468 | dependency: transitive 469 | description: 470 | name: package_config 471 | sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" 472 | url: "https://pub.dev" 473 | source: hosted 474 | version: "2.1.0" 475 | path: 476 | dependency: transitive 477 | description: 478 | name: path 479 | sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" 480 | url: "https://pub.dev" 481 | source: hosted 482 | version: "1.9.0" 483 | plugin_platform_interface: 484 | dependency: transitive 485 | description: 486 | name: plugin_platform_interface 487 | sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" 488 | url: "https://pub.dev" 489 | source: hosted 490 | version: "2.1.8" 491 | pool: 492 | dependency: transitive 493 | description: 494 | name: pool 495 | sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" 496 | url: "https://pub.dev" 497 | source: hosted 498 | version: "1.5.1" 499 | pub_semver: 500 | dependency: transitive 501 | description: 502 | name: pub_semver 503 | sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" 504 | url: "https://pub.dev" 505 | source: hosted 506 | version: "2.1.4" 507 | pubspec_parse: 508 | dependency: transitive 509 | description: 510 | name: pubspec_parse 511 | sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 512 | url: "https://pub.dev" 513 | source: hosted 514 | version: "1.2.3" 515 | riverpod: 516 | dependency: transitive 517 | description: 518 | name: riverpod 519 | sha256: "0f41a697a17609a7ac18e5fe0d5bdbe4c1ff7e7da6523baf46a203df0c44eaf2" 520 | url: "https://pub.dev" 521 | source: hosted 522 | version: "3.0.0-dev.3" 523 | shelf: 524 | dependency: transitive 525 | description: 526 | name: shelf 527 | sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 528 | url: "https://pub.dev" 529 | source: hosted 530 | version: "1.4.1" 531 | shelf_web_socket: 532 | dependency: transitive 533 | description: 534 | name: shelf_web_socket 535 | sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" 536 | url: "https://pub.dev" 537 | source: hosted 538 | version: "1.0.4" 539 | sky_engine: 540 | dependency: transitive 541 | description: flutter 542 | source: sdk 543 | version: "0.0.99" 544 | source_gen: 545 | dependency: transitive 546 | description: 547 | name: source_gen 548 | sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" 549 | url: "https://pub.dev" 550 | source: hosted 551 | version: "1.5.0" 552 | source_span: 553 | dependency: transitive 554 | description: 555 | name: source_span 556 | sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" 557 | url: "https://pub.dev" 558 | source: hosted 559 | version: "1.10.0" 560 | stack_trace: 561 | dependency: transitive 562 | description: 563 | name: stack_trace 564 | sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" 565 | url: "https://pub.dev" 566 | source: hosted 567 | version: "1.11.1" 568 | state_notifier: 569 | dependency: transitive 570 | description: 571 | name: state_notifier 572 | sha256: b8677376aa54f2d7c58280d5a007f9e8774f1968d1fb1c096adcb4792fba29bb 573 | url: "https://pub.dev" 574 | source: hosted 575 | version: "1.0.0" 576 | stream_channel: 577 | dependency: transitive 578 | description: 579 | name: stream_channel 580 | sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 581 | url: "https://pub.dev" 582 | source: hosted 583 | version: "2.1.2" 584 | stream_transform: 585 | dependency: transitive 586 | description: 587 | name: stream_transform 588 | sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" 589 | url: "https://pub.dev" 590 | source: hosted 591 | version: "2.1.0" 592 | string_scanner: 593 | dependency: transitive 594 | description: 595 | name: string_scanner 596 | sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" 597 | url: "https://pub.dev" 598 | source: hosted 599 | version: "1.2.0" 600 | term_glyph: 601 | dependency: transitive 602 | description: 603 | name: term_glyph 604 | sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 605 | url: "https://pub.dev" 606 | source: hosted 607 | version: "1.2.1" 608 | test_api: 609 | dependency: transitive 610 | description: 611 | name: test_api 612 | sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" 613 | url: "https://pub.dev" 614 | source: hosted 615 | version: "0.6.1" 616 | timing: 617 | dependency: transitive 618 | description: 619 | name: timing 620 | sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" 621 | url: "https://pub.dev" 622 | source: hosted 623 | version: "1.0.1" 624 | typed_data: 625 | dependency: transitive 626 | description: 627 | name: typed_data 628 | sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c 629 | url: "https://pub.dev" 630 | source: hosted 631 | version: "1.3.2" 632 | vector_math: 633 | dependency: transitive 634 | description: 635 | name: vector_math 636 | sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" 637 | url: "https://pub.dev" 638 | source: hosted 639 | version: "2.1.4" 640 | vm_service: 641 | dependency: transitive 642 | description: 643 | name: vm_service 644 | sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 645 | url: "https://pub.dev" 646 | source: hosted 647 | version: "13.0.0" 648 | watcher: 649 | dependency: transitive 650 | description: 651 | name: watcher 652 | sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" 653 | url: "https://pub.dev" 654 | source: hosted 655 | version: "1.1.0" 656 | web: 657 | dependency: transitive 658 | description: 659 | name: web 660 | sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" 661 | url: "https://pub.dev" 662 | source: hosted 663 | version: "0.5.1" 664 | web_socket_channel: 665 | dependency: transitive 666 | description: 667 | name: web_socket_channel 668 | sha256: "58c6666b342a38816b2e7e50ed0f1e261959630becd4c879c4f26bfa14aa5a42" 669 | url: "https://pub.dev" 670 | source: hosted 671 | version: "2.4.5" 672 | yaml: 673 | dependency: transitive 674 | description: 675 | name: yaml 676 | sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" 677 | url: "https://pub.dev" 678 | source: hosted 679 | version: "3.1.2" 680 | sdks: 681 | dart: ">=3.3.0 <4.0.0" 682 | flutter: ">=3.3.0" 683 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: firebase_auth_flutter_ddd 2 | description: Firebase authentication example with Hooks Riverpod and Freezed following Flutter DDD architecture 3 | 4 | 5 | 6 | publish_to: 'none' 7 | 8 | version: 1.0.0+1 9 | 10 | environment: 11 | sdk: '>=3.2.3 <4.0.0' 12 | 13 | dependencies: 14 | cupertino_icons: ^1.0.8 15 | firebase_auth: ^4.19.3 16 | firebase_core: ^2.30.1 17 | flutter: 18 | sdk: flutter 19 | flutter_hooks: ^0.20.5 20 | fpdart: ^1.1.0 21 | freezed_annotation: ^2.4.1 22 | hooks_riverpod: ^3.0.0-dev.3 23 | 24 | dev_dependencies: 25 | build_runner: ^2.4.9 26 | flutter_lints: ^3.0.2 27 | flutter_test: 28 | sdk: flutter 29 | freezed: ^2.5.2 30 | 31 | flutter: 32 | uses-material-design: true --------------------------------------------------------------------------------