├── .gitignore ├── .metadata ├── README.md ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── puzzleleaf │ │ │ │ └── firebaseauthproject │ │ │ │ └── MainActivity.java │ │ └── res │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── 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.h │ ├── AppDelegate.m │ ├── 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 │ └── main.m ├── lib ├── blocs │ ├── authentication_bloc │ │ ├── authentication_bloc.dart │ │ ├── authentication_event.dart │ │ └── authentication_state.dart │ ├── login_bloc │ │ ├── login_bloc.dart │ │ ├── login_event.dart │ │ └── login_state.dart │ ├── register_bloc │ │ ├── register_bloc.dart │ │ ├── register_event.dart │ │ └── register_state.dart │ └── simple_bloc_observer.dart ├── main.dart ├── repositories │ └── user_repository.dart ├── screens │ ├── home_screen.dart │ ├── login │ │ ├── login_form.dart │ │ └── login_screen.dart │ └── register │ │ ├── register_form.dart │ │ └── register_screen.dart ├── utils │ └── validators.dart └── widgets │ ├── curved_widget.dart │ └── gradient_button.dart ├── pubspec.lock ├── pubspec.yaml ├── readme └── youtube.png └── test └── widget_test.dart /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | .dart_tool/ 26 | .flutter-plugins 27 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | /build/ 32 | 33 | # Web related 34 | lib/generated_plugin_registrant.dart 35 | 36 | # Symbolication related 37 | app.*.symbols 38 | 39 | # Obfuscation related 40 | app.*.map.json 41 | 42 | # Exceptions to above rules. 43 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 44 | GoogleService-Info.plist 45 | -------------------------------------------------------------------------------- /.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: b041144f833e05cf463b8887fa12efdec9493488 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Flutter Firebase Auth With Bloc (Login, Register) 2 | 3 | ### Youtube 4 | [![Flutter Firebase Auth](./readme/youtube.png)](https://youtu.be/xGqMgHnDgb8) 5 | 6 | ### Packages 7 | * flutter_bloc 8 | 9 | 10 | A Flutter package that helps implement the BLoC pattern. 11 | 12 | 13 | https://pub.dev/packages/flutter_bloc 14 | 15 | * firebase_auth 16 | 17 | 18 | A Flutter plugin to use the Firebase Authentication API. 19 | 20 | 21 | https://pub.dev/packages/firebase_auth 22 | 23 | * equatable 24 | 25 | 26 | Simplify Equality Comparisons 27 | 28 | 29 | https://pub.dev/packages/equatable 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 26 | 27 | android { 28 | compileSdkVersion 28 29 | 30 | lintOptions { 31 | disable 'InvalidPackage' 32 | } 33 | 34 | defaultConfig { 35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 36 | applicationId "com.puzzleleaf.firebaseauthproject" 37 | minSdkVersion 16 38 | targetSdkVersion 28 39 | versionCode flutterVersionCode.toInteger() 40 | versionName flutterVersionName 41 | } 42 | 43 | buildTypes { 44 | release { 45 | // TODO: Add your own signing config for the release build. 46 | // Signing with the debug keys for now, so `flutter run --release` works. 47 | signingConfig signingConfigs.debug 48 | } 49 | } 50 | } 51 | 52 | flutter { 53 | source '../..' 54 | } 55 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 12 | 19 | 23 | 27 | 32 | 36 | 37 | 38 | 39 | 40 | 41 | 43 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/puzzleleaf/firebaseauthproject/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.puzzleleaf.firebaseauthproject; 2 | 3 | import io.flutter.embedding.android.FlutterActivity; 4 | 5 | public class MainActivity extends FlutterActivity { 6 | } 7 | -------------------------------------------------------------------------------- /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/puzzleleaf/FlutterFirebaseAuthWithBloc/98ac438833636d84a15efae04361b13675d95766/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puzzleleaf/FlutterFirebaseAuthWithBloc/98ac438833636d84a15efae04361b13675d95766/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puzzleleaf/FlutterFirebaseAuthWithBloc/98ac438833636d84a15efae04361b13675d95766/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puzzleleaf/FlutterFirebaseAuthWithBloc/98ac438833636d84a15efae04361b13675d95766/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puzzleleaf/FlutterFirebaseAuthWithBloc/98ac438833636d84a15efae04361b13675d95766/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.5.0' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | jcenter() 16 | } 17 | } 18 | 19 | rootProject.buildDir = '../build' 20 | subprojects { 21 | project.buildDir = "${rootProject.buildDir}/${project.name}" 22 | } 23 | subprojects { 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip 7 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Flutter Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | include ':app' 6 | 7 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 8 | def properties = new Properties() 9 | 10 | assert localPropertiesFile.exists() 11 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 12 | 13 | def flutterSdkPath = properties.getProperty("flutter.sdk") 14 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 15 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 16 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.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, '9.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 parse_KV_file(file, separator='=') 14 | file_abs_path = File.expand_path(file) 15 | if !File.exists? file_abs_path 16 | return []; 17 | end 18 | generated_key_values = {} 19 | skip_line_start_symbols = ["#", "/"] 20 | File.foreach(file_abs_path) do |line| 21 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } 22 | plugin = line.split(pattern=separator) 23 | if plugin.length == 2 24 | podname = plugin[0].strip() 25 | path = plugin[1].strip() 26 | podpath = File.expand_path("#{path}", file_abs_path) 27 | generated_key_values[podname] = podpath 28 | else 29 | puts "Invalid plugin specification: #{line}" 30 | end 31 | end 32 | generated_key_values 33 | end 34 | 35 | target 'Runner' do 36 | # Flutter Pod 37 | 38 | copied_flutter_dir = File.join(__dir__, 'Flutter') 39 | copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework') 40 | copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec') 41 | unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path) 42 | # Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet. 43 | # That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration. 44 | # CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist. 45 | 46 | generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig') 47 | unless File.exist?(generated_xcode_build_settings_path) 48 | raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first" 49 | end 50 | generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path) 51 | cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR']; 52 | 53 | unless File.exist?(copied_framework_path) 54 | FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir) 55 | end 56 | unless File.exist?(copied_podspec_path) 57 | FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir) 58 | end 59 | end 60 | 61 | # Keep pod path relative so it can be checked into Podfile.lock. 62 | pod 'Flutter', :path => 'Flutter' 63 | 64 | # Plugin Pods 65 | 66 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock 67 | # referring to absolute paths on developers' machines. 68 | system('rm -rf .symlinks') 69 | system('mkdir -p .symlinks/plugins') 70 | plugin_pods = parse_KV_file('../.flutter-plugins') 71 | plugin_pods.each do |name, path| 72 | symlink = File.join('.symlinks', 'plugins', name) 73 | File.symlink(path, symlink) 74 | pod name, :path => File.join(symlink, 'ios') 75 | end 76 | end 77 | 78 | post_install do |installer| 79 | installer.pods_project.targets.each do |target| 80 | target.build_configurations.each do |config| 81 | config.build_settings['ENABLE_BITCODE'] = 'NO' 82 | end 83 | end 84 | end 85 | -------------------------------------------------------------------------------- /ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Firebase/Auth (6.18.0): 3 | - Firebase/CoreOnly 4 | - FirebaseAuth (~> 6.4.3) 5 | - Firebase/Core (6.18.0): 6 | - Firebase/CoreOnly 7 | - FirebaseAnalytics (= 6.3.0) 8 | - Firebase/CoreOnly (6.18.0): 9 | - FirebaseCore (= 6.6.3) 10 | - firebase_auth (0.0.1): 11 | - Firebase/Auth (~> 6.3) 12 | - Firebase/Core 13 | - Flutter 14 | - firebase_auth_web (0.1.0): 15 | - Flutter 16 | - firebase_core (0.0.1): 17 | - Firebase/Core 18 | - Flutter 19 | - firebase_core_web (0.1.0): 20 | - Flutter 21 | - FirebaseAnalytics (6.3.0): 22 | - FirebaseCore (~> 6.6) 23 | - FirebaseInstallations (~> 1.1) 24 | - GoogleAppMeasurement (= 6.3.0) 25 | - GoogleUtilities/AppDelegateSwizzler (~> 6.0) 26 | - GoogleUtilities/MethodSwizzler (~> 6.0) 27 | - GoogleUtilities/Network (~> 6.0) 28 | - "GoogleUtilities/NSData+zlib (~> 6.0)" 29 | - nanopb (= 0.3.9011) 30 | - FirebaseAuth (6.4.3): 31 | - FirebaseAuthInterop (~> 1.0) 32 | - FirebaseCore (~> 6.6) 33 | - GoogleUtilities/AppDelegateSwizzler (~> 6.5) 34 | - GoogleUtilities/Environment (~> 6.5) 35 | - GTMSessionFetcher/Core (~> 1.1) 36 | - FirebaseAuthInterop (1.0.0) 37 | - FirebaseCore (6.6.3): 38 | - FirebaseCoreDiagnostics (~> 1.2) 39 | - FirebaseCoreDiagnosticsInterop (~> 1.2) 40 | - GoogleUtilities/Environment (~> 6.5) 41 | - GoogleUtilities/Logger (~> 6.5) 42 | - FirebaseCoreDiagnostics (1.2.1): 43 | - FirebaseCoreDiagnosticsInterop (~> 1.2) 44 | - GoogleDataTransportCCTSupport (~> 1.3) 45 | - GoogleUtilities/Environment (~> 6.5) 46 | - GoogleUtilities/Logger (~> 6.5) 47 | - nanopb (~> 0.3.901) 48 | - FirebaseCoreDiagnosticsInterop (1.2.0) 49 | - FirebaseInstallations (1.1.0): 50 | - FirebaseCore (~> 6.6) 51 | - GoogleUtilities/UserDefaults (~> 6.5) 52 | - PromisesObjC (~> 1.2) 53 | - Flutter (1.0.0) 54 | - GoogleAppMeasurement (6.3.0): 55 | - GoogleUtilities/AppDelegateSwizzler (~> 6.0) 56 | - GoogleUtilities/MethodSwizzler (~> 6.0) 57 | - GoogleUtilities/Network (~> 6.0) 58 | - "GoogleUtilities/NSData+zlib (~> 6.0)" 59 | - nanopb (= 0.3.9011) 60 | - GoogleDataTransport (4.0.1) 61 | - GoogleDataTransportCCTSupport (1.4.1): 62 | - GoogleDataTransport (~> 4.0) 63 | - nanopb (~> 0.3.901) 64 | - GoogleUtilities/AppDelegateSwizzler (6.5.1): 65 | - GoogleUtilities/Environment 66 | - GoogleUtilities/Logger 67 | - GoogleUtilities/Network 68 | - GoogleUtilities/Environment (6.5.1) 69 | - GoogleUtilities/Logger (6.5.1): 70 | - GoogleUtilities/Environment 71 | - GoogleUtilities/MethodSwizzler (6.5.1): 72 | - GoogleUtilities/Logger 73 | - GoogleUtilities/Network (6.5.1): 74 | - GoogleUtilities/Logger 75 | - "GoogleUtilities/NSData+zlib" 76 | - GoogleUtilities/Reachability 77 | - "GoogleUtilities/NSData+zlib (6.5.1)" 78 | - GoogleUtilities/Reachability (6.5.1): 79 | - GoogleUtilities/Logger 80 | - GoogleUtilities/UserDefaults (6.5.1): 81 | - GoogleUtilities/Logger 82 | - GTMSessionFetcher/Core (1.3.1) 83 | - nanopb (0.3.9011): 84 | - nanopb/decode (= 0.3.9011) 85 | - nanopb/encode (= 0.3.9011) 86 | - nanopb/decode (0.3.9011) 87 | - nanopb/encode (0.3.9011) 88 | - PromisesObjC (1.2.8) 89 | 90 | DEPENDENCIES: 91 | - firebase_auth (from `.symlinks/plugins/firebase_auth/ios`) 92 | - firebase_auth_web (from `.symlinks/plugins/firebase_auth_web/ios`) 93 | - firebase_core (from `.symlinks/plugins/firebase_core/ios`) 94 | - firebase_core_web (from `.symlinks/plugins/firebase_core_web/ios`) 95 | - Flutter (from `Flutter`) 96 | 97 | SPEC REPOS: 98 | trunk: 99 | - Firebase 100 | - FirebaseAnalytics 101 | - FirebaseAuth 102 | - FirebaseAuthInterop 103 | - FirebaseCore 104 | - FirebaseCoreDiagnostics 105 | - FirebaseCoreDiagnosticsInterop 106 | - FirebaseInstallations 107 | - GoogleAppMeasurement 108 | - GoogleDataTransport 109 | - GoogleDataTransportCCTSupport 110 | - GoogleUtilities 111 | - GTMSessionFetcher 112 | - nanopb 113 | - PromisesObjC 114 | 115 | EXTERNAL SOURCES: 116 | firebase_auth: 117 | :path: ".symlinks/plugins/firebase_auth/ios" 118 | firebase_auth_web: 119 | :path: ".symlinks/plugins/firebase_auth_web/ios" 120 | firebase_core: 121 | :path: ".symlinks/plugins/firebase_core/ios" 122 | firebase_core_web: 123 | :path: ".symlinks/plugins/firebase_core_web/ios" 124 | Flutter: 125 | :path: Flutter 126 | 127 | SPEC CHECKSUMS: 128 | Firebase: 0490eca762a72e4f1582319539153897f1508dee 129 | firebase_auth: af8784c4d8d87c36f730a305f97bfbcb24db024b 130 | firebase_auth_web: 0955c07bcc06e84af76b9d4e32e6f31518f2d7de 131 | firebase_core: 335c02abd48672b7c83c683df833d0488a72e73e 132 | firebase_core_web: d501d8b946b60c8af265428ce483b0fff5ad52d1 133 | FirebaseAnalytics: 058d71e714a1a6804d9e0f25e3bb18e377a51579 134 | FirebaseAuth: 5ce2b03a3d7fe56b7a6e4c5ec7ff1522890b1d6f 135 | FirebaseAuthInterop: 0ffa57668be100582bb7643d4fcb7615496c41fc 136 | FirebaseCore: 78276943ad85e616dfa54dafa6c89512987d9d60 137 | FirebaseCoreDiagnostics: 2109d10c35e8289b1ee6cabf44d9ffb055620194 138 | FirebaseCoreDiagnosticsInterop: 296e2c5f5314500a850ad0b83e9e7c10b011a850 139 | FirebaseInstallations: 575cd32f2aec0feeb0e44f5d0110a09e5e60b47b 140 | Flutter: 0e3d915762c693b495b44d77113d4970485de6ec 141 | GoogleAppMeasurement: 39ecba10918b21c83877d392246157f65db351cf 142 | GoogleDataTransport: 653963cf5be60fb59cf051e070f0836fdc305f81 143 | GoogleDataTransportCCTSupport: 84e4d4bbab642f2e9d83ee65d78aca2b5527d314 144 | GoogleUtilities: 06eb53bb579efe7099152735900dd04bf09e7275 145 | GTMSessionFetcher: cea130bbfe5a7edc8d06d3f0d17288c32ffe9925 146 | nanopb: 18003b5e52dab79db540fe93fe9579f399bd1ccd 147 | PromisesObjC: c119f3cd559f50b7ae681fa59dc1acd19173b7e6 148 | 149 | PODFILE CHECKSUM: f32fb4e7c14f8b3ca19a369d7be425dd9241af27 150 | 151 | COCOAPODS: 1.9.3 152 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; 13 | 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; 14 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 15 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 16 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 17 | 9FFCEF8824BB4C92000FFC47 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 9FFCEF8724BB4C92000FFC47 /* GoogleService-Info.plist */; }; 18 | F32AF538783CD71310315EBE /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F1612F073A1FBC0AE573F78D /* libPods-Runner.a */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXCopyFilesBuildPhase section */ 22 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 23 | isa = PBXCopyFilesBuildPhase; 24 | buildActionMask = 2147483647; 25 | dstPath = ""; 26 | dstSubfolderSpec = 10; 27 | files = ( 28 | ); 29 | name = "Embed Frameworks"; 30 | runOnlyForDeploymentPostprocessing = 0; 31 | }; 32 | /* End PBXCopyFilesBuildPhase section */ 33 | 34 | /* Begin PBXFileReference section */ 35 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 36 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 37 | 1AC3863D103E7659F56B683E /* 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 = ""; }; 38 | 2CB5E9DDD817B4073FAF5C7D /* 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 = ""; }; 39 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 40 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 41 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 42 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 43 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 44 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 45 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 46 | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 47 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 48 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 49 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 50 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 51 | 9FFCEF8724BB4C92000FFC47 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; 52 | C6C60D6BE3F7C2D5C7675BAF /* 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 = ""; }; 53 | F1612F073A1FBC0AE573F78D /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 54 | /* End PBXFileReference section */ 55 | 56 | /* Begin PBXFrameworksBuildPhase section */ 57 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 58 | isa = PBXFrameworksBuildPhase; 59 | buildActionMask = 2147483647; 60 | files = ( 61 | F32AF538783CD71310315EBE /* libPods-Runner.a in Frameworks */, 62 | ); 63 | runOnlyForDeploymentPostprocessing = 0; 64 | }; 65 | /* End PBXFrameworksBuildPhase section */ 66 | 67 | /* Begin PBXGroup section */ 68 | 07468FA5DB3DA7DDA3CB08AC /* Pods */ = { 69 | isa = PBXGroup; 70 | children = ( 71 | 1AC3863D103E7659F56B683E /* Pods-Runner.debug.xcconfig */, 72 | C6C60D6BE3F7C2D5C7675BAF /* Pods-Runner.release.xcconfig */, 73 | 2CB5E9DDD817B4073FAF5C7D /* Pods-Runner.profile.xcconfig */, 74 | ); 75 | path = Pods; 76 | sourceTree = ""; 77 | }; 78 | 7760F9BDF62F8E4A66A1A7CC /* Frameworks */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | F1612F073A1FBC0AE573F78D /* libPods-Runner.a */, 82 | ); 83 | name = Frameworks; 84 | sourceTree = ""; 85 | }; 86 | 9740EEB11CF90186004384FC /* Flutter */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 90 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 91 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 92 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 93 | ); 94 | name = Flutter; 95 | sourceTree = ""; 96 | }; 97 | 97C146E51CF9000F007C117D = { 98 | isa = PBXGroup; 99 | children = ( 100 | 9740EEB11CF90186004384FC /* Flutter */, 101 | 97C146F01CF9000F007C117D /* Runner */, 102 | 97C146EF1CF9000F007C117D /* Products */, 103 | 07468FA5DB3DA7DDA3CB08AC /* Pods */, 104 | 7760F9BDF62F8E4A66A1A7CC /* Frameworks */, 105 | ); 106 | sourceTree = ""; 107 | }; 108 | 97C146EF1CF9000F007C117D /* Products */ = { 109 | isa = PBXGroup; 110 | children = ( 111 | 97C146EE1CF9000F007C117D /* Runner.app */, 112 | ); 113 | name = Products; 114 | sourceTree = ""; 115 | }; 116 | 97C146F01CF9000F007C117D /* Runner */ = { 117 | isa = PBXGroup; 118 | children = ( 119 | 9FFCEF8724BB4C92000FFC47 /* GoogleService-Info.plist */, 120 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, 121 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, 122 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 123 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 124 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 125 | 97C147021CF9000F007C117D /* Info.plist */, 126 | 97C146F11CF9000F007C117D /* Supporting Files */, 127 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 128 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 129 | ); 130 | path = Runner; 131 | sourceTree = ""; 132 | }; 133 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 134 | isa = PBXGroup; 135 | children = ( 136 | 97C146F21CF9000F007C117D /* main.m */, 137 | ); 138 | name = "Supporting Files"; 139 | sourceTree = ""; 140 | }; 141 | /* End PBXGroup section */ 142 | 143 | /* Begin PBXNativeTarget section */ 144 | 97C146ED1CF9000F007C117D /* Runner */ = { 145 | isa = PBXNativeTarget; 146 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 147 | buildPhases = ( 148 | CEF396628FDFB35C82B5E0C0 /* [CP] Check Pods Manifest.lock */, 149 | 9740EEB61CF901F6004384FC /* Run Script */, 150 | 97C146EA1CF9000F007C117D /* Sources */, 151 | 97C146EB1CF9000F007C117D /* Frameworks */, 152 | 97C146EC1CF9000F007C117D /* Resources */, 153 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 154 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 155 | 902B22BA067F308701855440 /* [CP] Embed Pods Frameworks */, 156 | ); 157 | buildRules = ( 158 | ); 159 | dependencies = ( 160 | ); 161 | name = Runner; 162 | productName = Runner; 163 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 164 | productType = "com.apple.product-type.application"; 165 | }; 166 | /* End PBXNativeTarget section */ 167 | 168 | /* Begin PBXProject section */ 169 | 97C146E61CF9000F007C117D /* Project object */ = { 170 | isa = PBXProject; 171 | attributes = { 172 | LastUpgradeCheck = 1020; 173 | ORGANIZATIONNAME = ""; 174 | TargetAttributes = { 175 | 97C146ED1CF9000F007C117D = { 176 | CreatedOnToolsVersion = 7.3.1; 177 | }; 178 | }; 179 | }; 180 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 181 | compatibilityVersion = "Xcode 9.3"; 182 | developmentRegion = en; 183 | hasScannedForEncodings = 0; 184 | knownRegions = ( 185 | en, 186 | Base, 187 | ); 188 | mainGroup = 97C146E51CF9000F007C117D; 189 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 190 | projectDirPath = ""; 191 | projectRoot = ""; 192 | targets = ( 193 | 97C146ED1CF9000F007C117D /* Runner */, 194 | ); 195 | }; 196 | /* End PBXProject section */ 197 | 198 | /* Begin PBXResourcesBuildPhase section */ 199 | 97C146EC1CF9000F007C117D /* Resources */ = { 200 | isa = PBXResourcesBuildPhase; 201 | buildActionMask = 2147483647; 202 | files = ( 203 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 204 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 205 | 9FFCEF8824BB4C92000FFC47 /* GoogleService-Info.plist in Resources */, 206 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 207 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 208 | ); 209 | runOnlyForDeploymentPostprocessing = 0; 210 | }; 211 | /* End PBXResourcesBuildPhase section */ 212 | 213 | /* Begin PBXShellScriptBuildPhase section */ 214 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 215 | isa = PBXShellScriptBuildPhase; 216 | buildActionMask = 2147483647; 217 | files = ( 218 | ); 219 | inputPaths = ( 220 | ); 221 | name = "Thin Binary"; 222 | outputPaths = ( 223 | ); 224 | runOnlyForDeploymentPostprocessing = 0; 225 | shellPath = /bin/sh; 226 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 227 | }; 228 | 902B22BA067F308701855440 /* [CP] Embed Pods Frameworks */ = { 229 | isa = PBXShellScriptBuildPhase; 230 | buildActionMask = 2147483647; 231 | files = ( 232 | ); 233 | inputFileListPaths = ( 234 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", 235 | ); 236 | name = "[CP] Embed Pods Frameworks"; 237 | outputFileListPaths = ( 238 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", 239 | ); 240 | runOnlyForDeploymentPostprocessing = 0; 241 | shellPath = /bin/sh; 242 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; 243 | showEnvVarsInLog = 0; 244 | }; 245 | 9740EEB61CF901F6004384FC /* Run Script */ = { 246 | isa = PBXShellScriptBuildPhase; 247 | buildActionMask = 2147483647; 248 | files = ( 249 | ); 250 | inputPaths = ( 251 | ); 252 | name = "Run Script"; 253 | outputPaths = ( 254 | ); 255 | runOnlyForDeploymentPostprocessing = 0; 256 | shellPath = /bin/sh; 257 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 258 | }; 259 | CEF396628FDFB35C82B5E0C0 /* [CP] Check Pods Manifest.lock */ = { 260 | isa = PBXShellScriptBuildPhase; 261 | buildActionMask = 2147483647; 262 | files = ( 263 | ); 264 | inputFileListPaths = ( 265 | ); 266 | inputPaths = ( 267 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 268 | "${PODS_ROOT}/Manifest.lock", 269 | ); 270 | name = "[CP] Check Pods Manifest.lock"; 271 | outputFileListPaths = ( 272 | ); 273 | outputPaths = ( 274 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", 275 | ); 276 | runOnlyForDeploymentPostprocessing = 0; 277 | shellPath = /bin/sh; 278 | 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"; 279 | showEnvVarsInLog = 0; 280 | }; 281 | /* End PBXShellScriptBuildPhase section */ 282 | 283 | /* Begin PBXSourcesBuildPhase section */ 284 | 97C146EA1CF9000F007C117D /* Sources */ = { 285 | isa = PBXSourcesBuildPhase; 286 | buildActionMask = 2147483647; 287 | files = ( 288 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, 289 | 97C146F31CF9000F007C117D /* main.m in Sources */, 290 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 291 | ); 292 | runOnlyForDeploymentPostprocessing = 0; 293 | }; 294 | /* End PBXSourcesBuildPhase section */ 295 | 296 | /* Begin PBXVariantGroup section */ 297 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 298 | isa = PBXVariantGroup; 299 | children = ( 300 | 97C146FB1CF9000F007C117D /* Base */, 301 | ); 302 | name = Main.storyboard; 303 | sourceTree = ""; 304 | }; 305 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 306 | isa = PBXVariantGroup; 307 | children = ( 308 | 97C147001CF9000F007C117D /* Base */, 309 | ); 310 | name = LaunchScreen.storyboard; 311 | sourceTree = ""; 312 | }; 313 | /* End PBXVariantGroup section */ 314 | 315 | /* Begin XCBuildConfiguration section */ 316 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 317 | isa = XCBuildConfiguration; 318 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 319 | buildSettings = { 320 | ALWAYS_SEARCH_USER_PATHS = NO; 321 | CLANG_ANALYZER_NONNULL = YES; 322 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 323 | CLANG_CXX_LIBRARY = "libc++"; 324 | CLANG_ENABLE_MODULES = YES; 325 | CLANG_ENABLE_OBJC_ARC = YES; 326 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 327 | CLANG_WARN_BOOL_CONVERSION = YES; 328 | CLANG_WARN_COMMA = YES; 329 | CLANG_WARN_CONSTANT_CONVERSION = YES; 330 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 331 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 332 | CLANG_WARN_EMPTY_BODY = YES; 333 | CLANG_WARN_ENUM_CONVERSION = YES; 334 | CLANG_WARN_INFINITE_RECURSION = YES; 335 | CLANG_WARN_INT_CONVERSION = YES; 336 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 337 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 338 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 339 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 340 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 341 | CLANG_WARN_STRICT_PROTOTYPES = YES; 342 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 343 | CLANG_WARN_UNREACHABLE_CODE = YES; 344 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 345 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 346 | COPY_PHASE_STRIP = NO; 347 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 348 | ENABLE_NS_ASSERTIONS = NO; 349 | ENABLE_STRICT_OBJC_MSGSEND = YES; 350 | GCC_C_LANGUAGE_STANDARD = gnu99; 351 | GCC_NO_COMMON_BLOCKS = YES; 352 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 353 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 354 | GCC_WARN_UNDECLARED_SELECTOR = YES; 355 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 356 | GCC_WARN_UNUSED_FUNCTION = YES; 357 | GCC_WARN_UNUSED_VARIABLE = YES; 358 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 359 | MTL_ENABLE_DEBUG_INFO = NO; 360 | SDKROOT = iphoneos; 361 | SUPPORTED_PLATFORMS = iphoneos; 362 | TARGETED_DEVICE_FAMILY = "1,2"; 363 | VALIDATE_PRODUCT = YES; 364 | }; 365 | name = Profile; 366 | }; 367 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 368 | isa = XCBuildConfiguration; 369 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 370 | buildSettings = { 371 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 372 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 373 | ENABLE_BITCODE = NO; 374 | FRAMEWORK_SEARCH_PATHS = ( 375 | "$(inherited)", 376 | "$(PROJECT_DIR)/Flutter", 377 | ); 378 | INFOPLIST_FILE = Runner/Info.plist; 379 | LD_RUNPATH_SEARCH_PATHS = ( 380 | "$(inherited)", 381 | "@executable_path/Frameworks", 382 | ); 383 | LIBRARY_SEARCH_PATHS = ( 384 | "$(inherited)", 385 | "$(PROJECT_DIR)/Flutter", 386 | ); 387 | PRODUCT_BUNDLE_IDENTIFIER = com.puzzleleaf.firebaseauthproject; 388 | PRODUCT_NAME = "$(TARGET_NAME)"; 389 | VERSIONING_SYSTEM = "apple-generic"; 390 | }; 391 | name = Profile; 392 | }; 393 | 97C147031CF9000F007C117D /* Debug */ = { 394 | isa = XCBuildConfiguration; 395 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 396 | buildSettings = { 397 | ALWAYS_SEARCH_USER_PATHS = NO; 398 | CLANG_ANALYZER_NONNULL = YES; 399 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 400 | CLANG_CXX_LIBRARY = "libc++"; 401 | CLANG_ENABLE_MODULES = YES; 402 | CLANG_ENABLE_OBJC_ARC = YES; 403 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 404 | CLANG_WARN_BOOL_CONVERSION = YES; 405 | CLANG_WARN_COMMA = YES; 406 | CLANG_WARN_CONSTANT_CONVERSION = YES; 407 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 408 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 409 | CLANG_WARN_EMPTY_BODY = YES; 410 | CLANG_WARN_ENUM_CONVERSION = YES; 411 | CLANG_WARN_INFINITE_RECURSION = YES; 412 | CLANG_WARN_INT_CONVERSION = YES; 413 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 414 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 415 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 416 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 417 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 418 | CLANG_WARN_STRICT_PROTOTYPES = YES; 419 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 420 | CLANG_WARN_UNREACHABLE_CODE = YES; 421 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 422 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 423 | COPY_PHASE_STRIP = NO; 424 | DEBUG_INFORMATION_FORMAT = dwarf; 425 | ENABLE_STRICT_OBJC_MSGSEND = YES; 426 | ENABLE_TESTABILITY = YES; 427 | GCC_C_LANGUAGE_STANDARD = gnu99; 428 | GCC_DYNAMIC_NO_PIC = NO; 429 | GCC_NO_COMMON_BLOCKS = YES; 430 | GCC_OPTIMIZATION_LEVEL = 0; 431 | GCC_PREPROCESSOR_DEFINITIONS = ( 432 | "DEBUG=1", 433 | "$(inherited)", 434 | ); 435 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 436 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 437 | GCC_WARN_UNDECLARED_SELECTOR = YES; 438 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 439 | GCC_WARN_UNUSED_FUNCTION = YES; 440 | GCC_WARN_UNUSED_VARIABLE = YES; 441 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 442 | MTL_ENABLE_DEBUG_INFO = YES; 443 | ONLY_ACTIVE_ARCH = YES; 444 | SDKROOT = iphoneos; 445 | TARGETED_DEVICE_FAMILY = "1,2"; 446 | }; 447 | name = Debug; 448 | }; 449 | 97C147041CF9000F007C117D /* Release */ = { 450 | isa = XCBuildConfiguration; 451 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 452 | buildSettings = { 453 | ALWAYS_SEARCH_USER_PATHS = NO; 454 | CLANG_ANALYZER_NONNULL = YES; 455 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 456 | CLANG_CXX_LIBRARY = "libc++"; 457 | CLANG_ENABLE_MODULES = YES; 458 | CLANG_ENABLE_OBJC_ARC = YES; 459 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 460 | CLANG_WARN_BOOL_CONVERSION = YES; 461 | CLANG_WARN_COMMA = YES; 462 | CLANG_WARN_CONSTANT_CONVERSION = YES; 463 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 464 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 465 | CLANG_WARN_EMPTY_BODY = YES; 466 | CLANG_WARN_ENUM_CONVERSION = YES; 467 | CLANG_WARN_INFINITE_RECURSION = YES; 468 | CLANG_WARN_INT_CONVERSION = YES; 469 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 470 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 471 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 472 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 473 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 474 | CLANG_WARN_STRICT_PROTOTYPES = YES; 475 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 476 | CLANG_WARN_UNREACHABLE_CODE = YES; 477 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 478 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 479 | COPY_PHASE_STRIP = NO; 480 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 481 | ENABLE_NS_ASSERTIONS = NO; 482 | ENABLE_STRICT_OBJC_MSGSEND = YES; 483 | GCC_C_LANGUAGE_STANDARD = gnu99; 484 | GCC_NO_COMMON_BLOCKS = YES; 485 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 486 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 487 | GCC_WARN_UNDECLARED_SELECTOR = YES; 488 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 489 | GCC_WARN_UNUSED_FUNCTION = YES; 490 | GCC_WARN_UNUSED_VARIABLE = YES; 491 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 492 | MTL_ENABLE_DEBUG_INFO = NO; 493 | SDKROOT = iphoneos; 494 | SUPPORTED_PLATFORMS = iphoneos; 495 | TARGETED_DEVICE_FAMILY = "1,2"; 496 | VALIDATE_PRODUCT = YES; 497 | }; 498 | name = Release; 499 | }; 500 | 97C147061CF9000F007C117D /* Debug */ = { 501 | isa = XCBuildConfiguration; 502 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 503 | buildSettings = { 504 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 505 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 506 | ENABLE_BITCODE = NO; 507 | FRAMEWORK_SEARCH_PATHS = ( 508 | "$(inherited)", 509 | "$(PROJECT_DIR)/Flutter", 510 | ); 511 | INFOPLIST_FILE = Runner/Info.plist; 512 | LD_RUNPATH_SEARCH_PATHS = ( 513 | "$(inherited)", 514 | "@executable_path/Frameworks", 515 | ); 516 | LIBRARY_SEARCH_PATHS = ( 517 | "$(inherited)", 518 | "$(PROJECT_DIR)/Flutter", 519 | ); 520 | PRODUCT_BUNDLE_IDENTIFIER = com.puzzleleaf.firebaseauthproject; 521 | PRODUCT_NAME = "$(TARGET_NAME)"; 522 | VERSIONING_SYSTEM = "apple-generic"; 523 | }; 524 | name = Debug; 525 | }; 526 | 97C147071CF9000F007C117D /* Release */ = { 527 | isa = XCBuildConfiguration; 528 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 529 | buildSettings = { 530 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 531 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 532 | ENABLE_BITCODE = NO; 533 | FRAMEWORK_SEARCH_PATHS = ( 534 | "$(inherited)", 535 | "$(PROJECT_DIR)/Flutter", 536 | ); 537 | INFOPLIST_FILE = Runner/Info.plist; 538 | LD_RUNPATH_SEARCH_PATHS = ( 539 | "$(inherited)", 540 | "@executable_path/Frameworks", 541 | ); 542 | LIBRARY_SEARCH_PATHS = ( 543 | "$(inherited)", 544 | "$(PROJECT_DIR)/Flutter", 545 | ); 546 | PRODUCT_BUNDLE_IDENTIFIER = com.puzzleleaf.firebaseauthproject; 547 | PRODUCT_NAME = "$(TARGET_NAME)"; 548 | VERSIONING_SYSTEM = "apple-generic"; 549 | }; 550 | name = Release; 551 | }; 552 | /* End XCBuildConfiguration section */ 553 | 554 | /* Begin XCConfigurationList section */ 555 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 556 | isa = XCConfigurationList; 557 | buildConfigurations = ( 558 | 97C147031CF9000F007C117D /* Debug */, 559 | 97C147041CF9000F007C117D /* Release */, 560 | 249021D3217E4FDB00AE95B9 /* Profile */, 561 | ); 562 | defaultConfigurationIsVisible = 0; 563 | defaultConfigurationName = Release; 564 | }; 565 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 566 | isa = XCConfigurationList; 567 | buildConfigurations = ( 568 | 97C147061CF9000F007C117D /* Debug */, 569 | 97C147071CF9000F007C117D /* Release */, 570 | 249021D4217E4FDB00AE95B9 /* Profile */, 571 | ); 572 | defaultConfigurationIsVisible = 0; 573 | defaultConfigurationName = Release; 574 | }; 575 | /* End XCConfigurationList section */ 576 | }; 577 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 578 | } 579 | -------------------------------------------------------------------------------- /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 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /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.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | #import "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application 7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 8 | [GeneratedPluginRegistrant registerWithRegistry:self]; 9 | // Override point for customization after application launch. 10 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 11 | } 12 | 13 | @end 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/puzzleleaf/FlutterFirebaseAuthWithBloc/98ac438833636d84a15efae04361b13675d95766/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/puzzleleaf/FlutterFirebaseAuthWithBloc/98ac438833636d84a15efae04361b13675d95766/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/puzzleleaf/FlutterFirebaseAuthWithBloc/98ac438833636d84a15efae04361b13675d95766/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/puzzleleaf/FlutterFirebaseAuthWithBloc/98ac438833636d84a15efae04361b13675d95766/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/puzzleleaf/FlutterFirebaseAuthWithBloc/98ac438833636d84a15efae04361b13675d95766/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/puzzleleaf/FlutterFirebaseAuthWithBloc/98ac438833636d84a15efae04361b13675d95766/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/puzzleleaf/FlutterFirebaseAuthWithBloc/98ac438833636d84a15efae04361b13675d95766/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/puzzleleaf/FlutterFirebaseAuthWithBloc/98ac438833636d84a15efae04361b13675d95766/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/puzzleleaf/FlutterFirebaseAuthWithBloc/98ac438833636d84a15efae04361b13675d95766/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/puzzleleaf/FlutterFirebaseAuthWithBloc/98ac438833636d84a15efae04361b13675d95766/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/puzzleleaf/FlutterFirebaseAuthWithBloc/98ac438833636d84a15efae04361b13675d95766/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/puzzleleaf/FlutterFirebaseAuthWithBloc/98ac438833636d84a15efae04361b13675d95766/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/puzzleleaf/FlutterFirebaseAuthWithBloc/98ac438833636d84a15efae04361b13675d95766/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/puzzleleaf/FlutterFirebaseAuthWithBloc/98ac438833636d84a15efae04361b13675d95766/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/puzzleleaf/FlutterFirebaseAuthWithBloc/98ac438833636d84a15efae04361b13675d95766/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/puzzleleaf/FlutterFirebaseAuthWithBloc/98ac438833636d84a15efae04361b13675d95766/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puzzleleaf/FlutterFirebaseAuthWithBloc/98ac438833636d84a15efae04361b13675d95766/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puzzleleaf/FlutterFirebaseAuthWithBloc/98ac438833636d84a15efae04361b13675d95766/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 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | firebaseauthproject 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char* argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/blocs/authentication_bloc/authentication_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebaseauthproject/blocs/authentication_bloc/authentication_state.dart'; 2 | import 'package:firebaseauthproject/blocs/authentication_bloc/authentication_event.dart'; 3 | import 'package:firebaseauthproject/repositories/user_repository.dart'; 4 | import 'package:flutter_bloc/flutter_bloc.dart'; 5 | 6 | import 'authentication_state.dart'; 7 | 8 | class AuthenticationBloc 9 | extends Bloc { 10 | final UserRepository _userRepository; 11 | 12 | AuthenticationBloc({UserRepository userRepository}) 13 | : _userRepository = userRepository, 14 | super(AuthenticationInitial()); 15 | 16 | @override 17 | Stream mapEventToState( 18 | AuthenticationEvent event) async* { 19 | if (event is AuthenticationStarted) { 20 | yield* _mapAuthenticationStartedToState(); 21 | } else if (event is AuthenticationLoggedIn) { 22 | yield* _mapAuthenticationLoggedInToState(); 23 | } else if (event is AuthenticationLoggedOut) { 24 | yield* _mapAuthenticationLoggedOutInToState(); 25 | } 26 | } 27 | 28 | //AuthenticationLoggedOut 29 | Stream _mapAuthenticationLoggedOutInToState() async* { 30 | yield AuthenticationFailure(); 31 | _userRepository.signOut(); 32 | } 33 | 34 | //AuthenticationLoggedIn 35 | Stream _mapAuthenticationLoggedInToState() async* { 36 | yield AuthenticationSuccess(await _userRepository.getUser()); 37 | } 38 | 39 | // AuthenticationStarted 40 | Stream _mapAuthenticationStartedToState() async* { 41 | final isSignedIn = await _userRepository.isSignedIn(); 42 | if (isSignedIn) { 43 | final firebaseUser = await _userRepository.getUser(); 44 | yield AuthenticationSuccess(firebaseUser); 45 | } else { 46 | yield AuthenticationFailure(); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /lib/blocs/authentication_bloc/authentication_event.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | 3 | abstract class AuthenticationEvent extends Equatable { 4 | @override 5 | List get props => []; 6 | } 7 | 8 | class AuthenticationStarted extends AuthenticationEvent {} 9 | 10 | class AuthenticationLoggedIn extends AuthenticationEvent {} 11 | 12 | class AuthenticationLoggedOut extends AuthenticationEvent {} -------------------------------------------------------------------------------- /lib/blocs/authentication_bloc/authentication_state.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | import 'package:firebase_auth/firebase_auth.dart'; 3 | 4 | abstract class AuthenticationState extends Equatable { 5 | AuthenticationState(); 6 | 7 | @override 8 | List get props => []; 9 | } 10 | 11 | class AuthenticationInitial extends AuthenticationState {} 12 | 13 | class AuthenticationSuccess extends AuthenticationState { 14 | final FirebaseUser firebaseUser; 15 | 16 | AuthenticationSuccess(this.firebaseUser); 17 | 18 | @override 19 | List get props => [firebaseUser]; 20 | } 21 | 22 | class AuthenticationFailure extends AuthenticationState {} -------------------------------------------------------------------------------- /lib/blocs/login_bloc/login_bloc.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:firebaseauthproject/blocs/login_bloc/login_event.dart'; 3 | import 'package:firebaseauthproject/blocs/login_bloc/login_state.dart'; 4 | import 'package:firebaseauthproject/repositories/user_repository.dart'; 5 | import 'package:firebaseauthproject/utils/validators.dart'; 6 | import 'package:flutter_bloc/flutter_bloc.dart'; 7 | 8 | class LoginBloc extends Bloc { 9 | final UserRepository _userRepository; 10 | 11 | LoginBloc({UserRepository userRepository}) 12 | : _userRepository = userRepository, 13 | super(LoginState.initial()); 14 | 15 | @override 16 | Stream mapEventToState(LoginEvent event) async* { 17 | if (event is LoginEmailChange) { 18 | yield* _mapLoginEmailChangeToState(event.email); 19 | } else if (event is LoginPasswordChanged) { 20 | yield* _mapLoginPasswordChangeToState(event.password); 21 | } else if (event is LoginWithCredentialsPressed) { 22 | yield* _mapLoginWithCredentialsPressedToState( 23 | email: event.email, password: event.password); 24 | } 25 | } 26 | 27 | Stream _mapLoginEmailChangeToState(String email) async* { 28 | yield state.update(isEmailValid: Validators.isValidEmail(email)); 29 | } 30 | 31 | Stream _mapLoginPasswordChangeToState(String password) async* { 32 | yield state.update(isPasswordValid: Validators.isValidPassword(password)); 33 | } 34 | 35 | Stream _mapLoginWithCredentialsPressedToState( 36 | {String email, String password}) async* { 37 | yield LoginState.loading(); 38 | try { 39 | await _userRepository.signInWithCredentials(email, password); 40 | yield LoginState.success(); 41 | } catch (_) { 42 | yield LoginState.failure(); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /lib/blocs/login_bloc/login_event.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | 3 | abstract class LoginEvent extends Equatable { 4 | @override 5 | List get props => []; 6 | } 7 | 8 | class LoginEmailChange extends LoginEvent { 9 | final String email; 10 | 11 | LoginEmailChange({this.email}); 12 | 13 | @override 14 | List get props => [email]; 15 | } 16 | 17 | class LoginPasswordChanged extends LoginEvent { 18 | final String password; 19 | 20 | LoginPasswordChanged({this.password}); 21 | 22 | @override 23 | List get props => [password]; 24 | } 25 | 26 | class LoginWithCredentialsPressed extends LoginEvent { 27 | final String email; 28 | final String password; 29 | 30 | LoginWithCredentialsPressed({this.email, this.password}); 31 | 32 | @override 33 | List get props => [email, password]; 34 | } 35 | -------------------------------------------------------------------------------- /lib/blocs/login_bloc/login_state.dart: -------------------------------------------------------------------------------- 1 | class LoginState { 2 | final bool isEmailValid; 3 | final bool isPasswordValid; 4 | final bool isSubmitting; 5 | final bool isSuccess; 6 | final bool isFailure; 7 | 8 | bool get isFormValid => isEmailValid && isPasswordValid; 9 | 10 | LoginState( 11 | {this.isEmailValid, 12 | this.isPasswordValid, 13 | this.isSubmitting, 14 | this.isSuccess, 15 | this.isFailure}); 16 | 17 | factory LoginState.initial() { 18 | return LoginState( 19 | isEmailValid: true, 20 | isPasswordValid: true, 21 | isSubmitting: false, 22 | isSuccess: false, 23 | isFailure: false, 24 | ); 25 | } 26 | 27 | factory LoginState.loading() { 28 | return LoginState( 29 | isEmailValid: true, 30 | isPasswordValid: true, 31 | isSubmitting: true, 32 | isSuccess: false, 33 | isFailure: false, 34 | ); 35 | } 36 | 37 | factory LoginState.failure() { 38 | return LoginState( 39 | isEmailValid: true, 40 | isPasswordValid: true, 41 | isSubmitting: false, 42 | isSuccess: false, 43 | isFailure: true, 44 | ); 45 | } 46 | 47 | factory LoginState.success() { 48 | return LoginState( 49 | isEmailValid: true, 50 | isPasswordValid: true, 51 | isSubmitting: false, 52 | isSuccess: true, 53 | isFailure: false, 54 | ); 55 | } 56 | 57 | LoginState update({ 58 | bool isEmailValid, 59 | bool isPasswordValid, 60 | }) { 61 | return copyWith( 62 | isEmailValid: isEmailValid, 63 | isPasswordValid: isPasswordValid, 64 | isSubmitting: false, 65 | isSuccess: false, 66 | isFailure: false, 67 | ); 68 | } 69 | 70 | LoginState copyWith({ 71 | bool isEmailValid, 72 | bool isPasswordValid, 73 | bool isSubmitting, 74 | bool isSuccess, 75 | bool isFailure, 76 | }) { 77 | return LoginState( 78 | isEmailValid: isEmailValid ?? this.isEmailValid, 79 | isPasswordValid: isPasswordValid ?? this.isPasswordValid, 80 | isSubmitting: isSubmitting ?? this.isSubmitting, 81 | isSuccess: isSuccess ?? this.isSuccess, 82 | isFailure: isFailure ?? this.isFailure, 83 | ); 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /lib/blocs/register_bloc/register_bloc.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:firebaseauthproject/blocs/register_bloc/register_event.dart'; 3 | import 'package:firebaseauthproject/blocs/register_bloc/register_state.dart'; 4 | import 'package:firebaseauthproject/repositories/user_repository.dart'; 5 | import 'package:firebaseauthproject/utils/validators.dart'; 6 | import 'package:flutter_bloc/flutter_bloc.dart'; 7 | 8 | class RegisterBloc extends Bloc { 9 | final UserRepository _userRepository; 10 | 11 | RegisterBloc({UserRepository userRepository}) 12 | : _userRepository = userRepository, 13 | super(RegisterState.initial()); 14 | 15 | @override 16 | Stream mapEventToState(RegisterEvent event) async* { 17 | if (event is RegisterEmailChanged) { 18 | yield* _mapRegisterEmailChangeToState(event.email); 19 | } else if (event is RegisterPasswordChanged) { 20 | yield* _mapRegisterPasswordChangeToState(event.password); 21 | } else if (event is RegisterSubmitted) { 22 | yield* _mapRegisterSubmittedToState( 23 | email: event.email, password: event.password); 24 | } 25 | } 26 | 27 | Stream _mapRegisterEmailChangeToState(String email) async* { 28 | yield state.update(isEmailValid: Validators.isValidEmail(email)); 29 | } 30 | 31 | Stream _mapRegisterPasswordChangeToState(String password) async* { 32 | yield state.update(isPasswordValid: Validators.isValidPassword(password)); 33 | } 34 | 35 | Stream _mapRegisterSubmittedToState( 36 | {String email, String password}) async* { 37 | yield RegisterState.loading(); 38 | try { 39 | await _userRepository.signUp(email, password); 40 | yield RegisterState.success(); 41 | } catch (error) { 42 | print(error); 43 | yield RegisterState.failure(); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /lib/blocs/register_bloc/register_event.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | 3 | abstract class RegisterEvent extends Equatable { 4 | @override 5 | List get props => []; 6 | } 7 | 8 | class RegisterEmailChanged extends RegisterEvent { 9 | final String email; 10 | 11 | RegisterEmailChanged({this.email}); 12 | 13 | @override 14 | List get props => [email]; 15 | } 16 | 17 | class RegisterPasswordChanged extends RegisterEvent { 18 | final String password; 19 | 20 | RegisterPasswordChanged({this.password}); 21 | 22 | @override 23 | List get props => [password]; 24 | } 25 | 26 | class RegisterSubmitted extends RegisterEvent { 27 | final String email; 28 | final String password; 29 | 30 | RegisterSubmitted({this.email, this.password}); 31 | 32 | @override 33 | List get props => [email, password]; 34 | } 35 | -------------------------------------------------------------------------------- /lib/blocs/register_bloc/register_state.dart: -------------------------------------------------------------------------------- 1 | class RegisterState { 2 | final bool isEmailValid; 3 | final bool isPasswordValid; 4 | final bool isSubmitting; 5 | final bool isSuccess; 6 | final bool isFailure; 7 | 8 | bool get isFormValid => isEmailValid && isPasswordValid; 9 | 10 | RegisterState( 11 | {this.isEmailValid, 12 | this.isPasswordValid, 13 | this.isSubmitting, 14 | this.isSuccess, 15 | this.isFailure}); 16 | 17 | factory RegisterState.initial() { 18 | return RegisterState( 19 | isEmailValid: true, 20 | isPasswordValid: true, 21 | isSubmitting: false, 22 | isSuccess: false, 23 | isFailure: false, 24 | ); 25 | } 26 | 27 | factory RegisterState.loading() { 28 | return RegisterState( 29 | isEmailValid: true, 30 | isPasswordValid: true, 31 | isSubmitting: true, 32 | isSuccess: false, 33 | isFailure: false, 34 | ); 35 | } 36 | 37 | factory RegisterState.failure() { 38 | return RegisterState( 39 | isEmailValid: true, 40 | isPasswordValid: true, 41 | isSubmitting: false, 42 | isSuccess: false, 43 | isFailure: true, 44 | ); 45 | } 46 | 47 | factory RegisterState.success() { 48 | return RegisterState( 49 | isEmailValid: true, 50 | isPasswordValid: true, 51 | isSubmitting: false, 52 | isSuccess: true, 53 | isFailure: false, 54 | ); 55 | } 56 | 57 | RegisterState update({ 58 | bool isEmailValid, 59 | bool isPasswordValid, 60 | }) { 61 | return copyWith( 62 | isEmailValid: isEmailValid, 63 | isPasswordValid: isPasswordValid, 64 | isSubmitting: false, 65 | isSuccess: false, 66 | isFailure: false, 67 | ); 68 | } 69 | 70 | RegisterState copyWith({ 71 | bool isEmailValid, 72 | bool isPasswordValid, 73 | bool isSubmitting, 74 | bool isSuccess, 75 | bool isFailure, 76 | }) { 77 | return RegisterState( 78 | isEmailValid: isEmailValid ?? this.isEmailValid, 79 | isPasswordValid: isPasswordValid ?? this.isPasswordValid, 80 | isSubmitting: isSubmitting ?? this.isSubmitting, 81 | isSuccess: isSuccess ?? this.isSuccess, 82 | isFailure: isFailure ?? this.isFailure, 83 | ); 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /lib/blocs/simple_bloc_observer.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_bloc/flutter_bloc.dart'; 2 | 3 | class SimpleBlocObserver extends BlocObserver { 4 | 5 | @override 6 | void onTransition(Bloc bloc, Transition transition) { 7 | super.onTransition(bloc, transition); 8 | print(transition); 9 | } 10 | 11 | @override 12 | void onError(Bloc bloc, Object error, StackTrace stackTrace) { 13 | super.onError(bloc, error, stackTrace); 14 | print(error); 15 | } 16 | } -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebaseauthproject/blocs/authentication_bloc/authentication_state.dart'; 2 | import 'package:firebaseauthproject/blocs/simple_bloc_observer.dart'; 3 | import 'package:firebaseauthproject/repositories/user_repository.dart'; 4 | import 'package:firebaseauthproject/screens/home_screen.dart'; 5 | import 'package:firebaseauthproject/screens/login/login_screen.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:flutter_bloc/flutter_bloc.dart'; 8 | 9 | import 'blocs/authentication_bloc/authentication_bloc.dart'; 10 | import 'blocs/authentication_bloc/authentication_event.dart'; 11 | 12 | void main() { 13 | Bloc.observer = SimpleBlocObserver(); 14 | final UserRepository userRepository = UserRepository(); 15 | runApp( 16 | BlocProvider( 17 | create: (context) => AuthenticationBloc( 18 | userRepository: userRepository, 19 | )..add(AuthenticationStarted()), 20 | child: MyApp( 21 | userRepository: userRepository, 22 | ), 23 | ), 24 | ); 25 | } 26 | 27 | class MyApp extends StatelessWidget { 28 | final UserRepository _userRepository; 29 | 30 | MyApp({UserRepository userRepository}) : _userRepository = userRepository; 31 | 32 | @override 33 | Widget build(BuildContext context) { 34 | return MaterialApp( 35 | debugShowCheckedModeBanner: false, 36 | title: 'Flutter Demo', 37 | theme: ThemeData( 38 | primaryColor: Color(0xff6a515e), 39 | cursorColor: Color(0xff6a515e), 40 | ), 41 | home: BlocBuilder( 42 | builder: (context, state) { 43 | if (state is AuthenticationFailure) { 44 | return LoginScreen(userRepository: _userRepository,); 45 | } 46 | 47 | if (state is AuthenticationSuccess) { 48 | return HomeScreen( 49 | user: state.firebaseUser, 50 | ); 51 | } 52 | 53 | return Scaffold( 54 | appBar: AppBar(), 55 | body: Container( 56 | child: Center(child: Text("Loading")), 57 | ), 58 | ); 59 | }, 60 | ), 61 | ); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /lib/repositories/user_repository.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_auth/firebase_auth.dart'; 2 | 3 | class UserRepository { 4 | final FirebaseAuth _firebaseAuth; 5 | 6 | UserRepository() 7 | : _firebaseAuth = FirebaseAuth.instance; 8 | 9 | Future signInWithCredentials(String email, String password) { 10 | return _firebaseAuth.signInWithEmailAndPassword( 11 | email: email, password: password); 12 | } 13 | 14 | Future signUp(String email, String password) async { 15 | return await _firebaseAuth.createUserWithEmailAndPassword( 16 | email: email, 17 | password: password, 18 | ); 19 | } 20 | 21 | Future signOut() async { 22 | return Future.wait([_firebaseAuth.signOut()]); 23 | } 24 | 25 | Future isSignedIn() async { 26 | final currentUser = await _firebaseAuth.currentUser(); 27 | return currentUser != null; 28 | } 29 | 30 | Future getUser() async { 31 | return await _firebaseAuth.currentUser(); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /lib/screens/home_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_auth/firebase_auth.dart'; 2 | import 'package:firebaseauthproject/blocs/authentication_bloc/authentication_bloc.dart'; 3 | import 'package:firebaseauthproject/blocs/authentication_bloc/authentication_event.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:flutter_bloc/flutter_bloc.dart'; 6 | 7 | class HomeScreen extends StatelessWidget { 8 | final FirebaseUser user; 9 | 10 | const HomeScreen({Key key, this.user}) : super(key: key); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return Scaffold( 15 | appBar: AppBar( 16 | title: Text('Home'), 17 | actions: [ 18 | IconButton( 19 | icon: Icon(Icons.exit_to_app), 20 | onPressed: () { 21 | BlocProvider.of(context) 22 | .add(AuthenticationLoggedOut()); 23 | }, 24 | ) 25 | ], 26 | ), 27 | body: Column( 28 | children: [ 29 | Center( 30 | child: Text("Hello, ${user.email}"), 31 | ), 32 | ], 33 | ), 34 | ); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /lib/screens/login/login_form.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebaseauthproject/blocs/authentication_bloc/authentication_bloc.dart'; 2 | import 'package:firebaseauthproject/blocs/authentication_bloc/authentication_event.dart'; 3 | import 'package:firebaseauthproject/blocs/login_bloc/login_bloc.dart'; 4 | import 'package:firebaseauthproject/blocs/login_bloc/login_event.dart'; 5 | import 'package:firebaseauthproject/blocs/login_bloc/login_state.dart'; 6 | import 'package:firebaseauthproject/repositories/user_repository.dart'; 7 | import 'package:firebaseauthproject/screens/register/register_screen.dart'; 8 | import 'package:firebaseauthproject/widgets/gradient_button.dart'; 9 | import 'package:flutter/material.dart'; 10 | import 'package:flutter_bloc/flutter_bloc.dart'; 11 | 12 | class LoginForm extends StatefulWidget { 13 | final UserRepository _userRepository; 14 | 15 | const LoginForm({Key key, UserRepository userRepository}) 16 | : _userRepository = userRepository, 17 | super(key: key); 18 | 19 | @override 20 | _LoginFormState createState() => _LoginFormState(); 21 | } 22 | 23 | class _LoginFormState extends State { 24 | final TextEditingController _emailController = TextEditingController(); 25 | final TextEditingController _passwordController = TextEditingController(); 26 | 27 | bool get isPopulated => 28 | _emailController.text.isNotEmpty && _passwordController.text.isNotEmpty; 29 | 30 | bool isButtonEnabled(LoginState state) { 31 | return state.isFormValid && isPopulated && !state.isSubmitting; 32 | } 33 | 34 | LoginBloc _loginBloc; 35 | 36 | @override 37 | void initState() { 38 | super.initState(); 39 | _loginBloc = BlocProvider.of(context); 40 | _emailController.addListener(_onEmailChange); 41 | _passwordController.addListener(_onPasswordChange); 42 | } 43 | 44 | @override 45 | Widget build(BuildContext context) { 46 | return BlocListener( 47 | listener: (context, state) { 48 | if (state.isFailure) { 49 | Scaffold.of(context) 50 | ..removeCurrentSnackBar() 51 | ..showSnackBar( 52 | SnackBar( 53 | content: Row( 54 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 55 | children: [ 56 | Text('Login Failure'), 57 | Icon(Icons.error), 58 | ], 59 | ), 60 | backgroundColor: Color(0xffffae88), 61 | ), 62 | ); 63 | } 64 | 65 | if (state.isSubmitting) { 66 | Scaffold.of(context) 67 | ..removeCurrentSnackBar() 68 | ..showSnackBar( 69 | SnackBar( 70 | content: Row( 71 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 72 | children: [ 73 | Text('Logging In...'), 74 | CircularProgressIndicator( 75 | valueColor: AlwaysStoppedAnimation(Colors.white), 76 | ) 77 | ], 78 | ), 79 | backgroundColor: Color(0xffffae88), 80 | ), 81 | ); 82 | } 83 | 84 | if (state.isSuccess) { 85 | BlocProvider.of(context).add( 86 | AuthenticationLoggedIn(), 87 | ); 88 | } 89 | }, 90 | child: BlocBuilder( 91 | builder: (context, state) { 92 | return Padding( 93 | padding: const EdgeInsets.all(20.0), 94 | child: Form( 95 | child: Column( 96 | children: [ 97 | TextFormField( 98 | controller: _emailController, 99 | decoration: InputDecoration( 100 | icon: Icon(Icons.email), 101 | labelText: "Email", 102 | ), 103 | keyboardType: TextInputType.emailAddress, 104 | autovalidate: true, 105 | autocorrect: false, 106 | validator: (_) { 107 | return !state.isEmailValid ? 'Invalid Email' : null; 108 | }, 109 | ), 110 | TextFormField( 111 | controller: _passwordController, 112 | decoration: InputDecoration( 113 | icon: Icon(Icons.lock), 114 | labelText: "Password", 115 | ), 116 | obscureText: true, 117 | autovalidate: true, 118 | autocorrect: false, 119 | validator: (_) { 120 | return !state.isPasswordValid ? 'Invalid Password' : null; 121 | }, 122 | ), 123 | SizedBox( 124 | height: 10, 125 | ), 126 | GradientButton( 127 | width: 150, 128 | height: 45, 129 | onPressed: () { 130 | if (isButtonEnabled(state)) { 131 | _onFormSubmitted(); 132 | } 133 | }, 134 | text: Text( 135 | 'LogIn', 136 | style: TextStyle( 137 | color: Colors.white, 138 | ), 139 | ), 140 | icon: Icon( 141 | Icons.check, 142 | color: Colors.white, 143 | ), 144 | ), 145 | SizedBox( 146 | height: 10, 147 | ), 148 | GradientButton( 149 | width: 150, 150 | height: 45, 151 | onPressed: () { 152 | Navigator.push(context, MaterialPageRoute(builder: (_) { 153 | return RegisterScreen(userRepository: widget._userRepository,); 154 | })); 155 | }, 156 | text: Text( 157 | 'Register', 158 | style: TextStyle( 159 | color: Colors.white, 160 | ), 161 | ), 162 | icon: Icon( 163 | Icons.arrow_forward, 164 | color: Colors.white, 165 | ), 166 | ), 167 | ], 168 | ), 169 | ), 170 | ); 171 | }, 172 | ), 173 | ); 174 | } 175 | 176 | @override 177 | void dispose() { 178 | _emailController.dispose(); 179 | _passwordController.dispose(); 180 | super.dispose(); 181 | } 182 | 183 | void _onEmailChange() { 184 | _loginBloc.add(LoginEmailChange(email: _emailController.text)); 185 | } 186 | 187 | void _onPasswordChange() { 188 | _loginBloc.add(LoginPasswordChanged(password: _passwordController.text)); 189 | } 190 | 191 | void _onFormSubmitted() { 192 | _loginBloc.add(LoginWithCredentialsPressed( 193 | email: _emailController.text, password: _passwordController.text)); 194 | } 195 | } 196 | -------------------------------------------------------------------------------- /lib/screens/login/login_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebaseauthproject/blocs/login_bloc/login_bloc.dart'; 2 | import 'package:firebaseauthproject/repositories/user_repository.dart'; 3 | import 'package:firebaseauthproject/screens/login/login_form.dart'; 4 | import 'package:firebaseauthproject/widgets/curved_widget.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:flutter_bloc/flutter_bloc.dart'; 7 | 8 | class LoginScreen extends StatelessWidget { 9 | final UserRepository _userRepository; 10 | 11 | const LoginScreen({Key key, UserRepository userRepository}) 12 | : _userRepository = userRepository, 13 | super(key: key); 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return Scaffold( 18 | extendBodyBehindAppBar: true, 19 | appBar: AppBar( 20 | elevation: 0, 21 | backgroundColor: Colors.transparent, 22 | ), 23 | body: BlocProvider( 24 | create: (context) => LoginBloc(userRepository: _userRepository), 25 | child: Container( 26 | height: double.infinity, 27 | decoration: BoxDecoration( 28 | gradient: LinearGradient( 29 | begin: Alignment.topCenter, 30 | end: Alignment.bottomCenter, 31 | colors: [Color(0xfff2cbd0), Color(0xfff4ced9)], 32 | )), 33 | child: SingleChildScrollView( 34 | child: Stack( 35 | children: [ 36 | CurvedWidget( 37 | child: Container( 38 | padding: const EdgeInsets.only(top: 100, left: 50), 39 | width: double.infinity, 40 | height: 300, 41 | decoration: BoxDecoration( 42 | gradient: LinearGradient( 43 | begin: Alignment.topCenter, 44 | end: Alignment.bottomCenter, 45 | colors: [Colors.white, Colors.white.withOpacity(0.4)], 46 | ), 47 | ), 48 | child: Text( 49 | 'Login', 50 | style: TextStyle( 51 | fontSize: 40, 52 | color: Color(0xff6a515e), 53 | ), 54 | ), 55 | ), 56 | ), 57 | Container( 58 | margin: const EdgeInsets.only(top: 230), 59 | child: LoginForm(userRepository: _userRepository,), 60 | ) 61 | ], 62 | ), 63 | ), 64 | ), 65 | ), 66 | ); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /lib/screens/register/register_form.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebaseauthproject/blocs/authentication_bloc/authentication_bloc.dart'; 2 | import 'package:firebaseauthproject/blocs/authentication_bloc/authentication_event.dart'; 3 | import 'package:firebaseauthproject/blocs/register_bloc/register_bloc.dart'; 4 | import 'package:firebaseauthproject/blocs/register_bloc/register_event.dart'; 5 | import 'package:firebaseauthproject/blocs/register_bloc/register_state.dart'; 6 | import 'package:firebaseauthproject/widgets/gradient_button.dart'; 7 | import 'package:flutter/material.dart'; 8 | import 'package:flutter_bloc/flutter_bloc.dart'; 9 | 10 | class RegisterForm extends StatefulWidget { 11 | @override 12 | _LoginFormState createState() => _LoginFormState(); 13 | } 14 | 15 | class _LoginFormState extends State { 16 | final TextEditingController _emailController = TextEditingController(); 17 | final TextEditingController _passwordController = TextEditingController(); 18 | 19 | bool get isPopulated => 20 | _emailController.text.isNotEmpty && _passwordController.text.isNotEmpty; 21 | 22 | bool isButtonEnabled(RegisterState state) { 23 | return state.isFormValid && isPopulated && !state.isSubmitting; 24 | } 25 | 26 | RegisterBloc _registerBloc; 27 | 28 | @override 29 | void initState() { 30 | super.initState(); 31 | _registerBloc = BlocProvider.of(context); 32 | _emailController.addListener(_onEmailChange); 33 | _passwordController.addListener(_onPasswordChange); 34 | } 35 | 36 | @override 37 | Widget build(BuildContext context) { 38 | return BlocListener( 39 | listener: (context, state) { 40 | if (state.isFailure) { 41 | Scaffold.of(context) 42 | ..removeCurrentSnackBar() 43 | ..showSnackBar( 44 | SnackBar( 45 | content: Row( 46 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 47 | children: [ 48 | Text('Register Failure'), 49 | Icon(Icons.error), 50 | ], 51 | ), 52 | backgroundColor: Color(0xffffae88), 53 | ), 54 | ); 55 | } 56 | 57 | if (state.isSubmitting) { 58 | Scaffold.of(context) 59 | ..removeCurrentSnackBar() 60 | ..showSnackBar( 61 | SnackBar( 62 | content: Row( 63 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 64 | children: [ 65 | Text('Registering...'), 66 | CircularProgressIndicator( 67 | valueColor: AlwaysStoppedAnimation(Colors.white), 68 | ) 69 | ], 70 | ), 71 | backgroundColor: Color(0xffffae88), 72 | ), 73 | ); 74 | } 75 | 76 | if (state.isSuccess) { 77 | BlocProvider.of(context).add( 78 | AuthenticationLoggedIn(), 79 | ); 80 | Navigator.pop(context); 81 | } 82 | }, 83 | child: BlocBuilder( 84 | builder: (context, state) { 85 | return Padding( 86 | padding: const EdgeInsets.all(20.0), 87 | child: Form( 88 | child: Column( 89 | children: [ 90 | TextFormField( 91 | controller: _emailController, 92 | decoration: InputDecoration( 93 | icon: Icon(Icons.email), 94 | labelText: "Email", 95 | ), 96 | keyboardType: TextInputType.emailAddress, 97 | autovalidate: true, 98 | autocorrect: false, 99 | validator: (_) { 100 | return !state.isEmailValid ? 'Invalid Email' : null; 101 | }, 102 | ), 103 | TextFormField( 104 | controller: _passwordController, 105 | decoration: InputDecoration( 106 | icon: Icon(Icons.lock), 107 | labelText: "Password", 108 | ), 109 | obscureText: true, 110 | autovalidate: true, 111 | autocorrect: false, 112 | validator: (_) { 113 | return !state.isPasswordValid ? 'Invalid Password' : null; 114 | }, 115 | ), 116 | SizedBox( 117 | height: 30, 118 | ), 119 | GradientButton( 120 | width: 150, 121 | height: 45, 122 | onPressed: () { 123 | if (isButtonEnabled(state)) { 124 | _onFormSubmitted(); 125 | } 126 | }, 127 | text: Text( 128 | 'Register', 129 | style: TextStyle( 130 | color: Colors.white, 131 | ), 132 | ), 133 | icon: Icon( 134 | Icons.check, 135 | color: Colors.white, 136 | ), 137 | ), 138 | SizedBox( 139 | height: 10, 140 | ), 141 | ], 142 | ), 143 | ), 144 | ); 145 | }, 146 | ), 147 | ); 148 | } 149 | 150 | void _onEmailChange() { 151 | _registerBloc.add(RegisterEmailChanged(email: _emailController.text)); 152 | } 153 | 154 | void _onPasswordChange() { 155 | _registerBloc 156 | .add(RegisterPasswordChanged(password: _passwordController.text)); 157 | } 158 | 159 | void _onFormSubmitted() { 160 | _registerBloc.add(RegisterSubmitted( 161 | email: _emailController.text, password: _passwordController.text)); 162 | } 163 | } 164 | -------------------------------------------------------------------------------- /lib/screens/register/register_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebaseauthproject/blocs/register_bloc/register_bloc.dart'; 2 | import 'package:firebaseauthproject/repositories/user_repository.dart'; 3 | import 'package:firebaseauthproject/screens/register/register_form.dart'; 4 | import 'package:firebaseauthproject/widgets/curved_widget.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:flutter_bloc/flutter_bloc.dart'; 7 | 8 | class RegisterScreen extends StatelessWidget { 9 | final UserRepository _userRepository; 10 | 11 | const RegisterScreen({Key key, UserRepository userRepository}) 12 | : _userRepository = userRepository, 13 | super(key: key); 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return Scaffold( 18 | extendBodyBehindAppBar: true, 19 | appBar: AppBar( 20 | elevation: 0, 21 | backgroundColor: Colors.transparent, 22 | iconTheme: IconThemeData( 23 | color: Color(0xff6a515e), 24 | ), 25 | ), 26 | body: BlocProvider( 27 | create: (context) => RegisterBloc(userRepository: _userRepository), 28 | child: Container( 29 | height: double.infinity, 30 | decoration: BoxDecoration( 31 | gradient: LinearGradient( 32 | begin: Alignment.topCenter, 33 | end: Alignment.bottomCenter, 34 | colors: [Color(0xfff2cbd0), Color(0xfff4ced9)], 35 | ), 36 | ), 37 | child: SingleChildScrollView( 38 | child: Stack( 39 | children: [ 40 | CurvedWidget( 41 | child: Container( 42 | padding: const EdgeInsets.only(top: 100, left: 50), 43 | width: double.infinity, 44 | height: 300, 45 | decoration: BoxDecoration( 46 | gradient: LinearGradient( 47 | begin: Alignment.topCenter, 48 | end: Alignment.bottomCenter, 49 | colors: [Colors.white, Colors.white.withOpacity(0.4)], 50 | ), 51 | ), 52 | child: Text( 53 | 'Register', 54 | style: TextStyle( 55 | fontSize: 40, 56 | color: Color(0xff6a515e), 57 | ), 58 | ), 59 | ), 60 | ), 61 | Container( 62 | margin: const EdgeInsets.only(top: 230), 63 | child: RegisterForm(), 64 | ) 65 | ], 66 | ), 67 | ), 68 | ), 69 | ), 70 | ); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /lib/utils/validators.dart: -------------------------------------------------------------------------------- 1 | class Validators { 2 | static final RegExp _emailRegExp = RegExp( 3 | r'^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$', 4 | ); 5 | static final RegExp _passwordRegExp = RegExp( 6 | r'^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$', 7 | ); 8 | 9 | static isValidEmail(String email) { 10 | return _emailRegExp.hasMatch(email); 11 | } 12 | 13 | static isValidPassword(String password) { 14 | return _passwordRegExp.hasMatch(password); 15 | } 16 | } -------------------------------------------------------------------------------- /lib/widgets/curved_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CurvedWidget extends StatelessWidget { 4 | final Widget child; 5 | final double curvedDistance; 6 | final double curvedHeight; 7 | 8 | const CurvedWidget( 9 | {Key key, this.curvedDistance = 80, this.curvedHeight = 80, this.child}) 10 | : super(key: key); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return ClipPath( 15 | clipper: CurvedWidgetBackgroundClipper( 16 | curvedDistance: curvedDistance, 17 | curvedHeight: curvedHeight, 18 | ), 19 | child: child, 20 | ); 21 | } 22 | } 23 | 24 | class CurvedWidgetBackgroundClipper extends CustomClipper { 25 | final double curvedDistance; 26 | final double curvedHeight; 27 | 28 | CurvedWidgetBackgroundClipper({this.curvedDistance, this.curvedHeight}); 29 | 30 | @override 31 | getClip(Size size) { 32 | Path clippedPath = Path(); 33 | clippedPath.lineTo(size.width, 0); 34 | clippedPath.lineTo(size.width, size.height - curvedDistance - curvedHeight); 35 | clippedPath.quadraticBezierTo(size.width, size.height - curvedHeight, 36 | size.width - curvedDistance, size.height - curvedHeight); 37 | clippedPath.lineTo(curvedDistance, size.height - curvedHeight); 38 | clippedPath.quadraticBezierTo( 39 | 0, size.height - curvedHeight, 0, size.height); 40 | clippedPath.lineTo(0, 0); 41 | return clippedPath; 42 | } 43 | 44 | @override 45 | bool shouldReclip(CustomClipper oldClipper) { 46 | return false; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /lib/widgets/gradient_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class GradientButton extends StatelessWidget { 4 | final double width; 5 | final double height; 6 | final Function onPressed; 7 | final Text text; 8 | final Icon icon; 9 | 10 | const GradientButton( 11 | {Key key, this.width, this.height, this.onPressed, this.text, this.icon}) 12 | : super(key: key); 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return Container( 17 | width: this.width, 18 | height: this.height, 19 | decoration: BoxDecoration( 20 | borderRadius: BorderRadius.circular(80), 21 | gradient: LinearGradient( 22 | begin: Alignment.centerLeft, 23 | end: Alignment.centerRight, 24 | colors: [Color(0xffffae88), Color(0xff8f93ea)], 25 | ), 26 | ), 27 | child: MaterialButton( 28 | onPressed: this.onPressed, 29 | materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, 30 | shape: StadiumBorder(), 31 | child: Padding( 32 | padding: const EdgeInsets.all(8.0), 33 | child: Row( 34 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 35 | children: [ 36 | text, 37 | icon, 38 | ], 39 | ), 40 | )), 41 | ); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | archive: 5 | dependency: transitive 6 | description: 7 | name: archive 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.0.13" 11 | args: 12 | dependency: transitive 13 | description: 14 | name: args 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "1.6.0" 18 | async: 19 | dependency: transitive 20 | description: 21 | name: async 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.4.1" 25 | bloc: 26 | dependency: transitive 27 | description: 28 | name: bloc 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "5.0.1" 32 | boolean_selector: 33 | dependency: transitive 34 | description: 35 | name: boolean_selector 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "2.0.0" 39 | charcode: 40 | dependency: transitive 41 | description: 42 | name: charcode 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.1.3" 46 | collection: 47 | dependency: transitive 48 | description: 49 | name: collection 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.14.12" 53 | convert: 54 | dependency: transitive 55 | description: 56 | name: convert 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "2.1.1" 60 | crypto: 61 | dependency: transitive 62 | description: 63 | name: crypto 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "2.1.4" 67 | cubit: 68 | dependency: transitive 69 | description: 70 | name: cubit 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "0.1.2" 74 | cupertino_icons: 75 | dependency: "direct main" 76 | description: 77 | name: cupertino_icons 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "0.1.3" 81 | equatable: 82 | dependency: "direct main" 83 | description: 84 | name: equatable 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "1.2.2" 88 | firebase: 89 | dependency: transitive 90 | description: 91 | name: firebase 92 | url: "https://pub.dartlang.org" 93 | source: hosted 94 | version: "7.3.0" 95 | firebase_auth: 96 | dependency: "direct main" 97 | description: 98 | name: firebase_auth 99 | url: "https://pub.dartlang.org" 100 | source: hosted 101 | version: "0.16.1" 102 | firebase_auth_platform_interface: 103 | dependency: transitive 104 | description: 105 | name: firebase_auth_platform_interface 106 | url: "https://pub.dartlang.org" 107 | source: hosted 108 | version: "1.1.8" 109 | firebase_auth_web: 110 | dependency: transitive 111 | description: 112 | name: firebase_auth_web 113 | url: "https://pub.dartlang.org" 114 | source: hosted 115 | version: "0.1.3+1" 116 | firebase_core: 117 | dependency: transitive 118 | description: 119 | name: firebase_core 120 | url: "https://pub.dartlang.org" 121 | source: hosted 122 | version: "0.4.5" 123 | firebase_core_platform_interface: 124 | dependency: transitive 125 | description: 126 | name: firebase_core_platform_interface 127 | url: "https://pub.dartlang.org" 128 | source: hosted 129 | version: "1.0.4" 130 | firebase_core_web: 131 | dependency: transitive 132 | description: 133 | name: firebase_core_web 134 | url: "https://pub.dartlang.org" 135 | source: hosted 136 | version: "0.1.1+2" 137 | flutter: 138 | dependency: "direct main" 139 | description: flutter 140 | source: sdk 141 | version: "0.0.0" 142 | flutter_bloc: 143 | dependency: "direct main" 144 | description: 145 | name: flutter_bloc 146 | url: "https://pub.dartlang.org" 147 | source: hosted 148 | version: "5.0.1" 149 | flutter_cubit: 150 | dependency: transitive 151 | description: 152 | name: flutter_cubit 153 | url: "https://pub.dartlang.org" 154 | source: hosted 155 | version: "0.1.1" 156 | flutter_test: 157 | dependency: "direct dev" 158 | description: flutter 159 | source: sdk 160 | version: "0.0.0" 161 | flutter_web_plugins: 162 | dependency: transitive 163 | description: flutter 164 | source: sdk 165 | version: "0.0.0" 166 | http: 167 | dependency: transitive 168 | description: 169 | name: http 170 | url: "https://pub.dartlang.org" 171 | source: hosted 172 | version: "0.12.1" 173 | http_parser: 174 | dependency: transitive 175 | description: 176 | name: http_parser 177 | url: "https://pub.dartlang.org" 178 | source: hosted 179 | version: "3.1.4" 180 | image: 181 | dependency: transitive 182 | description: 183 | name: image 184 | url: "https://pub.dartlang.org" 185 | source: hosted 186 | version: "2.1.12" 187 | js: 188 | dependency: transitive 189 | description: 190 | name: js 191 | url: "https://pub.dartlang.org" 192 | source: hosted 193 | version: "0.6.2" 194 | matcher: 195 | dependency: transitive 196 | description: 197 | name: matcher 198 | url: "https://pub.dartlang.org" 199 | source: hosted 200 | version: "0.12.6" 201 | meta: 202 | dependency: transitive 203 | description: 204 | name: meta 205 | url: "https://pub.dartlang.org" 206 | source: hosted 207 | version: "1.1.8" 208 | nested: 209 | dependency: transitive 210 | description: 211 | name: nested 212 | url: "https://pub.dartlang.org" 213 | source: hosted 214 | version: "0.0.4" 215 | path: 216 | dependency: transitive 217 | description: 218 | name: path 219 | url: "https://pub.dartlang.org" 220 | source: hosted 221 | version: "1.6.4" 222 | pedantic: 223 | dependency: transitive 224 | description: 225 | name: pedantic 226 | url: "https://pub.dartlang.org" 227 | source: hosted 228 | version: "1.9.0" 229 | petitparser: 230 | dependency: transitive 231 | description: 232 | name: petitparser 233 | url: "https://pub.dartlang.org" 234 | source: hosted 235 | version: "2.4.0" 236 | plugin_platform_interface: 237 | dependency: transitive 238 | description: 239 | name: plugin_platform_interface 240 | url: "https://pub.dartlang.org" 241 | source: hosted 242 | version: "1.0.2" 243 | provider: 244 | dependency: transitive 245 | description: 246 | name: provider 247 | url: "https://pub.dartlang.org" 248 | source: hosted 249 | version: "4.3.1" 250 | quiver: 251 | dependency: transitive 252 | description: 253 | name: quiver 254 | url: "https://pub.dartlang.org" 255 | source: hosted 256 | version: "2.1.3" 257 | sky_engine: 258 | dependency: transitive 259 | description: flutter 260 | source: sdk 261 | version: "0.0.99" 262 | source_span: 263 | dependency: transitive 264 | description: 265 | name: source_span 266 | url: "https://pub.dartlang.org" 267 | source: hosted 268 | version: "1.7.0" 269 | stack_trace: 270 | dependency: transitive 271 | description: 272 | name: stack_trace 273 | url: "https://pub.dartlang.org" 274 | source: hosted 275 | version: "1.9.3" 276 | stream_channel: 277 | dependency: transitive 278 | description: 279 | name: stream_channel 280 | url: "https://pub.dartlang.org" 281 | source: hosted 282 | version: "2.0.0" 283 | string_scanner: 284 | dependency: transitive 285 | description: 286 | name: string_scanner 287 | url: "https://pub.dartlang.org" 288 | source: hosted 289 | version: "1.0.5" 290 | term_glyph: 291 | dependency: transitive 292 | description: 293 | name: term_glyph 294 | url: "https://pub.dartlang.org" 295 | source: hosted 296 | version: "1.1.0" 297 | test_api: 298 | dependency: transitive 299 | description: 300 | name: test_api 301 | url: "https://pub.dartlang.org" 302 | source: hosted 303 | version: "0.2.15" 304 | typed_data: 305 | dependency: transitive 306 | description: 307 | name: typed_data 308 | url: "https://pub.dartlang.org" 309 | source: hosted 310 | version: "1.1.6" 311 | vector_math: 312 | dependency: transitive 313 | description: 314 | name: vector_math 315 | url: "https://pub.dartlang.org" 316 | source: hosted 317 | version: "2.0.8" 318 | xml: 319 | dependency: transitive 320 | description: 321 | name: xml 322 | url: "https://pub.dartlang.org" 323 | source: hosted 324 | version: "3.6.1" 325 | sdks: 326 | dart: ">=2.7.0 <3.0.0" 327 | flutter: ">=1.16.0 <2.0.0" 328 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: firebaseauthproject 2 | description: A new Flutter application. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 1.0.0+1 19 | 20 | environment: 21 | sdk: ">=2.7.0 <3.0.0" 22 | 23 | dependencies: 24 | flutter: 25 | sdk: flutter 26 | 27 | 28 | # The following adds the Cupertino Icons font to your application. 29 | # Use with the CupertinoIcons class for iOS style icons. 30 | cupertino_icons: ^0.1.3 31 | firebase_auth: ^0.16.1 32 | flutter_bloc: ^5.0.1 33 | equatable: ^1.2.2 34 | 35 | dev_dependencies: 36 | flutter_test: 37 | sdk: flutter 38 | 39 | # For information on the generic Dart part of this file, see the 40 | # following page: https://dart.dev/tools/pub/pubspec 41 | 42 | # The following section is specific to Flutter. 43 | flutter: 44 | 45 | # The following line ensures that the Material Icons font is 46 | # included with your application, so that you can use the icons in 47 | # the material Icons class. 48 | uses-material-design: true 49 | 50 | # To add assets to your application, add an assets section, like this: 51 | # assets: 52 | # - images/a_dot_burr.jpeg 53 | # - images/a_dot_ham.jpeg 54 | 55 | # An image asset can refer to one or more resolution-specific "variants", see 56 | # https://flutter.dev/assets-and-images/#resolution-aware. 57 | 58 | # For details regarding adding assets from package dependencies, see 59 | # https://flutter.dev/assets-and-images/#from-packages 60 | 61 | # To add custom fonts to your application, add a fonts section here, 62 | # in this "flutter" section. Each entry in this list should have a 63 | # "family" key with the font family name, and a "fonts" key with a 64 | # list giving the asset and other descriptors for the font. For 65 | # example: 66 | # fonts: 67 | # - family: Schyler 68 | # fonts: 69 | # - asset: fonts/Schyler-Regular.ttf 70 | # - asset: fonts/Schyler-Italic.ttf 71 | # style: italic 72 | # - family: Trajan Pro 73 | # fonts: 74 | # - asset: fonts/TrajanPro.ttf 75 | # - asset: fonts/TrajanPro_Bold.ttf 76 | # weight: 700 77 | # 78 | # For details regarding fonts from package dependencies, 79 | # see https://flutter.dev/custom-fonts/#from-packages 80 | -------------------------------------------------------------------------------- /readme/youtube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puzzleleaf/FlutterFirebaseAuthWithBloc/98ac438833636d84a15efae04361b13675d95766/readme/youtube.png -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:firebaseauthproject/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | --------------------------------------------------------------------------------