├── ios ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner │ ├── Runner-Bridging-Header.h │ ├── Assets.xcassets │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── 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-1024x1024@1x.png │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── GoogleService-Info.plist │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ └── project.pbxproj ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist └── .gitignore ├── assets └── notebook.png ├── android ├── gradle.properties ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── 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 │ │ │ │ ├── drawable │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable-v21 │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── values │ │ │ │ │ └── styles.xml │ │ │ │ └── values-night │ │ │ │ │ └── styles.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── etechviral │ │ │ │ │ └── mynotes │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── google-services.json │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── settings.gradle └── build.gradle ├── lib ├── generated │ └── assets.dart ├── app_const.dart ├── feature │ ├── domain │ │ ├── use_cases │ │ │ ├── sign_out_usecase.dart │ │ │ ├── is_sign_in_usecase.dart │ │ │ ├── sign_in_usecase.dart │ │ │ ├── sign_up_usecase.dart │ │ │ ├── delete_note_usecase.dart │ │ │ ├── get_notes_usecase.dart │ │ │ ├── update_note_usecase.dart │ │ │ ├── get_current_uid_usecase.dart │ │ │ ├── add_new_note_usecase.dart │ │ │ └── get_create_current_user_usecase.dart │ │ ├── entities │ │ │ ├── note_entity.dart │ │ │ └── user_entity.dart │ │ └── repositories │ │ │ └── firebase_repository.dart │ ├── presentation │ │ ├── cubit │ │ │ ├── auth │ │ │ │ ├── auth_state.dart │ │ │ │ └── auth_cubit.dart │ │ │ ├── user │ │ │ │ ├── user_state.dart │ │ │ │ └── user_cubit.dart │ │ │ └── note │ │ │ │ ├── note_state.dart │ │ │ │ └── note_cubit.dart │ │ ├── widgets │ │ │ └── common.dart │ │ └── pages │ │ │ ├── update_note_page.dart │ │ │ ├── add_new_note_page.dart │ │ │ ├── home_page.dart │ │ │ ├── sign_in_page.dart │ │ │ └── sign_up_page.dart │ └── data │ │ ├── remote │ │ ├── data_sources │ │ │ ├── firebase_remote_data_source.dart │ │ │ └── firebase_remote_data_source_impl.dart │ │ └── models │ │ │ ├── note_model.dart │ │ │ └── user_model.dart │ │ └── repositories │ │ └── firebase_repository_impl.dart ├── main.dart ├── on_generate_route.dart └── injection_container.dart ├── .metadata ├── README.md ├── .gitignore ├── test └── widget_test.dart ├── pubspec.yaml └── pubspec.lock /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /assets/notebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirk3321/my-notes-app/HEAD/assets/notebook.png -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirk3321/my-notes-app/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirk3321/my-notes-app/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirk3321/my-notes-app/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirk3321/my-notes-app/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirk3321/my-notes-app/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirk3321/my-notes-app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirk3321/my-notes-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirk3321/my-notes-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirk3321/my-notes-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirk3321/my-notes-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirk3321/my-notes-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirk3321/my-notes-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirk3321/my-notes-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirk3321/my-notes-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirk3321/my-notes-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirk3321/my-notes-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirk3321/my-notes-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirk3321/my-notes-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirk3321/my-notes-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirk3321/my-notes-app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirk3321/my-notes-app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirk3321/my-notes-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirk3321/my-notes-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/etechviral/mynotes/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.etechviral.mynotes 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/generated/assets.dart: -------------------------------------------------------------------------------- 1 | ///This file is automatically generated. DO NOT EDIT, all your changes would be lost. 2 | class Assets { 3 | Assets._(); 4 | 5 | static const String assetsNotebook = 'assets/notebook.png'; 6 | 7 | } 8 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/app_const.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | class AppConst{ 4 | 5 | } 6 | 7 | class PageConst{ 8 | static const String signUpPage="signUpPage"; 9 | static const String signInPage="signInPage"; 10 | static const String addNotePage="addNotePage"; 11 | static const String UpdateNotePage="UpdateNotePage"; 12 | } -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.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: f4abaa0735eba4dfd8f33f73363911d63931fe03 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /lib/feature/domain/use_cases/sign_out_usecase.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | import 'package:mynotes/feature/domain/repositories/firebase_repository.dart'; 4 | 5 | class SignOutUseCase { 6 | 7 | final FirebaseRepository repository; 8 | 9 | SignOutUseCase({required this.repository}); 10 | 11 | Future call()async{ 12 | return repository.signOut(); 13 | } 14 | } -------------------------------------------------------------------------------- /lib/feature/domain/use_cases/is_sign_in_usecase.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | import 'package:mynotes/feature/domain/repositories/firebase_repository.dart'; 4 | 5 | class IsSignInUseCase { 6 | 7 | final FirebaseRepository repository; 8 | 9 | IsSignInUseCase({required this.repository}); 10 | 11 | Future call()async{ 12 | return repository.isSignIn(); 13 | } 14 | } -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /lib/feature/domain/use_cases/sign_in_usecase.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | import 'package:mynotes/feature/domain/entities/user_entity.dart'; 4 | import 'package:mynotes/feature/domain/repositories/firebase_repository.dart'; 5 | 6 | class SignInUseCase { 7 | 8 | final FirebaseRepository repository; 9 | 10 | SignInUseCase({required this.repository}); 11 | 12 | Future call(UserEntity user)async{ 13 | return repository.signIn(user); 14 | } 15 | } -------------------------------------------------------------------------------- /lib/feature/domain/use_cases/sign_up_usecase.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | import 'package:mynotes/feature/domain/entities/user_entity.dart'; 4 | import 'package:mynotes/feature/domain/repositories/firebase_repository.dart'; 5 | 6 | class SignUPUseCase { 7 | 8 | final FirebaseRepository repository; 9 | 10 | SignUPUseCase({required this.repository}); 11 | 12 | Future call(UserEntity user)async{ 13 | return repository.signUp(user); 14 | } 15 | } -------------------------------------------------------------------------------- /lib/feature/domain/use_cases/delete_note_usecase.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:mynotes/feature/domain/entities/note_entity.dart'; 3 | import 'package:mynotes/feature/domain/repositories/firebase_repository.dart'; 4 | 5 | class DeleteNoteUseCase { 6 | 7 | final FirebaseRepository repository; 8 | 9 | DeleteNoteUseCase({required this.repository}); 10 | 11 | Future call(NoteEntity note)async{ 12 | return repository.deleteNote(note); 13 | } 14 | } -------------------------------------------------------------------------------- /lib/feature/domain/use_cases/get_notes_usecase.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | import 'package:mynotes/feature/domain/entities/note_entity.dart'; 4 | import 'package:mynotes/feature/domain/repositories/firebase_repository.dart'; 5 | 6 | class GetNotesUseCase { 7 | 8 | final FirebaseRepository repository; 9 | 10 | GetNotesUseCase({required this.repository}); 11 | 12 | Stream> call(String uid){ 13 | return repository.getNotes(uid); 14 | } 15 | } -------------------------------------------------------------------------------- /lib/feature/domain/use_cases/update_note_usecase.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | import 'package:mynotes/feature/domain/entities/note_entity.dart'; 4 | import 'package:mynotes/feature/domain/repositories/firebase_repository.dart'; 5 | 6 | class UpdateNoteUseCase { 7 | 8 | final FirebaseRepository repository; 9 | 10 | UpdateNoteUseCase({required this.repository}); 11 | 12 | Future call(NoteEntity note)async{ 13 | return repository.updateNote(note); 14 | } 15 | } -------------------------------------------------------------------------------- /lib/feature/domain/use_cases/get_current_uid_usecase.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | import 'package:mynotes/feature/domain/entities/user_entity.dart'; 5 | import 'package:mynotes/feature/domain/repositories/firebase_repository.dart'; 6 | 7 | class GetCurrentUidUseCase { 8 | 9 | final FirebaseRepository repository; 10 | 11 | GetCurrentUidUseCase({required this.repository}); 12 | 13 | Future call()async{ 14 | return repository.getCurrentUId(); 15 | } 16 | } -------------------------------------------------------------------------------- /lib/feature/domain/use_cases/add_new_note_usecase.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | import 'package:mynotes/feature/domain/entities/note_entity.dart'; 5 | import 'package:mynotes/feature/domain/repositories/firebase_repository.dart'; 6 | 7 | class AddNewNoteUseCase { 8 | 9 | final FirebaseRepository repository; 10 | 11 | AddNewNoteUseCase({required this.repository}); 12 | 13 | Future call(NoteEntity note)async{ 14 | return repository.addNewNote(note); 15 | } 16 | } -------------------------------------------------------------------------------- /lib/feature/domain/entities/note_entity.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:equatable/equatable.dart'; 3 | 4 | class NoteEntity extends Equatable { 5 | final String? noteId; 6 | final String? note; 7 | final Timestamp? time; 8 | final String? uid; 9 | 10 | NoteEntity({this.noteId, this.note, this.time, this.uid}); 11 | 12 | @override 13 | // TODO: implement props 14 | List get props => [note,noteId,time,uid]; 15 | } 16 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | import Firebase 4 | 5 | @UIApplicationMain 6 | @objc class AppDelegate: FlutterAppDelegate { 7 | override func application( 8 | _ application: UIApplication, 9 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 10 | ) -> Bool { 11 | GeneratedPluginRegistrant.register(with: self) 12 | FirebaseApp.configure() 13 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/feature/presentation/cubit/auth/auth_state.dart: -------------------------------------------------------------------------------- 1 | part of 'auth_cubit.dart'; 2 | 3 | abstract class AuthState extends Equatable { 4 | const AuthState(); 5 | } 6 | 7 | class AuthInitial extends AuthState { 8 | @override 9 | List get props => []; 10 | } 11 | 12 | class Authenticated extends AuthState { 13 | final String uid; 14 | 15 | Authenticated({required this.uid}); 16 | @override 17 | List get props => []; 18 | } 19 | 20 | class UnAuthenticated extends AuthState { 21 | @override 22 | List get props => []; 23 | } -------------------------------------------------------------------------------- /lib/feature/domain/use_cases/get_create_current_user_usecase.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | import 'package:mynotes/feature/domain/entities/note_entity.dart'; 7 | import 'package:mynotes/feature/domain/entities/user_entity.dart'; 8 | import 'package:mynotes/feature/domain/repositories/firebase_repository.dart'; 9 | 10 | class GetCreateCurrentUserUsecase { 11 | 12 | final FirebaseRepository repository; 13 | 14 | GetCreateCurrentUserUsecase({required this.repository}); 15 | 16 | Future call(UserEntity user)async{ 17 | return repository.getCreateCurrentUser(user); 18 | } 19 | } -------------------------------------------------------------------------------- /lib/feature/presentation/cubit/user/user_state.dart: -------------------------------------------------------------------------------- 1 | part of 'user_cubit.dart'; 2 | 3 | abstract class UserState extends Equatable { 4 | const UserState(); 5 | } 6 | 7 | class UserInitial extends UserState { 8 | @override 9 | List get props => []; 10 | } 11 | 12 | 13 | class UserLoading extends UserState { 14 | @override 15 | List get props => []; 16 | } 17 | class UserFailure extends UserState { 18 | @override 19 | List get props => []; 20 | } 21 | 22 | class UserSuccess extends UserState { 23 | @override 24 | List get props => []; 25 | } 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # mynotes 2 | 3 | A new Flutter project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /lib/feature/presentation/widgets/common.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | import 'package:flutter/material.dart'; 6 | import 'package:flutter_icons/flutter_icons.dart'; 7 | 8 | void snackBarError({String? msg, GlobalKey? scaffoldState}) { 9 | scaffoldState!.currentState!.showSnackBar( 10 | SnackBar( 11 | backgroundColor: Colors.red, 12 | duration: Duration(seconds: 3), 13 | content: Row( 14 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 15 | children: [ 16 | Text("$msg"), 17 | Icon(FontAwesome.exclamation_triangle) 18 | ], 19 | ), 20 | ), 21 | ); 22 | } -------------------------------------------------------------------------------- /lib/feature/domain/entities/user_entity.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | 3 | class UserEntity extends Equatable { 4 | final String? name; 5 | final String? email; 6 | final String? uid; 7 | final String? status; 8 | final String? password; 9 | 10 | UserEntity({ 11 | this.name, 12 | this.email, 13 | this.uid, 14 | this.status = "Hello there i'm using this app", 15 | this.password, 16 | }); 17 | 18 | @override 19 | // TODO: implement props 20 | List get props => [ 21 | name, 22 | email, 23 | uid, 24 | status, 25 | password, 26 | ]; 27 | } 28 | -------------------------------------------------------------------------------- /lib/feature/presentation/cubit/note/note_state.dart: -------------------------------------------------------------------------------- 1 | part of 'note_cubit.dart'; 2 | 3 | abstract class NoteState extends Equatable { 4 | const NoteState(); 5 | } 6 | 7 | class NoteInitial extends NoteState { 8 | @override 9 | List get props => []; 10 | } 11 | 12 | class NoteLoading extends NoteState { 13 | @override 14 | List get props => []; 15 | } 16 | 17 | class NoteFailure extends NoteState { 18 | @override 19 | List get props => []; 20 | } 21 | 22 | class NoteLoaded extends NoteState { 23 | final List notes; 24 | 25 | NoteLoaded({required this.notes}); 26 | @override 27 | List get props => [notes]; 28 | } 29 | -------------------------------------------------------------------------------- /lib/feature/domain/repositories/firebase_repository.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | import 'package:mynotes/feature/domain/entities/note_entity.dart'; 5 | import 'package:mynotes/feature/domain/entities/user_entity.dart'; 6 | 7 | abstract class FirebaseRepository{ 8 | Future isSignIn(); 9 | Future signIn(UserEntity user); 10 | Future signUp(UserEntity user); 11 | Future signOut(); 12 | Future getCurrentUId(); 13 | Future getCreateCurrentUser(UserEntity user); 14 | Future addNewNote(NoteEntity note); 15 | Future updateNote(NoteEntity note); 16 | Future deleteNote(NoteEntity note); 17 | Stream> getNotes(String uid); 18 | } -------------------------------------------------------------------------------- /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/ephemeral/ 22 | Flutter/app.flx 23 | Flutter/app.zip 24 | Flutter/flutter_assets/ 25 | Flutter/flutter_export_environment.sh 26 | ServiceDefinitions.json 27 | Runner/GeneratedPluginRegistrant.* 28 | 29 | # Exceptions to above rules. 30 | !default.mode1v3 31 | !default.mode2v3 32 | !default.pbxuser 33 | !default.perspectivev3 34 | -------------------------------------------------------------------------------- /lib/feature/data/remote/data_sources/firebase_remote_data_source.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | import 'package:mynotes/feature/domain/entities/note_entity.dart'; 5 | import 'package:mynotes/feature/domain/entities/user_entity.dart'; 6 | 7 | abstract class FirebaseRemoteDataSource{ 8 | Future isSignIn(); 9 | Future signIn(UserEntity user); 10 | Future signUp(UserEntity user); 11 | Future signOut(); 12 | Future getCurrentUId(); 13 | Future getCreateCurrentUser(UserEntity user); 14 | Future addNewNote(NoteEntity note); 15 | Future updateNote(NoteEntity note); 16 | Future deleteNote(NoteEntity note); 17 | Stream> getNotes(String uid); 18 | } 19 | -------------------------------------------------------------------------------- /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 'com.google.gms:google-services:4.3.8' 11 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 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 | project.evaluationDependsOn(':app') 26 | } 27 | 28 | task clean(type: Delete) { 29 | delete rootProject.buildDir 30 | } 31 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /lib/feature/data/remote/models/note_model.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | import 'package:cloud_firestore/cloud_firestore.dart'; 4 | import 'package:mynotes/feature/domain/entities/note_entity.dart'; 5 | 6 | class NoteModel extends NoteEntity{ 7 | NoteModel({ 8 | final String? noteId, 9 | final String? note, 10 | final Timestamp? time, 11 | final String? uid, 12 | }) :super( 13 | uid: uid, 14 | time: time, 15 | note: note, 16 | noteId: noteId 17 | ); 18 | factory NoteModel.fromSnapshot(DocumentSnapshot documentSnapshot){ 19 | return NoteModel( 20 | noteId: documentSnapshot.get('noteId'), 21 | note: documentSnapshot.get('note'), 22 | uid: documentSnapshot.get('uid'), 23 | time: documentSnapshot.get('time'), 24 | ); 25 | } 26 | 27 | Map toDocument(){ 28 | return { 29 | "uid":uid, 30 | "time":time, 31 | "note":note, 32 | "noteId":noteId 33 | }; 34 | } 35 | 36 | 37 | } -------------------------------------------------------------------------------- /lib/feature/data/remote/models/user_model.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | import 'package:cloud_firestore/cloud_firestore.dart'; 5 | import 'package:mynotes/feature/domain/entities/user_entity.dart'; 6 | 7 | class UserModel extends UserEntity{ 8 | UserModel({ 9 | final String? name, 10 | final String? email, 11 | final String? uid, 12 | final String? status, 13 | final String? password, 14 | }):super( 15 | uid: uid, 16 | name: name, 17 | email: email, 18 | password: password, 19 | status: status 20 | ); 21 | 22 | factory UserModel.fromSnapshot(DocumentSnapshot documentSnapshot){ 23 | return UserModel( 24 | status: documentSnapshot.get('status'), 25 | name: documentSnapshot.get('name'), 26 | uid: documentSnapshot.get('uid'), 27 | email: documentSnapshot.get('email'), 28 | ); 29 | } 30 | 31 | Map toDocument(){ 32 | return { 33 | "status":status, 34 | "uid":uid, 35 | "email":email, 36 | "name":name 37 | }; 38 | } 39 | 40 | } -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/app/google-services.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_info": { 3 | "project_number": "611458750364", 4 | "project_id": "mynotes-c12a8", 5 | "storage_bucket": "mynotes-c12a8.appspot.com" 6 | }, 7 | "client": [ 8 | { 9 | "client_info": { 10 | "mobilesdk_app_id": "1:611458750364:android:a4260a167c9eb903b49a59", 11 | "android_client_info": { 12 | "package_name": "com.etechviral.mynotes" 13 | } 14 | }, 15 | "oauth_client": [ 16 | { 17 | "client_id": "611458750364-tt4at1dl0gek39adllljadbnd3etu731.apps.googleusercontent.com", 18 | "client_type": 3 19 | } 20 | ], 21 | "api_key": [ 22 | { 23 | "current_key": "AIzaSyCa1bGa5ptsrIRZFNK-iRaao24XuXFLmdE" 24 | } 25 | ], 26 | "services": { 27 | "appinvite_service": { 28 | "other_platform_oauth_client": [ 29 | { 30 | "client_id": "611458750364-tt4at1dl0gek39adllljadbnd3etu731.apps.googleusercontent.com", 31 | "client_type": 3 32 | } 33 | ] 34 | } 35 | } 36 | } 37 | ], 38 | "configuration_version": "1" 39 | } -------------------------------------------------------------------------------- /ios/Runner/GoogleService-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CLIENT_ID 6 | 611458750364-oeeo3pvdjop5ar39etcor3urmq0e6qns.apps.googleusercontent.com 7 | REVERSED_CLIENT_ID 8 | com.googleusercontent.apps.611458750364-oeeo3pvdjop5ar39etcor3urmq0e6qns 9 | API_KEY 10 | AIzaSyDkA0p9Pn_BTAPwrYCPTfnxbW9LpWHq39I 11 | GCM_SENDER_ID 12 | 611458750364 13 | PLIST_VERSION 14 | 1 15 | BUNDLE_ID 16 | com.etechviral.mynotes 17 | PROJECT_ID 18 | mynotes-c12a8 19 | STORAGE_BUCKET 20 | mynotes-c12a8.appspot.com 21 | IS_ADS_ENABLED 22 | 23 | IS_ANALYTICS_ENABLED 24 | 25 | IS_APPINVITE_ENABLED 26 | 27 | IS_GCM_ENABLED 28 | 29 | IS_SIGNIN_ENABLED 30 | 31 | GOOGLE_APP_ID 32 | 1:611458750364:ios:46eba81c13d5eff1b49a59 33 | 34 | -------------------------------------------------------------------------------- /lib/feature/presentation/cubit/user/user_cubit.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:bloc/bloc.dart'; 4 | import 'package:equatable/equatable.dart'; 5 | import 'package:mynotes/feature/domain/entities/user_entity.dart'; 6 | import 'package:mynotes/feature/domain/use_cases/get_create_current_user_usecase.dart'; 7 | import 'package:mynotes/feature/domain/use_cases/sign_in_usecase.dart'; 8 | import 'package:mynotes/feature/domain/use_cases/sign_up_usecase.dart'; 9 | 10 | part 'user_state.dart'; 11 | 12 | class UserCubit extends Cubit { 13 | final SignInUseCase signInUseCase; 14 | final SignUPUseCase signUPUseCase; 15 | final GetCreateCurrentUserUsecase getCreateCurrentUserUseCase; 16 | UserCubit({required this.signUPUseCase,required this.signInUseCase,required this.getCreateCurrentUserUseCase}) : super(UserInitial()); 17 | 18 | Future submitSignIn({required UserEntity user})async{ 19 | emit(UserLoading()); 20 | try { 21 | await signInUseCase.call(user); 22 | emit(UserSuccess()); 23 | }on SocketException catch(_){ 24 | emit(UserFailure()); 25 | } catch(_){ 26 | emit(UserFailure()); 27 | } 28 | } 29 | Future submitSignUp({required UserEntity user})async{ 30 | emit(UserLoading()); 31 | try { 32 | await signUPUseCase.call(user); 33 | await getCreateCurrentUserUseCase.call(user); 34 | emit(UserSuccess()); 35 | }on SocketException catch(_){ 36 | emit(UserFailure()); 37 | } catch(_){ 38 | emit(UserFailure()); 39 | } 40 | 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /lib/feature/presentation/cubit/auth/auth_cubit.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:bloc/bloc.dart'; 4 | import 'package:equatable/equatable.dart'; 5 | import 'package:mynotes/feature/domain/use_cases/get_current_uid_usecase.dart'; 6 | import 'package:mynotes/feature/domain/use_cases/is_sign_in_usecase.dart'; 7 | import 'package:mynotes/feature/domain/use_cases/sign_out_usecase.dart'; 8 | 9 | part 'auth_state.dart'; 10 | 11 | class AuthCubit extends Cubit { 12 | final GetCurrentUidUseCase getCurrentUidUseCase; 13 | final IsSignInUseCase isSignInUseCase; 14 | final SignOutUseCase signOutUseCase; 15 | AuthCubit({required this.isSignInUseCase,required this.signOutUseCase,required this.getCurrentUidUseCase}) : super(AuthInitial()); 16 | 17 | Future appStarted()async{ 18 | try{ 19 | final isSignIn=await isSignInUseCase.call(); 20 | if (isSignIn){ 21 | final uid=await getCurrentUidUseCase.call(); 22 | emit(Authenticated(uid: uid)); 23 | }else{ 24 | emit(UnAuthenticated()); 25 | } 26 | 27 | 28 | }on SocketException catch(_){ 29 | emit(UnAuthenticated()); 30 | } 31 | 32 | 33 | } 34 | 35 | 36 | Future loggedIn()async{ 37 | try{ 38 | final uid=await getCurrentUidUseCase.call(); 39 | emit(Authenticated(uid: uid)); 40 | }on SocketException catch(_){ 41 | emit(UnAuthenticated()); 42 | } 43 | 44 | } 45 | Future loggedOut()async{ 46 | try{ 47 | await signOutUseCase.call(); 48 | emit(UnAuthenticated()); 49 | }on SocketException catch(_){ 50 | emit(UnAuthenticated()); 51 | } 52 | 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | 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 | -------------------------------------------------------------------------------- /lib/feature/data/repositories/firebase_repository_impl.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | import 'package:mynotes/feature/data/remote/data_sources/firebase_remote_data_source.dart'; 4 | import 'package:mynotes/feature/domain/entities/note_entity.dart'; 5 | import 'package:mynotes/feature/domain/entities/user_entity.dart'; 6 | import 'package:mynotes/feature/domain/repositories/firebase_repository.dart'; 7 | 8 | class FirebaseRepositoryImpl extends FirebaseRepository{ 9 | final FirebaseRemoteDataSource remoteDataSource; 10 | 11 | FirebaseRepositoryImpl({required this.remoteDataSource}); 12 | @override 13 | Future addNewNote(NoteEntity note) async => 14 | remoteDataSource.addNewNote(note); 15 | 16 | @override 17 | Future deleteNote(NoteEntity note) async => 18 | remoteDataSource.deleteNote(note); 19 | 20 | @override 21 | Future getCreateCurrentUser(UserEntity user) async => 22 | remoteDataSource.getCreateCurrentUser(user); 23 | 24 | @override 25 | Future getCurrentUId() async => 26 | remoteDataSource.getCurrentUId(); 27 | 28 | @override 29 | Stream> getNotes(String uid) => 30 | remoteDataSource.getNotes(uid); 31 | 32 | @override 33 | Future isSignIn() async => 34 | remoteDataSource.isSignIn(); 35 | 36 | @override 37 | Future signIn(UserEntity user) async => 38 | remoteDataSource.signIn(user); 39 | 40 | @override 41 | Future signOut() async => 42 | remoteDataSource.signOut(); 43 | 44 | @override 45 | Future signUp(UserEntity user) async => 46 | remoteDataSource.signUp(user); 47 | 48 | @override 49 | Future updateNote(NoteEntity note) async => 50 | remoteDataSource.updateNote(note); 51 | 52 | } -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_bloc/flutter_bloc.dart'; 3 | import 'package:mynotes/feature/presentation/cubit/note/note_cubit.dart'; 4 | import 'package:mynotes/feature/presentation/cubit/user/user_cubit.dart'; 5 | import 'package:mynotes/feature/presentation/pages/sign_in_page.dart'; 6 | import 'feature/presentation/cubit/auth/auth_cubit.dart'; 7 | import 'feature/presentation/pages/home_page.dart'; 8 | import 'injection_container.dart' as di; 9 | import 'package:firebase_core/firebase_core.dart'; 10 | 11 | import 'on_generate_route.dart'; 12 | 13 | void main() async{ 14 | WidgetsFlutterBinding.ensureInitialized(); 15 | await Firebase.initializeApp(); 16 | await di.init(); 17 | runApp(MyApp()); 18 | } 19 | 20 | class MyApp extends StatelessWidget { 21 | @override 22 | Widget build(BuildContext context) { 23 | return MultiBlocProvider( 24 | providers: [ 25 | BlocProvider(create: (_) => di.sl()..appStarted()), 26 | BlocProvider(create: (_) => di.sl()), 27 | BlocProvider(create: (_) => di.sl()), 28 | ], 29 | child: MaterialApp( 30 | title: 'My Notes', 31 | debugShowCheckedModeBanner: false, 32 | theme: ThemeData(primarySwatch: Colors.deepOrange), 33 | initialRoute: '/', 34 | onGenerateRoute:OnGenerateRoute.route, 35 | routes: { 36 | "/": (context){ 37 | return BlocBuilder(builder:(context,authState){ 38 | 39 | if (authState is Authenticated){ 40 | return HomePage(uid: authState.uid,); 41 | } 42 | if (authState is UnAuthenticated){ 43 | return SignInPage(); 44 | } 45 | 46 | return CircularProgressIndicator(); 47 | }); 48 | } 49 | }, 50 | ), 51 | ); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /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.etechviral.mynotes" 39 | minSdkVersion 16 40 | targetSdkVersion 30 41 | versionCode flutterVersionCode.toInteger() 42 | versionName flutterVersionName 43 | multiDexEnabled true 44 | } 45 | 46 | buildTypes { 47 | release { 48 | // TODO: Add your own signing config for the release build. 49 | // Signing with the debug keys for now, so `flutter run --release` works. 50 | signingConfig signingConfigs.debug 51 | } 52 | } 53 | } 54 | 55 | flutter { 56 | source '../..' 57 | } 58 | 59 | dependencies { 60 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 61 | } 62 | -------------------------------------------------------------------------------- /lib/on_generate_route.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | import 'package:flutter/cupertino.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:mynotes/app_const.dart'; 7 | import 'package:mynotes/feature/presentation/pages/sign_in_page.dart'; 8 | 9 | import 'feature/domain/entities/note_entity.dart'; 10 | import 'feature/presentation/pages/add_new_note_page.dart'; 11 | import 'feature/presentation/pages/sign_up_page.dart'; 12 | import 'feature/presentation/pages/update_note_page.dart'; 13 | 14 | class OnGenerateRoute{ 15 | static Route route(RouteSettings settings){ 16 | final args=settings.arguments; 17 | 18 | 19 | switch(settings.name){ 20 | case PageConst.signInPage:{ 21 | return materialBuilder(widget: SignInPage()); 22 | break; 23 | } 24 | case PageConst.signUpPage:{ 25 | return materialBuilder(widget: SignUpPage()); 26 | break; 27 | } 28 | case PageConst.addNotePage:{ 29 | if (args is String) { 30 | return materialBuilder(widget: AddNewNotePage(uid: args,)); 31 | } 32 | else { 33 | return materialBuilder( 34 | widget: ErrorPage(), 35 | ); 36 | } 37 | break; 38 | } 39 | case PageConst.UpdateNotePage:{ 40 | if (args is NoteEntity) { 41 | return materialBuilder(widget: UpdateNotePage(noteEntity: args,)); 42 | } 43 | else { 44 | return materialBuilder( 45 | widget: ErrorPage(), 46 | ); 47 | } 48 | break; 49 | } 50 | default: return materialBuilder(widget: ErrorPage()); 51 | } 52 | 53 | } 54 | } 55 | 56 | class ErrorPage extends StatelessWidget { 57 | @override 58 | Widget build(BuildContext context) { 59 | return Scaffold( 60 | appBar: AppBar( 61 | title: Text("error"), 62 | ), 63 | body: Center( 64 | child: Text("error"), 65 | ), 66 | ); 67 | } 68 | } 69 | 70 | MaterialPageRoute materialBuilder({required Widget widget}) { 71 | return MaterialPageRoute(builder: (_) => widget); 72 | } -------------------------------------------------------------------------------- /lib/feature/presentation/cubit/note/note_cubit.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:bloc/bloc.dart'; 4 | import 'package:equatable/equatable.dart'; 5 | import 'package:mynotes/feature/domain/entities/note_entity.dart'; 6 | import 'package:mynotes/feature/domain/use_cases/add_new_note_usecase.dart'; 7 | import 'package:mynotes/feature/domain/use_cases/delete_note_usecase.dart'; 8 | import 'package:mynotes/feature/domain/use_cases/get_notes_usecase.dart'; 9 | import 'package:mynotes/feature/domain/use_cases/update_note_usecase.dart'; 10 | 11 | part 'note_state.dart'; 12 | 13 | class NoteCubit extends Cubit { 14 | final UpdateNoteUseCase updateNoteUseCase; 15 | final DeleteNoteUseCase deleteNoteUseCase; 16 | final GetNotesUseCase getNotesUseCase; 17 | final AddNewNoteUseCase addNewNoteUseCase; 18 | NoteCubit({required this.getNotesUseCase,required this.deleteNoteUseCase,required this.updateNoteUseCase,required this.addNewNoteUseCase}) : super(NoteInitial()); 19 | 20 | 21 | Future addNote({required NoteEntity note})async{ 22 | try{ 23 | await addNewNoteUseCase.call(note); 24 | }on SocketException catch(_){ 25 | emit(NoteFailure()); 26 | }catch(_){ 27 | emit(NoteFailure()); 28 | } 29 | } 30 | 31 | Future deleteNote({required NoteEntity note})async{ 32 | try{ 33 | await deleteNoteUseCase.call(note); 34 | }on SocketException catch(_){ 35 | emit(NoteFailure()); 36 | }catch(_){ 37 | emit(NoteFailure()); 38 | } 39 | } 40 | Future updateNote({required NoteEntity note})async{ 41 | try{ 42 | await updateNoteUseCase.call(note); 43 | }on SocketException catch(_){ 44 | emit(NoteFailure()); 45 | }catch(_){ 46 | emit(NoteFailure()); 47 | } 48 | } 49 | 50 | Future getNotes({required String uid})async{ 51 | emit(NoteLoading()); 52 | try{ 53 | getNotesUseCase.call(uid).listen((notes) { 54 | emit(NoteLoaded(notes: notes)); 55 | }); 56 | }on SocketException catch(_){ 57 | emit(NoteFailure()); 58 | }catch(_){ 59 | emit(NoteFailure()); 60 | } 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 13 | 17 | 21 | 26 | 30 | 31 | 32 | 33 | 34 | 35 | 37 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/feature/presentation/pages/update_note_page.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | import 'package:cloud_firestore/cloud_firestore.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:flutter_bloc/flutter_bloc.dart'; 6 | import 'package:intl/intl.dart'; 7 | import 'package:mynotes/feature/domain/entities/note_entity.dart'; 8 | import 'package:mynotes/feature/presentation/cubit/note/note_cubit.dart'; 9 | 10 | class UpdateNotePage extends StatefulWidget { 11 | final NoteEntity noteEntity; 12 | const UpdateNotePage({Key? key,required this.noteEntity}) : super(key: key); 13 | 14 | @override 15 | _UpdateNotePageState createState() => _UpdateNotePageState(); 16 | } 17 | 18 | class _UpdateNotePageState extends State { 19 | 20 | TextEditingController? _noteTextController; 21 | 22 | @override 23 | void initState() { 24 | _noteTextController=TextEditingController(text: widget.noteEntity.note); 25 | _noteTextController!.addListener(() { 26 | setState(() {}); 27 | }); 28 | super.initState(); 29 | } 30 | 31 | @override 32 | void dispose() { 33 | _noteTextController!.dispose(); 34 | super.dispose(); 35 | } 36 | 37 | 38 | @override 39 | Widget build(BuildContext context) { 40 | return Scaffold( 41 | appBar: AppBar(title: Text("Update Note"),), 42 | body: Container( 43 | padding: EdgeInsets.symmetric(horizontal: 10,vertical: 10), 44 | child: Column( 45 | crossAxisAlignment: CrossAxisAlignment.start, 46 | children: [ 47 | Text("${DateFormat("dd MMM hh:mm a").format(DateTime.now())} | ${_noteTextController!.text.length} Characters",style: TextStyle(fontSize: 14,color: Colors.black.withOpacity(.5)),), 48 | Expanded( 49 | child: Scrollbar( 50 | child: TextFormField( 51 | controller: _noteTextController, 52 | maxLines: null, 53 | decoration: InputDecoration( 54 | border: InputBorder.none, 55 | hintText: "start your note" 56 | ), 57 | ), 58 | ), 59 | ), 60 | InkWell( 61 | onTap: _submitUpdateNote, 62 | child: Container( 63 | height: 45, 64 | width: double.infinity, 65 | alignment: Alignment.center, 66 | decoration: BoxDecoration( 67 | color: Colors.deepOrange, 68 | borderRadius: BorderRadius.circular(8) 69 | ), 70 | child: Text("Update",style: TextStyle(fontSize: 18,color: Colors.white),), 71 | ), 72 | ) 73 | ], 74 | ), 75 | ), 76 | ); 77 | } 78 | 79 | void _submitUpdateNote() { 80 | BlocProvider.of(context).updateNote(note: NoteEntity( 81 | note: _noteTextController!.text, 82 | noteId: widget.noteEntity.noteId, 83 | time: Timestamp.now(), 84 | uid: widget.noteEntity.uid, 85 | ),); 86 | 87 | Future.delayed(Duration(seconds: 1),(){ 88 | Navigator.pop(context); 89 | }); 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/feature/presentation/pages/add_new_note_page.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | import 'package:cloud_firestore/cloud_firestore.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:flutter_bloc/flutter_bloc.dart'; 7 | import 'package:intl/intl.dart'; 8 | import 'package:mynotes/feature/domain/entities/note_entity.dart'; 9 | import 'package:mynotes/feature/presentation/cubit/note/note_cubit.dart'; 10 | import 'package:mynotes/feature/presentation/widgets/common.dart'; 11 | 12 | class AddNewNotePage extends StatefulWidget { 13 | final String uid; 14 | const AddNewNotePage({Key? key,required this.uid}) : super(key: key); 15 | 16 | @override 17 | _AddNewNotePageState createState() => _AddNewNotePageState(); 18 | } 19 | 20 | class _AddNewNotePageState extends State { 21 | 22 | TextEditingController _noteTextController=TextEditingController(); 23 | GlobalKey _scaffoldStateKey= GlobalKey(); 24 | 25 | 26 | 27 | @override 28 | void initState() { 29 | _noteTextController.addListener(() {setState(() { 30 | 31 | });}); 32 | super.initState(); 33 | } 34 | 35 | @override 36 | void dispose() { 37 | _noteTextController.dispose(); 38 | super.dispose(); 39 | } 40 | 41 | @override 42 | Widget build(BuildContext context) { 43 | return Scaffold( 44 | key: _scaffoldStateKey, 45 | appBar: AppBar(title: Text("Note"),), 46 | body: Container( 47 | padding: EdgeInsets.symmetric(horizontal: 10,vertical: 10), 48 | child: Column( 49 | crossAxisAlignment: CrossAxisAlignment.start, 50 | children: [ 51 | Text("${DateFormat("dd MMM hh:mm a").format(DateTime.now())} | ${_noteTextController.text.length} Characters",style: TextStyle(fontSize: 14,color: Colors.black.withOpacity(.5)),), 52 | Expanded( 53 | child: Scrollbar( 54 | child: TextFormField( 55 | controller: _noteTextController, 56 | maxLines: null, 57 | decoration: InputDecoration( 58 | border: InputBorder.none, 59 | hintText: "start typing..." 60 | ), 61 | ), 62 | ), 63 | ), 64 | InkWell( 65 | onTap: _submitNewNote, 66 | child: Container( 67 | height: 45, 68 | width: double.infinity, 69 | alignment: Alignment.center, 70 | decoration: BoxDecoration( 71 | color: Colors.deepOrange, 72 | borderRadius: BorderRadius.circular(8) 73 | ), 74 | child: Text("Save",style: TextStyle(fontSize: 18,color: Colors.white),), 75 | ), 76 | ) 77 | ], 78 | ), 79 | ), 80 | ); 81 | } 82 | 83 | void _submitNewNote() { 84 | if (_noteTextController.text.isEmpty){ 85 | snackBarError(scaffoldState: _scaffoldStateKey,msg: "type something"); 86 | return; 87 | } 88 | BlocProvider.of(context).addNote(note: NoteEntity( 89 | note: _noteTextController.text, 90 | time: Timestamp.now(), 91 | uid: widget.uid, 92 | ),); 93 | 94 | Future.delayed(Duration(seconds: 1),(){ 95 | Navigator.pop(context); 96 | }); 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /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.12.0 <3.0.0" 22 | 23 | dependencies: 24 | flutter: 25 | sdk: flutter 26 | #state management 27 | flutter_bloc: ^7.1.0 28 | equatable: ^2.0.3 29 | #firebase 30 | firebase_auth: ^3.0.1 31 | cloud_firestore: ^2.4.0 32 | #service locator 33 | get_it: ^7.2.0 34 | #dateFormat 35 | intl: ^0.17.0 36 | flutter_icons: ^1.1.0 37 | 38 | # The following adds the Cupertino Icons font to your application. 39 | # Use with the CupertinoIcons class for iOS style icons. 40 | cupertino_icons: ^1.0.3 41 | 42 | dev_dependencies: 43 | flutter_test: 44 | sdk: flutter 45 | 46 | # For information on the generic Dart part of this file, see the 47 | # following page: https://dart.dev/tools/pub/pubspec 48 | 49 | # The following section is specific to Flutter. 50 | flutter: 51 | 52 | # The following line ensures that the Material Icons font is 53 | # included with your application, so that you can use the icons in 54 | # the material Icons class. 55 | uses-material-design: true 56 | 57 | # To add assets to your application, add an assets section, like this: 58 | assets: 59 | - assets/. 60 | # - images/a_dot_ham.jpeg 61 | 62 | # An image asset can refer to one or more resolution-specific "variants", see 63 | # https://flutter.dev/assets-and-images/#resolution-aware. 64 | 65 | # For details regarding adding assets from package dependencies, see 66 | # https://flutter.dev/assets-and-images/#from-packages 67 | 68 | # To add custom fonts to your application, add a fonts section here, 69 | # in this "flutter" section. Each entry in this list should have a 70 | # "family" key with the font family name, and a "fonts" key with a 71 | # list giving the asset and other descriptors for the font. For 72 | # example: 73 | # fonts: 74 | # - family: Schyler 75 | # fonts: 76 | # - asset: fonts/Schyler-Regular.ttf 77 | # - asset: fonts/Schyler-Italic.ttf 78 | # style: italic 79 | # - family: Trajan Pro 80 | # fonts: 81 | # - asset: fonts/TrajanPro.ttf 82 | # - asset: fonts/TrajanPro_Bold.ttf 83 | # weight: 700 84 | # 85 | # For details regarding fonts from package dependencies, 86 | # see https://flutter.dev/custom-fonts/#from-packages 87 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/feature/data/remote/data_sources/firebase_remote_data_source_impl.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:firebase_auth/firebase_auth.dart'; 3 | import 'package:mynotes/feature/data/remote/data_sources/firebase_remote_data_source.dart'; 4 | import 'package:mynotes/feature/data/remote/models/note_model.dart'; 5 | import 'package:mynotes/feature/data/remote/models/user_model.dart'; 6 | import 'package:mynotes/feature/domain/entities/note_entity.dart'; 7 | import 'package:mynotes/feature/domain/entities/user_entity.dart'; 8 | 9 | class FirebaseRemoteDataSourceImpl implements FirebaseRemoteDataSource { 10 | final FirebaseAuth auth; 11 | final FirebaseFirestore firestore; 12 | 13 | FirebaseRemoteDataSourceImpl({required this.auth, required this.firestore}); 14 | 15 | @override 16 | Future addNewNote(NoteEntity noteEntity) async{ 17 | final noteCollectionRef = 18 | firestore.collection("users").doc(noteEntity.uid).collection("notes"); 19 | 20 | final noteId = noteCollectionRef.doc().id; 21 | 22 | noteCollectionRef.doc(noteId).get().then((note) { 23 | final newNote = NoteModel( 24 | uid: noteEntity.uid, 25 | noteId: noteId, 26 | note: noteEntity.note, 27 | time: noteEntity.time, 28 | ).toDocument(); 29 | 30 | if (!note.exists) { 31 | 32 | noteCollectionRef.doc(noteId).set(newNote); 33 | 34 | } 35 | return; 36 | }); 37 | } 38 | 39 | @override 40 | Future deleteNote(NoteEntity noteEntity)async { 41 | final noteCollectionRef = 42 | firestore.collection("users").doc(noteEntity.uid).collection("notes"); 43 | 44 | 45 | noteCollectionRef.doc(noteEntity.noteId).get().then((note) { 46 | if (note.exists){ 47 | noteCollectionRef.doc(noteEntity. noteId).delete(); 48 | } 49 | return; 50 | }); 51 | 52 | } 53 | 54 | @override 55 | Future getCreateCurrentUser(UserEntity user) async{ 56 | final userCollectionRef = firestore.collection("users"); 57 | final uid=await getCurrentUId(); 58 | userCollectionRef.doc(uid).get().then((value){ 59 | final newUser=UserModel( 60 | uid:uid , 61 | status: user.status, 62 | email: user.email, 63 | name: user.name, 64 | ).toDocument(); 65 | if (!value.exists){ 66 | userCollectionRef.doc(uid).set(newUser); 67 | } 68 | return; 69 | }); 70 | 71 | } 72 | 73 | @override 74 | Future getCurrentUId() async => auth.currentUser!.uid; 75 | 76 | @override 77 | Stream> getNotes(String uid) { 78 | final noteCollectionRef=firestore.collection("users").doc(uid).collection("notes"); 79 | 80 | return noteCollectionRef.snapshots().map((querySnap) { 81 | return querySnap.docs.map((docSnap) => NoteModel.fromSnapshot(docSnap)).toList(); 82 | }); 83 | } 84 | 85 | @override 86 | Future isSignIn() async => auth.currentUser?.uid !=null; 87 | 88 | @override 89 | Future signIn(UserEntity user) async => 90 | auth.signInWithEmailAndPassword(email: user.email!, password: user.password!); 91 | 92 | @override 93 | Future signOut() async => 94 | auth.signOut(); 95 | 96 | @override 97 | Future signUp(UserEntity user) async => 98 | auth.createUserWithEmailAndPassword(email: user.email!, password: user.password!); 99 | 100 | @override 101 | Future updateNote(NoteEntity note)async { 102 | Map noteMap=Map(); 103 | final noteCollectionRef=firestore.collection("users").doc(note.uid).collection("notes"); 104 | 105 | if (note.note!=null) noteMap['note']=note.note; 106 | if (note.time!=null) noteMap['time'] =note.time; 107 | 108 | noteCollectionRef.doc(note.noteId).update(noteMap); 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /lib/injection_container.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:firebase_auth/firebase_auth.dart'; 3 | import 'package:get_it/get_it.dart'; 4 | import 'package:mynotes/feature/data/remote/data_sources/firebase_remote_data_source_impl.dart'; 5 | import 'package:mynotes/feature/data/repositories/firebase_repository_impl.dart'; 6 | import 'package:mynotes/feature/domain/repositories/firebase_repository.dart'; 7 | import 'package:mynotes/feature/domain/use_cases/add_new_note_usecase.dart'; 8 | import 'package:mynotes/feature/domain/use_cases/delete_note_usecase.dart'; 9 | import 'package:mynotes/feature/domain/use_cases/delete_note_usecase.dart'; 10 | import 'package:mynotes/feature/domain/use_cases/get_create_current_user_usecase.dart'; 11 | import 'package:mynotes/feature/domain/use_cases/get_create_current_user_usecase.dart'; 12 | import 'package:mynotes/feature/domain/use_cases/get_current_uid_usecase.dart'; 13 | import 'package:mynotes/feature/domain/use_cases/get_current_uid_usecase.dart'; 14 | import 'package:mynotes/feature/domain/use_cases/get_notes_usecase.dart'; 15 | import 'package:mynotes/feature/domain/use_cases/get_notes_usecase.dart'; 16 | import 'package:mynotes/feature/domain/use_cases/is_sign_in_usecase.dart'; 17 | import 'package:mynotes/feature/domain/use_cases/is_sign_in_usecase.dart'; 18 | import 'package:mynotes/feature/domain/use_cases/sign_in_usecase.dart'; 19 | import 'package:mynotes/feature/domain/use_cases/sign_in_usecase.dart'; 20 | import 'package:mynotes/feature/domain/use_cases/sign_out_usecase.dart'; 21 | import 'package:mynotes/feature/domain/use_cases/sign_out_usecase.dart'; 22 | import 'package:mynotes/feature/domain/use_cases/sign_up_usecase.dart'; 23 | import 'package:mynotes/feature/domain/use_cases/sign_up_usecase.dart'; 24 | import 'package:mynotes/feature/domain/use_cases/update_note_usecase.dart'; 25 | import 'package:mynotes/feature/domain/use_cases/update_note_usecase.dart'; 26 | import 'package:mynotes/feature/presentation/cubit/auth/auth_cubit.dart'; 27 | import 'package:mynotes/feature/presentation/cubit/note/note_cubit.dart'; 28 | import 'package:mynotes/feature/presentation/cubit/note/note_cubit.dart'; 29 | import 'package:mynotes/feature/presentation/cubit/user/user_cubit.dart'; 30 | 31 | import 'feature/data/remote/data_sources/firebase_remote_data_source.dart'; 32 | 33 | GetIt sl = GetIt.instance; 34 | 35 | Future init() async { 36 | //Cubit/Bloc 37 | sl.registerFactory(() => AuthCubit( 38 | isSignInUseCase: sl.call(), 39 | signOutUseCase: sl.call(), 40 | getCurrentUidUseCase: sl.call())); 41 | sl.registerFactory(() => UserCubit( 42 | getCreateCurrentUserUseCase: sl.call(), 43 | signInUseCase: sl.call(), 44 | signUPUseCase: sl.call(), 45 | )); 46 | sl.registerFactory(() => NoteCubit( 47 | updateNoteUseCase: sl.call(), 48 | getNotesUseCase: sl.call(), 49 | deleteNoteUseCase: sl.call(), 50 | addNewNoteUseCase: sl.call(), 51 | )); 52 | 53 | //useCase 54 | sl.registerLazySingleton( 55 | () => AddNewNoteUseCase(repository: sl.call())); 56 | sl.registerLazySingleton( 57 | () => DeleteNoteUseCase(repository: sl.call())); 58 | sl.registerLazySingleton( 59 | () => GetCreateCurrentUserUsecase(repository: sl.call())); 60 | sl.registerLazySingleton( 61 | () => GetCurrentUidUseCase(repository: sl.call())); 62 | sl.registerLazySingleton( 63 | () => GetNotesUseCase(repository: sl.call())); 64 | sl.registerLazySingleton( 65 | () => IsSignInUseCase(repository: sl.call())); 66 | sl.registerLazySingleton( 67 | () => SignInUseCase(repository: sl.call())); 68 | sl.registerLazySingleton( 69 | () => SignOutUseCase(repository: sl.call())); 70 | sl.registerLazySingleton( 71 | () => SignUPUseCase(repository: sl.call())); 72 | sl.registerLazySingleton( 73 | () => UpdateNoteUseCase(repository: sl.call())); 74 | 75 | //repository 76 | sl.registerLazySingleton( 77 | () => FirebaseRepositoryImpl(remoteDataSource: sl.call())); 78 | 79 | //data source 80 | sl.registerLazySingleton(() => 81 | FirebaseRemoteDataSourceImpl(auth: sl.call(), firestore: sl.call())); 82 | 83 | //External 84 | final auth = FirebaseAuth.instance; 85 | final fireStore = FirebaseFirestore.instance; 86 | 87 | sl.registerLazySingleton(() => auth); 88 | sl.registerLazySingleton(() => fireStore); 89 | } 90 | -------------------------------------------------------------------------------- /lib/feature/presentation/pages/home_page.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_bloc/flutter_bloc.dart'; 5 | import 'package:intl/intl.dart'; 6 | import 'package:mynotes/feature/presentation/cubit/auth/auth_cubit.dart'; 7 | import 'package:mynotes/feature/presentation/cubit/note/note_cubit.dart'; 8 | 9 | import '../../../app_const.dart'; 10 | 11 | class HomePage extends StatefulWidget { 12 | final String uid; 13 | const HomePage({Key? key,required this.uid}) : super(key: key); 14 | 15 | @override 16 | _HomePageState createState() => _HomePageState(); 17 | } 18 | 19 | class _HomePageState extends State { 20 | 21 | 22 | @override 23 | void initState() { 24 | BlocProvider.of(context).getNotes(uid: widget.uid); 25 | super.initState(); 26 | } 27 | 28 | @override 29 | Widget build(BuildContext context) { 30 | return Scaffold( 31 | appBar: AppBar( 32 | title: Text( 33 | "MyNotes ", 34 | style: TextStyle(fontSize: 20, fontWeight: FontWeight.w600), 35 | ), 36 | actions: [ 37 | IconButton( 38 | onPressed: () { 39 | BlocProvider.of(context).loggedOut(); 40 | }, 41 | icon: Icon(Icons.exit_to_app)), 42 | ], 43 | ), 44 | floatingActionButton: FloatingActionButton( 45 | child: Icon(Icons.add), 46 | onPressed: () { 47 | Navigator.pushNamed(context, PageConst.addNotePage, 48 | arguments: widget.uid); 49 | }, 50 | ), 51 | body: BlocBuilder( 52 | builder: (context,noteState){ 53 | 54 | if (noteState is NoteLoaded){ 55 | return _bodyWidget(noteState); 56 | } 57 | 58 | 59 | return Center(child: CircularProgressIndicator()); 60 | }, 61 | ), 62 | ); 63 | } 64 | 65 | Widget _noNotesWidget(){ 66 | return Center( 67 | child: Column( 68 | mainAxisAlignment: MainAxisAlignment.center, 69 | children: [ 70 | Container( 71 | height: 80, 72 | child: Image.asset('assets/notebook.png')), 73 | SizedBox( 74 | height: 10, 75 | ), 76 | Text("No notes here yet"), 77 | ], 78 | ), 79 | ); 80 | } 81 | 82 | Widget _bodyWidget(NoteLoaded noteLoadedState) { 83 | return Column( 84 | children: [ 85 | Expanded( 86 | child: noteLoadedState.notes.isEmpty?_noNotesWidget():GridView.builder( 87 | itemCount: noteLoadedState.notes.length, 88 | gridDelegate: 89 | SliverGridDelegateWithFixedCrossAxisCount( 90 | crossAxisCount: 2, childAspectRatio: 1.2), 91 | itemBuilder: (_, index) { 92 | return GestureDetector( 93 | onTap: () { 94 | Navigator.pushNamed( 95 | context, PageConst.UpdateNotePage, 96 | arguments: noteLoadedState.notes[index]); 97 | }, 98 | onLongPress: () { 99 | showDialog( 100 | context: context, 101 | builder: (BuildContext context) { 102 | return AlertDialog( 103 | title: Text("Delete Note"), 104 | content: Text("are you sure you want to delete this note."), 105 | actions: [ 106 | TextButton( 107 | child: Text("Delete"), 108 | onPressed: () { 109 | BlocProvider.of(context).deleteNote(note: noteLoadedState.notes[index]); 110 | Navigator.pop(context); 111 | }, 112 | ), 113 | TextButton( 114 | child: Text("No"), 115 | onPressed: () { 116 | Navigator.pop(context); 117 | }, 118 | ), 119 | ], 120 | ); 121 | }, 122 | ); 123 | }, 124 | child: Container( 125 | decoration: BoxDecoration( 126 | color: Colors.white, 127 | borderRadius: BorderRadius.circular(8), 128 | boxShadow: [ 129 | BoxShadow( 130 | color: Colors.black.withOpacity(.2), 131 | blurRadius: 2, 132 | spreadRadius: 2, 133 | offset: Offset(0, 1.5)) 134 | ]), 135 | padding: EdgeInsets.all(10), 136 | margin: EdgeInsets.all(6), 137 | child: Column( 138 | crossAxisAlignment: 139 | CrossAxisAlignment.start, 140 | mainAxisAlignment: 141 | MainAxisAlignment.spaceBetween, 142 | children: [ 143 | Text( 144 | "${noteLoadedState.notes[index].note}", 145 | maxLines: 6, 146 | overflow: TextOverflow.ellipsis, 147 | ), 148 | SizedBox( 149 | height: 4, 150 | ), 151 | Text( 152 | "${DateFormat("dd MMM yyy hh:mm a").format(noteLoadedState.notes[index].time!.toDate())}") 153 | ], 154 | ), 155 | ), 156 | ); 157 | }, 158 | ), 159 | ), 160 | ], 161 | ); 162 | } 163 | } 164 | -------------------------------------------------------------------------------- /lib/feature/presentation/pages/sign_in_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_bloc/flutter_bloc.dart'; 3 | import 'package:mynotes/app_const.dart'; 4 | import 'package:mynotes/feature/domain/entities/user_entity.dart'; 5 | import 'package:mynotes/feature/presentation/cubit/auth/auth_cubit.dart'; 6 | import 'package:mynotes/feature/presentation/cubit/user/user_cubit.dart'; 7 | import 'package:mynotes/feature/presentation/widgets/common.dart'; 8 | 9 | import 'home_page.dart'; 10 | 11 | class SignInPage extends StatefulWidget { 12 | const SignInPage({Key? key}) : super(key: key); 13 | 14 | @override 15 | _SignInPageState createState() => _SignInPageState(); 16 | } 17 | 18 | class _SignInPageState extends State { 19 | 20 | 21 | TextEditingController _emailController = TextEditingController(); 22 | TextEditingController _passwordController = TextEditingController(); 23 | 24 | GlobalKey _scaffoldGlobalKey = GlobalKey(); 25 | 26 | 27 | @override 28 | void dispose() { 29 | _emailController.dispose(); 30 | _passwordController.dispose(); 31 | super.dispose(); 32 | } 33 | 34 | 35 | @override 36 | Widget build(BuildContext context) { 37 | return Scaffold( 38 | key: _scaffoldGlobalKey, 39 | body: BlocConsumer( 40 | builder: (context,userState){ 41 | 42 | if (userState is UserSuccess){ 43 | return BlocBuilder(builder:(context,authState){ 44 | 45 | if (authState is Authenticated){ 46 | return HomePage(uid: authState.uid,); 47 | }else{ 48 | return _bodyWidget(); 49 | } 50 | }); 51 | } 52 | 53 | return _bodyWidget(); 54 | }, 55 | listener: (context,userState){ 56 | if (userState is UserSuccess){ 57 | BlocProvider.of(context).loggedIn(); 58 | } 59 | if (userState is UserFailure){ 60 | snackBarError(msg: "invalid email",scaffoldState: _scaffoldGlobalKey); 61 | } 62 | }, 63 | ) 64 | ); 65 | } 66 | 67 | _bodyWidget() { 68 | return Container( 69 | padding: EdgeInsets.all(25), 70 | child: Column( 71 | mainAxisAlignment: MainAxisAlignment.center, 72 | children: [ 73 | SizedBox( 74 | height: 30, 75 | ), 76 | Container(height: 120, child: Image.asset("assets/notebook.png"),), 77 | SizedBox( 78 | height: 40, 79 | ), 80 | Container( 81 | height: 50, 82 | padding: EdgeInsets.symmetric(horizontal: 10), 83 | decoration: BoxDecoration( 84 | color: Colors.black.withOpacity(.1), 85 | borderRadius: BorderRadius.all(Radius.circular(10)), 86 | ), 87 | child: TextField( 88 | controller: _emailController, 89 | decoration: InputDecoration( 90 | hintText: 'Enter your email', border: InputBorder.none), 91 | ), 92 | ), 93 | SizedBox( 94 | height: 10, 95 | ), 96 | Container( 97 | height: 50, 98 | padding: EdgeInsets.symmetric(horizontal: 10), 99 | decoration: BoxDecoration( 100 | color: Colors.black.withOpacity(.1), 101 | borderRadius: BorderRadius.all(Radius.circular(10)), 102 | ), 103 | child: TextField( 104 | controller: _passwordController, 105 | obscureText: true, 106 | decoration: InputDecoration( 107 | hintText: 'Enter your Password', border: InputBorder.none), 108 | ), 109 | ), 110 | SizedBox( 111 | height: 20, 112 | ), 113 | GestureDetector( 114 | onTap: () { 115 | submitSignIn(); 116 | }, 117 | child: Container( 118 | height: 45, 119 | alignment: Alignment.center, 120 | width: MediaQuery 121 | .of(context) 122 | .size 123 | .width / 2, 124 | decoration: BoxDecoration( 125 | color: Colors.deepOrange.withOpacity(.8), 126 | borderRadius: BorderRadius.all( 127 | Radius.circular(10), 128 | ), 129 | ), 130 | child: Text( 131 | "Login", 132 | style: TextStyle(fontSize: 18, fontWeight: FontWeight.w600), 133 | ), 134 | ), 135 | ), 136 | SizedBox( 137 | height: 10, 138 | ), 139 | GestureDetector( 140 | onTap: () { 141 | Navigator.pushNamedAndRemoveUntil(context, PageConst.signUpPage, (route) => false); 142 | }, 143 | child: Container( 144 | height: 45, 145 | alignment: Alignment.center, 146 | width: MediaQuery 147 | .of(context) 148 | .size 149 | .width / 2, 150 | decoration: BoxDecoration( 151 | color: Colors.grey.withOpacity(.8), 152 | borderRadius: BorderRadius.all( 153 | Radius.circular(10), 154 | ), 155 | ), 156 | child: Text( 157 | "Sign Up", 158 | style: TextStyle(fontSize: 18, fontWeight: FontWeight.w600), 159 | ), 160 | ), 161 | ), 162 | ], 163 | ), 164 | ); 165 | } 166 | 167 | void submitSignIn() { 168 | if (_emailController.text.isNotEmpty && 169 | _passwordController.text.isNotEmpty) { 170 | BlocProvider.of(context).submitSignIn(user: UserEntity( 171 | email: _emailController.text, 172 | password: _passwordController.text, 173 | )); 174 | } 175 | } 176 | } 177 | 178 | 179 | 180 | -------------------------------------------------------------------------------- /lib/feature/presentation/pages/sign_up_page.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | import 'package:flutter/material.dart'; 5 | import 'package:flutter_bloc/flutter_bloc.dart'; 6 | import 'package:mynotes/app_const.dart'; 7 | import 'package:mynotes/feature/domain/entities/user_entity.dart'; 8 | import 'package:mynotes/feature/presentation/cubit/auth/auth_cubit.dart'; 9 | import 'package:mynotes/feature/presentation/cubit/user/user_cubit.dart'; 10 | import 'package:mynotes/feature/presentation/widgets/common.dart'; 11 | 12 | import 'home_page.dart'; 13 | 14 | class SignUpPage extends StatefulWidget { 15 | const SignUpPage({Key? key}) : super(key: key); 16 | 17 | @override 18 | _SignUpPageState createState() => _SignUpPageState(); 19 | } 20 | 21 | class _SignUpPageState extends State { 22 | 23 | 24 | TextEditingController _usernameController = TextEditingController(); 25 | TextEditingController _emailController = TextEditingController(); 26 | TextEditingController _passwordController = TextEditingController(); 27 | 28 | GlobalKey _globalKey = GlobalKey(); 29 | 30 | 31 | 32 | @override 33 | void dispose() { 34 | _usernameController.dispose(); 35 | _emailController.dispose(); 36 | _passwordController.dispose(); 37 | super.dispose(); 38 | } 39 | 40 | @override 41 | Widget build(BuildContext context) { 42 | return Scaffold( 43 | key: _globalKey, 44 | body: BlocConsumer( 45 | builder: (context,userState){ 46 | 47 | if (userState is UserSuccess){ 48 | return BlocBuilder(builder:(context,authState){ 49 | 50 | if (authState is Authenticated){ 51 | return HomePage(uid: authState.uid,); 52 | }else{ 53 | return _bodyWidget(); 54 | } 55 | }); 56 | } 57 | 58 | return _bodyWidget(); 59 | }, 60 | listener: (context,userState){ 61 | if (userState is UserSuccess){ 62 | BlocProvider.of(context).loggedIn(); 63 | } 64 | if (userState is UserFailure){ 65 | snackBarError(msg: "invalid email",scaffoldState: _globalKey); 66 | } 67 | }, 68 | ) 69 | ); 70 | } 71 | 72 | _bodyWidget() { 73 | return Container( 74 | padding: EdgeInsets.all(25), 75 | child: Column( 76 | mainAxisAlignment: MainAxisAlignment.center, 77 | children: [ 78 | SizedBox( 79 | height: 30, 80 | ), 81 | GestureDetector( 82 | onTap: () { 83 | Navigator.pushNamedAndRemoveUntil(context, PageConst.signInPage, (route) => false); 84 | }, 85 | child: Container( 86 | height: 50, 87 | width: 50, 88 | alignment: Alignment.center, 89 | decoration: BoxDecoration( 90 | color: Colors.white, 91 | border: Border.all(color: Colors.black.withOpacity(.6)), 92 | shape: BoxShape.circle, 93 | ), 94 | child: Icon(Icons.arrow_back_ios), 95 | ), 96 | ), 97 | SizedBox( 98 | height: 30, 99 | ), 100 | Container( 101 | height: 50, 102 | padding: EdgeInsets.symmetric(horizontal: 10), 103 | decoration: BoxDecoration( 104 | color: Colors.black.withOpacity(.1), 105 | borderRadius: BorderRadius.all(Radius.circular(10)), 106 | ), 107 | child: TextField( 108 | controller: _usernameController, 109 | decoration: InputDecoration( 110 | hintText: 'Username', border: InputBorder.none), 111 | ), 112 | ), 113 | SizedBox( 114 | height: 10, 115 | ), 116 | Container( 117 | height: 50, 118 | padding: EdgeInsets.symmetric(horizontal: 10), 119 | decoration: BoxDecoration( 120 | color: Colors.black.withOpacity(.1), 121 | borderRadius: BorderRadius.all(Radius.circular(10)), 122 | ), 123 | child: TextField( 124 | controller: _emailController, 125 | decoration: InputDecoration( 126 | hintText: 'Enter your email', border: InputBorder.none), 127 | ), 128 | ), 129 | SizedBox( 130 | height: 10, 131 | ), 132 | Container( 133 | height: 50, 134 | padding: EdgeInsets.symmetric(horizontal: 10), 135 | decoration: BoxDecoration( 136 | color: Colors.black.withOpacity(.1), 137 | borderRadius: BorderRadius.all(Radius.circular(10)), 138 | ), 139 | child: TextField( 140 | obscureText: true, 141 | controller: _passwordController, 142 | decoration: InputDecoration( 143 | hintText: 'Enter your Password', border: InputBorder.none), 144 | ), 145 | ), 146 | SizedBox( 147 | height: 15, 148 | ), 149 | GestureDetector( 150 | onTap: (){ 151 | submitSignIn(); 152 | }, 153 | child: Container( 154 | height: 45, 155 | alignment: Alignment.center, 156 | width: MediaQuery.of(context).size.width / 2, 157 | decoration: BoxDecoration( 158 | color: Colors.deepOrange.withOpacity(.8), 159 | borderRadius: BorderRadius.all( 160 | Radius.circular(10), 161 | ), 162 | ), 163 | child: Text( 164 | "Create New Account", 165 | style: TextStyle(fontSize: 18, fontWeight: FontWeight.w600), 166 | ), 167 | ), 168 | ), 169 | SizedBox( 170 | height: 10, 171 | ), 172 | ], 173 | ), 174 | ); 175 | } 176 | 177 | void submitSignIn() { 178 | if (_usernameController.text.isNotEmpty &&_emailController.text.isNotEmpty && 179 | _passwordController.text.isNotEmpty) { 180 | BlocProvider.of(context).submitSignUp(user: UserEntity( 181 | email: _emailController.text, 182 | password: _passwordController.text, 183 | )); 184 | } 185 | } 186 | } 187 | -------------------------------------------------------------------------------- /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.6.1" 11 | bloc: 12 | dependency: transitive 13 | description: 14 | name: bloc 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "7.0.0" 18 | boolean_selector: 19 | dependency: transitive 20 | description: 21 | name: boolean_selector 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.1.0" 25 | characters: 26 | dependency: transitive 27 | description: 28 | name: characters 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.1.0" 32 | charcode: 33 | dependency: transitive 34 | description: 35 | name: charcode 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.2.0" 39 | clock: 40 | dependency: transitive 41 | description: 42 | name: clock 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.1.0" 46 | cloud_firestore: 47 | dependency: "direct main" 48 | description: 49 | name: cloud_firestore 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "2.4.0" 53 | cloud_firestore_platform_interface: 54 | dependency: transitive 55 | description: 56 | name: cloud_firestore_platform_interface 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "5.3.0" 60 | cloud_firestore_web: 61 | dependency: transitive 62 | description: 63 | name: cloud_firestore_web 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "2.3.0" 67 | collection: 68 | dependency: transitive 69 | description: 70 | name: collection 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "1.15.0" 74 | cupertino_icons: 75 | dependency: "direct main" 76 | description: 77 | name: cupertino_icons 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "1.0.3" 81 | equatable: 82 | dependency: "direct main" 83 | description: 84 | name: equatable 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "2.0.3" 88 | fake_async: 89 | dependency: transitive 90 | description: 91 | name: fake_async 92 | url: "https://pub.dartlang.org" 93 | source: hosted 94 | version: "1.2.0" 95 | firebase_auth: 96 | dependency: "direct main" 97 | description: 98 | name: firebase_auth 99 | url: "https://pub.dartlang.org" 100 | source: hosted 101 | version: "3.0.1" 102 | firebase_auth_platform_interface: 103 | dependency: transitive 104 | description: 105 | name: firebase_auth_platform_interface 106 | url: "https://pub.dartlang.org" 107 | source: hosted 108 | version: "6.0.0" 109 | firebase_auth_web: 110 | dependency: transitive 111 | description: 112 | name: firebase_auth_web 113 | url: "https://pub.dartlang.org" 114 | source: hosted 115 | version: "3.0.0" 116 | firebase_core: 117 | dependency: transitive 118 | description: 119 | name: firebase_core 120 | url: "https://pub.dartlang.org" 121 | source: hosted 122 | version: "1.4.0" 123 | firebase_core_platform_interface: 124 | dependency: transitive 125 | description: 126 | name: firebase_core_platform_interface 127 | url: "https://pub.dartlang.org" 128 | source: hosted 129 | version: "4.0.1" 130 | firebase_core_web: 131 | dependency: transitive 132 | description: 133 | name: firebase_core_web 134 | url: "https://pub.dartlang.org" 135 | source: hosted 136 | version: "1.1.0" 137 | flutter: 138 | dependency: "direct main" 139 | description: flutter 140 | source: sdk 141 | version: "0.0.0" 142 | flutter_bloc: 143 | dependency: "direct main" 144 | description: 145 | name: flutter_bloc 146 | url: "https://pub.dartlang.org" 147 | source: hosted 148 | version: "7.1.0" 149 | flutter_icons: 150 | dependency: "direct main" 151 | description: 152 | name: flutter_icons 153 | url: "https://pub.dartlang.org" 154 | source: hosted 155 | version: "1.1.0" 156 | flutter_test: 157 | dependency: "direct dev" 158 | description: flutter 159 | source: sdk 160 | version: "0.0.0" 161 | flutter_web_plugins: 162 | dependency: transitive 163 | description: flutter 164 | source: sdk 165 | version: "0.0.0" 166 | get_it: 167 | dependency: "direct main" 168 | description: 169 | name: get_it 170 | url: "https://pub.dartlang.org" 171 | source: hosted 172 | version: "7.2.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 | nested: 209 | dependency: transitive 210 | description: 211 | name: nested 212 | url: "https://pub.dartlang.org" 213 | source: hosted 214 | version: "1.0.0" 215 | path: 216 | dependency: transitive 217 | description: 218 | name: path 219 | url: "https://pub.dartlang.org" 220 | source: hosted 221 | version: "1.8.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.1" 229 | provider: 230 | dependency: transitive 231 | description: 232 | name: provider 233 | url: "https://pub.dartlang.org" 234 | source: hosted 235 | version: "5.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.1" 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.3.0" 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 <3.0.0" 299 | flutter: ">=1.16.0" 300 | -------------------------------------------------------------------------------- /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.etechviral.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.etechviral.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.etechviral.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 | --------------------------------------------------------------------------------