├── README.md
├── firebase_auths
├── .gitignore
├── .metadata
├── README.md
├── android
│ ├── .gitignore
│ ├── app
│ │ ├── build.gradle
│ │ ├── google-services.json
│ │ └── src
│ │ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── kotlin
│ │ │ │ └── com
│ │ │ │ │ └── example
│ │ │ │ │ └── firebase_auths
│ │ │ │ │ └── MainActivity.kt
│ │ │ └── res
│ │ │ │ ├── drawable-v21
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── drawable
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── values-night
│ │ │ │ └── styles.xml
│ │ │ │ └── values
│ │ │ │ └── styles.xml
│ │ │ └── profile
│ │ │ └── AndroidManifest.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ └── settings.gradle
├── assets
│ ├── fonts
│ │ ├── Lato-Bold.ttf
│ │ └── Lato-Regular.ttf
│ └── images
│ │ ├── google.png
│ │ └── login.png
├── ios
│ ├── .gitignore
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ └── Release.xcconfig
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ │ └── WorkspaceSettings.xcsettings
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── Runner
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ └── Icon-App-83.5x83.5@2x.png
│ │ └── LaunchImage.imageset
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ └── README.md
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── Runner-Bridging-Header.h
├── lib
│ ├── controller
│ │ └── auth
│ │ │ └── auth.dart
│ ├── main.dart
│ └── pages
│ │ ├── auth
│ │ ├── login.dart
│ │ ├── reset_password.dart
│ │ └── signup.dart
│ │ ├── profile
│ │ └── profile.dart
│ │ └── widgets
│ │ └── showAlert.dart
├── pubspec.lock
├── pubspec.yaml
├── test
│ └── widget_test.dart
└── web
│ ├── favicon.png
│ ├── icons
│ ├── Icon-192.png
│ └── Icon-512.png
│ ├── index.html
│ └── manifest.json
└── mynotes
├── .gitignore
├── .metadata
├── README.md
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ ├── google-services.json
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── mynotes
│ │ │ │ └── MainActivity.kt
│ │ └── res
│ │ │ ├── drawable-v21
│ │ │ └── launch_background.xml
│ │ │ ├── drawable
│ │ │ └── launch_background.xml
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── values-night
│ │ │ └── styles.xml
│ │ │ └── values
│ │ │ └── styles.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
└── settings.gradle
├── assets
├── fonts
│ ├── Lato-Bold.ttf
│ └── Lato-Regular.ttf
└── images
│ ├── cover.png
│ └── google.png
├── ios
├── .gitignore
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── WorkspaceSettings.xcsettings
└── Runner
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── Icon-App-1024x1024@1x.png
│ │ ├── Icon-App-20x20@1x.png
│ │ ├── Icon-App-20x20@2x.png
│ │ ├── Icon-App-20x20@3x.png
│ │ ├── Icon-App-29x29@1x.png
│ │ ├── Icon-App-29x29@2x.png
│ │ ├── Icon-App-29x29@3x.png
│ │ ├── Icon-App-40x40@1x.png
│ │ ├── Icon-App-40x40@2x.png
│ │ ├── Icon-App-40x40@3x.png
│ │ ├── Icon-App-60x60@2x.png
│ │ ├── Icon-App-60x60@3x.png
│ │ ├── Icon-App-76x76@1x.png
│ │ ├── Icon-App-76x76@2x.png
│ │ └── Icon-App-83.5x83.5@2x.png
│ └── LaunchImage.imageset
│ │ ├── Contents.json
│ │ ├── LaunchImage.png
│ │ ├── LaunchImage@2x.png
│ │ ├── LaunchImage@3x.png
│ │ └── README.md
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── Runner-Bridging-Header.h
├── lib
├── controller
│ └── google_auth.dart
├── main.dart
└── pages
│ ├── addnote.dart
│ ├── homepage.dart
│ ├── login.dart
│ └── viewnote.dart
├── pubspec.lock
├── pubspec.yaml
├── screenshots
├── Screenshot_1621499653_pixel_quite_black_portrait.png
├── Screenshot_1621499695_pixel_quite_black_portrait.png
├── Screenshot_1621499698_pixel_quite_black_portrait.png
└── Screenshot_1621499702_pixel_quite_black_portrait.png
├── test
└── widget_test.dart
└── web
├── favicon.png
├── icons
├── Icon-192.png
└── Icon-512.png
├── index.html
└── manifest.json
/README.md:
--------------------------------------------------------------------------------
1 | # Firebase Auths is Still Going
2 | # Notes App Is Done ( Will Refractor Soon)
--------------------------------------------------------------------------------
/firebase_auths/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | **/ios/Flutter/.last_build_id
26 | .dart_tool/
27 | .flutter-plugins
28 | .flutter-plugins-dependencies
29 | .packages
30 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Web related
35 | lib/generated_plugin_registrant.dart
36 |
37 | # Symbolication related
38 | app.*.symbols
39 |
40 | # Obfuscation related
41 | app.*.map.json
42 |
43 | # Android Studio will place build artifacts here
44 | /android/app/debug
45 | /android/app/profile
46 | /android/app/release
47 |
--------------------------------------------------------------------------------
/firebase_auths/.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: c5a4b4029c0798f37c4a39b479d7cb75daa7b05c
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/firebase_auths/README.md:
--------------------------------------------------------------------------------
1 | # firebase_auths
2 |
3 | https://console.firebase.google.com/u/8/project/learning-7cf41/authentication/users
4 |
5 | 1. Anon Authentication
6 |
--------------------------------------------------------------------------------
/firebase_auths/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 |
--------------------------------------------------------------------------------
/firebase_auths/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 plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 | apply plugin: 'com.google.gms.google-services'
28 |
29 | android {
30 | compileSdkVersion 30
31 |
32 | sourceSets {
33 | main.java.srcDirs += 'src/main/kotlin'
34 | }
35 |
36 | defaultConfig {
37 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
38 | applicationId "com.example.firebase_auths"
39 | minSdkVersion 23
40 | targetSdkVersion 30
41 | versionCode flutterVersionCode.toInteger()
42 | versionName flutterVersionName
43 | }
44 |
45 | buildTypes {
46 | release {
47 | // TODO: Add your own signing config for the release build.
48 | // Signing with the debug keys for now, so `flutter run --release` works.
49 | signingConfig signingConfigs.debug
50 | }
51 | }
52 | }
53 |
54 | flutter {
55 | source '../..'
56 | }
57 |
58 | dependencies {
59 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
60 | implementation platform('com.google.firebase:firebase-bom:26.8.0')
61 | }
62 |
--------------------------------------------------------------------------------
/firebase_auths/android/app/google-services.json:
--------------------------------------------------------------------------------
1 | {
2 | "project_info": {
3 | "project_number": "69557924181",
4 | "project_id": "learning-7cf41",
5 | "storage_bucket": "learning-7cf41.appspot.com"
6 | },
7 | "client": [
8 | {
9 | "client_info": {
10 | "mobilesdk_app_id": "1:69557924181:android:0e11ff92bd4801deb37fdc",
11 | "android_client_info": {
12 | "package_name": "com.example.firebase_auths"
13 | }
14 | },
15 | "oauth_client": [
16 | {
17 | "client_id": "69557924181-b8pcjgdd4s9f9ahv8qmaj5milfr7e8f9.apps.googleusercontent.com",
18 | "client_type": 3
19 | }
20 | ],
21 | "api_key": [
22 | {
23 | "current_key": "AIzaSyAf98Ykoa2xHBaonLH0Ol-SC4Upn8qcosg"
24 | }
25 | ],
26 | "services": {
27 | "appinvite_service": {
28 | "other_platform_oauth_client": [
29 | {
30 | "client_id": "69557924181-b8pcjgdd4s9f9ahv8qmaj5milfr7e8f9.apps.googleusercontent.com",
31 | "client_type": 3
32 | }
33 | ]
34 | }
35 | }
36 | }
37 | ],
38 | "configuration_version": "1"
39 | }
--------------------------------------------------------------------------------
/firebase_auths/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/firebase_auths/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
13 |
17 |
21 |
26 |
30 |
31 |
32 |
33 |
34 |
35 |
37 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/firebase_auths/android/app/src/main/kotlin/com/example/firebase_auths/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.firebase_auths
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/firebase_auths/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/firebase_auths/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/firebase_auths/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/firebase_auths/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/firebase_auths/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/firebase_auths/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/firebase_auths/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/firebase_auths/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/firebase_auths/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/firebase_auths/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/firebase_auths/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/firebase_auths/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/firebase_auths/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/firebase_auths/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/firebase_auths/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/firebase_auths/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.3.50'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:4.1.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | classpath 'com.google.gms:google-services:4.3.5'
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | google()
18 | jcenter()
19 | }
20 | }
21 |
22 | rootProject.buildDir = '../build'
23 | subprojects {
24 | project.buildDir = "${rootProject.buildDir}/${project.name}"
25 | }
26 | subprojects {
27 | project.evaluationDependsOn(':app')
28 | }
29 |
30 | task clean(type: Delete) {
31 | delete rootProject.buildDir
32 | }
33 |
--------------------------------------------------------------------------------
/firebase_auths/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/firebase_auths/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-6.7-all.zip
7 |
--------------------------------------------------------------------------------
/firebase_auths/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4 | def properties = new Properties()
5 |
6 | assert localPropertiesFile.exists()
7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
8 |
9 | def flutterSdkPath = properties.getProperty("flutter.sdk")
10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12 |
--------------------------------------------------------------------------------
/firebase_auths/assets/fonts/Lato-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/firebase_auths/assets/fonts/Lato-Bold.ttf
--------------------------------------------------------------------------------
/firebase_auths/assets/fonts/Lato-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/firebase_auths/assets/fonts/Lato-Regular.ttf
--------------------------------------------------------------------------------
/firebase_auths/assets/images/google.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/firebase_auths/assets/images/google.png
--------------------------------------------------------------------------------
/firebase_auths/assets/images/login.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/firebase_auths/assets/images/login.png
--------------------------------------------------------------------------------
/firebase_auths/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 |
--------------------------------------------------------------------------------
/firebase_auths/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/firebase_auths/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/firebase_auths/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/firebase_auths/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/firebase_auths/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/firebase_auths/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/firebase_auths/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 |
--------------------------------------------------------------------------------
/firebase_auths/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/firebase_auths/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/firebase_auths/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/firebase_auths/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/firebase_auths/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 |
--------------------------------------------------------------------------------
/firebase_auths/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/firebase_auths/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/firebase_auths/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/firebase_auths/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/firebase_auths/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/firebase_auths/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/firebase_auths/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/firebase_auths/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/firebase_auths/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/firebase_auths/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/firebase_auths/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/firebase_auths/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/firebase_auths/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/firebase_auths/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/firebase_auths/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/firebase_auths/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/firebase_auths/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/firebase_auths/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/firebase_auths/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/firebase_auths/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/firebase_auths/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/firebase_auths/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/firebase_auths/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/firebase_auths/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/firebase_auths/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/firebase_auths/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/firebase_auths/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/firebase_auths/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/firebase_auths/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/firebase_auths/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/firebase_auths/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 |
--------------------------------------------------------------------------------
/firebase_auths/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/firebase_auths/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/firebase_auths/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/firebase_auths/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/firebase_auths/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/firebase_auths/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/firebase_auths/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.
--------------------------------------------------------------------------------
/firebase_auths/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 |
--------------------------------------------------------------------------------
/firebase_auths/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 |
--------------------------------------------------------------------------------
/firebase_auths/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 | firebase_auths
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 |
--------------------------------------------------------------------------------
/firebase_auths/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/firebase_auths/lib/controller/auth/auth.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_auth/firebase_auth.dart';
2 | import 'package:firebase_auths/pages/auth/login.dart';
3 | import 'package:firebase_auths/pages/profile/profile.dart';
4 | import 'package:firebase_auths/pages/widgets/showAlert.dart';
5 | import 'package:flutter/cupertino.dart';
6 | import 'package:flutter/material.dart';
7 |
8 | FirebaseAuth firebaseAuth = FirebaseAuth.instance;
9 |
10 | void anonymousSignIn(BuildContext context) async {
11 | try {
12 | UserCredential cred = await firebaseAuth.signInAnonymously();
13 | print(cred);
14 |
15 | if (FirebaseAuth.instance.currentUser.uid != null) {
16 | Navigator.of(context).push(
17 | MaterialPageRoute(
18 | builder: (context) => ProfilePage(),
19 | ),
20 | );
21 | }
22 | } on FirebaseAuthException catch (e) {
23 | print(e);
24 | }
25 | }
26 |
27 | void signUpUserWithEmail(
28 | String email, String password, BuildContext context) async {
29 | try {
30 | UserCredential credential = await firebaseAuth
31 | .createUserWithEmailAndPassword(email: email, password: password);
32 |
33 | print(credential);
34 |
35 | Navigator.of(context).push(
36 | MaterialPageRoute(
37 | builder: (context) => ProfilePage(),
38 | ),
39 | );
40 | } on FirebaseAuthException catch (e) {
41 | // print(e);
42 | // print(e.code);
43 | // print(e.message);
44 |
45 | switch (e.code) {
46 | case 'email-already-in-use':
47 | showCustomAlert(context, "ERROR", e.message);
48 | break;
49 | case 'weak-password':
50 | showCustomAlert(context, "ERROR", e.message);
51 | break;
52 | default:
53 | showCustomAlert(context, "ERROR", "Unexpected Error has Occured.");
54 | break;
55 | }
56 | }
57 | }
58 |
59 | void signInUserWithEmail(
60 | String email, String password, BuildContext context) async {
61 | try {
62 | UserCredential credential = await firebaseAuth.signInWithEmailAndPassword(
63 | email: email, password: password);
64 |
65 | print(credential);
66 |
67 | Navigator.of(context).push(
68 | MaterialPageRoute(
69 | builder: (context) => ProfilePage(),
70 | ),
71 | );
72 | } on FirebaseAuthException catch (e) {
73 | // print(e);
74 | // print(e.code);
75 | // print(e.message);
76 |
77 | switch (e.code) {
78 | case 'user-not-found':
79 | showCustomAlert(context, "ERROR", e.message);
80 | break;
81 | case 'wrong-password':
82 | showCustomAlert(context, "ERROR", e.message);
83 | break;
84 | default:
85 | showCustomAlert(context, "ERROR", "Unexpected Error has Occured.");
86 | break;
87 | }
88 | }
89 | }
90 |
91 | void userLogout(BuildContext context) async {
92 | firebaseAuth.signOut();
93 |
94 | //
95 | Navigator.of(context).pushAndRemoveUntil(
96 | MaterialPageRoute(
97 | builder: (context) => LoginPage(),
98 | ),
99 | (route) => false);
100 | }
101 |
--------------------------------------------------------------------------------
/firebase_auths/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_auth/firebase_auth.dart';
2 | import 'package:firebase_auths/pages/auth/login.dart';
3 | import 'package:firebase_auths/pages/profile/profile.dart';
4 | import 'package:flutter/material.dart';
5 | import 'package:firebase_core/firebase_core.dart';
6 |
7 | void main() async {
8 | WidgetsFlutterBinding.ensureInitialized();
9 | await Firebase.initializeApp();
10 | runApp(MyApp());
11 | }
12 |
13 | class MyApp extends StatelessWidget {
14 | // This widget is the root of your application.
15 | @override
16 | Widget build(BuildContext context) {
17 | return MaterialApp(
18 | title: 'Authentications',
19 | theme: ThemeData(
20 | primarySwatch: Colors.indigo,
21 | fontFamily: "lato",
22 | ),
23 | home: FirebaseAuth.instance.currentUser == null
24 | ? LoginPage()
25 | : ProfilePage(),
26 | );
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/firebase_auths/lib/pages/auth/login.dart:
--------------------------------------------------------------------------------
1 | import 'package:country_picker/country_picker.dart';
2 | import 'package:firebase_auths/controller/auth/auth.dart';
3 | import 'package:firebase_auths/pages/auth/reset_password.dart';
4 | import 'package:firebase_auths/pages/auth/signup.dart';
5 | import 'package:flutter/material.dart';
6 | import 'package:flutter/services.dart';
7 |
8 | class LoginPage extends StatefulWidget {
9 | @override
10 | _LoginPageState createState() => _LoginPageState();
11 | }
12 |
13 | class _LoginPageState extends State {
14 | bool phoneLogin = true;
15 | String countryCode = "+91";
16 |
17 | String email;
18 | String password;
19 | String phoneNumber;
20 |
21 | bool passwordVisible = true;
22 |
23 | GlobalKey emailFormKey = GlobalKey();
24 |
25 | @override
26 | Widget build(BuildContext context) {
27 | return Scaffold(
28 | appBar: AppBar(
29 | title: Text(
30 | "Desi Programmer",
31 | ),
32 | ),
33 | //
34 | body: SingleChildScrollView(
35 | child: Container(
36 | padding: EdgeInsets.symmetric(
37 | horizontal: 12.0,
38 | ),
39 | child: Column(
40 | children: [
41 | //
42 | Image.asset(
43 | "assets/images/login.png",
44 | height: 180.0,
45 | ),
46 | //
47 | SizedBox(
48 | height: 12.0,
49 | ),
50 | //
51 | Text(
52 | "Continue to Your Account",
53 | style: TextStyle(
54 | fontSize: 32.0,
55 | fontFamily: "lato",
56 | fontWeight: FontWeight.w800,
57 | ),
58 | ),
59 | //
60 | SizedBox(
61 | height: 12.0,
62 | ),
63 | // input boxes
64 | phoneForm(),
65 | //
66 | emailForm(),
67 | //
68 | SizedBox(
69 | height: 12.0,
70 | ),
71 | //
72 | ElevatedButton(
73 | onPressed: () {
74 | // display email login form
75 | if (phoneLogin) {
76 | setState(() {
77 | phoneLogin = !phoneLogin;
78 | });
79 | } else {
80 | // email form is visible
81 | // validate values
82 | if (emailFormKey.currentState.validate()) {
83 | emailFormKey.currentState.save();
84 |
85 | // call login
86 | signInUserWithEmail(email, password, context);
87 | }
88 | }
89 | },
90 | child: Row(
91 | children: [
92 | Icon(
93 | Icons.email,
94 | ),
95 | SizedBox(
96 | width: 10.0,
97 | ),
98 | Text(
99 | " ${phoneLogin ? "Use Email Instead" : "Login with Email"}"),
100 | ],
101 | ),
102 | style: ButtonStyle(
103 | padding: MaterialStateProperty.all(
104 | EdgeInsets.symmetric(
105 | vertical: 12.0,
106 | horizontal: 20.0,
107 | ),
108 | //
109 | ),
110 | textStyle: MaterialStateProperty.all(
111 | TextStyle(
112 | fontSize: 18.0,
113 | ),
114 | ),
115 | shape: MaterialStateProperty.all(
116 | RoundedRectangleBorder(
117 | borderRadius: BorderRadius.circular(
118 | 8.0,
119 | ),
120 | ),
121 | ),
122 | ),
123 | ),
124 | //
125 | SizedBox(
126 | height: 12.0,
127 | ),
128 | //
129 | // phone number login
130 | ElevatedButton(
131 | onPressed: () {
132 | if (!phoneLogin) {
133 | setState(() {
134 | phoneLogin = !phoneLogin;
135 | });
136 | }
137 | },
138 | child: Row(
139 | children: [
140 | Icon(
141 | Icons.phone,
142 | ),
143 | SizedBox(
144 | width: 10.0,
145 | ),
146 | Text(
147 | "${phoneLogin ? "Continue With Phone" : "Use Number Instead"}",
148 | ),
149 | ],
150 | ),
151 | style: ButtonStyle(
152 | padding: MaterialStateProperty.all(
153 | EdgeInsets.symmetric(
154 | vertical: 12.0,
155 | horizontal: 20.0,
156 | ),
157 | //
158 | ),
159 | textStyle: MaterialStateProperty.all(
160 | TextStyle(
161 | fontSize: 18.0,
162 | ),
163 | ),
164 | shape: MaterialStateProperty.all(
165 | RoundedRectangleBorder(
166 | borderRadius: BorderRadius.circular(
167 | 8.0,
168 | ),
169 | ),
170 | ),
171 | ),
172 | ),
173 | //
174 | SizedBox(
175 | height: 12.0,
176 | ),
177 | //
178 | // google auth
179 | ElevatedButton(
180 | onPressed: () {},
181 | child: Row(
182 | children: [
183 | Image.asset(
184 | 'assets/images/google.png',
185 | width: 28.0,
186 | ),
187 | SizedBox(
188 | width: 10.0,
189 | ),
190 | Text(
191 | "Continue With Google",
192 | ),
193 | ],
194 | ),
195 | style: ButtonStyle(
196 | padding: MaterialStateProperty.all(
197 | EdgeInsets.symmetric(
198 | vertical: 12.0,
199 | horizontal: 20.0,
200 | ),
201 | //
202 | ),
203 | textStyle: MaterialStateProperty.all(
204 | TextStyle(
205 | fontSize: 18.0,
206 | ),
207 | ),
208 | shape: MaterialStateProperty.all(
209 | RoundedRectangleBorder(
210 | borderRadius: BorderRadius.circular(
211 | 8.0,
212 | ),
213 | ),
214 | ),
215 | ),
216 | ),
217 | //
218 | Container(
219 | padding: EdgeInsets.symmetric(
220 | vertical: 3.0,
221 | ),
222 | child: Row(
223 | children: [
224 | Expanded(
225 | child: Divider(
226 | thickness: 2.0,
227 | ),
228 | ),
229 | Text("\tor\t"),
230 | Expanded(
231 | child: Divider(
232 | thickness: 2.0,
233 | ),
234 | ),
235 | ],
236 | ),
237 | ),
238 | //
239 | Row(
240 | mainAxisAlignment: MainAxisAlignment.spaceAround,
241 | children: [
242 | TextButton(
243 | onPressed: () {
244 | Navigator.of(context).push(
245 | MaterialPageRoute(
246 | builder: (context) => SignUpPage(),
247 | ),
248 | );
249 | },
250 | child: Text(
251 | "Create new Account",
252 | ),
253 | ),
254 | TextButton(
255 | onPressed: () {
256 | anonymousSignIn(context);
257 | },
258 | child: Text(
259 | "Sign In Anonymously",
260 | ),
261 | ),
262 | ],
263 | )
264 | ],
265 | ),
266 | ),
267 | ),
268 | );
269 | }
270 |
271 | Widget phoneForm() {
272 | return Visibility(
273 | visible: phoneLogin,
274 | child: Form(
275 | child: Row(
276 | children: [
277 | Expanded(
278 | flex: 2,
279 | child: InkWell(
280 | onTap: () {
281 | showCountryPicker(
282 | context: context,
283 | onSelect: (Country country) {
284 | setState(() {
285 | countryCode = "+" + country.phoneCode;
286 | });
287 | },
288 | );
289 | },
290 | child: Container(
291 | decoration: BoxDecoration(
292 | borderRadius: BorderRadius.circular(
293 | 8.0,
294 | ),
295 | border: Border.all(
296 | color: Colors.black45,
297 | ),
298 | ),
299 | padding: EdgeInsets.symmetric(
300 | vertical: 12.0,
301 | ),
302 | alignment: Alignment.center,
303 | child: Text(
304 | "$countryCode",
305 | style: TextStyle(
306 | fontSize: 18.0,
307 | ),
308 | ),
309 | ),
310 | ),
311 | ),
312 | //
313 | SizedBox(
314 | width: 5.0,
315 | ),
316 | //
317 | Expanded(
318 | flex: 8,
319 | child: TextFormField(
320 | decoration: InputDecoration(
321 | hintText: "Enter Your Phone Number",
322 | border: OutlineInputBorder(
323 | borderRadius: BorderRadius.circular(
324 | 8.0,
325 | ),
326 | ),
327 | contentPadding: EdgeInsets.symmetric(
328 | vertical: 12.0,
329 | horizontal: 20.0,
330 | ),
331 | ),
332 | keyboardType: TextInputType.number,
333 | inputFormatters: [
334 | FilteringTextInputFormatter.digitsOnly,
335 | ],
336 | style: TextStyle(
337 | fontSize: 18.0,
338 | ),
339 | ),
340 | ),
341 | ],
342 | ),
343 | ),
344 | );
345 | }
346 |
347 | Widget emailForm() {
348 | return Visibility(
349 | visible: !phoneLogin,
350 | child: Form(
351 | key: emailFormKey,
352 | child: Column(
353 | children: [
354 | TextFormField(
355 | decoration: InputDecoration(
356 | hintText: "Enter Your Email",
357 | border: OutlineInputBorder(
358 | borderRadius: BorderRadius.circular(
359 | 8.0,
360 | ),
361 | ),
362 | contentPadding: EdgeInsets.symmetric(
363 | vertical: 12.0,
364 | horizontal: 20.0,
365 | ),
366 | ),
367 | style: TextStyle(
368 | fontSize: 18.0,
369 | ),
370 | validator: (val) {
371 | bool emailValid = RegExp(
372 | r"^[a-zA-Z0-9.a-zA-Z0-9.!#$%&'*+-/=?^_`{|}~]+@[a-zA-Z0-9]+\.[a-zA-Z]+")
373 | .hasMatch(val);
374 | if (emailValid) {
375 | return null;
376 | } else {
377 | return "Enter A Valid Email !";
378 | }
379 | },
380 | onChanged: (val) {
381 | email = val;
382 | },
383 | ),
384 | //
385 | SizedBox(
386 | height: 12.0,
387 | ),
388 | //
389 | TextFormField(
390 | decoration: InputDecoration(
391 | hintText: "Enter Your Password",
392 | border: OutlineInputBorder(
393 | borderRadius: BorderRadius.circular(
394 | 8.0,
395 | ),
396 | ),
397 | suffixIcon: IconButton(
398 | onPressed: () {
399 | setState(() {
400 | passwordVisible = !passwordVisible;
401 | });
402 | },
403 | icon: Icon(
404 | passwordVisible ? Icons.visibility : Icons.visibility_off,
405 | ),
406 | ),
407 | contentPadding: EdgeInsets.symmetric(
408 | vertical: 12.0,
409 | horizontal: 20.0,
410 | ),
411 | ),
412 | obscureText: passwordVisible,
413 | style: TextStyle(
414 | fontSize: 18.0,
415 | ),
416 | validator: (val) {
417 | if (val.trim().length < 6) {
418 | return "At least 6 characters required !";
419 | } else {
420 | return null;
421 | }
422 | },
423 | onChanged: (val) {
424 | password = val;
425 | },
426 | ),
427 | //
428 | Padding(
429 | padding: const EdgeInsets.all(3.0),
430 | child: Align(
431 | alignment: Alignment.centerRight,
432 | child: InkWell(
433 | onTap: () {
434 | Navigator.of(context).push(
435 | MaterialPageRoute(
436 | builder: (context) => ForgotPassword(),
437 | ),
438 | );
439 | },
440 | child: Text("Forgot Your Password ?"),
441 | ),
442 | ),
443 | )
444 | ],
445 | ),
446 | ),
447 | );
448 | }
449 | }
450 |
--------------------------------------------------------------------------------
/firebase_auths/lib/pages/auth/reset_password.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class ForgotPassword extends StatefulWidget {
4 | @override
5 | _ForgotPasswordState createState() => _ForgotPasswordState();
6 | }
7 |
8 | class _ForgotPasswordState extends State {
9 | //
10 | String email;
11 |
12 | //
13 | GlobalKey formKey = GlobalKey();
14 |
15 | @override
16 | Widget build(BuildContext context) {
17 | return Scaffold(
18 | appBar: AppBar(
19 | title: Text(
20 | "Back To Login",
21 | ),
22 | ),
23 | backgroundColor: Colors.white,
24 | body: Center(
25 | child: SingleChildScrollView(
26 | child: Padding(
27 | padding: const EdgeInsets.all(12.0),
28 | child: Form(
29 | key: formKey,
30 | child: Column(
31 | children: [
32 | Column(
33 | crossAxisAlignment: CrossAxisAlignment.start,
34 | children: [
35 | //
36 | Center(
37 | child: Container(
38 | decoration: BoxDecoration(
39 | borderRadius: BorderRadius.circular(
40 | 12.0,
41 | ),
42 | color: Colors.grey[200],
43 | ),
44 | padding: EdgeInsets.all(
45 | 12.0,
46 | ),
47 | child: Icon(
48 | Icons.refresh_outlined,
49 | size: 64.0,
50 | ),
51 | ),
52 | ),
53 | //
54 | SizedBox(
55 | height: 12.0,
56 | ),
57 | //
58 | Text(
59 | "Reset Password",
60 | style: TextStyle(
61 | fontSize: 32.0,
62 | fontFamily: "lato",
63 | fontWeight: FontWeight.w800,
64 | ),
65 | ),
66 | //
67 | SizedBox(
68 | height: 12.0,
69 | ),
70 | //
71 | Text(
72 | "You don't need to reset password if you have signed up using Phone Number \n In case You have used Google , Then try resetting your Google password !",
73 | style: TextStyle(
74 | fontSize: 16.0,
75 | fontFamily: "lato",
76 | color: Colors.grey[700],
77 | ),
78 | ),
79 | ],
80 | ),
81 | //
82 | SizedBox(
83 | height: 12.0,
84 | ),
85 | //
86 | TextFormField(
87 | decoration: InputDecoration(
88 | hintText: "Enter Your Email",
89 | border: OutlineInputBorder(
90 | borderSide: BorderSide(
91 | color: Colors.grey,
92 | ),
93 | borderRadius: BorderRadius.circular(
94 | 8.0,
95 | )),
96 | contentPadding: EdgeInsets.symmetric(
97 | vertical: 15.0,
98 | horizontal: 20.0,
99 | ),
100 | ),
101 | style: TextStyle(
102 | fontSize: 20.0,
103 | fontFamily: "lato",
104 | ),
105 | ),
106 | SizedBox(
107 | height: 15.0,
108 | ),
109 | SizedBox(
110 | width: double.infinity,
111 | height: 60.0,
112 | child: ElevatedButton(
113 | onPressed: () {},
114 | child: Text(
115 | "Send Reset Instructions",
116 | ),
117 | style: ButtonStyle(
118 | padding: MaterialStateProperty.all(
119 | EdgeInsets.symmetric(
120 | vertical: 15.0,
121 | horizontal: 20.0,
122 | ),
123 | ),
124 | textStyle: MaterialStateProperty.all(
125 | TextStyle(
126 | fontSize: 20.0,
127 | fontFamily: "lato",
128 | ),
129 | ),
130 | shape: MaterialStateProperty.all(
131 | RoundedRectangleBorder(
132 | borderRadius: BorderRadius.circular(
133 | 8.0,
134 | ),
135 | ),
136 | ),
137 | ),
138 | ),
139 | ),
140 | SizedBox(
141 | height: 25.0,
142 | ),
143 | ],
144 | ),
145 | ),
146 | ),
147 | ),
148 | ),
149 | );
150 | }
151 | }
152 |
--------------------------------------------------------------------------------
/firebase_auths/lib/pages/auth/signup.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_auths/controller/auth/auth.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | class SignUpPage extends StatefulWidget {
5 | @override
6 | _SignUpPageState createState() => _SignUpPageState();
7 | }
8 |
9 | class _SignUpPageState extends State {
10 | String email;
11 | String password;
12 |
13 | GlobalKey formKey = GlobalKey();
14 |
15 | @override
16 | Widget build(BuildContext context) {
17 | return Scaffold(
18 | appBar: AppBar(
19 | title: Text(
20 | "Back To Login",
21 | ),
22 | ),
23 | backgroundColor: Colors.white,
24 | body: Center(
25 | child: SingleChildScrollView(
26 | child: Padding(
27 | padding: const EdgeInsets.all(20.0),
28 | child: Column(
29 | children: [
30 | Column(
31 | crossAxisAlignment: CrossAxisAlignment.start,
32 | children: [
33 | //
34 | Center(
35 | child: Container(
36 | decoration: BoxDecoration(
37 | borderRadius: BorderRadius.circular(
38 | 12.0,
39 | ),
40 | color: Colors.grey[200],
41 | ),
42 | padding: EdgeInsets.all(
43 | 12.0,
44 | ),
45 | child: Icon(
46 | Icons.person_add_alt_1_outlined,
47 | size: 64.0,
48 | ),
49 | ),
50 | ),
51 | //
52 | SizedBox(
53 | height: 12.0,
54 | ),
55 | //
56 |
57 | Text(
58 | "Create Your Account",
59 | style: TextStyle(
60 | fontSize: 32.0,
61 | fontFamily: "lato",
62 | fontWeight: FontWeight.w800,
63 | ),
64 | ),
65 | //
66 | // SizedBox(
67 | // height: 12.0,
68 | // ),
69 | //
70 | // Text(
71 | // "You don't need to reset password if you have signed up using Phone Number \n In case You have used Google , Then try resetting your Google password !",
72 | // style: TextStyle(
73 | // fontSize: 16.0,
74 | // fontFamily: "lato",
75 | // color: Colors.grey[700],
76 | // ),
77 | // ),
78 | ],
79 | ),
80 | SizedBox(
81 | height: 15.0,
82 | ),
83 | // == email
84 | Form(
85 | key: formKey,
86 | child: Column(
87 | children: [
88 | TextFormField(
89 | decoration: InputDecoration(
90 | hintText: "Enter Your Email",
91 | border: OutlineInputBorder(
92 | borderSide: BorderSide(
93 | color: Colors.grey,
94 | ),
95 | borderRadius: BorderRadius.circular(
96 | 8.0,
97 | )),
98 | contentPadding: EdgeInsets.symmetric(
99 | vertical: 15.0,
100 | horizontal: 20.0,
101 | ),
102 | ),
103 | style: TextStyle(
104 | fontSize: 20.0,
105 | fontFamily: "lato",
106 | ),
107 | validator: (val) {
108 | bool emailValid = RegExp(
109 | r"^[a-zA-Z0-9.a-zA-Z0-9.!#$%&'*+-/=?^_`{|}~]+@[a-zA-Z0-9]+\.[a-zA-Z]+")
110 | .hasMatch(val);
111 | if (emailValid) {
112 | return null;
113 | } else {
114 | return "Enter A Valid Email !";
115 | }
116 | },
117 | onChanged: (val) {
118 | email = val;
119 | },
120 | ),
121 | SizedBox(
122 | height: 15.0,
123 | ),
124 | TextFormField(
125 | decoration: InputDecoration(
126 | hintText: "Choose A Password",
127 | border: OutlineInputBorder(
128 | borderSide: BorderSide(
129 | color: Colors.grey,
130 | ),
131 | borderRadius: BorderRadius.circular(
132 | 8.0,
133 | )),
134 | contentPadding: EdgeInsets.symmetric(
135 | vertical: 15.0,
136 | horizontal: 20.0,
137 | ),
138 | ),
139 | style: TextStyle(
140 | fontSize: 20.0,
141 | fontFamily: "lato",
142 | ),
143 | validator: (val) {
144 | if (val.trim().length < 6) {
145 | return "At least 6 characters required !";
146 | } else {
147 | return null;
148 | }
149 | },
150 | onChanged: (val) {
151 | password = val;
152 | },
153 | ),
154 | ],
155 | ),
156 | ),
157 | //
158 | SizedBox(
159 | height: 15.0,
160 | ),
161 | SizedBox(
162 | width: double.infinity,
163 | height: 60.0,
164 | child: ElevatedButton(
165 | onPressed: () {
166 | // create a user with email and password
167 | if (formKey.currentState.validate()) {
168 | formKey.currentState.save();
169 |
170 | signUpUserWithEmail(email, password, context);
171 | }
172 | },
173 | child: Text(
174 | "Sign Up",
175 | ),
176 | style: ButtonStyle(
177 | padding: MaterialStateProperty.all(
178 | EdgeInsets.symmetric(
179 | vertical: 15.0,
180 | horizontal: 20.0,
181 | ),
182 | ),
183 | textStyle: MaterialStateProperty.all(
184 | TextStyle(
185 | fontSize: 20.0,
186 | fontFamily: "lato",
187 | ),
188 | ),
189 | shape: MaterialStateProperty.all(
190 | RoundedRectangleBorder(
191 | borderRadius: BorderRadius.circular(
192 | 8.0,
193 | ),
194 | ),
195 | ),
196 | ),
197 | ),
198 | ),
199 | // Row(
200 | // children: [
201 | // Expanded(
202 | // child: Container(
203 | // margin: EdgeInsets.only(left: 10.0, right: 10.0),
204 | // child: Divider(
205 | // height: 36,
206 | // thickness: 2.0,
207 | // ),
208 | // ),
209 | // ),
210 | // Text(
211 | // "or",
212 | // style: TextStyle(
213 | // fontFamily: "regular",
214 | // ),
215 | // ),
216 | // Expanded(
217 | // child: Container(
218 | // margin: EdgeInsets.only(left: 10.0, right: 10.0),
219 | // child: Divider(
220 | // height: 36,
221 | // thickness: 2.0,
222 | // )),
223 | // ),
224 | // ],
225 | // ),
226 | // SizedBox(
227 | // height: 15.0,
228 | // ),
229 | // InkWell(
230 | // splashColor: Colors.transparent,
231 | // highlightColor: Colors.transparent,
232 | // onTap: () {
233 | // Navigator.of(context).pop();
234 | // },
235 | // child: Padding(
236 | // padding: const EdgeInsets.all(6.0),
237 | // child: Text(
238 | // "Already Registered ? Login here",
239 | // style: TextStyle(
240 | // fontFamily: "lato",
241 | // fontSize: 18.0,
242 | // color: Colors.black87,
243 | // ),
244 | // ),
245 | // ),
246 | // ),
247 | ],
248 | ),
249 | ),
250 | ),
251 | ),
252 | );
253 | }
254 |
255 | // Future signInWithPhone() async {
256 | // // number login
257 | // FirebaseAuth auth = FirebaseAuth.instance;
258 |
259 | // await auth.verifyPhoneNumber(
260 | // phoneNumber: '+' + countryCode + phoneNumber,
261 | // timeout: Duration(seconds: 60),
262 | // verificationCompleted: (PhoneAuthCredential credential) async {
263 | // // sign in the user
264 | // await auth.signInWithCredential(credential);
265 | // },
266 | // verificationFailed: (FirebaseAuthException e) {
267 | // if (e.code == 'invalid-phone-number') {
268 | // print('The provided phone number is not valid.');
269 | // }
270 | // },
271 | // codeSent: (String verificationId, int resendToken) async {
272 | // // show Dialog
273 | // await showDialog(
274 | // context: context,
275 | // builder: (context) => AlertDialog(
276 | // content: Column(
277 | // mainAxisSize: MainAxisSize.min,
278 | // children: [
279 | // Text(
280 | // "Verify OTP",
281 | // style: TextStyle(fontSize: 22.0),
282 | // ),
283 | // SizedBox(
284 | // height: 10.0,
285 | // ),
286 | // TextField(
287 | // decoration: InputDecoration(
288 | // labelText: "OTP",
289 | // ),
290 | // style: TextStyle(
291 | // fontSize: 20.0,
292 | // ),
293 | // onChanged: (_val) {
294 | // setState(() {
295 | // codesent = _val;
296 | // });
297 | // },
298 | // ),
299 | // SizedBox(
300 | // height: 10.0,
301 | // ),
302 | // RaisedButton(
303 | // onPressed: () {
304 | // Navigator.pop(context);
305 | // },
306 | // shape: BeveledRectangleBorder(),
307 | // padding: EdgeInsets.symmetric(
308 | // horizontal: 25.0,
309 | // vertical: 10.0,
310 | // ),
311 | // child: Text("Confirm"),
312 | // color: Colors.greenAccent[700],
313 | // textColor: Colors.white,
314 | // ),
315 | // ],
316 | // ),
317 | // ),
318 | // );
319 |
320 | // String smsCode = codesent;
321 |
322 | // // Create a PhoneAuthCredential with the code
323 | // PhoneAuthCredential phoneAuthCredential = PhoneAuthProvider.credential(
324 | // verificationId: verificationId, smsCode: smsCode);
325 |
326 | // try {
327 | // await auth.signInWithCredential(phoneAuthCredential);
328 | // } catch (e) {
329 | // showDialog(
330 | // context: context,
331 | // builder: (context) => AlertDialog(
332 | // content: Column(
333 | // mainAxisSize: MainAxisSize.min,
334 | // children: [
335 | // Text("Error Logging In !"),
336 | // SizedBox(
337 | // height: 10.0,
338 | // ),
339 | // RaisedButton(
340 | // onPressed: () {
341 | // Navigator.pop(context);
342 | // return;
343 | // },
344 | // child: Text(
345 | // "Ok",
346 | // ),
347 | // ),
348 | // ],
349 | // ),
350 | // ));
351 | // }
352 |
353 | // CollectionReference users =
354 | // FirebaseFirestore.instance.collection('users');
355 | // User user = FirebaseAuth.instance.currentUser;
356 | // if (user != null) {
357 | // var data = await users.doc(user.uid).get();
358 | // if (data.exists) {
359 | // // no user exists
360 | // var userData = {
361 | // 'email': user.email,
362 | // 'id': user.uid,
363 | // 'phone': user.phoneNumber,
364 | // 'photoUrl': null,
365 | // };
366 | // users.doc(user.uid).update(userData);
367 | // } else {
368 | // var userData = {
369 | // 'email': user.email,
370 | // 'id': user.uid,
371 | // 'phone': user.phoneNumber,
372 | // 'photoUrl': null,
373 | // };
374 | // users.doc(user.uid).update(userData);
375 | // }
376 |
377 | // if (FirebaseAuth.instance.currentUser != null) {
378 | // Navigator.of(context).pushReplacement(
379 | // MaterialPageRoute(
380 | // builder: (context) => ProfileCreation(),
381 | // ),
382 | // );
383 | // }
384 | // }
385 | // },
386 | // codeAutoRetrievalTimeout: (
387 | // String verificationId,
388 | // ) {},
389 | // );
390 | // }
391 | }
392 |
--------------------------------------------------------------------------------
/firebase_auths/lib/pages/profile/profile.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_auth/firebase_auth.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:firebase_auths/controller/auth/auth.dart';
4 |
5 | class ProfilePage extends StatefulWidget {
6 | @override
7 | _ProfilePageState createState() => _ProfilePageState();
8 | }
9 |
10 | class _ProfilePageState extends State {
11 | @override
12 | Widget build(BuildContext context) {
13 | return Scaffold(
14 | appBar: AppBar(
15 | title: Text("Profile"),
16 | ),
17 | body: Center(
18 | child: Column(
19 | mainAxisAlignment: MainAxisAlignment.center,
20 | children: [
21 | Text(
22 | "Your Profile !",
23 | style: TextStyle(
24 | fontSize: 24.0,
25 | fontWeight: FontWeight.bold,
26 | ),
27 | ),
28 | Text(
29 | "${FirebaseAuth.instance.currentUser.isAnonymous ? "Anonymous User" : "Normla User"}",
30 | style: TextStyle(
31 | fontSize: 20.0,
32 | ),
33 | ),
34 | Text(
35 | "${FirebaseAuth.instance.currentUser.uid}",
36 | style: TextStyle(
37 | fontSize: 20.0,
38 | ),
39 | ),
40 | //
41 | ElevatedButton(
42 | onPressed: () {
43 | userLogout(context);
44 | },
45 | child: Row(
46 | mainAxisSize: MainAxisSize.min,
47 | children: [
48 | Text("Logout"),
49 | SizedBox(
50 | width: 10.0,
51 | ),
52 | Icon(
53 | Icons.logout,
54 | ),
55 | ],
56 | ),
57 | style: ButtonStyle(
58 | padding: MaterialStateProperty.all(
59 | EdgeInsets.symmetric(
60 | vertical: 12.0,
61 | horizontal: 20.0,
62 | ),
63 | //
64 | ),
65 | textStyle: MaterialStateProperty.all(
66 | TextStyle(
67 | fontSize: 18.0,
68 | ),
69 | ),
70 | shape: MaterialStateProperty.all(
71 | RoundedRectangleBorder(
72 | borderRadius: BorderRadius.circular(
73 | 8.0,
74 | ),
75 | ),
76 | ),
77 | backgroundColor: MaterialStateProperty.all(
78 | Colors.redAccent[700],
79 | ),
80 | ),
81 | ),
82 | ],
83 | ),
84 | ),
85 | );
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/firebase_auths/lib/pages/widgets/showAlert.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/cupertino.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | void showCustomAlert(BuildContext context, String title, String message) {
5 | showDialog(
6 | context: context,
7 | builder: (context) => AlertDialog(
8 | title: Text("$title"),
9 | content: Text("$message"),
10 | actions: [
11 | TextButton(
12 | onPressed: () {
13 | Navigator.of(context).pop();
14 | },
15 | child: Text("ok"),
16 | ),
17 | ],
18 | ),
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/firebase_auths/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "2.5.0"
11 | boolean_selector:
12 | dependency: transitive
13 | description:
14 | name: boolean_selector
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "2.1.0"
18 | characters:
19 | dependency: transitive
20 | description:
21 | name: characters
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "1.1.0"
25 | charcode:
26 | dependency: transitive
27 | description:
28 | name: charcode
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "1.2.0"
32 | clock:
33 | dependency: transitive
34 | description:
35 | name: clock
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "1.1.0"
39 | collection:
40 | dependency: transitive
41 | description:
42 | name: collection
43 | url: "https://pub.dartlang.org"
44 | source: hosted
45 | version: "1.15.0"
46 | country_picker:
47 | dependency: "direct main"
48 | description:
49 | name: country_picker
50 | url: "https://pub.dartlang.org"
51 | source: hosted
52 | version: "2.0.2"
53 | cupertino_icons:
54 | dependency: "direct main"
55 | description:
56 | name: cupertino_icons
57 | url: "https://pub.dartlang.org"
58 | source: hosted
59 | version: "1.0.2"
60 | fake_async:
61 | dependency: transitive
62 | description:
63 | name: fake_async
64 | url: "https://pub.dartlang.org"
65 | source: hosted
66 | version: "1.2.0"
67 | firebase:
68 | dependency: "direct main"
69 | description:
70 | name: firebase
71 | url: "https://pub.dartlang.org"
72 | source: hosted
73 | version: "9.0.1"
74 | firebase_auth:
75 | dependency: "direct main"
76 | description:
77 | name: firebase_auth
78 | url: "https://pub.dartlang.org"
79 | source: hosted
80 | version: "1.0.1"
81 | firebase_auth_platform_interface:
82 | dependency: transitive
83 | description:
84 | name: firebase_auth_platform_interface
85 | url: "https://pub.dartlang.org"
86 | source: hosted
87 | version: "4.0.0"
88 | firebase_auth_web:
89 | dependency: transitive
90 | description:
91 | name: firebase_auth_web
92 | url: "https://pub.dartlang.org"
93 | source: hosted
94 | version: "1.0.3"
95 | firebase_core:
96 | dependency: "direct main"
97 | description:
98 | name: firebase_core
99 | url: "https://pub.dartlang.org"
100 | source: hosted
101 | version: "1.0.2"
102 | firebase_core_platform_interface:
103 | dependency: transitive
104 | description:
105 | name: firebase_core_platform_interface
106 | url: "https://pub.dartlang.org"
107 | source: hosted
108 | version: "4.0.0"
109 | firebase_core_web:
110 | dependency: transitive
111 | description:
112 | name: firebase_core_web
113 | url: "https://pub.dartlang.org"
114 | source: hosted
115 | version: "1.0.2"
116 | flutter:
117 | dependency: "direct main"
118 | description: flutter
119 | source: sdk
120 | version: "0.0.0"
121 | flutter_test:
122 | dependency: "direct dev"
123 | description: flutter
124 | source: sdk
125 | version: "0.0.0"
126 | flutter_web_plugins:
127 | dependency: transitive
128 | description: flutter
129 | source: sdk
130 | version: "0.0.0"
131 | http:
132 | dependency: transitive
133 | description:
134 | name: http
135 | url: "https://pub.dartlang.org"
136 | source: hosted
137 | version: "0.13.1"
138 | http_parser:
139 | dependency: transitive
140 | description:
141 | name: http_parser
142 | url: "https://pub.dartlang.org"
143 | source: hosted
144 | version: "4.0.0"
145 | intl:
146 | dependency: transitive
147 | description:
148 | name: intl
149 | url: "https://pub.dartlang.org"
150 | source: hosted
151 | version: "0.17.0"
152 | js:
153 | dependency: transitive
154 | description:
155 | name: js
156 | url: "https://pub.dartlang.org"
157 | source: hosted
158 | version: "0.6.3"
159 | matcher:
160 | dependency: transitive
161 | description:
162 | name: matcher
163 | url: "https://pub.dartlang.org"
164 | source: hosted
165 | version: "0.12.10"
166 | meta:
167 | dependency: transitive
168 | description:
169 | name: meta
170 | url: "https://pub.dartlang.org"
171 | source: hosted
172 | version: "1.3.0"
173 | path:
174 | dependency: transitive
175 | description:
176 | name: path
177 | url: "https://pub.dartlang.org"
178 | source: hosted
179 | version: "1.8.0"
180 | pedantic:
181 | dependency: transitive
182 | description:
183 | name: pedantic
184 | url: "https://pub.dartlang.org"
185 | source: hosted
186 | version: "1.11.0"
187 | plugin_platform_interface:
188 | dependency: transitive
189 | description:
190 | name: plugin_platform_interface
191 | url: "https://pub.dartlang.org"
192 | source: hosted
193 | version: "2.0.0"
194 | sky_engine:
195 | dependency: transitive
196 | description: flutter
197 | source: sdk
198 | version: "0.0.99"
199 | source_span:
200 | dependency: transitive
201 | description:
202 | name: source_span
203 | url: "https://pub.dartlang.org"
204 | source: hosted
205 | version: "1.8.0"
206 | stack_trace:
207 | dependency: transitive
208 | description:
209 | name: stack_trace
210 | url: "https://pub.dartlang.org"
211 | source: hosted
212 | version: "1.10.0"
213 | stream_channel:
214 | dependency: transitive
215 | description:
216 | name: stream_channel
217 | url: "https://pub.dartlang.org"
218 | source: hosted
219 | version: "2.1.0"
220 | string_scanner:
221 | dependency: transitive
222 | description:
223 | name: string_scanner
224 | url: "https://pub.dartlang.org"
225 | source: hosted
226 | version: "1.1.0"
227 | term_glyph:
228 | dependency: transitive
229 | description:
230 | name: term_glyph
231 | url: "https://pub.dartlang.org"
232 | source: hosted
233 | version: "1.2.0"
234 | test_api:
235 | dependency: transitive
236 | description:
237 | name: test_api
238 | url: "https://pub.dartlang.org"
239 | source: hosted
240 | version: "0.2.19"
241 | typed_data:
242 | dependency: transitive
243 | description:
244 | name: typed_data
245 | url: "https://pub.dartlang.org"
246 | source: hosted
247 | version: "1.3.0"
248 | vector_math:
249 | dependency: transitive
250 | description:
251 | name: vector_math
252 | url: "https://pub.dartlang.org"
253 | source: hosted
254 | version: "2.1.0"
255 | sdks:
256 | dart: ">=2.12.0 <3.0.0"
257 | flutter: ">=1.12.13+hotfix.5"
258 |
--------------------------------------------------------------------------------
/firebase_auths/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: firebase_auths
2 | description: A new Flutter project.
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 | country_picker: ^2.0.2
27 | cupertino_icons: ^1.0.2
28 | firebase: ^9.0.1
29 | firebase_auth: ^1.0.1
30 | firebase_core: ^1.0.2
31 |
32 | dev_dependencies:
33 | flutter_test:
34 | sdk: flutter
35 |
36 | # For information on the generic Dart part of this file, see the
37 | # following page: https://dart.dev/tools/pub/pubspec
38 | # The following section is specific to Flutter.
39 | flutter:
40 |
41 | # The following line ensures that the Material Icons font is
42 | # included with your application, so that you can use the icons in
43 | # the material Icons class.
44 | uses-material-design: true
45 |
46 | # To add assets to your application, add an assets section, like this:
47 | assets:
48 | - assets/images/
49 | # - images/a_dot_ham.jpeg
50 | # An image asset can refer to one or more resolution-specific "variants", see
51 | # https://flutter.dev/assets-and-images/#resolution-aware.
52 | # For details regarding adding assets from package dependencies, see
53 | # https://flutter.dev/assets-and-images/#from-packages
54 | # To add custom fonts to your application, add a fonts section here,
55 | # in this "flutter" section. Each entry in this list should have a
56 | # "family" key with the font family name, and a "fonts" key with a
57 | # list giving the asset and other descriptors for the font. For
58 | # example:
59 | fonts:
60 | # - family: Schyler
61 | # fonts:
62 | # - asset: fonts/Schyler-Regular.ttf
63 | # - asset: fonts/Schyler-Italic.ttf
64 | # style: italic
65 | - family: lato
66 | fonts:
67 | - asset: assets/fonts/Lato-Regular.ttf
68 | - asset: assets/fonts/Lato-Bold.ttf
69 | weight: 800
70 | # For details regarding fonts from package dependencies,
71 | # see https://flutter.dev/custom-fonts/#from-packages
72 |
--------------------------------------------------------------------------------
/firebase_auths/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:firebase_auths/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 |
--------------------------------------------------------------------------------
/firebase_auths/web/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/firebase_auths/web/favicon.png
--------------------------------------------------------------------------------
/firebase_auths/web/icons/Icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/firebase_auths/web/icons/Icon-192.png
--------------------------------------------------------------------------------
/firebase_auths/web/icons/Icon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/firebase_auths/web/icons/Icon-512.png
--------------------------------------------------------------------------------
/firebase_auths/web/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | firebase_auths
30 |
31 |
32 |
33 |
36 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/firebase_auths/web/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "firebase_auths",
3 | "short_name": "firebase_auths",
4 | "start_url": ".",
5 | "display": "standalone",
6 | "background_color": "#0175C2",
7 | "theme_color": "#0175C2",
8 | "description": "A new Flutter project.",
9 | "orientation": "portrait-primary",
10 | "prefer_related_applications": false,
11 | "icons": [
12 | {
13 | "src": "icons/Icon-192.png",
14 | "sizes": "192x192",
15 | "type": "image/png"
16 | },
17 | {
18 | "src": "icons/Icon-512.png",
19 | "sizes": "512x512",
20 | "type": "image/png"
21 | }
22 | ]
23 | }
24 |
--------------------------------------------------------------------------------
/mynotes/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | **/ios/Flutter/.last_build_id
26 | .dart_tool/
27 | .flutter-plugins
28 | .flutter-plugins-dependencies
29 | .packages
30 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Web related
35 | lib/generated_plugin_registrant.dart
36 |
37 | # Symbolication related
38 | app.*.symbols
39 |
40 | # Obfuscation related
41 | app.*.map.json
42 |
43 | # Android Studio will place build artifacts here
44 | /android/app/debug
45 | /android/app/profile
46 | /android/app/release
47 |
--------------------------------------------------------------------------------
/mynotes/.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: c5a4b4029c0798f37c4a39b479d7cb75daa7b05c
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/mynotes/README.md:
--------------------------------------------------------------------------------
1 | # Mynotes
2 |
3 | A flutter firebase project with Google Authentication and CRUD for Notes.
4 |
5 | Watch Tutorial Here : https://www.youtube.com/watch?v=O0f4m68-v58
6 |
7 | # Fixes
8 | [ed1f24a](https://github.com/desi-programmer/flutter-firebase/commit/ed1f24a415be50100d0bb01643cba8a8a7770504) Fixed floating button moves up on keyboard press
9 |
10 | # Screenshots
11 | 
12 | 
13 | 
14 | 
15 |
16 | # Update tutorial
17 | - Changes
18 | - Add no Note on Home Page
19 | - Add Update
20 | - Add new colors for cards
21 |
--------------------------------------------------------------------------------
/mynotes/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 |
--------------------------------------------------------------------------------
/mynotes/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 plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 | apply plugin: 'com.google.gms.google-services'
28 |
29 | android {
30 | compileSdkVersion 30
31 |
32 | sourceSets {
33 | main.java.srcDirs += 'src/main/kotlin'
34 | }
35 |
36 | defaultConfig {
37 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
38 | applicationId "com.example.mynotes"
39 | minSdkVersion 23
40 | targetSdkVersion 30
41 | versionCode flutterVersionCode.toInteger()
42 | versionName flutterVersionName
43 | }
44 |
45 | buildTypes {
46 | release {
47 | // TODO: Add your own signing config for the release build.
48 | // Signing with the debug keys for now, so `flutter run --release` works.
49 | signingConfig signingConfigs.debug
50 | }
51 | }
52 | }
53 |
54 | flutter {
55 | source '../..'
56 | }
57 |
58 | dependencies {
59 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
60 | implementation platform('com.google.firebase:firebase-bom:26.7.0')
61 | }
62 |
--------------------------------------------------------------------------------
/mynotes/android/app/google-services.json:
--------------------------------------------------------------------------------
1 | {
2 | "project_info": {
3 | "project_number": "1023762323509",
4 | "firebase_url": "https://test-725be.firebaseio.com",
5 | "project_id": "test-725be",
6 | "storage_bucket": "test-725be.appspot.com"
7 | },
8 | "client": [
9 | {
10 | "client_info": {
11 | "mobilesdk_app_id": "1:1023762323509:android:926ce11a6712570e72397c",
12 | "android_client_info": {
13 | "package_name": "com.example.mynotes"
14 | }
15 | },
16 | "oauth_client": [
17 | {
18 | "client_id": "1023762323509-v9pa8c7ssis7878i8ft5sd5hei1o7n7j.apps.googleusercontent.com",
19 | "client_type": 1,
20 | "android_info": {
21 | "package_name": "com.example.mynotes",
22 | "certificate_hash": "61e9236acc5ce259dfcba7f20ff18d932b6cbec1"
23 | }
24 | },
25 | {
26 | "client_id": "1023762323509-sl1va0cf7chldh67orrtafbroiu19n87.apps.googleusercontent.com",
27 | "client_type": 3
28 | }
29 | ],
30 | "api_key": [
31 | {
32 | "current_key": "AIzaSyD6NYSyif6-tKjxH53Kd3FjPKqg4qBplgo"
33 | }
34 | ],
35 | "services": {
36 | "appinvite_service": {
37 | "other_platform_oauth_client": [
38 | {
39 | "client_id": "1023762323509-sl1va0cf7chldh67orrtafbroiu19n87.apps.googleusercontent.com",
40 | "client_type": 3
41 | }
42 | ]
43 | }
44 | }
45 | },
46 | {
47 | "client_info": {
48 | "mobilesdk_app_id": "1:1023762323509:android:f4a5b5512042398372397c",
49 | "android_client_info": {
50 | "package_name": "com.example.notesapp"
51 | }
52 | },
53 | "oauth_client": [
54 | {
55 | "client_id": "1023762323509-mmn0rpji6qt62r0aqt9o01nj1aosd0ki.apps.googleusercontent.com",
56 | "client_type": 1,
57 | "android_info": {
58 | "package_name": "com.example.notesapp",
59 | "certificate_hash": "61e9236acc5ce259dfcba7f20ff18d932b6cbec1"
60 | }
61 | },
62 | {
63 | "client_id": "1023762323509-sl1va0cf7chldh67orrtafbroiu19n87.apps.googleusercontent.com",
64 | "client_type": 3
65 | }
66 | ],
67 | "api_key": [
68 | {
69 | "current_key": "AIzaSyD6NYSyif6-tKjxH53Kd3FjPKqg4qBplgo"
70 | }
71 | ],
72 | "services": {
73 | "appinvite_service": {
74 | "other_platform_oauth_client": [
75 | {
76 | "client_id": "1023762323509-sl1va0cf7chldh67orrtafbroiu19n87.apps.googleusercontent.com",
77 | "client_type": 3
78 | }
79 | ]
80 | }
81 | }
82 | },
83 | {
84 | "client_info": {
85 | "mobilesdk_app_id": "1:1023762323509:android:80bd63832ddef41072397c",
86 | "android_client_info": {
87 | "package_name": "com.example.podcasts"
88 | }
89 | },
90 | "oauth_client": [
91 | {
92 | "client_id": "1023762323509-66vd13katl01htom75egb8qd2ch0iv5o.apps.googleusercontent.com",
93 | "client_type": 1,
94 | "android_info": {
95 | "package_name": "com.example.podcasts",
96 | "certificate_hash": "61e9236acc5ce259dfcba7f20ff18d932b6cbec1"
97 | }
98 | },
99 | {
100 | "client_id": "1023762323509-sl1va0cf7chldh67orrtafbroiu19n87.apps.googleusercontent.com",
101 | "client_type": 3
102 | }
103 | ],
104 | "api_key": [
105 | {
106 | "current_key": "AIzaSyD6NYSyif6-tKjxH53Kd3FjPKqg4qBplgo"
107 | }
108 | ],
109 | "services": {
110 | "appinvite_service": {
111 | "other_platform_oauth_client": [
112 | {
113 | "client_id": "1023762323509-sl1va0cf7chldh67orrtafbroiu19n87.apps.googleusercontent.com",
114 | "client_type": 3
115 | }
116 | ]
117 | }
118 | }
119 | },
120 | {
121 | "client_info": {
122 | "mobilesdk_app_id": "1:1023762323509:android:2d96f8db1421545872397c",
123 | "android_client_info": {
124 | "package_name": "com.example.remdeez_service_provider"
125 | }
126 | },
127 | "oauth_client": [
128 | {
129 | "client_id": "1023762323509-1e5hr044inhhr47b161i61vq4ebc3tld.apps.googleusercontent.com",
130 | "client_type": 1,
131 | "android_info": {
132 | "package_name": "com.example.remdeez_service_provider",
133 | "certificate_hash": "52c435adb1bbde43d98390ad04108bb163ba3e39"
134 | }
135 | },
136 | {
137 | "client_id": "1023762323509-atumcth0n1vvk7cnsf05epueuq8b0a1g.apps.googleusercontent.com",
138 | "client_type": 1,
139 | "android_info": {
140 | "package_name": "com.example.remdeez_service_provider",
141 | "certificate_hash": "159d43b356bbf78ff54561b55e5cce95b3febd0e"
142 | }
143 | },
144 | {
145 | "client_id": "1023762323509-sl1va0cf7chldh67orrtafbroiu19n87.apps.googleusercontent.com",
146 | "client_type": 3
147 | }
148 | ],
149 | "api_key": [
150 | {
151 | "current_key": "AIzaSyD6NYSyif6-tKjxH53Kd3FjPKqg4qBplgo"
152 | }
153 | ],
154 | "services": {
155 | "appinvite_service": {
156 | "other_platform_oauth_client": [
157 | {
158 | "client_id": "1023762323509-sl1va0cf7chldh67orrtafbroiu19n87.apps.googleusercontent.com",
159 | "client_type": 3
160 | }
161 | ]
162 | }
163 | }
164 | }
165 | ],
166 | "configuration_version": "1"
167 | }
--------------------------------------------------------------------------------
/mynotes/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/mynotes/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
13 |
17 |
21 |
26 |
30 |
31 |
32 |
33 |
34 |
35 |
37 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/mynotes/android/app/src/main/kotlin/com/example/mynotes/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.mynotes
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/mynotes/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/mynotes/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/mynotes/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/mynotes/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/mynotes/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/mynotes/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/mynotes/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/mynotes/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/mynotes/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/mynotes/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/mynotes/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/mynotes/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/mynotes/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/mynotes/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/mynotes/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/mynotes/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.3.50'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:4.1.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | classpath 'com.google.gms:google-services:4.3.5'
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | google()
18 | jcenter()
19 | }
20 | }
21 |
22 | rootProject.buildDir = '../build'
23 | subprojects {
24 | project.buildDir = "${rootProject.buildDir}/${project.name}"
25 | }
26 | subprojects {
27 | project.evaluationDependsOn(':app')
28 | }
29 |
30 | task clean(type: Delete) {
31 | delete rootProject.buildDir
32 | }
33 |
--------------------------------------------------------------------------------
/mynotes/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/mynotes/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-6.7-all.zip
7 |
--------------------------------------------------------------------------------
/mynotes/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4 | def properties = new Properties()
5 |
6 | assert localPropertiesFile.exists()
7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
8 |
9 | def flutterSdkPath = properties.getProperty("flutter.sdk")
10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12 |
--------------------------------------------------------------------------------
/mynotes/assets/fonts/Lato-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/mynotes/assets/fonts/Lato-Bold.ttf
--------------------------------------------------------------------------------
/mynotes/assets/fonts/Lato-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/mynotes/assets/fonts/Lato-Regular.ttf
--------------------------------------------------------------------------------
/mynotes/assets/images/cover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/mynotes/assets/images/cover.png
--------------------------------------------------------------------------------
/mynotes/assets/images/google.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/mynotes/assets/images/google.png
--------------------------------------------------------------------------------
/mynotes/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 |
--------------------------------------------------------------------------------
/mynotes/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/mynotes/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/mynotes/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/mynotes/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
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 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
16 | /* End PBXBuildFile section */
17 |
18 | /* Begin PBXCopyFilesBuildPhase section */
19 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
20 | isa = PBXCopyFilesBuildPhase;
21 | buildActionMask = 2147483647;
22 | dstPath = "";
23 | dstSubfolderSpec = 10;
24 | files = (
25 | );
26 | name = "Embed Frameworks";
27 | runOnlyForDeploymentPostprocessing = 0;
28 | };
29 | /* End PBXCopyFilesBuildPhase section */
30 |
31 | /* Begin PBXFileReference section */
32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
41 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
45 | /* End PBXFileReference section */
46 |
47 | /* Begin PBXFrameworksBuildPhase section */
48 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
49 | isa = PBXFrameworksBuildPhase;
50 | buildActionMask = 2147483647;
51 | files = (
52 | );
53 | runOnlyForDeploymentPostprocessing = 0;
54 | };
55 | /* End PBXFrameworksBuildPhase section */
56 |
57 | /* Begin PBXGroup section */
58 | 9740EEB11CF90186004384FC /* Flutter */ = {
59 | isa = PBXGroup;
60 | children = (
61 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
62 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
63 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
64 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
65 | );
66 | name = Flutter;
67 | sourceTree = "";
68 | };
69 | 97C146E51CF9000F007C117D = {
70 | isa = PBXGroup;
71 | children = (
72 | 9740EEB11CF90186004384FC /* Flutter */,
73 | 97C146F01CF9000F007C117D /* Runner */,
74 | 97C146EF1CF9000F007C117D /* Products */,
75 | );
76 | sourceTree = "";
77 | };
78 | 97C146EF1CF9000F007C117D /* Products */ = {
79 | isa = PBXGroup;
80 | children = (
81 | 97C146EE1CF9000F007C117D /* Runner.app */,
82 | );
83 | name = Products;
84 | sourceTree = "";
85 | };
86 | 97C146F01CF9000F007C117D /* Runner */ = {
87 | isa = PBXGroup;
88 | children = (
89 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
92 | 97C147021CF9000F007C117D /* Info.plist */,
93 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
94 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
95 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
96 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
97 | );
98 | path = Runner;
99 | sourceTree = "";
100 | };
101 | /* End PBXGroup section */
102 |
103 | /* Begin PBXNativeTarget section */
104 | 97C146ED1CF9000F007C117D /* Runner */ = {
105 | isa = PBXNativeTarget;
106 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
107 | buildPhases = (
108 | 9740EEB61CF901F6004384FC /* Run Script */,
109 | 97C146EA1CF9000F007C117D /* Sources */,
110 | 97C146EB1CF9000F007C117D /* Frameworks */,
111 | 97C146EC1CF9000F007C117D /* Resources */,
112 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
113 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
114 | );
115 | buildRules = (
116 | );
117 | dependencies = (
118 | );
119 | name = Runner;
120 | productName = Runner;
121 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
122 | productType = "com.apple.product-type.application";
123 | };
124 | /* End PBXNativeTarget section */
125 |
126 | /* Begin PBXProject section */
127 | 97C146E61CF9000F007C117D /* Project object */ = {
128 | isa = PBXProject;
129 | attributes = {
130 | LastUpgradeCheck = 1020;
131 | ORGANIZATIONNAME = "";
132 | TargetAttributes = {
133 | 97C146ED1CF9000F007C117D = {
134 | CreatedOnToolsVersion = 7.3.1;
135 | LastSwiftMigration = 1100;
136 | };
137 | };
138 | };
139 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
140 | compatibilityVersion = "Xcode 9.3";
141 | developmentRegion = en;
142 | hasScannedForEncodings = 0;
143 | knownRegions = (
144 | en,
145 | Base,
146 | );
147 | mainGroup = 97C146E51CF9000F007C117D;
148 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
149 | projectDirPath = "";
150 | projectRoot = "";
151 | targets = (
152 | 97C146ED1CF9000F007C117D /* Runner */,
153 | );
154 | };
155 | /* End PBXProject section */
156 |
157 | /* Begin PBXResourcesBuildPhase section */
158 | 97C146EC1CF9000F007C117D /* Resources */ = {
159 | isa = PBXResourcesBuildPhase;
160 | buildActionMask = 2147483647;
161 | files = (
162 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
163 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
164 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
165 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
166 | );
167 | runOnlyForDeploymentPostprocessing = 0;
168 | };
169 | /* End PBXResourcesBuildPhase section */
170 |
171 | /* Begin PBXShellScriptBuildPhase section */
172 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
173 | isa = PBXShellScriptBuildPhase;
174 | buildActionMask = 2147483647;
175 | files = (
176 | );
177 | inputPaths = (
178 | );
179 | name = "Thin Binary";
180 | outputPaths = (
181 | );
182 | runOnlyForDeploymentPostprocessing = 0;
183 | shellPath = /bin/sh;
184 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
185 | };
186 | 9740EEB61CF901F6004384FC /* Run Script */ = {
187 | isa = PBXShellScriptBuildPhase;
188 | buildActionMask = 2147483647;
189 | files = (
190 | );
191 | inputPaths = (
192 | );
193 | name = "Run Script";
194 | outputPaths = (
195 | );
196 | runOnlyForDeploymentPostprocessing = 0;
197 | shellPath = /bin/sh;
198 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
199 | };
200 | /* End PBXShellScriptBuildPhase section */
201 |
202 | /* Begin PBXSourcesBuildPhase section */
203 | 97C146EA1CF9000F007C117D /* Sources */ = {
204 | isa = PBXSourcesBuildPhase;
205 | buildActionMask = 2147483647;
206 | files = (
207 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
208 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
209 | );
210 | runOnlyForDeploymentPostprocessing = 0;
211 | };
212 | /* End PBXSourcesBuildPhase section */
213 |
214 | /* Begin PBXVariantGroup section */
215 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
216 | isa = PBXVariantGroup;
217 | children = (
218 | 97C146FB1CF9000F007C117D /* Base */,
219 | );
220 | name = Main.storyboard;
221 | sourceTree = "";
222 | };
223 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
224 | isa = PBXVariantGroup;
225 | children = (
226 | 97C147001CF9000F007C117D /* Base */,
227 | );
228 | name = LaunchScreen.storyboard;
229 | sourceTree = "";
230 | };
231 | /* End PBXVariantGroup section */
232 |
233 | /* Begin XCBuildConfiguration section */
234 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
235 | isa = XCBuildConfiguration;
236 | buildSettings = {
237 | ALWAYS_SEARCH_USER_PATHS = NO;
238 | CLANG_ANALYZER_NONNULL = YES;
239 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
240 | CLANG_CXX_LIBRARY = "libc++";
241 | CLANG_ENABLE_MODULES = YES;
242 | CLANG_ENABLE_OBJC_ARC = YES;
243 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
244 | CLANG_WARN_BOOL_CONVERSION = YES;
245 | CLANG_WARN_COMMA = YES;
246 | CLANG_WARN_CONSTANT_CONVERSION = YES;
247 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
248 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
249 | CLANG_WARN_EMPTY_BODY = YES;
250 | CLANG_WARN_ENUM_CONVERSION = YES;
251 | CLANG_WARN_INFINITE_RECURSION = YES;
252 | CLANG_WARN_INT_CONVERSION = YES;
253 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
254 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
255 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
256 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
257 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
258 | CLANG_WARN_STRICT_PROTOTYPES = YES;
259 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
260 | CLANG_WARN_UNREACHABLE_CODE = YES;
261 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
262 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
263 | COPY_PHASE_STRIP = NO;
264 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
265 | ENABLE_NS_ASSERTIONS = NO;
266 | ENABLE_STRICT_OBJC_MSGSEND = YES;
267 | GCC_C_LANGUAGE_STANDARD = gnu99;
268 | GCC_NO_COMMON_BLOCKS = YES;
269 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
270 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
271 | GCC_WARN_UNDECLARED_SELECTOR = YES;
272 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
273 | GCC_WARN_UNUSED_FUNCTION = YES;
274 | GCC_WARN_UNUSED_VARIABLE = YES;
275 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
276 | MTL_ENABLE_DEBUG_INFO = NO;
277 | SDKROOT = iphoneos;
278 | SUPPORTED_PLATFORMS = iphoneos;
279 | TARGETED_DEVICE_FAMILY = "1,2";
280 | VALIDATE_PRODUCT = YES;
281 | };
282 | name = Profile;
283 | };
284 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
285 | isa = XCBuildConfiguration;
286 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
287 | buildSettings = {
288 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
289 | CLANG_ENABLE_MODULES = YES;
290 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
291 | ENABLE_BITCODE = NO;
292 | INFOPLIST_FILE = Runner/Info.plist;
293 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
294 | PRODUCT_BUNDLE_IDENTIFIER = com.example.mynotes;
295 | PRODUCT_NAME = "$(TARGET_NAME)";
296 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
297 | SWIFT_VERSION = 5.0;
298 | VERSIONING_SYSTEM = "apple-generic";
299 | };
300 | name = Profile;
301 | };
302 | 97C147031CF9000F007C117D /* Debug */ = {
303 | isa = XCBuildConfiguration;
304 | buildSettings = {
305 | ALWAYS_SEARCH_USER_PATHS = NO;
306 | CLANG_ANALYZER_NONNULL = YES;
307 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
308 | CLANG_CXX_LIBRARY = "libc++";
309 | CLANG_ENABLE_MODULES = YES;
310 | CLANG_ENABLE_OBJC_ARC = YES;
311 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
312 | CLANG_WARN_BOOL_CONVERSION = YES;
313 | CLANG_WARN_COMMA = YES;
314 | CLANG_WARN_CONSTANT_CONVERSION = YES;
315 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
316 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
317 | CLANG_WARN_EMPTY_BODY = YES;
318 | CLANG_WARN_ENUM_CONVERSION = YES;
319 | CLANG_WARN_INFINITE_RECURSION = YES;
320 | CLANG_WARN_INT_CONVERSION = YES;
321 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
322 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
323 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
324 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
325 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
326 | CLANG_WARN_STRICT_PROTOTYPES = YES;
327 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
328 | CLANG_WARN_UNREACHABLE_CODE = YES;
329 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
330 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
331 | COPY_PHASE_STRIP = NO;
332 | DEBUG_INFORMATION_FORMAT = dwarf;
333 | ENABLE_STRICT_OBJC_MSGSEND = YES;
334 | ENABLE_TESTABILITY = YES;
335 | GCC_C_LANGUAGE_STANDARD = gnu99;
336 | GCC_DYNAMIC_NO_PIC = NO;
337 | GCC_NO_COMMON_BLOCKS = YES;
338 | GCC_OPTIMIZATION_LEVEL = 0;
339 | GCC_PREPROCESSOR_DEFINITIONS = (
340 | "DEBUG=1",
341 | "$(inherited)",
342 | );
343 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
344 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
345 | GCC_WARN_UNDECLARED_SELECTOR = YES;
346 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
347 | GCC_WARN_UNUSED_FUNCTION = YES;
348 | GCC_WARN_UNUSED_VARIABLE = YES;
349 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
350 | MTL_ENABLE_DEBUG_INFO = YES;
351 | ONLY_ACTIVE_ARCH = YES;
352 | SDKROOT = iphoneos;
353 | TARGETED_DEVICE_FAMILY = "1,2";
354 | };
355 | name = Debug;
356 | };
357 | 97C147041CF9000F007C117D /* Release */ = {
358 | isa = XCBuildConfiguration;
359 | buildSettings = {
360 | ALWAYS_SEARCH_USER_PATHS = NO;
361 | CLANG_ANALYZER_NONNULL = YES;
362 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
363 | CLANG_CXX_LIBRARY = "libc++";
364 | CLANG_ENABLE_MODULES = YES;
365 | CLANG_ENABLE_OBJC_ARC = YES;
366 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
367 | CLANG_WARN_BOOL_CONVERSION = YES;
368 | CLANG_WARN_COMMA = YES;
369 | CLANG_WARN_CONSTANT_CONVERSION = YES;
370 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
371 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
372 | CLANG_WARN_EMPTY_BODY = YES;
373 | CLANG_WARN_ENUM_CONVERSION = YES;
374 | CLANG_WARN_INFINITE_RECURSION = YES;
375 | CLANG_WARN_INT_CONVERSION = YES;
376 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
377 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
378 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
379 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
380 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
381 | CLANG_WARN_STRICT_PROTOTYPES = YES;
382 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
383 | CLANG_WARN_UNREACHABLE_CODE = YES;
384 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
385 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
386 | COPY_PHASE_STRIP = NO;
387 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
388 | ENABLE_NS_ASSERTIONS = NO;
389 | ENABLE_STRICT_OBJC_MSGSEND = YES;
390 | GCC_C_LANGUAGE_STANDARD = gnu99;
391 | GCC_NO_COMMON_BLOCKS = YES;
392 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
393 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
394 | GCC_WARN_UNDECLARED_SELECTOR = YES;
395 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
396 | GCC_WARN_UNUSED_FUNCTION = YES;
397 | GCC_WARN_UNUSED_VARIABLE = YES;
398 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
399 | MTL_ENABLE_DEBUG_INFO = NO;
400 | SDKROOT = iphoneos;
401 | SUPPORTED_PLATFORMS = iphoneos;
402 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
403 | TARGETED_DEVICE_FAMILY = "1,2";
404 | VALIDATE_PRODUCT = YES;
405 | };
406 | name = Release;
407 | };
408 | 97C147061CF9000F007C117D /* Debug */ = {
409 | isa = XCBuildConfiguration;
410 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
411 | buildSettings = {
412 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
413 | CLANG_ENABLE_MODULES = YES;
414 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
415 | ENABLE_BITCODE = NO;
416 | INFOPLIST_FILE = Runner/Info.plist;
417 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
418 | PRODUCT_BUNDLE_IDENTIFIER = com.example.mynotes;
419 | PRODUCT_NAME = "$(TARGET_NAME)";
420 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
421 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
422 | SWIFT_VERSION = 5.0;
423 | VERSIONING_SYSTEM = "apple-generic";
424 | };
425 | name = Debug;
426 | };
427 | 97C147071CF9000F007C117D /* Release */ = {
428 | isa = XCBuildConfiguration;
429 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
430 | buildSettings = {
431 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
432 | CLANG_ENABLE_MODULES = YES;
433 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
434 | ENABLE_BITCODE = NO;
435 | INFOPLIST_FILE = Runner/Info.plist;
436 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
437 | PRODUCT_BUNDLE_IDENTIFIER = com.example.mynotes;
438 | PRODUCT_NAME = "$(TARGET_NAME)";
439 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
440 | SWIFT_VERSION = 5.0;
441 | VERSIONING_SYSTEM = "apple-generic";
442 | };
443 | name = Release;
444 | };
445 | /* End XCBuildConfiguration section */
446 |
447 | /* Begin XCConfigurationList section */
448 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
449 | isa = XCConfigurationList;
450 | buildConfigurations = (
451 | 97C147031CF9000F007C117D /* Debug */,
452 | 97C147041CF9000F007C117D /* Release */,
453 | 249021D3217E4FDB00AE95B9 /* Profile */,
454 | );
455 | defaultConfigurationIsVisible = 0;
456 | defaultConfigurationName = Release;
457 | };
458 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
459 | isa = XCConfigurationList;
460 | buildConfigurations = (
461 | 97C147061CF9000F007C117D /* Debug */,
462 | 97C147071CF9000F007C117D /* Release */,
463 | 249021D4217E4FDB00AE95B9 /* Profile */,
464 | );
465 | defaultConfigurationIsVisible = 0;
466 | defaultConfigurationName = Release;
467 | };
468 | /* End XCConfigurationList section */
469 | };
470 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
471 | }
472 |
--------------------------------------------------------------------------------
/mynotes/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/mynotes/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/mynotes/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/mynotes/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 |
--------------------------------------------------------------------------------
/mynotes/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/mynotes/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/mynotes/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/mynotes/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/mynotes/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 |
--------------------------------------------------------------------------------
/mynotes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/mynotes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/mynotes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/mynotes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/mynotes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/mynotes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/mynotes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/mynotes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/mynotes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/mynotes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/mynotes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/mynotes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/mynotes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/mynotes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/mynotes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/mynotes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/mynotes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/mynotes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/mynotes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/mynotes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/mynotes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/mynotes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/mynotes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/mynotes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/mynotes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/mynotes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/mynotes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/mynotes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/mynotes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/mynotes/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/mynotes/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 |
--------------------------------------------------------------------------------
/mynotes/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/mynotes/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/mynotes/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/mynotes/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/mynotes/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/mynotes/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/mynotes/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.
--------------------------------------------------------------------------------
/mynotes/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 |
--------------------------------------------------------------------------------
/mynotes/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 |
--------------------------------------------------------------------------------
/mynotes/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 | mynotes
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 |
--------------------------------------------------------------------------------
/mynotes/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/mynotes/lib/controller/google_auth.dart:
--------------------------------------------------------------------------------
1 | import 'package:cloud_firestore/cloud_firestore.dart';
2 | import 'package:firebase_auth/firebase_auth.dart';
3 | import 'package:flutter/cupertino.dart';
4 | import 'package:flutter/material.dart';
5 | import 'package:google_sign_in/google_sign_in.dart';
6 | import 'package:mynotes/pages/homepage.dart';
7 |
8 | GoogleSignIn googleSignIn = GoogleSignIn();
9 | final FirebaseAuth auth = FirebaseAuth.instance;
10 | CollectionReference users = FirebaseFirestore.instance.collection('users');
11 |
12 | // changing return type to void
13 | // as bool was not needed here
14 | void signInWithGoogle(BuildContext context) async {
15 | try {
16 | final GoogleSignInAccount googleSignInAccount = await googleSignIn.signIn();
17 |
18 | if (googleSignInAccount != null) {
19 | final GoogleSignInAuthentication googleSignInAuthentication =
20 | await googleSignInAccount.authentication;
21 |
22 | final AuthCredential credential = GoogleAuthProvider.credential(
23 | accessToken: googleSignInAuthentication.accessToken,
24 | idToken: googleSignInAuthentication.idToken);
25 |
26 | final UserCredential authResult =
27 | await auth.signInWithCredential(credential);
28 |
29 | final User user = authResult.user;
30 |
31 | var userData = {
32 | 'name': googleSignInAccount.displayName,
33 | 'provider': 'google',
34 | 'photoUrl': googleSignInAccount.photoUrl,
35 | 'email': googleSignInAccount.email,
36 | };
37 |
38 | users.doc(user.uid).get().then((doc) {
39 | if (doc.exists) {
40 | // old user
41 | doc.reference.update(userData);
42 |
43 | Navigator.of(context).pushReplacement(
44 | MaterialPageRoute(
45 | builder: (context) => HomePage(),
46 | ),
47 | );
48 | } else {
49 | // new user
50 |
51 | users.doc(user.uid).set(userData);
52 |
53 | Navigator.of(context).pushReplacement(
54 | MaterialPageRoute(
55 | builder: (context) => HomePage(),
56 | ),
57 | );
58 | }
59 | });
60 | }
61 | } catch (PlatformException) {
62 | print(PlatformException);
63 | print("Sign in not successful !");
64 | // better show an alert here
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/mynotes/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_auth/firebase_auth.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:firebase_core/firebase_core.dart';
4 | import 'package:mynotes/pages/homepage.dart';
5 | import 'package:mynotes/pages/login.dart';
6 |
7 | void main() async {
8 | WidgetsFlutterBinding.ensureInitialized();
9 | await Firebase.initializeApp();
10 | runApp(MyApp());
11 | }
12 |
13 | class MyApp extends StatelessWidget {
14 | // This widget is the root of your application.
15 | @override
16 | Widget build(BuildContext context) {
17 | return MaterialApp(
18 | title: 'My Notes',
19 | debugShowCheckedModeBanner: false,
20 | theme: ThemeData.dark().copyWith(
21 | primaryColor: Colors.white,
22 | accentColor: Colors.white,
23 | scaffoldBackgroundColor: Color(0xff070706),
24 | ),
25 | // which used to re-authenticate every time App was opened
26 | // earlier I was simply calling the Login page
27 | // fixed it here
28 | // home: LoginPage(),
29 | home:
30 | FirebaseAuth.instance.currentUser == null ? LoginPage() : HomePage(),
31 | );
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/mynotes/lib/pages/addnote.dart:
--------------------------------------------------------------------------------
1 | import 'package:cloud_firestore/cloud_firestore.dart';
2 | import 'package:firebase_auth/firebase_auth.dart';
3 | import 'package:flutter/material.dart';
4 |
5 | class AddNote extends StatefulWidget {
6 | @override
7 | _AddNoteState createState() => _AddNoteState();
8 | }
9 |
10 | class _AddNoteState extends State {
11 | String title;
12 | String des;
13 |
14 | @override
15 | Widget build(BuildContext context) {
16 | return SafeArea(
17 | child: Scaffold(
18 | body: SingleChildScrollView(
19 | child: Container(
20 | padding: EdgeInsets.all(
21 | 12.0,
22 | ),
23 | child: Column(
24 | children: [
25 | Row(
26 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
27 | children: [
28 | ElevatedButton(
29 | onPressed: () {
30 | Navigator.of(context).pop();
31 | },
32 | child: Icon(
33 | Icons.arrow_back_ios_outlined,
34 | size: 24.0,
35 | ),
36 | style: ButtonStyle(
37 | backgroundColor: MaterialStateProperty.all(
38 | Colors.grey[700],
39 | ),
40 | padding: MaterialStateProperty.all(
41 | EdgeInsets.symmetric(
42 | horizontal: 25.0,
43 | vertical: 8.0,
44 | ),
45 | ),
46 | ),
47 | ),
48 | //
49 | ElevatedButton(
50 | onPressed: add,
51 | child: Text(
52 | "Save",
53 | style: TextStyle(
54 | fontSize: 18.0,
55 | fontFamily: "lato",
56 | color: Colors.white,
57 | ),
58 | ),
59 | style: ButtonStyle(
60 | backgroundColor: MaterialStateProperty.all(
61 | Colors.grey[700],
62 | ),
63 | padding: MaterialStateProperty.all(
64 | EdgeInsets.symmetric(
65 | horizontal: 25.0,
66 | vertical: 8.0,
67 | ),
68 | ),
69 | ),
70 | ),
71 | ],
72 | ),
73 | //
74 | SizedBox(
75 | height: 12.0,
76 | ),
77 | //
78 | Form(
79 | child: Column(
80 | children: [
81 | TextFormField(
82 | decoration: InputDecoration.collapsed(
83 | hintText: "Title",
84 | ),
85 | style: TextStyle(
86 | fontSize: 32.0,
87 | fontFamily: "lato",
88 | fontWeight: FontWeight.bold,
89 | color: Colors.grey,
90 | ),
91 | onChanged: (_val) {
92 | title = _val;
93 | },
94 | ),
95 | //
96 | Container(
97 | height: MediaQuery.of(context).size.height * 0.75,
98 | padding: const EdgeInsets.only(top: 12.0),
99 | child: TextFormField(
100 | decoration: InputDecoration.collapsed(
101 | hintText: "Note Description",
102 | ),
103 | style: TextStyle(
104 | fontSize: 20.0,
105 | fontFamily: "lato",
106 | color: Colors.grey,
107 | ),
108 | onChanged: (_val) {
109 | des = _val;
110 | },
111 | maxLines: 20,
112 | ),
113 | ),
114 | ],
115 | ),
116 | ),
117 | ],
118 | ),
119 | ),
120 | ),
121 | ),
122 | );
123 | }
124 |
125 | void add() async {
126 | // save to db
127 | CollectionReference ref = FirebaseFirestore.instance
128 | .collection('users')
129 | .doc(FirebaseAuth.instance.currentUser.uid)
130 | .collection('notes');
131 |
132 | var data = {
133 | 'title': title,
134 | 'description': des,
135 | 'created': DateTime.now(),
136 | };
137 |
138 | ref.add(data);
139 |
140 | //
141 |
142 | Navigator.pop(context);
143 | }
144 | }
145 |
--------------------------------------------------------------------------------
/mynotes/lib/pages/homepage.dart:
--------------------------------------------------------------------------------
1 | import 'dart:math';
2 |
3 | import 'package:cloud_firestore/cloud_firestore.dart';
4 | import 'package:firebase_auth/firebase_auth.dart';
5 | import 'package:flutter/material.dart';
6 | import 'package:intl/intl.dart';
7 | import 'package:mynotes/pages/addnote.dart';
8 | import 'package:mynotes/pages/viewnote.dart';
9 |
10 | class HomePage extends StatefulWidget {
11 | @override
12 | _HomePageState createState() => _HomePageState();
13 | }
14 |
15 | class _HomePageState extends State {
16 | CollectionReference ref = FirebaseFirestore.instance
17 | .collection('users')
18 | .doc(FirebaseAuth.instance.currentUser.uid)
19 | .collection('notes');
20 |
21 | List myColors = [
22 | Colors.yellow[200],
23 | Colors.red[200],
24 | Colors.green[200],
25 | Colors.deepPurple[200],
26 | Colors.purple[200],
27 | Colors.cyan[200],
28 | Colors.teal[200],
29 | Colors.tealAccent[200],
30 | Colors.pink[200],
31 | ];
32 |
33 | @override
34 | Widget build(BuildContext context) {
35 | return Scaffold(
36 | floatingActionButton: FloatingActionButton(
37 | onPressed: () {
38 | Navigator.of(context)
39 | .push(
40 | MaterialPageRoute(
41 | builder: (context) => AddNote(),
42 | ),
43 | )
44 | .then((value) {
45 | print("Calling Set State !");
46 | setState(() {});
47 | });
48 | },
49 | child: Icon(
50 | Icons.add,
51 | color: Colors.white70,
52 | ),
53 | backgroundColor: Colors.grey[700],
54 | ),
55 | //
56 | appBar: AppBar(
57 | title: Text(
58 | "Notes",
59 | style: TextStyle(
60 | fontSize: 32.0,
61 | fontFamily: "lato",
62 | fontWeight: FontWeight.bold,
63 | color: Colors.white70,
64 | ),
65 | ),
66 | elevation: 0.0,
67 | backgroundColor: Color(0xff070706),
68 | ),
69 | //
70 | body: FutureBuilder(
71 | future: ref.get(),
72 | builder: (context, snapshot) {
73 | if (snapshot.hasData) {
74 | if (snapshot.data.docs.length == 0) {
75 | return Center(
76 | child: Text(
77 | "You have no saved Notes !",
78 | style: TextStyle(
79 | color: Colors.white70,
80 | ),
81 | ),
82 | );
83 | }
84 |
85 | return ListView.builder(
86 | itemCount: snapshot.data.docs.length,
87 | itemBuilder: (context, index) {
88 | Random random = new Random();
89 | Color bg = myColors[random.nextInt(4)];
90 | Map data = snapshot.data.docs[index].data();
91 | DateTime mydateTime = data['created'].toDate();
92 | String formattedTime =
93 | DateFormat.yMMMd().add_jm().format(mydateTime);
94 |
95 | return InkWell(
96 | onTap: () {
97 | Navigator.of(context)
98 | .push(
99 | MaterialPageRoute(
100 | builder: (context) => ViewNote(
101 | data,
102 | formattedTime,
103 | snapshot.data.docs[index].reference,
104 | ),
105 | ),
106 | )
107 | .then((value) {
108 | setState(() {});
109 | });
110 | },
111 | child: Card(
112 | color: bg,
113 | child: Padding(
114 | padding: const EdgeInsets.all(15.0),
115 | child: Column(
116 | crossAxisAlignment: CrossAxisAlignment.start,
117 | children: [
118 | Text(
119 | "${data['title']}",
120 | style: TextStyle(
121 | fontSize: 24.0,
122 | fontFamily: "lato",
123 | fontWeight: FontWeight.bold,
124 | color: Colors.black87,
125 | ),
126 | ),
127 | //
128 | Container(
129 | alignment: Alignment.centerRight,
130 | child: Text(
131 | formattedTime,
132 | style: TextStyle(
133 | fontSize: 20.0,
134 | fontFamily: "lato",
135 | color: Colors.black87,
136 | ),
137 | ),
138 | ),
139 | ],
140 | ),
141 | ),
142 | ),
143 | );
144 | },
145 | );
146 | } else {
147 | return Center(
148 | child: Text("Loading..."),
149 | );
150 | }
151 | },
152 | ),
153 | );
154 | }
155 | }
156 |
--------------------------------------------------------------------------------
/mynotes/lib/pages/login.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:mynotes/controller/google_auth.dart';
3 |
4 | class LoginPage extends StatefulWidget {
5 | @override
6 | _LoginPageState createState() => _LoginPageState();
7 | }
8 |
9 | class _LoginPageState extends State {
10 | @override
11 | Widget build(BuildContext context) {
12 | return Scaffold(
13 | body: Center(
14 | child: Column(
15 | children: [
16 | Expanded(
17 | child: Container(
18 | decoration: BoxDecoration(
19 | image: DecorationImage(
20 | image: AssetImage(
21 | "assets/images/cover.png",
22 | ),
23 | ),
24 | ),
25 | ),
26 | ),
27 | //
28 | Padding(
29 | padding: const EdgeInsets.symmetric(
30 | horizontal: 10.0,
31 | vertical: 12.0,
32 | ),
33 | child: Text(
34 | "Create and Manage your Notes",
35 | style: TextStyle(
36 | fontSize: 36.0,
37 | fontFamily: "lato",
38 | fontWeight: FontWeight.bold,
39 | ),
40 | ),
41 | ),
42 | //
43 | Padding(
44 | padding: const EdgeInsets.symmetric(
45 | horizontal: 10.0,
46 | ),
47 | child: ElevatedButton(
48 | onPressed: () {
49 | signInWithGoogle(context);
50 | },
51 | child: Row(
52 | mainAxisAlignment: MainAxisAlignment.center,
53 | children: [
54 | Text(
55 | "Continue With Google",
56 | style: TextStyle(
57 | fontSize: 20.0,
58 | fontFamily: "lato",
59 | ),
60 | ),
61 | //
62 | SizedBox(
63 | width: 10.0,
64 | ),
65 | //
66 | Image.asset(
67 | 'assets/images/google.png',
68 | height: 36.0,
69 | ),
70 | ],
71 | ),
72 | style: ButtonStyle(
73 | backgroundColor: MaterialStateProperty.all(
74 | Colors.grey[700],
75 | ),
76 | padding: MaterialStateProperty.all(
77 | EdgeInsets.symmetric(
78 | vertical: 12.0,
79 | ),
80 | )),
81 | ),
82 | ),
83 | //
84 | SizedBox(
85 | height: 10.0,
86 | ),
87 | ],
88 | ),
89 | ),
90 | );
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/mynotes/lib/pages/viewnote.dart:
--------------------------------------------------------------------------------
1 | import 'package:cloud_firestore/cloud_firestore.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | class ViewNote extends StatefulWidget {
5 | final Map data;
6 | final String time;
7 | final DocumentReference ref;
8 |
9 | ViewNote(this.data, this.time, this.ref);
10 |
11 | @override
12 | _ViewNoteState createState() => _ViewNoteState();
13 | }
14 |
15 | class _ViewNoteState extends State {
16 | String title;
17 | String des;
18 |
19 | bool edit = false;
20 | GlobalKey key = GlobalKey();
21 |
22 | @override
23 | Widget build(BuildContext context) {
24 | title = widget.data['title'];
25 | des = widget.data['description'];
26 | return SafeArea(
27 | child: Scaffold(
28 | //
29 | floatingActionButton: edit
30 | ? FloatingActionButton(
31 | onPressed: save,
32 | child: Icon(
33 | Icons.save_rounded,
34 | color: Colors.white,
35 | ),
36 | backgroundColor: Colors.grey[700],
37 | )
38 | : null,
39 | //
40 | resizeToAvoidBottomInset: false,
41 | //
42 | body: SingleChildScrollView(
43 | child: Container(
44 | padding: EdgeInsets.all(
45 | 12.0,
46 | ),
47 | child: Column(
48 | children: [
49 | Row(
50 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
51 | children: [
52 | ElevatedButton(
53 | onPressed: () {
54 | Navigator.of(context).pop();
55 | },
56 | child: Icon(
57 | Icons.arrow_back_ios_outlined,
58 | size: 24.0,
59 | ),
60 | style: ButtonStyle(
61 | backgroundColor: MaterialStateProperty.all(
62 | Colors.grey[700],
63 | ),
64 | padding: MaterialStateProperty.all(
65 | EdgeInsets.symmetric(
66 | horizontal: 25.0,
67 | vertical: 8.0,
68 | ),
69 | ),
70 | ),
71 | ),
72 | //
73 | Row(
74 | children: [
75 | ElevatedButton(
76 | onPressed: () {
77 | setState(() {
78 | edit = !edit;
79 | });
80 | },
81 | child: Icon(
82 | Icons.edit,
83 | size: 24.0,
84 | ),
85 | style: ButtonStyle(
86 | backgroundColor: MaterialStateProperty.all(
87 | Colors.grey[700],
88 | ),
89 | padding: MaterialStateProperty.all(
90 | EdgeInsets.symmetric(
91 | horizontal: 15.0,
92 | vertical: 8.0,
93 | ),
94 | ),
95 | ),
96 | ),
97 | //
98 | SizedBox(
99 | width: 8.0,
100 | ),
101 | //
102 | ElevatedButton(
103 | onPressed: delete,
104 | child: Icon(
105 | Icons.delete_forever,
106 | size: 24.0,
107 | ),
108 | style: ButtonStyle(
109 | backgroundColor: MaterialStateProperty.all(
110 | Colors.red[300],
111 | ),
112 | padding: MaterialStateProperty.all(
113 | EdgeInsets.symmetric(
114 | horizontal: 15.0,
115 | vertical: 8.0,
116 | ),
117 | ),
118 | ),
119 | ),
120 | ],
121 | ),
122 | ],
123 | ),
124 | //
125 | SizedBox(
126 | height: 12.0,
127 | ),
128 | //
129 | Form(
130 | key: key,
131 | child: Column(
132 | crossAxisAlignment: CrossAxisAlignment.start,
133 | children: [
134 | TextFormField(
135 | decoration: InputDecoration.collapsed(
136 | hintText: "Title",
137 | ),
138 | style: TextStyle(
139 | fontSize: 32.0,
140 | fontFamily: "lato",
141 | fontWeight: FontWeight.bold,
142 | color: Colors.grey,
143 | ),
144 | initialValue: widget.data['title'],
145 | enabled: edit,
146 | onChanged: (_val) {
147 | title = _val;
148 | },
149 | validator: (_val) {
150 | if (_val.isEmpty) {
151 | return "Can't be empty !";
152 | } else {
153 | return null;
154 | }
155 | },
156 | ),
157 | //
158 | Padding(
159 | padding: const EdgeInsets.only(
160 | top: 12.0,
161 | bottom: 12.0,
162 | ),
163 | child: Text(
164 | widget.time,
165 | style: TextStyle(
166 | fontSize: 20.0,
167 | fontFamily: "lato",
168 | color: Colors.grey,
169 | ),
170 | ),
171 | ),
172 |
173 | //
174 |
175 | TextFormField(
176 | decoration: InputDecoration.collapsed(
177 | hintText: "Note Description",
178 | ),
179 | style: TextStyle(
180 | fontSize: 20.0,
181 | fontFamily: "lato",
182 | color: Colors.grey,
183 | ),
184 | initialValue: widget.data['description'],
185 | enabled: edit,
186 | onChanged: (_val) {
187 | des = _val;
188 | },
189 | maxLines: 20,
190 | validator: (_val) {
191 | if (_val.isEmpty) {
192 | return "Can't be empty !";
193 | } else {
194 | return null;
195 | }
196 | },
197 | ),
198 | ],
199 | ),
200 | ),
201 | ],
202 | ),
203 | ),
204 | ),
205 | ),
206 | );
207 | }
208 |
209 | void delete() async {
210 | // delete from db
211 | await widget.ref.delete();
212 | Navigator.pop(context);
213 | }
214 |
215 | void save() async {
216 | if (key.currentState.validate()) {
217 | // TODo : showing any kind of alert that new changes have been saved
218 | await widget.ref.update(
219 | {'title': title, 'description': des},
220 | );
221 | Navigator.of(context).pop();
222 | }
223 | }
224 | }
225 |
--------------------------------------------------------------------------------
/mynotes/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "2.5.0"
11 | boolean_selector:
12 | dependency: transitive
13 | description:
14 | name: boolean_selector
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "2.1.0"
18 | characters:
19 | dependency: transitive
20 | description:
21 | name: characters
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "1.1.0"
25 | charcode:
26 | dependency: transitive
27 | description:
28 | name: charcode
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "1.2.0"
32 | clock:
33 | dependency: transitive
34 | description:
35 | name: clock
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "1.1.0"
39 | cloud_firestore:
40 | dependency: "direct main"
41 | description:
42 | name: cloud_firestore
43 | url: "https://pub.dartlang.org"
44 | source: hosted
45 | version: "1.0.1"
46 | cloud_firestore_platform_interface:
47 | dependency: transitive
48 | description:
49 | name: cloud_firestore_platform_interface
50 | url: "https://pub.dartlang.org"
51 | source: hosted
52 | version: "4.0.0"
53 | cloud_firestore_web:
54 | dependency: transitive
55 | description:
56 | name: cloud_firestore_web
57 | url: "https://pub.dartlang.org"
58 | source: hosted
59 | version: "1.0.1"
60 | collection:
61 | dependency: transitive
62 | description:
63 | name: collection
64 | url: "https://pub.dartlang.org"
65 | source: hosted
66 | version: "1.15.0"
67 | cupertino_icons:
68 | dependency: "direct main"
69 | description:
70 | name: cupertino_icons
71 | url: "https://pub.dartlang.org"
72 | source: hosted
73 | version: "1.0.2"
74 | fake_async:
75 | dependency: transitive
76 | description:
77 | name: fake_async
78 | url: "https://pub.dartlang.org"
79 | source: hosted
80 | version: "1.2.0"
81 | firebase:
82 | dependency: "direct main"
83 | description:
84 | name: firebase
85 | url: "https://pub.dartlang.org"
86 | source: hosted
87 | version: "9.0.0"
88 | firebase_auth:
89 | dependency: "direct main"
90 | description:
91 | name: firebase_auth
92 | url: "https://pub.dartlang.org"
93 | source: hosted
94 | version: "1.0.1"
95 | firebase_auth_platform_interface:
96 | dependency: transitive
97 | description:
98 | name: firebase_auth_platform_interface
99 | url: "https://pub.dartlang.org"
100 | source: hosted
101 | version: "4.0.0"
102 | firebase_auth_web:
103 | dependency: transitive
104 | description:
105 | name: firebase_auth_web
106 | url: "https://pub.dartlang.org"
107 | source: hosted
108 | version: "1.0.2"
109 | firebase_core:
110 | dependency: "direct main"
111 | description:
112 | name: firebase_core
113 | url: "https://pub.dartlang.org"
114 | source: hosted
115 | version: "1.0.1"
116 | firebase_core_platform_interface:
117 | dependency: transitive
118 | description:
119 | name: firebase_core_platform_interface
120 | url: "https://pub.dartlang.org"
121 | source: hosted
122 | version: "4.0.0"
123 | firebase_core_web:
124 | dependency: transitive
125 | description:
126 | name: firebase_core_web
127 | url: "https://pub.dartlang.org"
128 | source: hosted
129 | version: "1.0.1"
130 | flutter:
131 | dependency: "direct main"
132 | description: flutter
133 | source: sdk
134 | version: "0.0.0"
135 | flutter_test:
136 | dependency: "direct dev"
137 | description: flutter
138 | source: sdk
139 | version: "0.0.0"
140 | flutter_web_plugins:
141 | dependency: transitive
142 | description: flutter
143 | source: sdk
144 | version: "0.0.0"
145 | google_sign_in:
146 | dependency: "direct main"
147 | description:
148 | name: google_sign_in
149 | url: "https://pub.dartlang.org"
150 | source: hosted
151 | version: "5.0.0"
152 | google_sign_in_platform_interface:
153 | dependency: transitive
154 | description:
155 | name: google_sign_in_platform_interface
156 | url: "https://pub.dartlang.org"
157 | source: hosted
158 | version: "2.0.1"
159 | google_sign_in_web:
160 | dependency: transitive
161 | description:
162 | name: google_sign_in_web
163 | url: "https://pub.dartlang.org"
164 | source: hosted
165 | version: "0.10.0"
166 | http:
167 | dependency: transitive
168 | description:
169 | name: http
170 | url: "https://pub.dartlang.org"
171 | source: hosted
172 | version: "0.13.0"
173 | http_parser:
174 | dependency: transitive
175 | description:
176 | name: http_parser
177 | url: "https://pub.dartlang.org"
178 | source: hosted
179 | version: "4.0.0"
180 | intl:
181 | dependency: "direct main"
182 | description:
183 | name: intl
184 | url: "https://pub.dartlang.org"
185 | source: hosted
186 | version: "0.17.0"
187 | js:
188 | dependency: transitive
189 | description:
190 | name: js
191 | url: "https://pub.dartlang.org"
192 | source: hosted
193 | version: "0.6.3"
194 | matcher:
195 | dependency: transitive
196 | description:
197 | name: matcher
198 | url: "https://pub.dartlang.org"
199 | source: hosted
200 | version: "0.12.10"
201 | meta:
202 | dependency: transitive
203 | description:
204 | name: meta
205 | url: "https://pub.dartlang.org"
206 | source: hosted
207 | version: "1.3.0"
208 | path:
209 | dependency: transitive
210 | description:
211 | name: path
212 | url: "https://pub.dartlang.org"
213 | source: hosted
214 | version: "1.8.0"
215 | pedantic:
216 | dependency: transitive
217 | description:
218 | name: pedantic
219 | url: "https://pub.dartlang.org"
220 | source: hosted
221 | version: "1.11.0"
222 | plugin_platform_interface:
223 | dependency: transitive
224 | description:
225 | name: plugin_platform_interface
226 | url: "https://pub.dartlang.org"
227 | source: hosted
228 | version: "2.0.0"
229 | quiver:
230 | dependency: transitive
231 | description:
232 | name: quiver
233 | url: "https://pub.dartlang.org"
234 | source: hosted
235 | version: "3.0.0"
236 | sky_engine:
237 | dependency: transitive
238 | description: flutter
239 | source: sdk
240 | version: "0.0.99"
241 | source_span:
242 | dependency: transitive
243 | description:
244 | name: source_span
245 | url: "https://pub.dartlang.org"
246 | source: hosted
247 | version: "1.8.0"
248 | stack_trace:
249 | dependency: transitive
250 | description:
251 | name: stack_trace
252 | url: "https://pub.dartlang.org"
253 | source: hosted
254 | version: "1.10.0"
255 | stream_channel:
256 | dependency: transitive
257 | description:
258 | name: stream_channel
259 | url: "https://pub.dartlang.org"
260 | source: hosted
261 | version: "2.1.0"
262 | string_scanner:
263 | dependency: transitive
264 | description:
265 | name: string_scanner
266 | url: "https://pub.dartlang.org"
267 | source: hosted
268 | version: "1.1.0"
269 | term_glyph:
270 | dependency: transitive
271 | description:
272 | name: term_glyph
273 | url: "https://pub.dartlang.org"
274 | source: hosted
275 | version: "1.2.0"
276 | test_api:
277 | dependency: transitive
278 | description:
279 | name: test_api
280 | url: "https://pub.dartlang.org"
281 | source: hosted
282 | version: "0.2.19"
283 | typed_data:
284 | dependency: transitive
285 | description:
286 | name: typed_data
287 | url: "https://pub.dartlang.org"
288 | source: hosted
289 | version: "1.3.0"
290 | vector_math:
291 | dependency: transitive
292 | description:
293 | name: vector_math
294 | url: "https://pub.dartlang.org"
295 | source: hosted
296 | version: "2.1.0"
297 | sdks:
298 | dart: ">=2.12.0-259.9.beta <3.0.0"
299 | flutter: ">=1.20.0"
300 |
--------------------------------------------------------------------------------
/mynotes/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: mynotes
2 | description: A new Flutter project.
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: ^1.0.2
31 | firebase: ^9.0.0
32 | firebase_core: ^1.0.1
33 | firebase_auth: ^1.0.1
34 | cloud_firestore: ^1.0.1
35 | google_sign_in: ^5.0.0
36 | intl: ^0.17.0
37 |
38 | dev_dependencies:
39 | flutter_test:
40 | sdk: flutter
41 |
42 | # For information on the generic Dart part of this file, see the
43 | # following page: https://dart.dev/tools/pub/pubspec
44 |
45 | # The following section is specific to Flutter.
46 | flutter:
47 |
48 | # The following line ensures that the Material Icons font is
49 | # included with your application, so that you can use the icons in
50 | # the material Icons class.
51 | uses-material-design: true
52 |
53 | # To add assets to your application, add an assets section, like this:
54 | assets:
55 | - assets/images/
56 | # - images/a_dot_ham.jpeg
57 |
58 | # An image asset can refer to one or more resolution-specific "variants", see
59 | # https://flutter.dev/assets-and-images/#resolution-aware.
60 |
61 | # For details regarding adding assets from package dependencies, see
62 | # https://flutter.dev/assets-and-images/#from-packages
63 |
64 | # To add custom fonts to your application, add a fonts section here,
65 | # in this "flutter" section. Each entry in this list should have a
66 | # "family" key with the font family name, and a "fonts" key with a
67 | # list giving the asset and other descriptors for the font. For
68 | # example:
69 | fonts:
70 | - family: lato
71 | fonts:
72 | - asset: assets/fonts/Lato-Regular.ttf
73 | - asset: assets/fonts/Lato-Bold.ttf
74 | weight: 800
75 |
76 |
--------------------------------------------------------------------------------
/mynotes/screenshots/Screenshot_1621499653_pixel_quite_black_portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/mynotes/screenshots/Screenshot_1621499653_pixel_quite_black_portrait.png
--------------------------------------------------------------------------------
/mynotes/screenshots/Screenshot_1621499695_pixel_quite_black_portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/mynotes/screenshots/Screenshot_1621499695_pixel_quite_black_portrait.png
--------------------------------------------------------------------------------
/mynotes/screenshots/Screenshot_1621499698_pixel_quite_black_portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/mynotes/screenshots/Screenshot_1621499698_pixel_quite_black_portrait.png
--------------------------------------------------------------------------------
/mynotes/screenshots/Screenshot_1621499702_pixel_quite_black_portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/mynotes/screenshots/Screenshot_1621499702_pixel_quite_black_portrait.png
--------------------------------------------------------------------------------
/mynotes/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:mynotes/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 |
--------------------------------------------------------------------------------
/mynotes/web/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/mynotes/web/favicon.png
--------------------------------------------------------------------------------
/mynotes/web/icons/Icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/mynotes/web/icons/Icon-192.png
--------------------------------------------------------------------------------
/mynotes/web/icons/Icon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/desi-programmer/flutter-firebase/a99adbf4739da2cf4a8c98b71b7f599c6575cbf6/mynotes/web/icons/Icon-512.png
--------------------------------------------------------------------------------
/mynotes/web/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | mynotes
30 |
31 |
32 |
33 |
36 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/mynotes/web/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "mynotes",
3 | "short_name": "mynotes",
4 | "start_url": ".",
5 | "display": "standalone",
6 | "background_color": "#0175C2",
7 | "theme_color": "#0175C2",
8 | "description": "A new Flutter project.",
9 | "orientation": "portrait-primary",
10 | "prefer_related_applications": false,
11 | "icons": [
12 | {
13 | "src": "icons/Icon-192.png",
14 | "sizes": "192x192",
15 | "type": "image/png"
16 | },
17 | {
18 | "src": "icons/Icon-512.png",
19 | "sizes": "512x512",
20 | "type": "image/png"
21 | }
22 | ]
23 | }
24 |
--------------------------------------------------------------------------------