├── .gitignore ├── .metadata ├── LICENSE ├── README.md ├── android ├── .gitignore ├── app │ ├── build.gradle │ ├── google-services.json │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── ic_launcher-playstore.png │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── youtubetutorial │ │ │ │ └── generation │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable-v21 │ │ │ └── launch_background.xml │ │ │ ├── drawable │ │ │ ├── app_icon.png │ │ │ └── launch_background.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_foreground.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_foreground.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_foreground.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_foreground.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_foreground.png │ │ │ └── ic_launcher_round.png │ │ │ ├── values-night │ │ │ └── styles.xml │ │ │ └── values │ │ │ ├── ic_launcher_background.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── settings.gradle └── settings_aar.gradle ├── assets ├── images │ ├── fbook.png │ └── google.png └── logo │ └── logo.png ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings └── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-1024x1024@1x.png │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ └── Icon-App-83.5x83.5@2x.png │ └── LaunchImage.imageset │ │ ├── Contents.json │ │ ├── LaunchImage.png │ │ ├── LaunchImage@2x.png │ │ ├── LaunchImage@3x.png │ │ └── README.md │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── Runner-Bridging-Header.h ├── lib ├── Backend │ ├── firebase │ │ ├── Auth │ │ │ ├── email_and_pwd_auth.dart │ │ │ ├── fb_auth.dart │ │ │ └── google_auth.dart │ │ └── OnlineDatabaseManagement │ │ │ └── cloud_data_management.dart │ └── sqlite_management │ │ └── local_database_management.dart ├── FrontEnd │ ├── AuthUI │ │ ├── common_auth_methods.dart │ │ ├── log_in.dart │ │ └── sign_up.dart │ ├── MainScreens │ │ ├── chatAndActivityScreen.dart │ │ ├── general_connection_section.dart │ │ ├── home_page.dart │ │ ├── logs_collection.dart │ │ └── main_screen.dart │ ├── MenuScreens │ │ ├── SupportScreens │ │ │ ├── mail_content_maker.dart │ │ │ └── support_screen.dart │ │ ├── about_screen.dart │ │ ├── profile_screen.dart │ │ └── settings_screen.dart │ ├── NewUserEntry │ │ └── new_user_entry.dart │ ├── Preview │ │ └── image_preview_screen.dart │ ├── Services │ │ ├── ChatManagement │ │ │ └── chat_screen.dart │ │ └── search_screen.dart │ └── model │ │ └── previous_message_structure.dart ├── Global_Uses │ ├── constants.dart │ ├── enum_generation.dart │ ├── foreground_receive_notificaion_management.dart │ ├── native_calling.dart │ ├── reg_exp.dart │ ├── send_notification_management.dart │ └── show_toast_message.dart └── main.dart └── pubspec.yaml /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 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 | ## important 35 | pubspec.lock 36 | 37 | # Web related 38 | lib/generated_plugin_registrant.dart 39 | 40 | # Symbolication related 41 | app.*.symbols 42 | 43 | # Obfuscation related 44 | app.*.map.json 45 | 46 | # Android Studio will place build artifacts here 47 | /android/app/debug 48 | /android/app/profile 49 | /android/app/release 50 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ###

💘 Generation Tutorial 💘

2 | 3 | ###

⌛ This is the project source code of my youtube video tutorial of ⌛

4 | ###

💚 Flutter Social Media App Tutorial 2021 💚

5 | 6 | ####

📌 Tutorial is available at: https://youtube.com/playlist?list=PLn4o1Gy6eg752X6ZaJ7UL55kLJ235laOg

7 | 8 |

🙏 Show 💕 by Starring this Repo 🙏

-------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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: 'com.google.gms.google-services' 26 | apply plugin: 'kotlin-android' 27 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 28 | 29 | android { 30 | compileSdkVersion 31 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.youtubetutorial.generation" 39 | minSdkVersion 23 40 | targetSdkVersion 31 41 | versionCode flutterVersionCode.toInteger() 42 | versionName flutterVersionName 43 | } 44 | 45 | buildTypes { 46 | release { 47 | // TODO: Add your own signing config for the release build. 48 | // Signing with the debug keys for now, so `flutter run --release` works. 49 | signingConfig signingConfigs.debug 50 | } 51 | } 52 | } 53 | 54 | flutter { 55 | source '../..' 56 | } 57 | 58 | dependencies { 59 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 60 | implementation platform('com.google.firebase:firebase-bom:28.3.0') 61 | implementation 'com.google.firebase:firebase-analytics-ktx' 62 | implementation 'com.google.firebase:firebase-messaging:22.0.0' 63 | } 64 | -------------------------------------------------------------------------------- /android/app/google-services.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_info": { 3 | "project_number": "865289032877", 4 | "project_id": "generation-33602", 5 | "storage_bucket": "generation-33602.appspot.com" 6 | }, 7 | "client": [ 8 | { 9 | "client_info": { 10 | "mobilesdk_app_id": "1:865289032877:android:c3b327618803feaf2ca224", 11 | "android_client_info": { 12 | "package_name": "com.youtubetutorial.generation" 13 | } 14 | }, 15 | "oauth_client": [ 16 | { 17 | "client_id": "865289032877-tn4f6okv8vvq6cv4ih0501ahq3nthr29.apps.googleusercontent.com", 18 | "client_type": 1, 19 | "android_info": { 20 | "package_name": "com.youtubetutorial.generation", 21 | "certificate_hash": "026591a5ef09087a8f36e0991636e4bd40bfd9f2" 22 | } 23 | }, 24 | { 25 | "client_id": "865289032877-jk58nmn4cok4a0tccccuikdrq6113beo.apps.googleusercontent.com", 26 | "client_type": 3 27 | } 28 | ], 29 | "api_key": [ 30 | { 31 | "current_key": "AIzaSyAym7X970mgW6LLvKYufnkzOSNj-WfV8iw" 32 | } 33 | ], 34 | "services": { 35 | "appinvite_service": { 36 | "other_platform_oauth_client": [ 37 | { 38 | "client_id": "865289032877-jk58nmn4cok4a0tccccuikdrq6113beo.apps.googleusercontent.com", 39 | "client_type": 3 40 | } 41 | ] 42 | } 43 | } 44 | } 45 | ], 46 | "configuration_version": "1" 47 | } -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 24 | 28 | 32 | 37 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 53 | 56 | 57 | 59 | 60 | 61 | 63 | 64 | 68 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /android/app/src/main/ic_launcher-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/android/app/src/main/ic_launcher-playstore.png -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/youtubetutorial/generation/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.youtubetutorial.generation 2 | 3 | import android.content.Context 4 | import android.database.Cursor 5 | import android.graphics.Bitmap 6 | import android.media.ThumbnailUtils 7 | import android.net.Uri 8 | import android.os.Build 9 | import android.provider.MediaStore 10 | import android.util.Log 11 | import android.view.WindowManager 12 | import androidx.annotation.NonNull 13 | import androidx.annotation.RequiresApi 14 | import io.flutter.embedding.android.FlutterActivity 15 | import io.flutter.embedding.engine.FlutterEngine 16 | import io.flutter.plugin.common.MethodChannel 17 | import java.io.File 18 | import java.time.LocalDateTime 19 | 20 | class MainActivity : FlutterActivity() { 21 | private val CHANNEL = "com.youtubetutorial.generation/nativeCallBack" 22 | 23 | companion object { 24 | val TAG: String = MainActivity::class.java.simpleName 25 | } 26 | 27 | @RequiresApi(Build.VERSION_CODES.O) 28 | override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) { 29 | super.configureFlutterEngine(flutterEngine) 30 | 31 | // // for Screenshot Restriction 32 | // getWindow().setFlags( 33 | // WindowManager.LayoutParams.FLAG_SECURE, 34 | // WindowManager.LayoutParams.FLAG_SECURE 35 | // ) 36 | 37 | MethodChannel( 38 | flutterEngine.dartExecutor.binaryMessenger, 39 | CHANNEL 40 | ).setMethodCallHandler { call, result -> 41 | if (call.method == "makeVideoThumbnail") { 42 | val takeVideoPath: String? = call.argument("videoPath") 43 | 44 | takeVideoPath?.let { 45 | result.success(makeVideoThumbnail(takeVideoPath.toString())) 46 | } 47 | 48 | } else { 49 | result.notImplemented() 50 | } 51 | } 52 | } 53 | 54 | @RequiresApi(Build.VERSION_CODES.O) 55 | private fun makeVideoThumbnail(videoPath: String): String { 56 | val bitmap: Bitmap? = ThumbnailUtils.createVideoThumbnail( 57 | File(videoPath).path.toString(), 58 | MediaStore.Video.Thumbnails.MICRO_KIND 59 | ) 60 | 61 | 62 | bitmap?.let { 63 | // CALL THIS METHOD TO GET THE URI FROM THE BITMAP 64 | val tempUri: Uri? = getImageUri(applicationContext, bitmap) 65 | 66 | // CALL THIS METHOD TO GET THE ACTUAL PATH 67 | val finalFile = File(getRealPathFromURI(tempUri)) 68 | 69 | return finalFile.absolutePath; 70 | } 71 | 72 | return ""; 73 | } 74 | 75 | /// Bitmap to Uri 76 | @RequiresApi(Build.VERSION_CODES.O) 77 | private fun getImageUri(inContext: Context, bitmapImage: Bitmap): Uri? { 78 | val path = MediaStore.Images.Media.insertImage( 79 | inContext.contentResolver, 80 | bitmapImage, 81 | LocalDateTime.now().toString(), 82 | null 83 | ) 84 | 85 | return Uri.parse(path) 86 | } 87 | 88 | /// Uri to Actual Location Path 89 | private fun getRealPathFromURI(uri: Uri?): String { 90 | var path = "" 91 | 92 | try { 93 | uri?.let { 94 | contentResolver?.let { 95 | val cursor: Cursor? = contentResolver.query(uri, null, null, null, null) 96 | 97 | cursor?.let { 98 | cursor.moveToFirst() 99 | val index: Int = cursor.getColumnIndex(MediaStore.Images.ImageColumns.DATA) 100 | path = cursor.getString(index) 101 | cursor.close() 102 | } 103 | } 104 | } 105 | } catch (e: java.lang.Exception) { 106 | Log.i(TAG, "Error in Get Real Path From Uri: $uri") 107 | 108 | 109 | } 110 | return path 111 | 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/app_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/android/app/src/main/res/drawable/app_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Generation 4 | 5 | 864013677542534 6 | fb864013677542534 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.5.31' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.1.3' 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 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/settings_aar.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /assets/images/fbook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/assets/images/fbook.png -------------------------------------------------------------------------------- /assets/images/google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/assets/images/google.png -------------------------------------------------------------------------------- /assets/logo/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/assets/logo/logo.png -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/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/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/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/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/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/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/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/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/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/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/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/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/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/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/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/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/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/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/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/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/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/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/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/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamarpanCoder2002/Generation-Chat-App-Tutorial/9e2011285bdcb791b14c27453f589ee87fa20123/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | generation 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /lib/Backend/firebase/Auth/email_and_pwd_auth.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_auth/firebase_auth.dart'; 2 | import 'package:generation/Global_Uses/enum_generation.dart'; 3 | 4 | class EmailAndPasswordAuth { 5 | Future signUpAuth( 6 | {required String email, required String pwd}) async { 7 | try { 8 | final UserCredential userCredential = await FirebaseAuth.instance 9 | .createUserWithEmailAndPassword(email: email, password: pwd); 10 | if (userCredential.user!.email != null) { 11 | await userCredential.user!.sendEmailVerification(); 12 | return EmailSignUpResults.SignUpCompleted; 13 | } 14 | return EmailSignUpResults.SignUpNotCompleted; 15 | } catch (e) { 16 | print('Error in Email and Password Sign Up: ${e.toString()}'); 17 | return EmailSignUpResults.EmailAlreadyPresent; 18 | } 19 | } 20 | 21 | Future signInWithEmailAndPassword( 22 | {required String email, required String pwd}) async { 23 | try { 24 | final UserCredential userCredential = await FirebaseAuth.instance 25 | .signInWithEmailAndPassword(email: email, password: pwd); 26 | if (userCredential.user!.emailVerified) 27 | return EmailSignInResults.SignInCompleted; 28 | else{ 29 | final bool logOutResponse = await logOut(); 30 | if(logOutResponse) 31 | return EmailSignInResults.EmailNotVerified; 32 | return EmailSignInResults.UnexpectedError; 33 | } 34 | } catch (e) { 35 | print( 36 | 'Error in Sign In With Email And Password Authentication: ${e.toString()}'); 37 | return EmailSignInResults.EmailOrPasswordInvalid; 38 | } 39 | } 40 | 41 | Future logOut() async{ 42 | try{ 43 | await FirebaseAuth.instance.signOut(); 44 | return true; 45 | }catch(e){ 46 | return false; 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /lib/Backend/firebase/Auth/fb_auth.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_facebook_auth/flutter_facebook_auth.dart'; 2 | import 'package:firebase_auth/firebase_auth.dart'; 3 | import 'package:generation/Global_Uses/enum_generation.dart'; 4 | 5 | class FacebookAuthentication { 6 | final FacebookAuth _facebookLogin = FacebookAuth.instance; 7 | 8 | Future facebookLogIn() async { 9 | try { 10 | if (await _facebookLogin.accessToken == null) { 11 | final LoginResult _fbLogInResult = await _facebookLogin.login(); 12 | 13 | if (_fbLogInResult.status == LoginStatus.success) { 14 | final OAuthCredential _oAuthCredential = 15 | FacebookAuthProvider.credential( 16 | _fbLogInResult.accessToken!.token); 17 | 18 | if (FirebaseAuth.instance.currentUser != null) 19 | FirebaseAuth.instance.signOut(); 20 | 21 | final UserCredential fbUser = await FirebaseAuth.instance 22 | .signInWithCredential(_oAuthCredential); 23 | 24 | print( 25 | 'Fb Log In Info: ${fbUser.user} ${fbUser.additionalUserInfo}'); 26 | 27 | return FBSignInResults.SignInCompleted; 28 | } 29 | return FBSignInResults.UnExpectedError; 30 | } else { 31 | print('Already Fb Logged In'); 32 | await logOut(); 33 | return FBSignInResults.AlreadySignedIn; 34 | } 35 | } catch (e) { 36 | print('Facebook Log In Error: ${e.toString()}'); 37 | return FBSignInResults.UnExpectedError; 38 | } 39 | } 40 | 41 | Future logOut() async { 42 | try { 43 | print('Facebook Log Out'); 44 | if (await _facebookLogin.accessToken != null) { 45 | await _facebookLogin.logOut(); 46 | await FirebaseAuth.instance.signOut(); 47 | return true; 48 | } 49 | return false; 50 | } catch (e) { 51 | print('Facebook Log out Error: ${e.toString()}'); 52 | return false; 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /lib/Backend/firebase/Auth/google_auth.dart: -------------------------------------------------------------------------------- 1 | import 'package:generation/Global_Uses/enum_generation.dart'; 2 | import 'package:google_sign_in/google_sign_in.dart'; 3 | import 'package:firebase_auth/firebase_auth.dart'; 4 | 5 | class GoogleAuthentication { 6 | final GoogleSignIn _googleSignIn = GoogleSignIn(); 7 | 8 | Future signInWithGoogle() async { 9 | try { 10 | if (await this._googleSignIn.isSignedIn()) 11 | return GoogleSignInResults.AlreadySignedIn; 12 | else { 13 | final GoogleSignInAccount? _googleSignInAccount = 14 | await this._googleSignIn.signIn(); 15 | 16 | 17 | if (_googleSignInAccount == null) 18 | return GoogleSignInResults.SignInNotCompleted; 19 | else { 20 | 21 | final GoogleSignInAuthentication _googleSignInAuth = 22 | await _googleSignInAccount.authentication; 23 | 24 | final OAuthCredential _oAuthCredential = 25 | GoogleAuthProvider.credential( 26 | accessToken: _googleSignInAuth.accessToken, 27 | idToken: _googleSignInAuth.idToken, 28 | ); 29 | 30 | final UserCredential userCredential = await FirebaseAuth.instance 31 | .signInWithCredential(_oAuthCredential); 32 | 33 | if (userCredential.user!.email != null) { 34 | print('Google Sign In Completed'); 35 | return GoogleSignInResults.SignInCompleted; 36 | } else { 37 | print('Google Sign In Problem'); 38 | return GoogleSignInResults.UnexpectedError; 39 | } 40 | } 41 | } 42 | } catch (e) { 43 | print('Error in Google Sign In ${e.toString()}'); 44 | return GoogleSignInResults.UnexpectedError; 45 | } 46 | } 47 | 48 | Future logOut() async { 49 | try { 50 | print('Google Log out'); 51 | 52 | await _googleSignIn.disconnect(); 53 | await _googleSignIn.signOut(); 54 | await FirebaseAuth.instance.signOut(); 55 | return true; 56 | } catch (e) { 57 | print('Error in Google Log Out: ${e.toString()}'); 58 | return false; 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /lib/Backend/firebase/OnlineDatabaseManagement/cloud_data_management.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:firebase_storage/firebase_storage.dart'; 4 | import 'package:generation/Backend/sqlite_management/local_database_management.dart'; 5 | import 'package:generation/Global_Uses/constants.dart'; 6 | import 'package:generation/Global_Uses/enum_generation.dart'; 7 | import 'package:generation/Global_Uses/send_notification_management.dart'; 8 | import 'package:intl/intl.dart'; 9 | import 'package:cloud_firestore/cloud_firestore.dart'; 10 | import 'package:firebase_messaging/firebase_messaging.dart'; 11 | 12 | import 'package:firebase_auth/firebase_auth.dart'; 13 | 14 | class CloudStoreDataManagement { 15 | final _collectionName = 'generation_users'; 16 | 17 | final SendNotification _sendNotification = SendNotification(); 18 | final LocalDatabase _localDatabase = LocalDatabase(); 19 | 20 | Future checkThisUserAlreadyPresentOrNot( 21 | {required String userName}) async { 22 | try { 23 | final QuerySnapshot> findResults = 24 | await FirebaseFirestore.instance 25 | .collection(_collectionName) 26 | .where('user_name', isEqualTo: userName) 27 | .get(); 28 | 29 | print('Debug 1: ${findResults.docs.isEmpty}'); 30 | 31 | return findResults.docs.isEmpty ? true : false; 32 | } catch (e) { 33 | print( 34 | 'Error in Checkj This User Already Present or not: ${e.toString()}'); 35 | return false; 36 | } 37 | } 38 | 39 | Future registerNewUser( 40 | {required String userName, 41 | required String userAbout, 42 | required String userEmail}) async { 43 | try { 44 | final String? _getToken = await FirebaseMessaging.instance.getToken(); 45 | 46 | final String currDate = DateFormat('dd-MM-yyyy').format(DateTime.now()); 47 | 48 | final String currTime = "${DateFormat('hh:mm a').format(DateTime.now())}"; 49 | 50 | await FirebaseFirestore.instance.doc('$_collectionName/$userEmail').set({ 51 | "about": userAbout, 52 | "activity": [], 53 | "connection_request": [], 54 | "connections": {}, 55 | "creation_date": currDate, 56 | "creation_time": currTime, 57 | "phone_number": "", 58 | "profile_pic": "", 59 | "token": _getToken.toString(), 60 | "total_connections": "", 61 | "user_name": userName, 62 | }); 63 | 64 | return true; 65 | } catch (e) { 66 | print('Error in Register new user: ${e.toString()}'); 67 | return false; 68 | } 69 | } 70 | 71 | Future userRecordPresentOrNot({required String email}) async { 72 | try { 73 | final DocumentSnapshot> documentSnapshot = 74 | await FirebaseFirestore.instance 75 | .doc('${this._collectionName}/$email') 76 | .get(); 77 | return documentSnapshot.exists; 78 | } catch (e) { 79 | print('Error in user Record Present or not: ${e.toString()}'); 80 | return false; 81 | } 82 | } 83 | 84 | Future> getTokenFromCloudStore( 85 | {required String userMail}) async { 86 | try { 87 | final DocumentSnapshot> documentSnapshot = 88 | await FirebaseFirestore.instance 89 | .doc('${this._collectionName}/$userMail') 90 | .get(); 91 | 92 | print('DocumentSnapShot is: ${documentSnapshot.data()}'); 93 | 94 | final Map importantData = Map(); 95 | 96 | importantData["token"] = documentSnapshot.data()!["token"]; 97 | importantData["date"] = documentSnapshot.data()!["creation_date"]; 98 | importantData["time"] = documentSnapshot.data()!["creation_time"]; 99 | 100 | return importantData; 101 | } catch (e) { 102 | print('Error in get Token from Cloud Store: ${e.toString()}'); 103 | return {}; 104 | } 105 | } 106 | 107 | Future>> getAllUsersListExceptMyAccount( 108 | {required String currentUserEmail}) async { 109 | try { 110 | final QuerySnapshot> querySnapshot = 111 | await FirebaseFirestore.instance 112 | .collection(this._collectionName) 113 | .get(); 114 | 115 | List> _usersDataCollection = []; 116 | 117 | querySnapshot.docs.forEach( 118 | (QueryDocumentSnapshot> queryDocumentSnapshot) { 119 | if (currentUserEmail != queryDocumentSnapshot.id) 120 | _usersDataCollection.add({ 121 | queryDocumentSnapshot.id: 122 | '${queryDocumentSnapshot.get("user_name")}[user-name-about-divider]${queryDocumentSnapshot.get("about")}', 123 | }); 124 | }); 125 | 126 | print(_usersDataCollection); 127 | 128 | return _usersDataCollection; 129 | } catch (e) { 130 | print('Error in get All Users List: ${e.toString()}'); 131 | return []; 132 | } 133 | } 134 | 135 | Future?> _getCurrentAccountAllData( 136 | {required String email}) async { 137 | try { 138 | final DocumentSnapshot> documentSnapshot = 139 | await FirebaseFirestore.instance 140 | .doc('${this._collectionName}/$email') 141 | .get(); 142 | 143 | return documentSnapshot.data(); 144 | } catch (e) { 145 | print('Error in getCurrentAccountAll Data: ${e.toString()}'); 146 | return {}; 147 | } 148 | } 149 | 150 | Future> currentUserConnectionRequestList( 151 | {required String email}) async { 152 | try { 153 | Map? _currentUserData = 154 | await _getCurrentAccountAllData(email: email); 155 | 156 | final List _connectionRequestCollection = 157 | _currentUserData!["connection_request"]; 158 | 159 | print('Collection: $_connectionRequestCollection'); 160 | 161 | return _connectionRequestCollection; 162 | } catch (e) { 163 | print('Error in Current USer Collection List: ${e.toString()}'); 164 | return []; 165 | } 166 | } 167 | 168 | Future changeConnectionStatus({ 169 | required String oppositeUserMail, 170 | required String currentUserMail, 171 | required String connectionUpdatedStatus, 172 | required List currentUserUpdatedConnectionRequest, 173 | bool storeDataAlsoInConnections = false, 174 | }) async { 175 | try { 176 | print('Come here'); 177 | 178 | /// Opposite Connection database Update 179 | final DocumentSnapshot> documentSnapshot = 180 | await FirebaseFirestore.instance 181 | .doc('${this._collectionName}/$oppositeUserMail') 182 | .get(); 183 | 184 | Map? map = documentSnapshot.data(); 185 | 186 | print('Map: $map'); 187 | 188 | List _oppositeConnectionsRequestsList = 189 | map!["connection_request"]; 190 | 191 | int index = -1; 192 | 193 | _oppositeConnectionsRequestsList.forEach((element) { 194 | if (element.keys.first.toString() == currentUserMail) 195 | index = _oppositeConnectionsRequestsList.indexOf(element); 196 | }); 197 | 198 | if (index > -1) _oppositeConnectionsRequestsList.removeAt(index); 199 | 200 | print('Opposite Connections: $_oppositeConnectionsRequestsList'); 201 | 202 | _oppositeConnectionsRequestsList.add({ 203 | currentUserMail: connectionUpdatedStatus, 204 | }); 205 | 206 | print('Opposite Connections: $_oppositeConnectionsRequestsList'); 207 | 208 | map["connection_request"] = _oppositeConnectionsRequestsList; 209 | 210 | if (storeDataAlsoInConnections) 211 | map[FirestoreFieldConstants().connections].addAll({ 212 | currentUserMail: [], 213 | }); 214 | 215 | await FirebaseFirestore.instance 216 | .doc('${this._collectionName}/$oppositeUserMail') 217 | .update(map); 218 | 219 | /// Current User Connection Database Update 220 | final Map? currentUserMap = 221 | await _getCurrentAccountAllData(email: currentUserMail); 222 | 223 | currentUserMap!["connection_request"] = 224 | currentUserUpdatedConnectionRequest; 225 | 226 | if (storeDataAlsoInConnections) 227 | currentUserMap[FirestoreFieldConstants().connections].addAll({ 228 | oppositeUserMail: [], 229 | }); 230 | 231 | await FirebaseFirestore.instance 232 | .doc('${this._collectionName}/$currentUserMail') 233 | .update(currentUserMap); 234 | } catch (e) { 235 | print('Error in Change Connection Status: ${e.toString()}'); 236 | } 237 | } 238 | 239 | Future>>?> 240 | fetchRealTimeDataFromFirestore() async { 241 | try { 242 | return FirebaseFirestore.instance 243 | .collection(this._collectionName) 244 | .snapshots(); 245 | } catch (e) { 246 | print('Error in Fetch Real Time Data : ${e.toString()}'); 247 | return null; 248 | } 249 | } 250 | 251 | Future>>?> 252 | fetchRealTimeMessages() async { 253 | try { 254 | return FirebaseFirestore.instance 255 | .doc( 256 | '${this._collectionName}/${FirebaseAuth.instance.currentUser!.email.toString()}') 257 | .snapshots(); 258 | } catch (e) { 259 | print('Error in Fetch Real Time Data : ${e.toString()}'); 260 | return null; 261 | } 262 | } 263 | 264 | Future sendMessageToConnection( 265 | {required String connectionUserName, 266 | required Map> sendMessageData, 267 | required ChatMessageTypes chatMessageTypes}) async { 268 | try { 269 | final LocalDatabase _localDatabase = LocalDatabase(); 270 | 271 | final String? currentUserEmail = FirebaseAuth.instance.currentUser!.email; 272 | 273 | final String? _getConnectedUserEmail = 274 | await _localDatabase.getParticularFieldDataFromImportantTable( 275 | userName: connectionUserName, 276 | getField: GetFieldForImportantDataLocalDatabase.UserEmail); 277 | 278 | final DocumentSnapshot> documentSnapshot = 279 | await FirebaseFirestore.instance 280 | .doc("${this._collectionName}/$_getConnectedUserEmail") 281 | .get(); 282 | 283 | final Map? connectedUserData = documentSnapshot.data(); 284 | 285 | List? getOldMessages = 286 | connectedUserData![FirestoreFieldConstants().connections] 287 | [currentUserEmail.toString()]; 288 | if (getOldMessages == null) getOldMessages = []; 289 | 290 | getOldMessages.add(sendMessageData); 291 | 292 | connectedUserData[FirestoreFieldConstants().connections] 293 | [currentUserEmail.toString()] = getOldMessages; 294 | 295 | print( 296 | "Data checking: ${connectedUserData[FirestoreFieldConstants().connections]}"); 297 | 298 | await FirebaseFirestore.instance 299 | .doc("${this._collectionName}/$_getConnectedUserEmail") 300 | .update({ 301 | FirestoreFieldConstants().connections: 302 | connectedUserData[FirestoreFieldConstants().connections], 303 | }).whenComplete(() async { 304 | print('Data Send Completed'); 305 | 306 | final String? connectionToken = 307 | await _localDatabase.getParticularFieldDataFromImportantTable( 308 | userName: connectionUserName, 309 | getField: GetFieldForImportantDataLocalDatabase.Token); 310 | 311 | final String? currentAccountUserName = 312 | await _localDatabase.getUserNameForCurrentUser( 313 | FirebaseAuth.instance.currentUser!.email.toString()); 314 | 315 | await _sendNotification.messageNotificationClassifier(chatMessageTypes, 316 | connectionToken: connectionToken ?? "", 317 | currAccountUserName: currentAccountUserName ?? ""); 318 | }); 319 | } catch (e) { 320 | print('error in Send Data: ${e.toString()}'); 321 | } 322 | } 323 | 324 | Future removeOldMessages({required String connectionEmail}) async { 325 | try { 326 | final String? currentUserEmail = FirebaseAuth.instance.currentUser!.email; 327 | 328 | final DocumentSnapshot> documentSnapshot = 329 | await FirebaseFirestore.instance 330 | .doc("${this._collectionName}/$currentUserEmail") 331 | .get(); 332 | 333 | final Map? connectedUserData = documentSnapshot.data(); 334 | 335 | connectedUserData![FirestoreFieldConstants().connections] 336 | [connectionEmail.toString()] = []; 337 | 338 | print( 339 | "After Remove: ${connectedUserData[FirestoreFieldConstants().connections]}"); 340 | 341 | await FirebaseFirestore.instance 342 | .doc("${this._collectionName}/$currentUserEmail") 343 | .update({ 344 | FirestoreFieldConstants().connections: 345 | connectedUserData[FirestoreFieldConstants().connections], 346 | }).whenComplete(() { 347 | print('Data Deletion Completed'); 348 | }); 349 | } catch (e) { 350 | print('error in Send Data: ${e.toString()}'); 351 | } 352 | } 353 | 354 | Future uploadMediaToStorage(File filePath, 355 | {required String reference}) async { 356 | try { 357 | String? downLoadUrl; 358 | 359 | final String fileName = 360 | '${FirebaseAuth.instance.currentUser!.uid}${DateTime.now().day}${DateTime.now().month}${DateTime.now().year}${DateTime.now().hour}${DateTime.now().minute}${DateTime.now().second}${DateTime.now().millisecond}'; 361 | 362 | final Reference firebaseStorageRef = 363 | FirebaseStorage.instance.ref(reference).child(fileName); 364 | 365 | print('Firebase Storage Reference: $firebaseStorageRef'); 366 | 367 | final UploadTask uploadTask = firebaseStorageRef.putFile(filePath); 368 | 369 | await uploadTask.whenComplete(() async { 370 | print("Media Uploaded"); 371 | downLoadUrl = await firebaseStorageRef.getDownloadURL(); 372 | print("Download Url: $downLoadUrl}"); 373 | }); 374 | 375 | return downLoadUrl!; 376 | } catch (e) { 377 | print("Error: Firebase Storage Exception is: ${e.toString()}"); 378 | return null; 379 | } 380 | } 381 | } 382 | -------------------------------------------------------------------------------- /lib/Backend/sqlite_management/local_database_management.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:generation/FrontEnd/model/previous_message_structure.dart'; 4 | import 'package:generation/Global_Uses/enum_generation.dart'; 5 | import 'package:sqflite/sqflite.dart'; 6 | 7 | class LocalDatabase { 8 | /// For Important Table 9 | final String _importantTableData = "__Important_Table_Data__"; // Table Name 10 | 11 | // All Columns 12 | final String _colUserName = "User_Name"; 13 | final String _colUserMail = "User_Mail"; 14 | final String _colToken = "User_Device_Token"; 15 | final String _colProfileImagePath = "Profile_Image_Path"; 16 | final String _colProfileImageUrl = "Profile_Image_Url"; 17 | final String _colAbout = "About"; 18 | final String _colWallpaper = "Chat_Wallpaper"; 19 | final String _colNotification = "Notification_Status"; 20 | final String _colMobileNumber = "User_Mobile_Number"; 21 | final String _colAccCreationDate = "Account_Creation_Date"; 22 | final String _colAccCreationTime = "Account_Creation_Time"; 23 | 24 | /// For Status Management 25 | /// final String _userStatusData = "__User_Status_Data__"; 26 | 27 | // All Columns 28 | final String _colActivity = "Activity_path"; 29 | final String _colActivityTime = "Activity_time"; 30 | final String _colActivityMediaType = "Activity_media"; 31 | final String _colActivityExtraText = "Activity_Extra_Text"; 32 | final String _colActivityBGInformation = "Activity_BG_Information"; 33 | 34 | /// For Every User 35 | final String _colActualMessage = "Message"; 36 | final String _colMessageType = "Message_Type"; 37 | final String _colMessageDate = "Message_Date"; 38 | final String _colMessageTime = "Message_Time"; 39 | final String _colMessageHolder = "Message_Holder"; 40 | 41 | /// Create Singleton Objects(Only Created once in the whole application) 42 | static late LocalDatabase _localStorageHelper = 43 | LocalDatabase._createInstance(); 44 | static late Database _database; 45 | 46 | /// Instantiate the obj 47 | LocalDatabase._createInstance(); // Named Constructor 48 | 49 | /// For access Singleton object 50 | factory LocalDatabase() { 51 | _localStorageHelper = LocalDatabase._createInstance(); 52 | return _localStorageHelper; 53 | } 54 | 55 | /// Getter for taking instance of database 56 | Future get database async { 57 | _database = await initializeDatabase(); 58 | return _database; 59 | } 60 | 61 | /// For make a database 62 | Future initializeDatabase() async { 63 | /// Get the directory path to store the database 64 | final String desirePath = await getDatabasesPath(); 65 | 66 | final Directory newDirectory = 67 | await Directory(desirePath + '/.Databases/').create(); 68 | final String path = newDirectory.path + '/generation_local_storage.db'; 69 | 70 | // create the database 71 | final Database getDatabase = await openDatabase(path, version: 1); 72 | return getDatabase; 73 | } 74 | 75 | /// Table for store important data Table 76 | Future createTableToStoreImportantData() async { 77 | try { 78 | final Database db = await this.database; 79 | await db.execute( 80 | "CREATE TABLE ${this._importantTableData}($_colUserName TEXT PRIMARY KEY, $_colUserMail TEXT, $_colToken TEXT, $_colProfileImagePath TEXT, $_colProfileImageUrl TEXT, $_colAbout TEXT, $_colWallpaper TEXT, $_colNotification TEXT, $_colMobileNumber TEXT, $_colAccCreationDate TEXT, $_colAccCreationTime TEXT)"); 81 | 82 | print('User Important table creatred'); 83 | } catch (e) { 84 | print('Error in Create Import Table: ${e.toString()}'); 85 | } 86 | } 87 | 88 | /// Insert or Update From Important Data Table 89 | Future insertOrUpdateDataForThisAccount({ 90 | required String userName, 91 | required String userMail, 92 | required String userToken, 93 | required String userAbout, 94 | required String userAccCreationDate, 95 | required String userAccCreationTime, 96 | String chatWallpaper = '', 97 | String profileImagePath = '', 98 | String profileImageUrl = '', 99 | String purpose = 'insert', 100 | }) async { 101 | try { 102 | final Database db = await this.database; 103 | 104 | if (purpose != 'insert') { 105 | final int updateResult = await db.rawUpdate( 106 | "UPDATE $_importantTableData SET $_colToken = '$userToken', $_colAbout = '$userAbout', $_colUserMail = '$userMail', $_colAccCreationDate = '$userAccCreationDate', $_colAccCreationTime = '$userAccCreationTime' WHERE $_colUserName = '$userName'"); 107 | 108 | print('Update Result is: $updateResult'); 109 | } else { 110 | final Map _accountData = Map(); 111 | 112 | _accountData[_colUserName] = userName; 113 | _accountData[_colUserMail] = userMail; 114 | _accountData[_colToken] = userToken; 115 | _accountData[_colProfileImagePath] = profileImagePath; 116 | _accountData[_colProfileImageUrl] = profileImageUrl; 117 | _accountData[_colAbout] = userAbout; 118 | _accountData[_colWallpaper] = chatWallpaper; 119 | _accountData[_colMobileNumber] = ''; 120 | _accountData[_colNotification] = "1"; 121 | _accountData[_colAccCreationDate] = userAccCreationDate; 122 | _accountData[_colAccCreationTime] = userAccCreationTime; 123 | 124 | await db.insert(this._importantTableData, _accountData); 125 | } 126 | return true; 127 | } catch (e) { 128 | print('Error in Insert or Update Important Data Table'); 129 | return false; 130 | } 131 | } 132 | 133 | Future getUserNameForCurrentUser(String userEmail) async { 134 | try { 135 | final Database db = await this.database; 136 | 137 | List> result = await db.rawQuery( 138 | "SELECT $_colUserName FROM ${this._importantTableData} WHERE $_colUserMail='$userEmail'"); 139 | 140 | return result[0].values.first.toString(); 141 | } catch (e) { 142 | return null; 143 | } 144 | } 145 | 146 | Future getParticularFieldDataFromImportantTable( 147 | {required String userName, 148 | required GetFieldForImportantDataLocalDatabase getField}) async { 149 | try { 150 | final Database db = await this.database; 151 | 152 | final String? _particularSearchField = 153 | _getFieldNameHelpWithEnumerators(getField); 154 | 155 | List> getResult = await db.rawQuery( 156 | "SELECT $_particularSearchField FROM ${this._importantTableData} WHERE $_colUserName = '$userName'"); 157 | 158 | return getResult[0].values.first.toString(); 159 | } catch (e) { 160 | print( 161 | 'Error in getParticularFieldDataFromImportantTable: ${e.toString()}'); 162 | } 163 | } 164 | 165 | String? _getFieldNameHelpWithEnumerators( 166 | GetFieldForImportantDataLocalDatabase getField) { 167 | switch (getField) { 168 | case GetFieldForImportantDataLocalDatabase.UserEmail: 169 | return this._colUserMail; 170 | case GetFieldForImportantDataLocalDatabase.Token: 171 | return this._colToken; 172 | case GetFieldForImportantDataLocalDatabase.ProfileImagePath: 173 | return this._colProfileImagePath; 174 | case GetFieldForImportantDataLocalDatabase.ProfileImageUrl: 175 | return this._colProfileImageUrl; 176 | case GetFieldForImportantDataLocalDatabase.About: 177 | return this._colAbout; 178 | case GetFieldForImportantDataLocalDatabase.WallPaper: 179 | return this._colWallpaper; 180 | case GetFieldForImportantDataLocalDatabase.MobileNumber: 181 | return this._colMobileNumber; 182 | case GetFieldForImportantDataLocalDatabase.Notification: 183 | return this._colNotification; 184 | case GetFieldForImportantDataLocalDatabase.AccountCreationDate: 185 | return this._colAccCreationDate; 186 | case GetFieldForImportantDataLocalDatabase.AccountCreationTime: 187 | return this._colAccCreationTime; 188 | } 189 | } 190 | 191 | /// For Make Table for Status 192 | Future createTableForUserActivity({required String tableName}) async { 193 | final Database db = await this.database; 194 | try { 195 | await db.execute( 196 | "CREATE TABLE ${tableName}_status($_colActivity, $_colActivityTime TEXT PRIMARY KEY, $_colActivityMediaType TEXT, $_colActivityExtraText TEXT, $_colActivityBGInformation TEXT)"); 197 | 198 | print('User Activity table creatred'); 199 | 200 | return true; 201 | } catch (e) { 202 | print("Error in Create Table For Status: ${e.toString()}"); 203 | return false; 204 | } 205 | } 206 | 207 | /// Insert ActivityData to Activity Table 208 | Future insertDataInUserActivityTable( 209 | {required String tableName, 210 | required String statusLinkOrString, 211 | required StatusMediaTypes mediaTypes, 212 | required String activityTime, 213 | String extraText = '', 214 | String bgInformation = ''}) async { 215 | try { 216 | final Database db = await this.database; 217 | final Map _activityStoreMap = Map(); 218 | 219 | _activityStoreMap[_colActivity] = statusLinkOrString; 220 | _activityStoreMap[_colActivityTime] = activityTime; 221 | _activityStoreMap[_colActivityMediaType] = mediaTypes.toString(); 222 | _activityStoreMap[_colActivityExtraText] = extraText; 223 | _activityStoreMap[_colActivityBGInformation] = bgInformation; 224 | 225 | /// Result Insert to DB 226 | final int result = 227 | await db.insert('${tableName}_status', _activityStoreMap); 228 | 229 | return result > 0 ? true : false; 230 | } catch (e) { 231 | print('Error: Activity Table Data insertion Error: ${e.toString()}'); 232 | return false; 233 | } 234 | } 235 | 236 | Future createTableForEveryUser({required String userName}) async { 237 | try { 238 | final Database db = await this.database; 239 | 240 | await db.execute( 241 | "CREATE TABLE $userName($_colActualMessage TEXT, $_colMessageType TEXT, $_colMessageHolder TEXT, $_colMessageDate TEXT, $_colMessageTime TEXT)"); 242 | } catch (e) { 243 | print("Error in Create Table For Every User: ${e.toString()}"); 244 | } 245 | } 246 | 247 | Future insertMessageInUserTable( 248 | {required String userName, 249 | required String actualMessage, 250 | required ChatMessageTypes chatMessageTypes, 251 | required MessageHolderType messageHolderType, 252 | required String messageDateLocal, 253 | required String messageTimeLocal}) async { 254 | try { 255 | final Database db = await this.database; 256 | 257 | Map tempMap = Map(); 258 | 259 | tempMap[this._colActualMessage] = actualMessage; 260 | tempMap[this._colMessageType] = chatMessageTypes.toString(); 261 | tempMap[this._colMessageHolder] = messageHolderType.toString(); 262 | tempMap[this._colMessageDate] = messageDateLocal; 263 | tempMap[this._colMessageTime] = messageTimeLocal; 264 | 265 | final int rowAffected = await db.insert(userName, tempMap); 266 | print('Row Affected: $rowAffected'); 267 | } catch (e) { 268 | print('Error in Insert Message In User Table: ${e.toString()}'); 269 | } 270 | } 271 | 272 | Future> getAllPreviousMessages( 273 | String userName) async { 274 | try { 275 | final Database db = await this.database; 276 | 277 | final List> result = 278 | await db.rawQuery("SELECT * from $userName"); 279 | 280 | List takePreviousMessages = []; 281 | 282 | for (int i = 0; i < result.length; i++) { 283 | Map tempMap = result[i]; 284 | takePreviousMessages.add(PreviousMessageStructure.toJson(tempMap)); 285 | } 286 | 287 | return takePreviousMessages; 288 | } catch (e) { 289 | print("Error is: $e"); 290 | return []; 291 | } 292 | } 293 | } 294 | -------------------------------------------------------------------------------- /lib/FrontEnd/AuthUI/common_auth_methods.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/cupertino.dart'; 3 | import 'package:generation/FrontEnd/AuthUI/sign_up.dart'; 4 | 5 | import 'log_in.dart'; 6 | 7 | Widget commonTextFormField({required String hintText, required String? Function(String?)? validator, required TextEditingController textEditingController, double bottomPadding = 50.0}) { 8 | return Container( 9 | padding: EdgeInsets.only(left: 20.0, right: 20.0, bottom: bottomPadding), 10 | child: TextFormField( 11 | validator: validator, 12 | controller: textEditingController, 13 | style: TextStyle(color: Colors.white), 14 | decoration: InputDecoration( 15 | hintText: hintText, 16 | hintStyle: TextStyle(color: Colors.white70), 17 | enabledBorder: UnderlineInputBorder( 18 | borderSide: BorderSide( 19 | color: Colors.lightBlue, 20 | width: 2.0, 21 | ), 22 | ), 23 | ), 24 | ), 25 | ); 26 | } 27 | 28 | // Widget authButton(BuildContext context, String buttonName) { 29 | // return Padding( 30 | // padding: const EdgeInsets.only(left: 20.0, right: 20.0), 31 | // child: ElevatedButton( 32 | // style: ElevatedButton.styleFrom( 33 | // minimumSize: Size(MediaQuery.of(context).size.width - 60, 30.0), 34 | // elevation: 5.0, 35 | // primary: Color.fromRGBO(57, 60, 80, 1), 36 | // padding: EdgeInsets.only( 37 | // left: 20.0, 38 | // right: 20.0, 39 | // top: 7.0, 40 | // bottom: 7.0, 41 | // ), 42 | // shape: RoundedRectangleBorder( 43 | // borderRadius: BorderRadius.all(Radius.circular(20.0)), 44 | // )), 45 | // child: Text( 46 | // buttonName, 47 | // style: TextStyle( 48 | // fontSize: 25.0, 49 | // letterSpacing: 1.0, 50 | // fontWeight: FontWeight.w400, 51 | // ), 52 | // ), 53 | // onPressed: () async {}, 54 | // ), 55 | // ); 56 | // } 57 | 58 | // Widget socialMediaIntegrationButtons() { 59 | // return Container( 60 | // width: double.maxFinite, 61 | // padding: EdgeInsets.all(30.0), 62 | // child: Row( 63 | // mainAxisAlignment: MainAxisAlignment.center, 64 | // children: [ 65 | // GestureDetector( 66 | // onTap: (){ 67 | // print('Google Pressed'); 68 | // }, 69 | // child: Image.asset( 70 | // 'assets/images/google.png', 71 | // width: 50.0, 72 | // ), 73 | // ), 74 | // SizedBox( 75 | // width: 80.0, 76 | // ), 77 | // GestureDetector( 78 | // onTap: (){ 79 | // print('Facebook Pressed'); 80 | // }, 81 | // child: Image.asset( 82 | // 'assets/images/fbook.png', 83 | // width: 50.0, 84 | // ), 85 | // ), 86 | // ], 87 | // ), 88 | // ); 89 | // } 90 | 91 | Widget switchAnotherAuthScreen( 92 | BuildContext context, String buttonNameFirst, String buttonNameLast) { 93 | return ElevatedButton( 94 | child: Row( 95 | mainAxisAlignment: MainAxisAlignment.center, 96 | children: [ 97 | Text( 98 | buttonNameFirst, 99 | style: TextStyle( 100 | color: Colors.white, 101 | fontSize: 16.0, 102 | letterSpacing: 1.0, 103 | ), 104 | ), 105 | Text( 106 | buttonNameLast, 107 | style: TextStyle( 108 | color: Colors.lightBlueAccent, 109 | fontSize: 16.0, 110 | letterSpacing: 1.0, 111 | ), 112 | ), 113 | ], 114 | ), 115 | style: ElevatedButton.styleFrom( 116 | elevation: 0.0, 117 | primary: Color.fromRGBO(34, 48, 60, 1), 118 | ), 119 | onPressed: () { 120 | if (buttonNameLast == "Log-In") 121 | Navigator.push( 122 | context, MaterialPageRoute(builder: (_) => LogInScreen())); 123 | else 124 | Navigator.push(context, MaterialPageRoute(builder: (_) => SignUpScreen())); 125 | }, 126 | ); 127 | } 128 | -------------------------------------------------------------------------------- /lib/FrontEnd/AuthUI/log_in.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/cupertino.dart'; 3 | import 'package:flutter/services.dart'; 4 | import 'package:generation/Backend/firebase/Auth/email_and_pwd_auth.dart'; 5 | import 'package:generation/Backend/firebase/Auth/fb_auth.dart'; 6 | import 'package:generation/Backend/firebase/Auth/google_auth.dart'; 7 | import 'package:generation/FrontEnd/NewUserEntry/new_user_entry.dart'; 8 | import 'package:generation/FrontEnd/MainScreens/home_page.dart'; 9 | import 'package:generation/Global_Uses/enum_generation.dart'; 10 | import 'package:generation/Global_Uses/reg_exp.dart'; 11 | import 'package:loading_overlay/loading_overlay.dart'; 12 | 13 | import 'common_auth_methods.dart'; 14 | 15 | class LogInScreen extends StatefulWidget { 16 | const LogInScreen({Key? key}) : super(key: key); 17 | 18 | @override 19 | _LogInScreenState createState() => _LogInScreenState(); 20 | } 21 | 22 | class _LogInScreenState extends State { 23 | final GlobalKey _logInKey = GlobalKey(); 24 | 25 | final TextEditingController _email = TextEditingController(); 26 | final TextEditingController _pwd = TextEditingController(); 27 | 28 | final EmailAndPasswordAuth _emailAndPasswordAuth = EmailAndPasswordAuth(); 29 | final GoogleAuthentication _googleAuthentication = GoogleAuthentication(); 30 | final FacebookAuthentication _facebookAuthentication = FacebookAuthentication(); 31 | 32 | bool _isLoading = false; 33 | 34 | @override 35 | Widget build(BuildContext context) { 36 | return SafeArea( 37 | child: Scaffold( 38 | backgroundColor: const Color.fromRGBO(34, 48, 60, 1), 39 | body: LoadingOverlay( 40 | isLoading: this._isLoading, 41 | color: Colors.black54, 42 | child: Container( 43 | child: ListView( 44 | shrinkWrap: true, 45 | children: [ 46 | SizedBox( 47 | height: 50.0, 48 | ), 49 | Center( 50 | child: Text( 51 | 'Log-In', 52 | style: TextStyle(fontSize: 28.0, color: Colors.white), 53 | ), 54 | ), 55 | Container( 56 | height: MediaQuery.of(context).size.height / 2, 57 | width: MediaQuery.of(context).size.width, 58 | padding: EdgeInsets.only(top: 60.0, bottom: 10.0), 59 | child: Form( 60 | key: this._logInKey, 61 | child: ListView( 62 | children: [ 63 | commonTextFormField( 64 | hintText: 'Email', 65 | validator: (String? inputVal) { 66 | if (!emailRegex.hasMatch(inputVal.toString())) 67 | return 'Email format is not matching'; 68 | return null; 69 | }, 70 | textEditingController: this._email), 71 | commonTextFormField( 72 | hintText: 'Password', 73 | validator: (String? inputVal) { 74 | if (inputVal!.length < 6) 75 | return 'Password must be at least 6 characters'; 76 | return null; 77 | }, 78 | textEditingController: this._pwd), 79 | logInAuthButton(context, 'Log-In'), 80 | ], 81 | ), 82 | ), 83 | ), 84 | Center( 85 | child: Text( 86 | 'Or Continue With', 87 | style: TextStyle(color: Colors.white, fontSize: 20.0), 88 | ), 89 | ), 90 | logInSocialMediaIntegrationButtons(), 91 | switchAnotherAuthScreen( 92 | context, "Don't Have an Account? ", 'Sign-Up'), 93 | ], 94 | ), 95 | ), 96 | ), 97 | ), 98 | ); 99 | } 100 | 101 | Widget logInAuthButton(BuildContext context, String buttonName) { 102 | return Padding( 103 | padding: const EdgeInsets.only(left: 20.0, right: 20.0), 104 | child: ElevatedButton( 105 | style: ElevatedButton.styleFrom( 106 | minimumSize: Size(MediaQuery.of(context).size.width - 60, 30.0), 107 | elevation: 5.0, 108 | primary: Color.fromRGBO(57, 60, 80, 1), 109 | padding: EdgeInsets.only( 110 | left: 20.0, 111 | right: 20.0, 112 | top: 7.0, 113 | bottom: 7.0, 114 | ), 115 | shape: RoundedRectangleBorder( 116 | borderRadius: BorderRadius.all(Radius.circular(20.0)), 117 | )), 118 | child: Text( 119 | buttonName, 120 | style: TextStyle( 121 | fontSize: 25.0, 122 | letterSpacing: 1.0, 123 | fontWeight: FontWeight.w400, 124 | ), 125 | ), 126 | onPressed: () async { 127 | if (this._logInKey.currentState!.validate()) { 128 | print('Validated'); 129 | SystemChannels.textInput.invokeMethod('TextInput.hide'); 130 | 131 | if (mounted) { 132 | setState(() { 133 | this._isLoading = true; 134 | }); 135 | } 136 | 137 | final EmailSignInResults emailSignInResults = 138 | await _emailAndPasswordAuth.signInWithEmailAndPassword( 139 | email: this._email.text, pwd: this._pwd.text); 140 | 141 | String msg = ''; 142 | if (emailSignInResults == EmailSignInResults.SignInCompleted) 143 | Navigator.pushAndRemoveUntil( 144 | context, 145 | MaterialPageRoute(builder: (_) => TakePrimaryUserData()), 146 | (route) => false); 147 | else if (emailSignInResults == 148 | EmailSignInResults.EmailNotVerified) { 149 | msg = 150 | 'Email not Verified.\nPlease Verify your email and then Log In'; 151 | } else if (emailSignInResults == 152 | EmailSignInResults.EmailOrPasswordInvalid) 153 | msg = 'Email And Password Invalid'; 154 | else 155 | msg = 'Sign In Not Completed'; 156 | 157 | if (msg != '') 158 | ScaffoldMessenger.of(context) 159 | .showSnackBar(SnackBar(content: Text(msg))); 160 | 161 | if (mounted) { 162 | setState(() { 163 | this._isLoading = false; 164 | }); 165 | } 166 | } else { 167 | print('Not Validated'); 168 | } 169 | }, 170 | ), 171 | ); 172 | } 173 | 174 | Widget logInSocialMediaIntegrationButtons() { 175 | return Container( 176 | width: double.maxFinite, 177 | padding: EdgeInsets.all(30.0), 178 | child: Row( 179 | mainAxisAlignment: MainAxisAlignment.center, 180 | children: [ 181 | GestureDetector( 182 | onTap: ()async{ 183 | print('Google Pressed'); 184 | if (mounted) { 185 | setState(() { 186 | this._isLoading = true; 187 | }); 188 | } 189 | 190 | final GoogleSignInResults _googleSignInResults = 191 | await this._googleAuthentication.signInWithGoogle(); 192 | 193 | String msg = ''; 194 | 195 | if (_googleSignInResults == GoogleSignInResults.SignInCompleted) { 196 | msg = 'Sign In Completed'; 197 | } else if (_googleSignInResults == 198 | GoogleSignInResults.SignInNotCompleted) 199 | msg = 'Sign In not Completed'; 200 | else if (_googleSignInResults == 201 | GoogleSignInResults.AlreadySignedIn) 202 | msg = 'Already Google SignedIn'; 203 | else 204 | msg = 'Unexpected Error Happen'; 205 | 206 | ScaffoldMessenger.of(context) 207 | .showSnackBar(SnackBar(content: Text(msg))); 208 | 209 | if (_googleSignInResults == GoogleSignInResults.SignInCompleted) 210 | Navigator.pushAndRemoveUntil( 211 | context, 212 | MaterialPageRoute(builder: (_) => TakePrimaryUserData()), 213 | (route) => false); 214 | 215 | if (mounted) { 216 | setState(() { 217 | this._isLoading = false; 218 | }); 219 | } 220 | }, 221 | child: Image.asset( 222 | 'assets/images/google.png', 223 | width: 50.0, 224 | ), 225 | ), 226 | SizedBox( 227 | width: 80.0, 228 | ), 229 | GestureDetector( 230 | onTap: ()async{ 231 | print('Facebook Pressed'); 232 | 233 | if (mounted) { 234 | setState(() { 235 | this._isLoading = true; 236 | }); 237 | } 238 | 239 | final FBSignInResults _fbSignInResults = 240 | await this._facebookAuthentication.facebookLogIn(); 241 | 242 | String msg = ''; 243 | 244 | if (_fbSignInResults == FBSignInResults.SignInCompleted) { 245 | msg = 'Sign In Completed'; 246 | } else if (_fbSignInResults == FBSignInResults.SignInNotCompleted) 247 | msg = 'Sign In not Completed'; 248 | else if (_fbSignInResults == FBSignInResults.AlreadySignedIn) 249 | msg = 'Already Google SignedIn'; 250 | else 251 | msg = 'Unexpected Error Happen'; 252 | 253 | ScaffoldMessenger.of(context) 254 | .showSnackBar(SnackBar(content: Text(msg))); 255 | 256 | if (_fbSignInResults == FBSignInResults.SignInCompleted) 257 | Navigator.pushAndRemoveUntil( 258 | context, 259 | MaterialPageRoute(builder: (_) => TakePrimaryUserData()), 260 | (route) => false); 261 | 262 | if (mounted) { 263 | setState(() { 264 | this._isLoading = false; 265 | }); 266 | } 267 | }, 268 | child: Image.asset( 269 | 'assets/images/fbook.png', 270 | width: 50.0, 271 | ), 272 | ), 273 | ], 274 | ), 275 | ); 276 | } 277 | } 278 | -------------------------------------------------------------------------------- /lib/FrontEnd/AuthUI/sign_up.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/cupertino.dart'; 3 | import 'package:flutter/services.dart'; 4 | import 'package:generation/Backend/firebase/Auth/email_and_pwd_auth.dart'; 5 | import 'package:generation/Backend/firebase/Auth/fb_auth.dart'; 6 | import 'package:generation/Backend/firebase/Auth/google_auth.dart'; 7 | import 'package:generation/FrontEnd/AuthUI/log_in.dart'; 8 | import 'package:generation/FrontEnd/NewUserEntry/new_user_entry.dart'; 9 | import 'package:generation/Global_Uses/enum_generation.dart'; 10 | import 'package:generation/Global_Uses/reg_exp.dart'; 11 | 12 | import 'package:loading_overlay/loading_overlay.dart'; 13 | 14 | import '../MainScreens/home_page.dart'; 15 | import 'common_auth_methods.dart'; 16 | 17 | class SignUpScreen extends StatefulWidget { 18 | const SignUpScreen({Key? key}) : super(key: key); 19 | 20 | @override 21 | _SignUpScreenState createState() => _SignUpScreenState(); 22 | } 23 | 24 | class _SignUpScreenState extends State { 25 | final GlobalKey _signUpKey = GlobalKey(); 26 | 27 | final TextEditingController _email = TextEditingController(); 28 | final TextEditingController _pwd = TextEditingController(); 29 | final TextEditingController _conformPwd = TextEditingController(); 30 | 31 | final EmailAndPasswordAuth _emailAndPasswordAuth = EmailAndPasswordAuth(); 32 | final GoogleAuthentication _googleAuthentication = GoogleAuthentication(); 33 | final FacebookAuthentication _facebookAuthentication = FacebookAuthentication(); 34 | 35 | bool _isLoading = false; 36 | 37 | @override 38 | Widget build(BuildContext context) { 39 | return SafeArea( 40 | child: Scaffold( 41 | backgroundColor: const Color.fromRGBO(34, 48, 60, 1), 42 | body: LoadingOverlay( 43 | isLoading: this._isLoading, 44 | color: Colors.black54, 45 | child: Container( 46 | child: ListView( 47 | shrinkWrap: true, 48 | children: [ 49 | SizedBox( 50 | height: 50.0, 51 | ), 52 | Center( 53 | child: Text( 54 | 'Sign-Up', 55 | style: TextStyle(fontSize: 28.0, color: Colors.white), 56 | ), 57 | ), 58 | Container( 59 | height: MediaQuery.of(context).size.height / 1.65, 60 | width: MediaQuery.of(context).size.width, 61 | padding: EdgeInsets.only(top: 40.0, bottom: 10.0), 62 | child: Form( 63 | key: this._signUpKey, 64 | child: ListView( 65 | children: [ 66 | commonTextFormField( 67 | hintText: 'Email', 68 | validator: (inputVal) { 69 | if (!emailRegex.hasMatch(inputVal.toString())) 70 | return 'Email Format not Matching'; 71 | return null; 72 | }, 73 | textEditingController: this._email), 74 | commonTextFormField( 75 | hintText: 'Password', 76 | validator: (String? inputVal) { 77 | if (inputVal!.length < 6) 78 | return 'Password must be at least 6 characters'; 79 | return null; 80 | }, 81 | textEditingController: this._pwd), 82 | commonTextFormField( 83 | hintText: 'Conform Password', 84 | validator: (String? inputVal) { 85 | if (inputVal!.length < 6) 86 | return 'Conform Password Must be at least 6 characters'; 87 | if (this._pwd.text != this._conformPwd.text) 88 | return 'Password and Conform Password Not Same Here'; 89 | return null; 90 | }, 91 | textEditingController: this._conformPwd), 92 | signUpAuthButton(context, 'Sign-Up'), 93 | ], 94 | ), 95 | ), 96 | ), 97 | Center( 98 | child: Text( 99 | 'Or Continue With', 100 | style: TextStyle(color: Colors.white, fontSize: 20.0), 101 | ), 102 | ), 103 | signUpSocialMediaIntegrationButtons(), 104 | switchAnotherAuthScreen( 105 | context, "Already have an account? ", "Log-In"), 106 | ], 107 | ), 108 | ), 109 | ), 110 | ), 111 | ); 112 | } 113 | 114 | Widget signUpAuthButton(BuildContext context, String buttonName) { 115 | return Padding( 116 | padding: const EdgeInsets.only(left: 20.0, right: 20.0), 117 | child: ElevatedButton( 118 | style: ElevatedButton.styleFrom( 119 | minimumSize: Size(MediaQuery.of(context).size.width - 60, 30.0), 120 | elevation: 5.0, 121 | primary: Color.fromRGBO(57, 60, 80, 1), 122 | padding: EdgeInsets.only( 123 | left: 20.0, 124 | right: 20.0, 125 | top: 7.0, 126 | bottom: 7.0, 127 | ), 128 | shape: RoundedRectangleBorder( 129 | borderRadius: BorderRadius.all(Radius.circular(20.0)), 130 | )), 131 | child: Text( 132 | buttonName, 133 | style: TextStyle( 134 | fontSize: 25.0, 135 | letterSpacing: 1.0, 136 | fontWeight: FontWeight.w400, 137 | ), 138 | ), 139 | onPressed: () async { 140 | if (this._signUpKey.currentState!.validate()) { 141 | print('Validated'); 142 | 143 | if (mounted) { 144 | setState(() { 145 | this._isLoading = true; 146 | }); 147 | } 148 | 149 | SystemChannels.textInput.invokeMethod('TextInput.hide'); 150 | 151 | final EmailSignUpResults response = await this 152 | ._emailAndPasswordAuth 153 | .signUpAuth(email: this._email.text, pwd: this._pwd.text); 154 | if (response == EmailSignUpResults.SignUpCompleted) { 155 | Navigator.push( 156 | context, MaterialPageRoute(builder: (_) => LogInScreen())); 157 | } else { 158 | final String msg = 159 | response == EmailSignUpResults.EmailAlreadyPresent 160 | ? 'Email Already Present' 161 | : 'Sign Up Not Completed'; 162 | ScaffoldMessenger.of(context) 163 | .showSnackBar(SnackBar(content: Text(msg))); 164 | } 165 | } else { 166 | print('Not Validated'); 167 | } 168 | 169 | if (mounted) { 170 | setState(() { 171 | this._isLoading = false; 172 | }); 173 | } 174 | }, 175 | ), 176 | ); 177 | } 178 | 179 | Widget signUpSocialMediaIntegrationButtons() { 180 | return Container( 181 | width: double.maxFinite, 182 | padding: EdgeInsets.all(30.0), 183 | child: Row( 184 | mainAxisAlignment: MainAxisAlignment.center, 185 | children: [ 186 | GestureDetector( 187 | onTap: () async { 188 | print('Google Pressed'); 189 | if (mounted) { 190 | setState(() { 191 | this._isLoading = true; 192 | }); 193 | } 194 | 195 | final GoogleSignInResults _googleSignInResults = 196 | await this._googleAuthentication.signInWithGoogle(); 197 | 198 | String msg = ''; 199 | 200 | if (_googleSignInResults == GoogleSignInResults.SignInCompleted) { 201 | msg = 'Sign In Completed'; 202 | } else if (_googleSignInResults == 203 | GoogleSignInResults.SignInNotCompleted) 204 | msg = 'Sign In not Completed'; 205 | else if (_googleSignInResults == 206 | GoogleSignInResults.AlreadySignedIn) 207 | msg = 'Already Google SignedIn'; 208 | else 209 | msg = 'Unexpected Error Happen'; 210 | 211 | ScaffoldMessenger.of(context) 212 | .showSnackBar(SnackBar(content: Text(msg))); 213 | 214 | if (_googleSignInResults == GoogleSignInResults.SignInCompleted) 215 | Navigator.pushAndRemoveUntil( 216 | context, 217 | MaterialPageRoute(builder: (_) => TakePrimaryUserData()), 218 | (route) => false); 219 | 220 | if (mounted) { 221 | setState(() { 222 | this._isLoading = false; 223 | }); 224 | } 225 | }, 226 | child: Image.asset( 227 | 'assets/images/google.png', 228 | width: 50.0, 229 | ), 230 | ), 231 | SizedBox( 232 | width: 80.0, 233 | ), 234 | GestureDetector( 235 | onTap: () async{ 236 | print('Facebook Pressed'); 237 | 238 | if (mounted) { 239 | setState(() { 240 | this._isLoading = true; 241 | }); 242 | } 243 | 244 | final FBSignInResults _fbSignInResults = 245 | await this._facebookAuthentication.facebookLogIn(); 246 | 247 | String msg = ''; 248 | 249 | if (_fbSignInResults == FBSignInResults.SignInCompleted) { 250 | msg = 'Sign In Completed'; 251 | } else if (_fbSignInResults == FBSignInResults.SignInNotCompleted) 252 | msg = 'Sign In not Completed'; 253 | else if (_fbSignInResults == FBSignInResults.AlreadySignedIn) 254 | msg = 'Already Google SignedIn'; 255 | else 256 | msg = 'Unexpected Error Happen'; 257 | 258 | ScaffoldMessenger.of(context) 259 | .showSnackBar(SnackBar(content: Text(msg))); 260 | 261 | if (_fbSignInResults == FBSignInResults.SignInCompleted) 262 | Navigator.pushAndRemoveUntil( 263 | context, 264 | MaterialPageRoute(builder: (_) => TakePrimaryUserData()), 265 | (route) => false); 266 | 267 | if (mounted) { 268 | setState(() { 269 | this._isLoading = false; 270 | }); 271 | } 272 | }, 273 | child: Image.asset( 274 | 'assets/images/fbook.png', 275 | width: 50.0, 276 | ), 277 | ), 278 | ], 279 | ), 280 | ); 281 | } 282 | } 283 | -------------------------------------------------------------------------------- /lib/FrontEnd/MainScreens/general_connection_section.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/cupertino.dart'; 3 | 4 | import 'package:circle_list/circle_list.dart'; 5 | 6 | class GeneralMessagingSection extends StatefulWidget { 7 | const GeneralMessagingSection({Key? key}) : super(key: key); 8 | 9 | @override 10 | _GeneralMessagingSectionState createState() => _GeneralMessagingSectionState(); 11 | } 12 | 13 | class _GeneralMessagingSectionState extends State { 14 | @override 15 | Widget build(BuildContext context) { 16 | return SafeArea( 17 | child: Scaffold( 18 | backgroundColor: const Color.fromRGBO(34, 48, 60, 1), 19 | body: SizedBox( 20 | height: MediaQuery.of(context).size.height, 21 | child: Center( 22 | child: CircleList( 23 | initialAngle: 55, 24 | outerRadius: MediaQuery.of(context).size.width / 2.2, 25 | innerRadius: MediaQuery.of(context).size.width / 4, 26 | showInitialAnimation: true, 27 | innerCircleColor: Color.fromRGBO(34, 48, 60, 1), 28 | outerCircleColor: Color.fromRGBO(0, 0, 0, 0.1), 29 | origin: Offset(0, 0), 30 | rotateMode: RotateMode.allRotate, 31 | centerWidget: Center( 32 | child: Text( 33 | "G", 34 | style: TextStyle( 35 | color: Colors.lightBlue, 36 | fontSize: 65.0, 37 | ), 38 | ), 39 | ), 40 | children: [ 41 | Container( 42 | width: 60, 43 | height: 60, 44 | decoration: BoxDecoration( 45 | borderRadius: BorderRadius.circular(100), 46 | border: Border.all( 47 | color: Colors.blue, 48 | width: 3, 49 | )), 50 | child: GestureDetector( 51 | onTap: () async { 52 | //_imageOrVideoSend(imageSource: ImageSource.camera); 53 | }, 54 | onLongPress: () async { 55 | //_imageOrVideoSend(imageSource: ImageSource.gallery); 56 | }, 57 | child: Icon( 58 | Icons.camera_alt_rounded, 59 | color: Colors.lightGreen, 60 | size: 30.0, 61 | ), 62 | ), 63 | ), 64 | Container( 65 | width: 60, 66 | height: 60, 67 | decoration: BoxDecoration( 68 | borderRadius: BorderRadius.circular(100), 69 | border: Border.all( 70 | color: Colors.blue, 71 | width: 3, 72 | )), 73 | child: GestureDetector( 74 | onTap: () async { 75 | // _imageOrVideoSend( 76 | // imageSource: ImageSource.camera, type: 'video'); 77 | }, 78 | onLongPress: () async { 79 | // _imageOrVideoSend( 80 | // imageSource: ImageSource.gallery, type: 'video'); 81 | }, 82 | child: Icon( 83 | Icons.video_collection, 84 | color: Colors.lightGreen, 85 | size: 30.0, 86 | ), 87 | ), 88 | ), 89 | Container( 90 | width: 60, 91 | height: 60, 92 | decoration: BoxDecoration( 93 | borderRadius: BorderRadius.circular(100), 94 | border: Border.all( 95 | color: Colors.blue, 96 | width: 3, 97 | )), 98 | child: GestureDetector( 99 | onTap: () async { 100 | //_extraTextManagement(MediaTypes.Text); 101 | }, 102 | child: Icon( 103 | Icons.text_fields_rounded, 104 | color: Colors.lightGreen, 105 | size: 30.0, 106 | ), 107 | ), 108 | ), 109 | Container( 110 | width: 60, 111 | height: 60, 112 | decoration: BoxDecoration( 113 | borderRadius: BorderRadius.circular(100), 114 | border: Border.all( 115 | color: Colors.blue, 116 | width: 3, 117 | )), 118 | child: GestureDetector( 119 | onTap: () async { 120 | //await _documentSend(); 121 | }, 122 | child: Icon( 123 | Icons.document_scanner_outlined, 124 | color: Colors.lightGreen, 125 | size: 30.0, 126 | ), 127 | ), 128 | ), 129 | Container( 130 | width: 60, 131 | height: 60, 132 | decoration: BoxDecoration( 133 | borderRadius: BorderRadius.circular(100), 134 | border: Border.all( 135 | color: Colors.blue, 136 | width: 3, 137 | )), 138 | child: GestureDetector( 139 | onTap: () async { 140 | // if (!await NativeCallback().callToCheckNetworkConnectivity()) 141 | // _showDiaLog(titleText: 'No Internet Connection'); 142 | // else { 143 | // _showDiaLog(titleText: 'Wait for map'); 144 | // await _locationSend(); 145 | // } 146 | }, 147 | child: Icon( 148 | Icons.location_on_rounded, 149 | color: Colors.lightGreen, 150 | size: 30.0, 151 | ), 152 | ), 153 | ), 154 | Container( 155 | width: 60, 156 | height: 60, 157 | decoration: BoxDecoration( 158 | borderRadius: BorderRadius.circular(100), 159 | border: Border.all( 160 | color: Colors.blue, 161 | width: 3, 162 | )), 163 | child: GestureDetector( 164 | child: Icon( 165 | Icons.music_note_rounded, 166 | color: Colors.lightGreen, 167 | size: 30.0, 168 | ), 169 | onTap: () async { 170 | //await _voiceSend(); 171 | }, 172 | ), 173 | ), 174 | ], 175 | ), 176 | ), 177 | ), 178 | ), 179 | ); 180 | } 181 | } 182 | -------------------------------------------------------------------------------- /lib/FrontEnd/MainScreens/home_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/cupertino.dart'; 3 | import 'package:generation/Backend/firebase/Auth/email_and_pwd_auth.dart'; 4 | import 'package:generation/Backend/firebase/Auth/fb_auth.dart'; 5 | import 'package:generation/Backend/firebase/Auth/google_auth.dart'; 6 | import 'package:generation/FrontEnd/AuthUI/log_in.dart'; 7 | 8 | class HomePage extends StatefulWidget { 9 | const HomePage({Key? key}) : super(key: key); 10 | 11 | @override 12 | _HomePageState createState() => _HomePageState(); 13 | } 14 | 15 | class _HomePageState extends State { 16 | final EmailAndPasswordAuth _emailAndPasswordAuth = EmailAndPasswordAuth(); 17 | final GoogleAuthentication _googleAuthentication = GoogleAuthentication(); 18 | final FacebookAuthentication _facebookAuthentication = 19 | FacebookAuthentication(); 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | return Scaffold( 24 | body: Container( 25 | alignment: Alignment.center, 26 | child: ElevatedButton( 27 | child: Text('Log Out'), 28 | onPressed: () async { 29 | final bool googleResponse = 30 | await this._googleAuthentication.logOut(); 31 | 32 | if (!googleResponse) { 33 | final bool fbResponse = 34 | await this._facebookAuthentication.logOut(); 35 | 36 | 37 | if (!fbResponse) await this._emailAndPasswordAuth.logOut(); 38 | } 39 | 40 | Navigator.pushAndRemoveUntil( 41 | context, 42 | MaterialPageRoute(builder: (_) => LogInScreen()), 43 | (route) => false); 44 | }, 45 | ), 46 | ), 47 | ); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /lib/FrontEnd/MainScreens/logs_collection.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/cupertino.dart'; 3 | 4 | import 'package:loading_overlay/loading_overlay.dart'; 5 | 6 | class LogsCollection extends StatefulWidget { 7 | const LogsCollection({Key? key}) : super(key: key); 8 | 9 | @override 10 | _LogsCollectionState createState() => _LogsCollectionState(); 11 | } 12 | 13 | class _LogsCollectionState extends State { 14 | bool _isLoading = false; 15 | 16 | final List _callingConnection = [ 17 | 'Samarpan', 18 | 'Generation', 19 | 'Paulomi', 20 | 'Amitava', 21 | 'Youtube', 22 | 'Sathi' 23 | ]; 24 | 25 | @override 26 | Widget build(BuildContext context) { 27 | return SafeArea( 28 | child: Scaffold( 29 | backgroundColor: const Color.fromRGBO(34, 48, 60, 1), 30 | body: LoadingOverlay( 31 | color: const Color.fromRGBO(0, 0, 0, 0.5), 32 | progressIndicator: const CircularProgressIndicator( 33 | backgroundColor: Colors.black87, 34 | ), 35 | isLoading: this._isLoading, 36 | child: Container( 37 | margin: const EdgeInsets.all(12.0), 38 | width: double.maxFinite, 39 | height: double.maxFinite, 40 | child: ListView.builder( 41 | itemCount: this._callingConnection.length, 42 | itemBuilder: (upperContext, index) => 43 | _everyConnectionHistory(index), 44 | ), 45 | ), 46 | ), 47 | ), 48 | ); 49 | } 50 | 51 | Widget _everyConnectionHistory(int index) { 52 | return Container( 53 | margin: EdgeInsets.only(bottom: 15.0), 54 | child: Row( 55 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 56 | children: [ 57 | CircleAvatar( 58 | radius: 30.0, 59 | backgroundColor: const Color.fromRGBO(34, 48, 60, 1), 60 | backgroundImage: ExactAssetImage('assets/images/google.png'), 61 | //getProperImageProviderForConnectionsCollection( 62 | // _userName), 63 | ), 64 | Text( 65 | this._callingConnection[index], 66 | style: TextStyle(color: Colors.white, fontSize: 20.0), 67 | ), 68 | IconButton( 69 | icon: Icon( 70 | Icons.call, 71 | size: 30.0, 72 | color: Colors.green, 73 | ), 74 | onPressed: () {}, 75 | ), 76 | ], 77 | ), 78 | ); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /lib/FrontEnd/MainScreens/main_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/cupertino.dart'; 3 | import 'package:flutter/services.dart'; 4 | import 'package:generation/FrontEnd/MenuScreens/about_screen.dart'; 5 | import 'package:generation/FrontEnd/MenuScreens/profile_screen.dart'; 6 | import 'package:generation/FrontEnd/MenuScreens/settings_screen.dart'; 7 | import 'package:generation/FrontEnd/MenuScreens/SupportScreens/support_screen.dart'; 8 | 9 | import 'chatAndActivityScreen.dart'; 10 | import 'general_connection_section.dart'; 11 | import 'logs_collection.dart'; 12 | import 'package:animations/animations.dart'; 13 | 14 | class MainScreen extends StatefulWidget { 15 | const MainScreen({Key? key}) : super(key: key); 16 | 17 | @override 18 | _MainScreenState createState() => _MainScreenState(); 19 | } 20 | 21 | class _MainScreenState extends State { 22 | 23 | int _currIndex = 0; 24 | 25 | @override 26 | Widget build(BuildContext context) { 27 | return DefaultTabController( 28 | length: 3, 29 | child: WillPopScope( 30 | onWillPop: () async { 31 | if (_currIndex > 0) 32 | return false; 33 | else { 34 | return true; 35 | } 36 | }, 37 | child: Scaffold( 38 | backgroundColor: const Color.fromRGBO(34, 48, 60, 1), 39 | drawer: _drawer(), 40 | appBar: AppBar( 41 | brightness: Brightness.dark, 42 | backgroundColor: const Color.fromRGBO(25, 39, 52, 1), 43 | elevation: 10.0, 44 | shadowColor: Colors.white70, 45 | shape: RoundedRectangleBorder( 46 | borderRadius: BorderRadius.only( 47 | bottomLeft: Radius.circular(40.0), 48 | bottomRight: Radius.circular(40.0), 49 | ), 50 | side: BorderSide(width: 0.7), 51 | ), 52 | title: Text( 53 | "Generation", 54 | style: TextStyle( 55 | fontSize: 25.0, fontFamily: 'Lora', letterSpacing: 1.0), 56 | ), 57 | actions: [ 58 | Padding( 59 | padding: EdgeInsets.only(right: 10.0), 60 | child: Icon( 61 | Icons.search_outlined, 62 | size: 25.0, 63 | ), 64 | ), 65 | Padding( 66 | padding: EdgeInsets.only( 67 | right: 20.0, 68 | ), 69 | child: IconButton( 70 | tooltip: 'Refresh', 71 | icon: Icon( 72 | Icons.refresh_outlined, 73 | size: 25.0, 74 | ), 75 | onPressed: () async {}, 76 | ), 77 | ), 78 | ], 79 | bottom: _bottom(), 80 | ), 81 | body: TabBarView( 82 | children: [ 83 | ChatAndActivityScreen(), 84 | LogsCollection(), 85 | GeneralMessagingSection(), 86 | ], 87 | ), 88 | ), 89 | ), 90 | ); 91 | } 92 | 93 | TabBar _bottom() { 94 | return TabBar( 95 | indicatorPadding: EdgeInsets.only(left: 20.0, right: 20.0), 96 | labelColor: Colors.white, 97 | unselectedLabelColor: Colors.white60, 98 | indicator: UnderlineTabIndicator( 99 | borderSide: BorderSide(width: 2.0, color: Colors.lightBlue), 100 | insets: EdgeInsets.symmetric(horizontal: 15.0)), 101 | automaticIndicatorColorAdjustment: true, 102 | labelStyle: TextStyle( 103 | fontFamily: 'Lora', 104 | fontWeight: FontWeight.w500, 105 | letterSpacing: 1.0, 106 | ), 107 | onTap: (index) { 108 | print("\nIndex is: $index"); 109 | if (mounted) { 110 | setState(() { 111 | _currIndex = index; 112 | }); 113 | } 114 | }, 115 | tabs: [ 116 | Tab( 117 | child: Text( 118 | "Chats", 119 | style: TextStyle( 120 | fontSize: 20.0, 121 | fontFamily: 'Lora', 122 | fontWeight: FontWeight.w500, 123 | letterSpacing: 1.0, 124 | ), 125 | ), 126 | ), 127 | Tab( 128 | child: Text( 129 | "Logs", 130 | style: TextStyle( 131 | fontSize: 20.0, 132 | fontFamily: 'Lora', 133 | fontWeight: FontWeight.w500, 134 | letterSpacing: 1.0, 135 | ), 136 | ), 137 | ), 138 | Tab( 139 | icon: Icon( 140 | Icons.store, 141 | size: 25.0, 142 | ), 143 | ), 144 | ], 145 | ); 146 | } 147 | 148 | Widget _drawer(){ 149 | return Drawer( 150 | elevation: 10.0, 151 | child: Container( 152 | width: double.maxFinite, 153 | height: double.maxFinite, 154 | color: const Color.fromRGBO(34, 48, 60, 1), 155 | child: ListView( 156 | shrinkWrap: true, 157 | children: [ 158 | SizedBox( 159 | height: 10.0, 160 | ), 161 | GestureDetector( 162 | onTap: () { 163 | Navigator.push(context, 164 | MaterialPageRoute(builder: (_) => ProfileScreen())); 165 | }, 166 | child: Center( 167 | child: CircleAvatar( 168 | backgroundImage: ExactAssetImage('assets/images/google.png'), 169 | backgroundColor: const Color.fromRGBO(34, 48, 60, 1), 170 | radius: MediaQuery.of(context).orientation == 171 | Orientation.portrait 172 | ? MediaQuery.of(context).size.height * 173 | (1.2 / 8) / 174 | 2.5 175 | : MediaQuery.of(context).size.height * 176 | (2.5 / 8) / 177 | 2.5, 178 | ), 179 | ), 180 | ), 181 | SizedBox( 182 | height: 30.0, 183 | ), 184 | _menuOptions(Icons.person_outline_rounded, 'Profile'), 185 | SizedBox( 186 | height: 10.0, 187 | ), 188 | _menuOptions(Icons.settings, 'Setting'), 189 | SizedBox( 190 | height: 10.0, 191 | ), 192 | _menuOptions(Icons.support_outlined, 'Support'), 193 | SizedBox( 194 | height: 10.0, 195 | ), 196 | _menuOptions(Icons.description_outlined, 'About'), 197 | SizedBox( 198 | height: 30.0, 199 | ), 200 | exitButtonCall(), 201 | ], 202 | ), 203 | ), 204 | ); 205 | } 206 | 207 | Widget _menuOptions(IconData icon, String menuOptionIs) { 208 | return OpenContainer( 209 | transitionType: ContainerTransitionType.fadeThrough, 210 | transitionDuration: Duration( 211 | milliseconds: 500, 212 | ), 213 | closedElevation: 0.0, 214 | openElevation: 3.0, 215 | closedColor: const Color.fromRGBO(34, 48, 60, 1), 216 | openColor: const Color.fromRGBO(34, 48, 60, 1), 217 | middleColor: const Color.fromRGBO(34, 48, 60, 1), 218 | onClosed: (value) { 219 | // print('Profile Page Closed'); 220 | // if (mounted) { 221 | // setState(() { 222 | // ImportantThings.findImageUrlAndUserName(); 223 | // }); 224 | // } 225 | }, 226 | openBuilder: (context, openWidget) { 227 | if (menuOptionIs == 'Profile') 228 | return ProfileScreen(); 229 | else if (menuOptionIs == 'Setting') 230 | return SettingsWindow(); 231 | else if (menuOptionIs == 'Support') 232 | return SupportMenuMaker(); 233 | else if (menuOptionIs == 'About') return AboutSection(); 234 | return Center(); 235 | }, 236 | closedBuilder: (context, closeWidget) { 237 | return SizedBox( 238 | height: 60.0, 239 | child: Row( 240 | mainAxisAlignment: MainAxisAlignment.center, 241 | children: [ 242 | Icon( 243 | icon, 244 | color: Colors.lightBlue, 245 | ), 246 | SizedBox( 247 | width: 10.0, 248 | ), 249 | Text( 250 | menuOptionIs, 251 | style: TextStyle( 252 | fontSize: 20.0, 253 | color: Colors.white, 254 | ), 255 | ), 256 | ], 257 | ), 258 | ); 259 | }, 260 | ); 261 | } 262 | 263 | Widget exitButtonCall() { 264 | return GestureDetector( 265 | onTap: () async { 266 | await SystemNavigator.pop(animated: true); 267 | }, 268 | child: Row( 269 | mainAxisAlignment: MainAxisAlignment.center, 270 | children: [ 271 | Icon( 272 | Icons.exit_to_app_rounded, 273 | color: Colors.lightBlue, 274 | ), 275 | SizedBox( 276 | width: 10.0, 277 | ), 278 | Text( 279 | 'Exit', 280 | style: TextStyle( 281 | fontSize: 20.0, 282 | color: Colors.white, 283 | ), 284 | ), 285 | ], 286 | ), 287 | ); 288 | } 289 | } 290 | -------------------------------------------------------------------------------- /lib/FrontEnd/MenuScreens/SupportScreens/mail_content_maker.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/cupertino.dart'; 3 | 4 | // import 'package:url_launcher/url_launcher.dart'; 5 | 6 | class SupportInputTaker extends StatefulWidget { 7 | final String subject; 8 | final String appbarTitle; 9 | 10 | SupportInputTaker({required this.subject, required this.appbarTitle}); 11 | 12 | @override 13 | _SupportInputTakerState createState() => _SupportInputTakerState(); 14 | } 15 | 16 | class _SupportInputTakerState extends State { 17 | final GlobalKey _globalKey = GlobalKey(); 18 | 19 | final TextEditingController _problemTitleController = TextEditingController(); 20 | final TextEditingController _problemDescriptionController = 21 | TextEditingController(); 22 | 23 | @override 24 | void initState() { 25 | this._problemTitleController.text = ''; 26 | this._problemDescriptionController.text = ''; 27 | super.initState(); 28 | } 29 | 30 | @override 31 | void dispose() { 32 | this._problemTitleController.dispose(); 33 | this._problemDescriptionController.dispose(); 34 | super.dispose(); 35 | } 36 | 37 | @override 38 | Widget build(BuildContext context) { 39 | return Scaffold( 40 | backgroundColor: const Color.fromRGBO(34, 48, 60, 1), 41 | appBar: AppBar( 42 | brightness: Brightness.dark, 43 | backgroundColor: Color.fromRGBO(25, 39, 52, 1), 44 | elevation: 10.0, 45 | shadowColor: Colors.white70, 46 | title: Text( 47 | widget.appbarTitle, 48 | style: TextStyle( 49 | color: Colors.white, 50 | fontSize: 20.0, 51 | ), 52 | ), 53 | ), 54 | body: Container( 55 | width: MediaQuery.of(context).size.width, 56 | padding: EdgeInsets.all( 57 | 20.0, 58 | ), 59 | child: Form( 60 | key: _globalKey, 61 | child: ListView( 62 | shrinkWrap: true, 63 | children: [ 64 | Container( 65 | alignment: Alignment.center, 66 | width: MediaQuery.of(context).size.width - 40, 67 | child: TextFormField( 68 | controller: this._problemTitleController, 69 | style: TextStyle( 70 | color: Colors.white, 71 | ), 72 | validator: (inputValue) { 73 | if (inputValue!.length == 0) 74 | return 'Please Provide a Problem Title'; 75 | return null; 76 | }, 77 | decoration: InputDecoration( 78 | labelText: '${widget.subject} Title', 79 | labelStyle: TextStyle( 80 | color: Colors.white70, 81 | fontFamily: 'Lora', 82 | letterSpacing: 1.0, 83 | ), 84 | enabledBorder: UnderlineInputBorder( 85 | borderSide: BorderSide( 86 | color: Colors.blue, 87 | ), 88 | ), 89 | focusedBorder: UnderlineInputBorder( 90 | borderSide: BorderSide( 91 | color: Colors.green, 92 | ))), 93 | ), 94 | ), 95 | SizedBox( 96 | height: 30.0, 97 | ), 98 | Container( 99 | alignment: Alignment.center, 100 | width: MediaQuery.of(context).size.width - 40, 101 | child: TextFormField( 102 | maxLines: null, 103 | controller: this._problemDescriptionController, 104 | style: TextStyle( 105 | color: Colors.white, 106 | ), 107 | validator: (inputValue) { 108 | if (inputValue!.length == 0) 109 | return 'Please Provide a Problem Description'; 110 | return null; 111 | }, 112 | decoration: InputDecoration( 113 | labelText: '${widget.subject} Description', 114 | labelStyle: TextStyle( 115 | color: Colors.white70, 116 | fontFamily: 'Lora', 117 | letterSpacing: 1.0, 118 | ), 119 | enabledBorder: UnderlineInputBorder( 120 | borderSide: BorderSide( 121 | color: Colors.blue, 122 | ), 123 | ), 124 | focusedBorder: UnderlineInputBorder( 125 | borderSide: BorderSide( 126 | color: Colors.green, 127 | ))), 128 | ), 129 | ), 130 | Container( 131 | alignment: Alignment.center, 132 | padding: EdgeInsets.only( 133 | top: 30.0, 134 | bottom: 20.0, 135 | ), 136 | child: TextButton( 137 | child: Text( 138 | 'Send', 139 | style: TextStyle( 140 | color: Colors.green, 141 | fontSize: 18.0, 142 | ), 143 | ), 144 | style: TextButton.styleFrom( 145 | shape: RoundedRectangleBorder( 146 | borderRadius: BorderRadius.circular(20.0), 147 | ), 148 | side: BorderSide( 149 | color: Colors.green, 150 | ), 151 | ), 152 | onPressed: () async { 153 | if (_globalKey.currentState!.validate()) { 154 | await _sendMail(); 155 | } 156 | }, 157 | ), 158 | ), 159 | ], 160 | ), 161 | ), 162 | ), 163 | ); 164 | } 165 | 166 | Future _sendMail() async { 167 | Navigator.pop(context); 168 | 169 | final Uri params = Uri( 170 | scheme: 'mailto', 171 | path: 'generationofficialteam@gmail.com', 172 | query: 173 | 'subject=${widget.subject}: ${this._problemTitleController.text} &body=${this._problemDescriptionController.text}', //add subject and body here 174 | ); 175 | 176 | // final String url = params.toString(); 177 | try { 178 | // await launch(url); 179 | } catch (e) { 180 | print('Mail Sending Error: ${e.toString()}'); 181 | } 182 | } 183 | } -------------------------------------------------------------------------------- /lib/FrontEnd/MenuScreens/SupportScreens/support_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:animations/animations.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter/cupertino.dart'; 4 | 5 | import 'mail_content_maker.dart'; 6 | 7 | //import 'package:generation/FrontEnd/MenuScreen/Support/mail_content_maker.dart'; 8 | 9 | class SupportMenuMaker extends StatefulWidget { 10 | const SupportMenuMaker({Key? key}) : super(key: key); 11 | 12 | @override 13 | _SupportMenuMakerState createState() => _SupportMenuMakerState(); 14 | } 15 | 16 | class _SupportMenuMakerState extends State { 17 | @override 18 | Widget build(BuildContext context) { 19 | return Scaffold( 20 | backgroundColor: const Color.fromRGBO(34, 48, 60, 1), 21 | appBar: AppBar( 22 | brightness: Brightness.dark, 23 | backgroundColor: Color.fromRGBO(25, 39, 52, 1), 24 | elevation: 10.0, 25 | shadowColor: Colors.white70, 26 | title: Text( 27 | 'Support', 28 | style: TextStyle( 29 | color: Colors.white, 30 | fontSize: 20.0, 31 | ), 32 | ), 33 | ), 34 | body: Container( 35 | alignment: Alignment.topCenter, 36 | width: MediaQuery.of(context).size.width, 37 | height: MediaQuery.of(context).size.height, 38 | child: Column( 39 | children: [ 40 | _getListOption( 41 | icon: Icon( 42 | Icons.report_gmailerrorred_outlined, 43 | size: 30.0, 44 | color: Colors.red, 45 | ), 46 | title: 'Report a Problem', 47 | extraText: 'About App Crashing, Bugs Report'), 48 | _getListOption( 49 | icon: Icon( 50 | Icons.request_page_outlined, 51 | size: 30.0, 52 | color: Colors.green, 53 | ), 54 | title: 'Request a Feature', 55 | extraText: 'Any New Feature in your Mind', 56 | ), 57 | _getListOption( 58 | icon: Icon( 59 | Icons.featured_play_list_outlined, 60 | size: 30.0, 61 | color: Colors.amber, 62 | ), 63 | title: 'Send Feedback', 64 | extraText: 'Your Experience of that App', 65 | ), 66 | ], 67 | ), 68 | ), 69 | ); 70 | } 71 | 72 | Widget _getListOption( 73 | {required Icon icon, 74 | required String title, 75 | required String extraText}) { 76 | return OpenContainer( 77 | closedColor: const Color.fromRGBO(34, 48, 60, 1), 78 | middleColor: const Color.fromRGBO(34, 48, 60, 1), 79 | openColor: const Color.fromRGBO(34, 48, 60, 1), 80 | closedElevation: 0.0, 81 | transitionType: ContainerTransitionType.fadeThrough, 82 | transitionDuration: Duration( 83 | milliseconds: 500, 84 | ), 85 | openBuilder: (_, __) { 86 | print(title); 87 | if (title == 'Report a Problem') 88 | return SupportInputTaker( 89 | subject: 'Problem', 90 | appbarTitle: 'Describe Your Problem', 91 | ); 92 | else if (title == 'Request a Feature') 93 | return SupportInputTaker( 94 | subject: 'Feature', 95 | appbarTitle: 'Describe the Feature', 96 | ); 97 | else if (title == 'Send Feedback') 98 | return SupportInputTaker( 99 | subject: 'Feedback', 100 | appbarTitle: 'Write Your Feedback', 101 | ); 102 | return Center(); 103 | }, 104 | closedBuilder: (_, __) { 105 | return Container( 106 | height: 80.0, 107 | alignment: Alignment.center, 108 | padding: EdgeInsets.only( 109 | top: 10.0, 110 | bottom: 10.0, 111 | ), 112 | child: Row( 113 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 114 | children: [ 115 | Padding( 116 | padding: EdgeInsets.only( 117 | left: 10.0, 118 | ), 119 | child: icon, 120 | ), 121 | Expanded( 122 | child: Align( 123 | alignment: Alignment.center, 124 | child: Column( 125 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 126 | children: [ 127 | Text( 128 | title, 129 | style: TextStyle( 130 | color: Colors.white70, 131 | fontSize: 18.0, 132 | ), 133 | ), 134 | Text( 135 | extraText, 136 | textAlign: TextAlign.center, 137 | style: TextStyle( 138 | color: Colors.white54, 139 | fontSize: 16.0, 140 | ), 141 | ), 142 | ], 143 | ), 144 | ), 145 | ), 146 | ], 147 | ), 148 | ); 149 | }, 150 | ); 151 | } 152 | } -------------------------------------------------------------------------------- /lib/FrontEnd/MenuScreens/about_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/cupertino.dart'; 3 | 4 | class AboutSection extends StatelessWidget { 5 | const AboutSection({Key? key}) : super(key: key); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | return Scaffold( 10 | backgroundColor: const Color.fromRGBO(34, 48, 60, 1), 11 | body: Container( 12 | width: MediaQuery.of(context).size.width, 13 | height: MediaQuery.of(context).size.height, 14 | alignment: Alignment.center, 15 | child: ListView( 16 | shrinkWrap: true, 17 | children: [ 18 | Padding( 19 | padding: EdgeInsets.only(top: 20.0, bottom: 10.0), 20 | child: Align( 21 | alignment: Alignment.center, 22 | child: Text( 23 | 'About Generation', 24 | style: TextStyle(color: Colors.white, fontSize: 20.0), 25 | ), 26 | ), 27 | ), 28 | Padding( 29 | padding: EdgeInsets.only( 30 | bottom: 20.0, left: 20.0, right: 20.0, top: 10.0), 31 | child: Align( 32 | alignment: Alignment.center, 33 | child: Text( 34 | "A Private, Secure, End-to-End Encrypted Messaging app that helps you to connect with your connections without any Ads, promotion. No other third party person, organization, or even Generation Team can't read your messages. Nobody can't take screenshot or can't do screen recording of this app.", 35 | textAlign: TextAlign.justify, 36 | style: TextStyle(color: Colors.white70, fontSize: 16.0), 37 | ), 38 | ), 39 | ), 40 | Padding( 41 | padding: EdgeInsets.only( 42 | bottom: 20.0, left: 20.0, right: 20.0, top: 10.0), 43 | child: Align( 44 | alignment: Alignment.center, 45 | child: Text( 46 | 'Alert: If you registered your mobile number and if any connection will call you, your number will visible in their call Logs.', 47 | textAlign: TextAlign.justify, 48 | style: TextStyle(color: Colors.redAccent, fontSize: 16.0), 49 | ), 50 | ), 51 | ), 52 | Padding( 53 | padding: EdgeInsets.only( 54 | bottom: 20.0, left: 20.0, right: 20.0, top: 10.0), 55 | child: Align( 56 | alignment: Alignment.center, 57 | child: Text( 58 | 'Messages and Activity except Audio Calling\nare End-to-End Encrypted', 59 | textAlign: TextAlign.center, 60 | style: TextStyle(color: Colors.amber, fontSize: 16.0), 61 | ), 62 | ), 63 | ), 64 | Padding( 65 | padding: EdgeInsets.only( 66 | bottom: 20.0, left: 20.0, right: 20.0, top: 30.0), 67 | child: Align( 68 | alignment: Alignment.center, 69 | child: Text( 70 | 'Hope You Enjoying this app', 71 | textAlign: TextAlign.center, 72 | style: TextStyle(color: Colors.lightBlue, fontSize: 18.0), 73 | ), 74 | ), 75 | ), 76 | Padding( 77 | padding: EdgeInsets.only( 78 | bottom: 20.0, left: 20.0, right: 20.0, top: 50.0), 79 | child: Align( 80 | alignment: Alignment.centerRight, 81 | child: Text( 82 | 'Creator\nSamarpan Dasgupta', 83 | textAlign: TextAlign.center, 84 | style: TextStyle(color: Colors.lightBlue, fontSize: 18.0), 85 | ), 86 | ), 87 | ), 88 | ], 89 | ), 90 | ), 91 | ); 92 | } 93 | } -------------------------------------------------------------------------------- /lib/FrontEnd/MenuScreens/profile_screen.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | 4 | import 'package:animations/animations.dart'; 5 | // import 'package:firebase_auth/firebase_auth.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:flutter/cupertino.dart'; 8 | // import 'package:fluttertoast/fluttertoast.dart'; 9 | // import 'package:image_picker/image_picker.dart'; 10 | import 'package:loading_overlay/loading_overlay.dart'; 11 | 12 | // import 'package:generation/BackendAndDatabaseManager/firebase_services/delete_my_account_service.dart'; 13 | // import 'package:generation/BackendAndDatabaseManager/global_controller/different_types.dart'; 14 | // import 'package:generation/BackendAndDatabaseManager/sqlite_services/local_storage_controller.dart'; 15 | // import 'package:generation/BackendAndDatabaseManager/global_controller/this_account_important_data.dart'; 16 | // import 'package:generation/BackendAndDatabaseManager/firebase_services/firestore_management.dart'; 17 | // import 'package:generation/BackendAndDatabaseManager/general_services/toast_message_manage.dart'; 18 | // import 'package:generation/FrontEnd/Preview/images_preview_screen.dart'; 19 | 20 | class ProfileScreen extends StatefulWidget { 21 | @override 22 | _ProfileScreenState createState() => _ProfileScreenState(); 23 | } 24 | 25 | class _ProfileScreenState extends State { 26 | // String _userAbout = '', _userAccCreationDate = '', _userAccCreationTime = ''; 27 | 28 | // final FToast _fToast = FToast(); 29 | // 30 | // final Management _management = Management(); 31 | // final ImagePicker _imagePicker = ImagePicker(); 32 | // final LocalStorageHelper _localStorageHelper = LocalStorageHelper(); 33 | 34 | bool _isLoading = false; 35 | // 36 | // void _getOtherProfileInformation() async { 37 | // final String userTempAbout = 38 | // await _localStorageHelper.extractImportantTableData( 39 | // extraImportant: ExtraImportant.About, 40 | // userMail: FirebaseAuth.instance.currentUser.email); 41 | // 42 | // final String userTempAccCreationDate = 43 | // await _localStorageHelper.extractImportantTableData( 44 | // extraImportant: ExtraImportant.CreationDate, 45 | // userMail: FirebaseAuth.instance.currentUser.email); 46 | // 47 | // final String userTempAccCreationTime = 48 | // await _localStorageHelper.extractImportantTableData( 49 | // extraImportant: ExtraImportant.CreationTime, 50 | // userMail: FirebaseAuth.instance.currentUser.email); 51 | // 52 | // if (mounted) { 53 | // setState(() { 54 | // this._userAbout = userTempAbout; 55 | // this._userAccCreationDate = userTempAccCreationDate; 56 | // this._userAccCreationTime = userTempAccCreationTime; 57 | // }); 58 | // 59 | // print(this._userAbout); 60 | // print(this._userAccCreationDate); 61 | // print(this._userAccCreationTime); 62 | // } 63 | // } 64 | 65 | @override 66 | void initState() { 67 | // _fToast.init(context); 68 | // ImportantThings.findImageUrlAndUserName(); 69 | // _getOtherProfileInformation(); 70 | super.initState(); 71 | } 72 | 73 | @override 74 | Widget build(BuildContext context) { 75 | return LoadingOverlay( 76 | isLoading: this._isLoading, 77 | child: Scaffold( 78 | backgroundColor: const Color.fromRGBO(34, 48, 60, 1), 79 | body: ListView( 80 | children: [ 81 | SizedBox( 82 | height: 20.0, 83 | ), 84 | firstPortion(context), 85 | SizedBox( 86 | height: 50.0, 87 | ), 88 | otherInformation('About', 'Welcome to Generation'), 89 | otherInformation('Join Date', "07-08-2021"), 90 | otherInformation('Join Time', "6:23 AM"), 91 | _deleteButton(context), 92 | ], 93 | ), 94 | ), 95 | ); 96 | } 97 | 98 | Widget firstPortion(BuildContext context) { 99 | return SizedBox( 100 | height: 130, 101 | child: Row( 102 | mainAxisAlignment: MainAxisAlignment.center, 103 | children: [ 104 | SizedBox( 105 | width: 10.0, 106 | ), 107 | Align( 108 | alignment: Alignment.centerLeft, 109 | child: Stack( 110 | children: [ 111 | OpenContainer( 112 | closedColor: const Color.fromRGBO(34, 48, 60, 1), 113 | openColor: const Color.fromRGBO(34, 48, 60, 1), 114 | middleColor: const Color.fromRGBO(34, 48, 60, 1), 115 | closedShape: CircleBorder(), 116 | closedElevation: 0.0, 117 | transitionDuration: Duration( 118 | milliseconds: 500, 119 | ), 120 | transitionType: ContainerTransitionType.fadeThrough, 121 | openBuilder: (context, openWidget) { 122 | return Center(); 123 | }, 124 | closedBuilder: (context, closeWidget) { 125 | return CircleAvatar( 126 | backgroundImage: ExactAssetImage('assets/images/google.png'), 127 | backgroundColor: const Color.fromRGBO(34, 48, 60, 1), 128 | radius: MediaQuery.of(context).orientation == 129 | Orientation.portrait 130 | ? MediaQuery.of(context).size.height * (1.2 / 8) / 2.5 131 | : MediaQuery.of(context).size.height * 132 | (2.5 / 8) / 133 | 2.5, 134 | ); 135 | }, 136 | ), 137 | Padding( 138 | padding: EdgeInsets.only( 139 | top: MediaQuery.of(context).orientation == 140 | Orientation.portrait 141 | ? MediaQuery.of(context).size.height * (0.7 / 8) - 10 142 | : MediaQuery.of(context).size.height * (1.5 / 8) - 10, 143 | left: MediaQuery.of(context).orientation == 144 | Orientation.portrait 145 | ? MediaQuery.of(context).size.width / 3 - 65 146 | : MediaQuery.of(context).size.width / 8 - 15, 147 | ), 148 | child: Container( 149 | decoration: const BoxDecoration( 150 | shape: BoxShape.circle, 151 | color: Colors.lightBlue, 152 | ), 153 | child: GestureDetector( 154 | child: Icon( 155 | Icons.add, 156 | color: Colors.white, 157 | size: MediaQuery.of(context).orientation == 158 | Orientation.portrait 159 | ? MediaQuery.of(context).size.height * 160 | (1.3 / 8) / 161 | 2.5 * 162 | (3.5 / 6) 163 | : MediaQuery.of(context).size.height * 164 | (1.3 / 8) / 165 | 2, 166 | ), 167 | onTap: () async { 168 | // final PickedFile _pickedFile = 169 | // await _imagePicker.getImage( 170 | // source: ImageSource.camera, 171 | // imageQuality: 50, 172 | // ); 173 | // 174 | // print('PickedFile: $_pickedFile'); 175 | // 176 | // if (_pickedFile != null) 177 | // await _manageTakeImageAsProfilePic(_pickedFile); 178 | }, 179 | onLongPress: () async { 180 | // final PickedFile _pickedFile = 181 | // await _imagePicker.getImage( 182 | // source: ImageSource.gallery, 183 | // imageQuality: 50, 184 | // ); 185 | // 186 | // print('PickedFile: $_pickedFile'); 187 | // 188 | // if (_pickedFile != null) 189 | // await _manageTakeImageAsProfilePic(_pickedFile); 190 | }, 191 | )), 192 | ), 193 | ], 194 | ), 195 | ), 196 | Expanded( 197 | child: Align( 198 | alignment: Alignment.center, 199 | child: Text( 200 | 'Samarpan Dasgupta', 201 | style: TextStyle( 202 | fontSize: 20.0, 203 | fontFamily: 'Lora', 204 | fontStyle: FontStyle.italic, 205 | color: Colors.white, 206 | letterSpacing: 1.0, 207 | ), 208 | ), 209 | ), 210 | ), 211 | ], 212 | ), 213 | ); 214 | } 215 | 216 | Widget otherInformation(String leftText, String rightText) { 217 | return Container( 218 | height: 60.0, 219 | margin: EdgeInsets.only(bottom: 30.0), 220 | child: Row( 221 | children: [ 222 | Expanded( 223 | child: Container( 224 | alignment: Alignment.centerLeft, 225 | padding: EdgeInsets.only(left: 10.0), 226 | child: Text( 227 | leftText, 228 | style: TextStyle( 229 | fontSize: 18.0, 230 | fontFamily: 'Lora', 231 | fontStyle: FontStyle.italic, 232 | color: Colors.lightBlue, 233 | letterSpacing: 1.0, 234 | ), 235 | ), 236 | ), 237 | ), 238 | Expanded( 239 | child: Container( 240 | margin: EdgeInsets.only(right: 10.0), 241 | alignment: Alignment.centerRight, 242 | child: Text( 243 | rightText, 244 | textAlign: TextAlign.center, 245 | style: TextStyle( 246 | fontSize: 16.0, 247 | fontFamily: 'Lora', 248 | fontStyle: FontStyle.italic, 249 | color: Colors.green, 250 | letterSpacing: 1.0, 251 | ), 252 | ), 253 | ), 254 | ), 255 | ], 256 | ), 257 | ); 258 | } 259 | 260 | // Future _manageTakeImageAsProfilePic(PickedFile _pickedFile) async { 261 | // try { 262 | // showToast( 263 | // 'Applying Changes', 264 | // _fToast, 265 | // seconds: 5, 266 | // fontSize: 18.0, 267 | // ); 268 | // 269 | // if (mounted) { 270 | // setState(() { 271 | // _isLoading = true; 272 | // }); 273 | // } 274 | // 275 | // await _management.uploadNewProfilePicToFireStore( 276 | // file: File(_pickedFile.path), 277 | // context: context, 278 | // userMail: FirebaseAuth.instance.currentUser.email); 279 | // 280 | // if (ImportantThings.thisAccountProfileImagePath != '') { 281 | // try { 282 | // await File(ImportantThings.thisAccountProfileImagePath) 283 | // .delete(recursive: true) 284 | // .whenComplete(() => print('Old Profile Image Deleted')); 285 | // } catch (e) { 286 | // print( 287 | // 'Exception: Delete Old Profile Picture Exception: ${e.toString()}'); 288 | // } 289 | // } 290 | // 291 | // if (mounted) { 292 | // setState(() { 293 | // ImportantThings.thisAccountProfileImagePath = 294 | // File(_pickedFile.path).path; 295 | // 296 | // _isLoading = false; 297 | // }); 298 | // } 299 | // } catch (e) { 300 | // showDialog( 301 | // context: context, 302 | // builder: (_) => AlertDialog( 303 | // elevation: 5.0, 304 | // backgroundColor: const Color.fromRGBO(34, 48, 60, 0.6), 305 | // title: Text( 306 | // 'An Error Occured', 307 | // style: TextStyle( 308 | // color: Colors.red, 309 | // fontSize: 18.0, 310 | // ), 311 | // ), 312 | // content: Text( 313 | // 'Please Close the Profile Screen and\nRe-Open To Continue', 314 | // style: TextStyle( 315 | // color: Colors.white, 316 | // ), 317 | // ), 318 | // )); 319 | // } 320 | // } 321 | 322 | Widget _deleteButton(BuildContext context) { 323 | return Center( 324 | child: TextButton( 325 | style: TextButton.styleFrom( 326 | padding: EdgeInsets.symmetric(horizontal: 20.0, vertical: 10.0), 327 | shape: RoundedRectangleBorder( 328 | borderRadius: BorderRadius.circular(40.0), 329 | side: BorderSide( 330 | color: Colors.red, 331 | ), 332 | ), 333 | ), 334 | child: Container( 335 | width: MediaQuery.of(context).size.width / 2, 336 | alignment: Alignment.center, 337 | child: Row( 338 | children: [ 339 | Icon( 340 | Icons.delete_outline, 341 | color: Colors.red, 342 | ), 343 | Expanded( 344 | child: Text( 345 | 'Delete My Account', 346 | textAlign: TextAlign.center, 347 | style: TextStyle( 348 | fontSize: 16.0, 349 | color: Colors.red, 350 | ), 351 | ), 352 | ), 353 | ], 354 | ), 355 | ), 356 | onPressed: () async { 357 | await _deleteConformation(); 358 | }, 359 | ), 360 | ); 361 | } 362 | 363 | Future _deleteConformation() async { 364 | showDialog( 365 | context: context, 366 | builder: (_) => AlertDialog( 367 | backgroundColor: const Color.fromRGBO(34, 48, 60, 0.6), 368 | elevation: 5.0, 369 | shape: RoundedRectangleBorder( 370 | borderRadius: BorderRadius.circular(40.0), 371 | ), 372 | title: Center( 373 | child: Text( 374 | 'Sure to Delete Your Account?', 375 | style: TextStyle( 376 | color: Colors.red, 377 | fontSize: 18.0, 378 | ), 379 | ), 380 | ), 381 | content: Container( 382 | height: 200.0, 383 | child: Column( 384 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 385 | children: [ 386 | Center( 387 | child: Text( 388 | 'If You delete this account, your entire data will lost forever...\n\nDo You Want to Continue?', 389 | textAlign: TextAlign.center, 390 | style: TextStyle( 391 | color: Colors.white, 392 | fontSize: 16.0, 393 | ), 394 | ), 395 | ), 396 | Row( 397 | mainAxisAlignment: MainAxisAlignment.spaceAround, 398 | children: [ 399 | TextButton( 400 | child: Text( 401 | 'Cancel', 402 | textAlign: TextAlign.center, 403 | style: TextStyle( 404 | color: Colors.green, 405 | ), 406 | ), 407 | style: TextButton.styleFrom( 408 | shape: RoundedRectangleBorder( 409 | borderRadius: BorderRadius.circular(40.0), 410 | side: BorderSide(color: Colors.green), 411 | )), 412 | onPressed: () { 413 | Navigator.pop(context); 414 | }, 415 | ), 416 | TextButton( 417 | child: Text( 418 | 'Sure', 419 | textAlign: TextAlign.center, 420 | style: TextStyle( 421 | color: Colors.red, 422 | ), 423 | ), 424 | style: TextButton.styleFrom( 425 | shape: RoundedRectangleBorder( 426 | borderRadius: BorderRadius.circular(40.0), 427 | side: BorderSide(color: Colors.red), 428 | )), 429 | onPressed: () async { 430 | Navigator.pop(context); 431 | 432 | if (mounted) { 433 | setState(() { 434 | _isLoading = true; 435 | }); 436 | } 437 | print("Deletion Event"); 438 | 439 | /// await deleteMyGenerationAccount(); 440 | }, 441 | ), 442 | ], 443 | ), 444 | ], 445 | ), 446 | ), 447 | )); 448 | } 449 | } -------------------------------------------------------------------------------- /lib/FrontEnd/MenuScreens/settings_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:animations/animations.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter/cupertino.dart'; 4 | import 'package:flutter_icons/flutter_icons.dart'; 5 | 6 | // import 'package:generation/BackendAndDatabaseManager/global_controller/different_types.dart'; 7 | // import 'package:generation/FrontEnd/MenuScreen/Settings/chat_wallpaper_maker.dart'; 8 | // import 'package:generation/FrontEnd/MenuScreen/Settings/chat_history_maker_and_media_view.dart'; 9 | // import 'package:generation/FrontEnd/MenuScreen/Settings/settings_notification_screen.dart'; 10 | // import 'package:generation/FrontEnd/MenuScreen/Settings/phone_call_config.dart'; 11 | 12 | class SettingsWindow extends StatefulWidget { 13 | @override 14 | _SettingsWindowState createState() => _SettingsWindowState(); 15 | } 16 | 17 | class _SettingsWindowState extends State { 18 | @override 19 | Widget build(BuildContext context) { 20 | return Scaffold( 21 | backgroundColor: const Color.fromRGBO(34, 48, 60, 1), 22 | appBar: AppBar( 23 | brightness: Brightness.dark, 24 | backgroundColor: Color.fromRGBO(25, 39, 52, 1), 25 | elevation: 10.0, 26 | shadowColor: Colors.white70, 27 | title: Text( 28 | 'Settings', 29 | style: TextStyle( 30 | color: Colors.white, 31 | fontSize: 20.0, 32 | fontFamily: 'Lora', 33 | letterSpacing: 1.0, 34 | ), 35 | ), 36 | ), 37 | body: ListView( 38 | shrinkWrap: true, 39 | children: [ 40 | SizedBox( 41 | height: 40.0, 42 | ), 43 | everySettingsItem( 44 | mainText: 'Notification', 45 | icon: Icons.notification_important_outlined, 46 | smallDescription: 'Different Notification Customization'), 47 | SizedBox( 48 | height: 15.0, 49 | ), 50 | everySettingsItem( 51 | mainText: 'Chat Wallpaper', 52 | icon: Icons.wallpaper_outlined, 53 | smallDescription: 'Change Chat Common Wallpaper'), 54 | SizedBox( 55 | height: 15.0, 56 | ), 57 | everySettingsItem( 58 | mainText: 'Generation Direct Calling Setting', 59 | icon: Icons.call, 60 | smallDescription: 'Add Phone Number to Receive Call'), 61 | SizedBox( 62 | height: 15.0, 63 | ), 64 | everySettingsItem( 65 | mainText: 'Chat History', 66 | icon: Entypo.text_document_inverted, 67 | smallDescription: 'Chat History Including Media'), 68 | SizedBox( 69 | height: 15.0, 70 | ), 71 | everySettingsItem( 72 | mainText: 'Storage', 73 | icon: Icons.storage, 74 | smallDescription: 'Storage Usage'), 75 | SizedBox( 76 | height: 30.0, 77 | ), 78 | Center( 79 | child: Text( 80 | 'Copyright © 2021 @ Generation', 81 | style: TextStyle( 82 | color: Colors.lightBlue, 83 | fontSize: 16.0, 84 | ), 85 | ), 86 | ), 87 | ], 88 | ), 89 | ); 90 | } 91 | 92 | Widget everySettingsItem( 93 | {required String mainText, 94 | required IconData icon, 95 | required String smallDescription}) { 96 | return OpenContainer( 97 | closedElevation: 0.0, 98 | openColor: const Color.fromRGBO(34, 48, 60, 1), 99 | middleColor: const Color.fromRGBO(34, 48, 60, 1), 100 | closedColor: const Color.fromRGBO(34, 48, 60, 1), 101 | transitionType: ContainerTransitionType.fadeThrough, 102 | transitionDuration: Duration(milliseconds: 500), 103 | openBuilder: (_, __) { 104 | switch (mainText) { 105 | // case 'Notification': 106 | // return SettingsNotificationConfiguration(); 107 | // 108 | // case 'Chat Wallpaper': 109 | // return ChatWallPaperMaker(allUpdatePermission: true, userName: ''); 110 | // 111 | // case 'Generation Direct Calling Setting': 112 | // return PhoneNumberConfig(); 113 | // 114 | // case 'Chat History': 115 | // return ChatHistoryMakerAndMediaViewer( 116 | // historyOrMediaChoice: HistoryOrMediaChoice.History); 117 | // 118 | // case 'Storage': 119 | // return ChatHistoryMakerAndMediaViewer( 120 | // historyOrMediaChoice: HistoryOrMediaChoice.Media); 121 | 122 | } 123 | return Center( 124 | child: Text( 125 | 'Sorry, Not yet Implemented', 126 | style: TextStyle(color: Colors.red, fontSize: 18.0), 127 | ), 128 | ); 129 | }, 130 | closedBuilder: (_, __) { 131 | return Container( 132 | width: MediaQuery.of(context).size.width, 133 | height: 70.0, 134 | margin: EdgeInsets.only( 135 | left: 20.0, 136 | ), 137 | child: Column( 138 | children: [ 139 | Row( 140 | children: [ 141 | Icon( 142 | icon, 143 | color: Colors.green, 144 | ), 145 | SizedBox( 146 | width: 15.0, 147 | ), 148 | Text( 149 | mainText, 150 | style: TextStyle( 151 | fontSize: 18.0, 152 | color: Colors.white70, 153 | ), 154 | ) 155 | ], 156 | ), 157 | Expanded( 158 | child: Container( 159 | alignment: Alignment.topLeft, 160 | padding: EdgeInsets.only( 161 | top: 5.0, 162 | left: 40.0, 163 | ), 164 | child: Text( 165 | smallDescription, 166 | style: TextStyle( 167 | color: Colors.white54, 168 | ), 169 | ), 170 | ), 171 | ), 172 | ], 173 | ), 174 | ); 175 | }, 176 | ); 177 | } 178 | } -------------------------------------------------------------------------------- /lib/FrontEnd/NewUserEntry/new_user_entry.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/cupertino.dart'; 3 | import 'package:flutter/services.dart'; 4 | import 'package:generation/Backend/firebase/OnlineDatabaseManagement/cloud_data_management.dart'; 5 | import 'package:generation/Backend/sqlite_management/local_database_management.dart'; 6 | import 'package:generation/FrontEnd/AuthUI/common_auth_methods.dart'; 7 | import 'package:firebase_auth/firebase_auth.dart'; 8 | import 'package:generation/FrontEnd/MainScreens/main_screen.dart'; 9 | 10 | import 'package:loading_overlay/loading_overlay.dart'; 11 | 12 | class TakePrimaryUserData extends StatefulWidget { 13 | const TakePrimaryUserData({Key? key}) : super(key: key); 14 | 15 | @override 16 | _TakePrimaryUserDataState createState() => _TakePrimaryUserDataState(); 17 | } 18 | 19 | class _TakePrimaryUserDataState extends State { 20 | bool _isLoading = false; 21 | 22 | final GlobalKey _takeUserPrimaryInformationKey = 23 | GlobalKey(); 24 | 25 | final TextEditingController _userName = TextEditingController(); 26 | final TextEditingController _userAbout = TextEditingController(); 27 | 28 | final CloudStoreDataManagement _cloudStoreDataManagement = 29 | CloudStoreDataManagement(); 30 | final LocalDatabase _localDatabase = LocalDatabase(); 31 | 32 | @override 33 | Widget build(BuildContext context) { 34 | return SafeArea( 35 | child: Scaffold( 36 | backgroundColor: const Color.fromRGBO(34, 48, 60, 1), 37 | body: LoadingOverlay( 38 | isLoading: this._isLoading, 39 | child: Container( 40 | width: MediaQuery.of(context).size.width, 41 | height: MediaQuery.of(context).size.height, 42 | child: Form( 43 | key: this._takeUserPrimaryInformationKey, 44 | child: ListView( 45 | shrinkWrap: true, 46 | children: [ 47 | _upperHeading(), 48 | commonTextFormField( 49 | bottomPadding: 30.0, 50 | hintText: 'User Name', 51 | validator: (inputUserName) { 52 | /// Regular Expression 53 | final RegExp _messageRegex = RegExp(r'[a-zA-Z0-9]'); 54 | 55 | if (inputUserName!.length < 6) 56 | return "User Name At Least 6 Characters"; 57 | else if (inputUserName.contains(' ') || 58 | inputUserName.contains('@')) 59 | return "Space and '@' Not Allowed...User '_' instead of space"; 60 | else if (inputUserName.contains('__')) 61 | return "'__' Not Allowed...User '_' instead of '__'"; 62 | else if (!_messageRegex.hasMatch(inputUserName)) 63 | return "Sorry,Only Emoji Not Supported"; 64 | return null; 65 | }, 66 | textEditingController: this._userName), 67 | commonTextFormField( 68 | hintText: 'User About', 69 | validator: (inputVal) { 70 | if (inputVal!.length < 6) 71 | return 'User About must have 6 characters'; 72 | return null; 73 | }, 74 | textEditingController: this._userAbout), 75 | _saveUserPrimaryInformation(), 76 | ], 77 | ), 78 | ), 79 | ), 80 | ), 81 | )); 82 | } 83 | 84 | Widget _upperHeading() { 85 | return Padding( 86 | padding: EdgeInsets.only(top: 30.0, bottom: 50.0), 87 | child: Center( 88 | child: Text( 89 | 'Set Up Your Account', 90 | style: TextStyle(color: Colors.white, fontSize: 25.0), 91 | ), 92 | ), 93 | ); 94 | } 95 | 96 | Widget _saveUserPrimaryInformation() { 97 | return Padding( 98 | padding: const EdgeInsets.only(left: 20.0, right: 20.0), 99 | child: ElevatedButton( 100 | style: ElevatedButton.styleFrom( 101 | minimumSize: Size(MediaQuery.of(context).size.width - 60, 30.0), 102 | elevation: 5.0, 103 | primary: Color.fromRGBO(57, 60, 80, 1), 104 | padding: EdgeInsets.only( 105 | left: 20.0, 106 | right: 20.0, 107 | top: 7.0, 108 | bottom: 7.0, 109 | ), 110 | shape: RoundedRectangleBorder( 111 | borderRadius: BorderRadius.all(Radius.circular(20.0)), 112 | )), 113 | child: Text( 114 | 'Save', 115 | style: TextStyle( 116 | fontSize: 25.0, 117 | letterSpacing: 1.0, 118 | fontWeight: FontWeight.w400, 119 | ), 120 | ), 121 | onPressed: () async { 122 | if (this._takeUserPrimaryInformationKey.currentState!.validate()) { 123 | print('Validated'); 124 | 125 | SystemChannels.textInput.invokeMethod('TextInput.hide'); 126 | 127 | if (mounted) { 128 | setState(() { 129 | this._isLoading = true; 130 | }); 131 | } 132 | 133 | final bool canRegisterNewUser = await _cloudStoreDataManagement 134 | .checkThisUserAlreadyPresentOrNot( 135 | userName: this._userName.text); 136 | 137 | String msg = ''; 138 | 139 | if (!canRegisterNewUser) 140 | msg = 'User Name Already Present'; 141 | else { 142 | final bool _userEntryResponse = 143 | await _cloudStoreDataManagement.registerNewUser( 144 | userName: this._userName.text, 145 | userAbout: this._userAbout.text, 146 | userEmail: 147 | FirebaseAuth.instance.currentUser!.email.toString()); 148 | if (_userEntryResponse) { 149 | msg = 'User data Entry Successfully'; 150 | 151 | /// Calling Local Databases Methods To Intitialize Local Database with required MEthods 152 | await this._localDatabase.createTableToStoreImportantData(); 153 | 154 | final Map _importantFetchedData = await _cloudStoreDataManagement.getTokenFromCloudStore(userMail: FirebaseAuth.instance.currentUser!.email.toString()); 155 | 156 | await this._localDatabase.insertOrUpdateDataForThisAccount( 157 | userName: this._userName.text, 158 | userMail: FirebaseAuth.instance.currentUser!.email.toString(), 159 | userToken: _importantFetchedData["token"], 160 | userAbout: this._userAbout.text, 161 | userAccCreationDate: _importantFetchedData["date"], 162 | userAccCreationTime: _importantFetchedData["time"]); 163 | 164 | await _localDatabase 165 | .createTableForUserActivity(tableName: this._userName.text); 166 | 167 | Navigator.pushAndRemoveUntil( 168 | context, 169 | MaterialPageRoute(builder: (_) => MainScreen()), 170 | (route) => false); 171 | } else 172 | msg = 'User Data Not Entry Successfully'; 173 | } 174 | 175 | ScaffoldMessenger.of(context) 176 | .showSnackBar(SnackBar(content: Text(msg))); 177 | 178 | if (mounted) { 179 | setState(() { 180 | this._isLoading = false; 181 | }); 182 | } 183 | } else { 184 | print('Not Validated'); 185 | } 186 | }, 187 | ), 188 | ); 189 | } 190 | } 191 | -------------------------------------------------------------------------------- /lib/FrontEnd/Preview/image_preview_screen.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter/cupertino.dart'; 5 | import 'package:generation/Global_Uses/enum_generation.dart'; 6 | 7 | import 'package:photo_view/photo_view.dart'; 8 | 9 | class ImageViewScreen extends StatefulWidget { 10 | final ImageProviderCategory imageProviderCategory; 11 | final String imagePath; 12 | 13 | ImageViewScreen( 14 | {Key? key, required this.imageProviderCategory, required this.imagePath}) 15 | : super(key: key); 16 | 17 | @override 18 | _ImageViewScreenState createState() => _ImageViewScreenState(); 19 | } 20 | 21 | class _ImageViewScreenState extends State { 22 | @override 23 | Widget build(BuildContext context) { 24 | return SafeArea( 25 | child: Scaffold( 26 | body: SizedBox( 27 | width: MediaQuery.of(context).size.width, 28 | height: MediaQuery.of(context).size.height, 29 | child: PhotoView( 30 | imageProvider: _getParticularImage(), 31 | enableRotation: true, 32 | initialScale: null, 33 | loadingBuilder: (context, event) => Center( 34 | child: CircularProgressIndicator(), 35 | ), 36 | errorBuilder: (context, obj, stackTrace) => Center( 37 | child: Text( 38 | 'Image not Found', 39 | style: TextStyle( 40 | fontSize: 23.0, 41 | color: Colors.red, 42 | fontFamily: 'Lora', 43 | letterSpacing: 1.0, 44 | ), 45 | )), 46 | ), 47 | ), 48 | ), 49 | ); 50 | } 51 | 52 | _getParticularImage() { 53 | switch (widget.imageProviderCategory) { 54 | case ImageProviderCategory.FileImage: 55 | return FileImage(File(widget.imagePath)); 56 | 57 | case ImageProviderCategory.ExactAssetImage: 58 | return ExactAssetImage(widget.imagePath); 59 | 60 | case ImageProviderCategory.NetworkImage: 61 | return NetworkImage(widget.imagePath); 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /lib/FrontEnd/Services/search_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/cupertino.dart'; 3 | import 'package:generation/Backend/firebase/OnlineDatabaseManagement/cloud_data_management.dart'; 4 | import 'package:firebase_auth/firebase_auth.dart'; 5 | import 'package:generation/Global_Uses/enum_generation.dart'; 6 | import 'package:loading_overlay/loading_overlay.dart'; 7 | 8 | class SearchScreen extends StatefulWidget { 9 | const SearchScreen({Key? key}) : super(key: key); 10 | 11 | @override 12 | _SearchScreenState createState() => _SearchScreenState(); 13 | } 14 | 15 | class _SearchScreenState extends State { 16 | List> _availableUsers = []; 17 | List> _sortedAvailableUsers = []; 18 | List _myConnectionRequestCollection = []; 19 | 20 | bool _isLoading = false; 21 | 22 | final CloudStoreDataManagement _cloudStoreDataManagement = 23 | CloudStoreDataManagement(); 24 | 25 | Future _initialDataFetchAndCheckUp() async { 26 | if (mounted) { 27 | setState(() { 28 | this._isLoading = true; 29 | }); 30 | } 31 | 32 | final List> takeUsers = 33 | await _cloudStoreDataManagement.getAllUsersListExceptMyAccount( 34 | currentUserEmail: 35 | FirebaseAuth.instance.currentUser!.email.toString()); 36 | 37 | final List> takeUsersAfterSorted = []; 38 | 39 | if (mounted) { 40 | setState(() { 41 | takeUsers.forEach((element) { 42 | if (mounted) { 43 | setState(() { 44 | takeUsersAfterSorted.add(element); 45 | }); 46 | } 47 | }); 48 | }); 49 | } 50 | 51 | final List _connectionRequestList = 52 | await _cloudStoreDataManagement.currentUserConnectionRequestList( 53 | email: FirebaseAuth.instance.currentUser!.email.toString()); 54 | 55 | if (mounted) { 56 | setState(() { 57 | this._availableUsers = takeUsers; 58 | this._sortedAvailableUsers = takeUsersAfterSorted; 59 | this._myConnectionRequestCollection = _connectionRequestList; 60 | }); 61 | } 62 | 63 | if (mounted) { 64 | setState(() { 65 | this._isLoading = false; 66 | }); 67 | } 68 | } 69 | 70 | @override 71 | void initState() { 72 | _initialDataFetchAndCheckUp(); 73 | super.initState(); 74 | } 75 | 76 | @override 77 | Widget build(BuildContext context) { 78 | return SafeArea( 79 | child: Scaffold( 80 | backgroundColor: const Color.fromRGBO(34, 48, 60, 1), 81 | body: LoadingOverlay( 82 | isLoading: this._isLoading, 83 | color: Colors.black54, 84 | child: Container( 85 | margin: EdgeInsets.all(12.0), 86 | width: double.maxFinite, 87 | height: double.maxFinite, 88 | child: ListView( 89 | shrinkWrap: true, 90 | children: [ 91 | Center( 92 | child: Text( 93 | 'Available Connections', 94 | style: TextStyle(color: Colors.white, fontSize: 25.0), 95 | ), 96 | ), 97 | Container( 98 | width: double.maxFinite, 99 | margin: EdgeInsets.only(top: 20.0, bottom: 20.0), 100 | child: TextField( 101 | autofocus: true, 102 | style: TextStyle(color: Colors.white), 103 | decoration: InputDecoration( 104 | hintText: 'Search User Name', 105 | hintStyle: TextStyle(color: Colors.white70), 106 | focusedBorder: UnderlineInputBorder( 107 | borderSide: 108 | BorderSide(width: 2.0, color: Colors.lightBlue)), 109 | enabledBorder: UnderlineInputBorder( 110 | borderSide: 111 | BorderSide(width: 2.0, color: Colors.lightBlue)), 112 | ), 113 | onChanged: (writeText) { 114 | if (mounted) { 115 | setState(() { 116 | this._isLoading = true; 117 | }); 118 | } 119 | 120 | if (mounted) { 121 | setState(() { 122 | this._sortedAvailableUsers.clear(); 123 | 124 | print('Available Users: ${this._availableUsers}'); 125 | 126 | this._availableUsers.forEach((userNameMap) { 127 | if (userNameMap.values.first 128 | .toString() 129 | .toLowerCase() 130 | .startsWith('${writeText.toLowerCase()}')) 131 | this._sortedAvailableUsers.add(userNameMap); 132 | }); 133 | }); 134 | } 135 | 136 | print(this._sortedAvailableUsers); 137 | 138 | if (mounted) { 139 | setState(() { 140 | this._isLoading = false; 141 | }); 142 | } 143 | }, 144 | ), 145 | ), 146 | Container( 147 | margin: EdgeInsets.only(top: 10.0), 148 | height: MediaQuery.of(context).size.height - 50, 149 | width: double.maxFinite, 150 | //color: Colors.red, 151 | child: ListView.builder( 152 | shrinkWrap: true, 153 | itemCount: this._sortedAvailableUsers.length, 154 | itemBuilder: (connectionContext, index) { 155 | return connectionShowUp(index); 156 | }, 157 | ), 158 | ), 159 | ], 160 | ), 161 | ), 162 | ), 163 | ), 164 | ); 165 | } 166 | 167 | Widget connectionShowUp(int index) { 168 | return Container( 169 | height: 80.0, 170 | width: double.maxFinite, 171 | //color: Colors.orange, 172 | child: Row( 173 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 174 | children: [ 175 | Column( 176 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 177 | children: [ 178 | Text( 179 | this 180 | ._sortedAvailableUsers[index] 181 | .values 182 | .first 183 | .toString() 184 | .split('[user-name-about-divider]')[0], 185 | style: TextStyle(color: Colors.orange, fontSize: 20.0), 186 | ), 187 | Text( 188 | this 189 | ._sortedAvailableUsers[index] 190 | .values 191 | .first 192 | .toString() 193 | .split('[user-name-about-divider]')[1], 194 | style: TextStyle(color: Colors.lightBlue, fontSize: 16.0), 195 | ), 196 | ], 197 | ), 198 | TextButton( 199 | style: TextButton.styleFrom( 200 | shape: RoundedRectangleBorder( 201 | borderRadius: BorderRadius.circular(100.0), 202 | side: BorderSide( 203 | color: _getRelevantButtonConfig( 204 | connectionStateType: 205 | ConnectionStateType.ButtonBorderColor, 206 | index: index)), 207 | )), 208 | child: _getRelevantButtonConfig( 209 | connectionStateType: ConnectionStateType.ButtonNameWidget, 210 | index: index), 211 | onPressed: () async { 212 | final String buttonName = _getRelevantButtonConfig( 213 | connectionStateType: ConnectionStateType.ButtonOnlyName, 214 | index: index); 215 | 216 | if (mounted) { 217 | setState(() { 218 | this._isLoading = true; 219 | }); 220 | } 221 | 222 | if (buttonName == ConnectionStateName.Connect.toString()) { 223 | if (mounted) { 224 | setState(() { 225 | this._myConnectionRequestCollection.add({ 226 | this._sortedAvailableUsers[index].keys.first.toString(): 227 | OtherConnectionStatus.Request_Pending.toString(), 228 | }); 229 | }); 230 | } 231 | 232 | await _cloudStoreDataManagement.changeConnectionStatus( 233 | oppositeUserMail: this 234 | ._sortedAvailableUsers[index] 235 | .keys 236 | .first 237 | .toString(), 238 | currentUserMail: 239 | FirebaseAuth.instance.currentUser!.email.toString(), 240 | connectionUpdatedStatus: 241 | OtherConnectionStatus.Invitation_Came.toString(), 242 | currentUserUpdatedConnectionRequest: 243 | this._myConnectionRequestCollection); 244 | } else if (buttonName == 245 | ConnectionStateName.Accept.toString()) { 246 | if (mounted) { 247 | setState(() { 248 | this._myConnectionRequestCollection.forEach((element) { 249 | if (element.keys.first.toString() == 250 | this 251 | ._sortedAvailableUsers[index] 252 | .keys 253 | .first 254 | .toString()) { 255 | this._myConnectionRequestCollection[this 256 | ._myConnectionRequestCollection 257 | .indexOf(element)] = { 258 | this 259 | ._sortedAvailableUsers[index] 260 | .keys 261 | .first 262 | .toString(): 263 | OtherConnectionStatus.Invitation_Accepted 264 | .toString(), 265 | }; 266 | } 267 | }); 268 | }); 269 | } 270 | 271 | await _cloudStoreDataManagement.changeConnectionStatus( 272 | storeDataAlsoInConnections: true, 273 | oppositeUserMail: this 274 | ._sortedAvailableUsers[index] 275 | .keys 276 | .first 277 | .toString(), 278 | currentUserMail: 279 | FirebaseAuth.instance.currentUser!.email.toString(), 280 | connectionUpdatedStatus: 281 | OtherConnectionStatus.Request_Accepted.toString(), 282 | currentUserUpdatedConnectionRequest: 283 | this._myConnectionRequestCollection); 284 | } 285 | 286 | if (mounted) { 287 | setState(() { 288 | this._isLoading = false; 289 | }); 290 | } 291 | }), 292 | ], 293 | ), 294 | ); 295 | } 296 | 297 | dynamic _getRelevantButtonConfig( 298 | {required ConnectionStateType connectionStateType, required int index}) { 299 | bool _isUserPresent = false; 300 | String _storeStatus = ''; 301 | 302 | this._myConnectionRequestCollection.forEach((element) { 303 | if (element.keys.first.toString() == 304 | this._sortedAvailableUsers[index].keys.first.toString()) { 305 | _isUserPresent = true; 306 | _storeStatus = element.values.first.toString(); 307 | } 308 | }); 309 | 310 | if (_isUserPresent) { 311 | print('User Present in Connection List'); 312 | 313 | if (_storeStatus == OtherConnectionStatus.Request_Pending.toString() || 314 | _storeStatus == OtherConnectionStatus.Invitation_Came.toString()) { 315 | if (connectionStateType == ConnectionStateType.ButtonNameWidget) 316 | return Text( 317 | _storeStatus == OtherConnectionStatus.Request_Pending.toString() 318 | ? ConnectionStateName.Pending.toString() 319 | .split(".")[1] 320 | .toString() 321 | : ConnectionStateName.Accept.toString() 322 | .split(".")[1] 323 | .toString(), 324 | style: TextStyle(color: Colors.yellow), 325 | ); 326 | else if (connectionStateType == ConnectionStateType.ButtonOnlyName) 327 | return _storeStatus == 328 | OtherConnectionStatus.Request_Pending.toString() 329 | ? ConnectionStateName.Pending.toString() 330 | : ConnectionStateName.Accept.toString(); 331 | 332 | return Colors.yellow; 333 | } else { 334 | if (connectionStateType == ConnectionStateType.ButtonNameWidget) 335 | return Text( 336 | ConnectionStateName.Connected.toString().split(".")[1].toString(), 337 | style: TextStyle(color: Colors.green), 338 | ); 339 | else if (connectionStateType == ConnectionStateType.ButtonOnlyName) 340 | return ConnectionStateName.Connected.toString(); 341 | 342 | return Colors.green; 343 | } 344 | } else { 345 | print('User Not Present in Connection List'); 346 | 347 | if (connectionStateType == ConnectionStateType.ButtonNameWidget) 348 | return Text( 349 | ConnectionStateName.Connect.toString().split(".")[1].toString(), 350 | style: TextStyle(color: Colors.lightBlue), 351 | ); 352 | else if (connectionStateType == ConnectionStateType.ButtonOnlyName) 353 | return ConnectionStateName.Connect.toString(); 354 | 355 | return Colors.lightBlue; 356 | } 357 | } 358 | } 359 | -------------------------------------------------------------------------------- /lib/FrontEnd/model/previous_message_structure.dart: -------------------------------------------------------------------------------- 1 | import 'package:generation/Global_Uses/enum_generation.dart'; 2 | 3 | class PreviousMessageStructure { 4 | late String actualMessage; 5 | late String messageDate; 6 | late String messageTime; 7 | late bool messageHolder; 8 | late ChatMessageTypes messageType; 9 | 10 | PreviousMessageStructure({required String actualMessage, 11 | required String messageType, 12 | required String messageDate, 13 | required String messageTime, 14 | required String messageHolder}) { 15 | this.actualMessage = actualMessage; 16 | this.messageType = _getChatMessageTypePerfectly(messageType); 17 | this.messageTime = messageTime; 18 | this.messageDate = messageDate; 19 | this.messageHolder = _getChatMessageHolderType(messageHolder); 20 | } 21 | 22 | factory PreviousMessageStructure.toJson(Map map) { 23 | return PreviousMessageStructure( 24 | actualMessage: map["Message"], 25 | messageType: map["Message_Type"], 26 | messageDate: map["Message_Date"], 27 | messageTime: map["Message_Time"], 28 | messageHolder: map["Message_Holder"]); 29 | } 30 | 31 | ChatMessageTypes _getChatMessageTypePerfectly(String messageType) { 32 | if (messageType == ChatMessageTypes.Text.toString()) 33 | return ChatMessageTypes.Text; 34 | else if (messageType == ChatMessageTypes.Image.toString()) 35 | return ChatMessageTypes.Image; 36 | else if (messageType == ChatMessageTypes.Video.toString()) 37 | return ChatMessageTypes.Video; 38 | else if (messageType == ChatMessageTypes.Audio.toString()) { 39 | return ChatMessageTypes.Audio; 40 | } else if (messageType == ChatMessageTypes.Document.toString()) { 41 | return ChatMessageTypes.Document; 42 | } else if (messageType == ChatMessageTypes.Location.toString()) { 43 | return ChatMessageTypes.Location; 44 | } else { 45 | return ChatMessageTypes.None; 46 | } 47 | } 48 | 49 | bool _getChatMessageHolderType(String messageHolderTypeString) { 50 | return messageHolderTypeString == MessageHolderType.Me.toString()?false:true; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /lib/Global_Uses/constants.dart: -------------------------------------------------------------------------------- 1 | class FirestoreFieldConstants{ 2 | final String about = "about"; 3 | final String activity = "activity"; 4 | final String connectionRequest = "connection_request"; 5 | final String connections = "connections"; 6 | final String creationDate = "creation_date"; 7 | final String creationTime = "creation_time"; 8 | final String phoneNumber = "phone_number"; 9 | final String profilePic = "profile_pic"; 10 | final String token = "token"; 11 | final String totalConnections = "total_connections"; 12 | final String userName = "user_name"; 13 | } -------------------------------------------------------------------------------- /lib/Global_Uses/enum_generation.dart: -------------------------------------------------------------------------------- 1 | enum EmailSignUpResults { 2 | SignUpCompleted, 3 | EmailAlreadyPresent, 4 | SignUpNotCompleted, 5 | } 6 | 7 | enum EmailSignInResults { 8 | SignInCompleted, 9 | EmailNotVerified, 10 | EmailOrPasswordInvalid, 11 | UnexpectedError, 12 | } 13 | 14 | enum GoogleSignInResults { 15 | SignInCompleted, 16 | SignInNotCompleted, 17 | UnexpectedError, 18 | AlreadySignedIn, 19 | } 20 | 21 | enum FBSignInResults { 22 | SignInCompleted, 23 | SignInNotCompleted, 24 | AlreadySignedIn, 25 | UnExpectedError, 26 | } 27 | 28 | enum StatusMediaTypes { 29 | TextActivity, 30 | ImageActivity, 31 | } 32 | 33 | enum ConnectionStateName { 34 | Connect, 35 | Pending, 36 | Accept, 37 | Connected, 38 | } 39 | 40 | enum ConnectionStateType { 41 | ButtonNameWidget, 42 | ButtonBorderColor, 43 | ButtonOnlyName, 44 | } 45 | 46 | enum OtherConnectionStatus { 47 | Request_Pending, 48 | Invitation_Came, 49 | Invitation_Accepted, 50 | Request_Accepted, 51 | } 52 | 53 | enum ChatMessageTypes { 54 | None, 55 | Text, 56 | Image, 57 | Video, 58 | Document, 59 | Audio, 60 | Location, 61 | } 62 | 63 | enum ImageProviderCategory { 64 | FileImage, 65 | ExactAssetImage, 66 | NetworkImage, 67 | } 68 | 69 | enum MessageHolderType { 70 | Me, 71 | ConnectedUsers, 72 | } 73 | 74 | enum GetFieldForImportantDataLocalDatabase { 75 | UserEmail, 76 | Token, 77 | ProfileImagePath, 78 | ProfileImageUrl, 79 | About, 80 | WallPaper, 81 | MobileNumber, 82 | Notification, 83 | AccountCreationDate, 84 | AccountCreationTime, 85 | } 86 | 87 | enum PreviousMessageColTypes { 88 | ActualMessage, 89 | MessageDate, 90 | MessageTime, 91 | MessageHolder, 92 | MessageType, 93 | } 94 | -------------------------------------------------------------------------------- /lib/Global_Uses/foreground_receive_notificaion_management.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_local_notifications/flutter_local_notifications.dart'; 2 | 3 | class ForegroundNotificationManagement { 4 | final FlutterLocalNotificationsPlugin _flutterLocalNotificationsPlugin = 5 | FlutterLocalNotificationsPlugin(); 6 | 7 | final AndroidInitializationSettings _androidInitializationSettings = 8 | AndroidInitializationSettings("app_icon"); 9 | 10 | ForegroundNotificationManagement() { 11 | final InitializationSettings _initializationSettings = 12 | InitializationSettings(android: _androidInitializationSettings); 13 | 14 | print("Foreground Notification Constructor"); 15 | 16 | initAll(_initializationSettings); 17 | } 18 | 19 | initAll(InitializationSettings initializationSettings) async { 20 | final response = await _flutterLocalNotificationsPlugin.initialize( 21 | initializationSettings, onSelectNotification: (payload) async { 22 | print("On Select Notification Payload: $payload"); 23 | }); 24 | 25 | print("Local Notification Initialization Status: $response"); 26 | } 27 | 28 | Future showNotification( 29 | {required String title, required String body}) async { 30 | try { 31 | final AndroidNotificationDetails androidDetails = 32 | AndroidNotificationDetails( 33 | "CHANNEL ID", "Generation Youtube Tutorial", 34 | channelDescription: 35 | "This is made under Youtube Generation Tutorial", 36 | importance: Importance.max); 37 | 38 | final NotificationDetails generalNotificationDetails = 39 | NotificationDetails(android: androidDetails); 40 | 41 | await _flutterLocalNotificationsPlugin 42 | .show(0, title, body, generalNotificationDetails, payload: title); 43 | } catch (e) { 44 | print("Foreground Notification Error :${e.toString()}"); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /lib/Global_Uses/native_calling.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/services.dart'; 2 | 3 | class NativeCallback { 4 | static const MethodChannel _platform = 5 | const MethodChannel('com.youtubetutorial.generation/nativeCallBack'); 6 | 7 | Future getTheVideoThumbnail({required String videoPath}) async { 8 | print('Thumbnail Take'); 9 | 10 | final String thumbnailPath = await _platform 11 | .invokeMethod('makeVideoThumbnail', {'videoPath': videoPath}); 12 | 13 | print("Thumbnail Path is: $thumbnailPath"); 14 | 15 | return thumbnailPath; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/Global_Uses/reg_exp.dart: -------------------------------------------------------------------------------- 1 | final RegExp emailRegex = RegExp( 2 | r"^[a-zA-Z0-9.a-zA-Z0-9.!#$%&'*+-/=?^_`{|}~]+@[a-zA-Z0-9]+\.[a-zA-Z]+"); -------------------------------------------------------------------------------- /lib/Global_Uses/send_notification_management.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:generation/Global_Uses/enum_generation.dart'; 4 | import 'package:http/http.dart'; 5 | 6 | class SendNotification { 7 | Future messageNotificationClassifier(ChatMessageTypes messageTypes, 8 | {String textMsg = "", 9 | required String connectionToken, 10 | required String currAccountUserName}) async { 11 | switch (messageTypes) { 12 | case ChatMessageTypes.None: 13 | break; 14 | case ChatMessageTypes.Text: 15 | await sendNotification( 16 | token: connectionToken, 17 | title: "$currAccountUserName Send a Message", 18 | body: textMsg); 19 | break; 20 | case ChatMessageTypes.Image: 21 | await sendNotification( 22 | token: connectionToken, 23 | title: "$currAccountUserName Send a Image", 24 | body: ""); 25 | break; 26 | case ChatMessageTypes.Video: 27 | await sendNotification( 28 | token: connectionToken, 29 | title: "$currAccountUserName Send a Video", 30 | body: ""); 31 | break; 32 | case ChatMessageTypes.Document: 33 | await sendNotification( 34 | token: connectionToken, 35 | title: "$currAccountUserName Send a Document", 36 | body: ""); 37 | break; 38 | case ChatMessageTypes.Audio: 39 | await sendNotification( 40 | token: connectionToken, 41 | title: "$currAccountUserName Send a Audio", 42 | body: ""); 43 | break; 44 | case ChatMessageTypes.Location: 45 | await sendNotification( 46 | token: connectionToken, 47 | title: "$currAccountUserName Send a Location", 48 | body: ""); 49 | break; 50 | } 51 | } 52 | 53 | Future sendNotification( 54 | {required String token, 55 | required String title, 56 | required String body}) async { 57 | try { 58 | print("In Notification"); 59 | 60 | final String _serverKey = 61 | "AAAAyXc-1K0:APA91bHfrn53OmcmgNKIT3H5Gt5Rah30msbtxbIP3RBDSZyeZwOPwPqAGRni5L6bAzM-kqD8x5B1Y7Gf85gPBePd9TDOHqaEi4iISaUcdixo3kKnNLaF_LSwma9uX6wO0Dl5KjNNH9q2"; 62 | 63 | final Response response = await post( 64 | Uri.parse("https://fcm.googleapis.com/fcm/send"), 65 | headers: { 66 | "Content-Type": "application/json", 67 | "Authorization": "key=$_serverKey", 68 | }, 69 | body: jsonEncode({ 70 | "notification": { 71 | "body": body, 72 | "title": title, 73 | }, 74 | "priority": "high", 75 | "data": { 76 | "click": "FLUTTER_NOTIFICATION_CLICK", 77 | "id": "1", 78 | "status": "done", 79 | "collapse_key": "type_a", 80 | }, 81 | "to": token, 82 | }), 83 | ); 84 | 85 | print("Response is: ${response.statusCode} ${response.body}"); 86 | 87 | return response.statusCode; 88 | } catch (e) { 89 | print("Error in Notification Send: ${e.toString()}"); 90 | return 404; 91 | } 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /lib/Global_Uses/show_toast_message.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:fluttertoast/fluttertoast.dart'; 4 | 5 | void showToast(String? msg, FToast fToast, 6 | {Color toastColor = Colors.green, 7 | int seconds = 2, 8 | ToastGravity toastGravity = ToastGravity.BOTTOM, 9 | double fontSize = 20.0, 10 | Color bgColor = Colors.black54}) { 11 | 12 | if (msg != null) { 13 | final Widget toast = Container( 14 | padding: const EdgeInsets.symmetric(horizontal: 15.0, vertical: 10.0), 15 | decoration: BoxDecoration( 16 | borderRadius: BorderRadius.circular(15.0), 17 | color: bgColor, 18 | ), 19 | child: Text( 20 | msg, 21 | textAlign: TextAlign.center, 22 | style: TextStyle( 23 | color: toastColor, 24 | fontSize: fontSize, 25 | fontFamily: 'Lora', 26 | letterSpacing: 1.0, 27 | fontWeight: FontWeight.w400, 28 | ), 29 | ), 30 | ); 31 | 32 | fToast.showToast( 33 | child: toast, 34 | gravity: toastGravity, 35 | toastDuration: Duration(seconds: seconds), 36 | ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_messaging/firebase_messaging.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter/cupertino.dart'; 4 | import 'package:firebase_core/firebase_core.dart'; 5 | 6 | import 'package:firebase_auth/firebase_auth.dart'; 7 | import 'package:generation/Backend/firebase/OnlineDatabaseManagement/cloud_data_management.dart'; 8 | import 'package:generation/FrontEnd/AuthUI/log_in.dart'; 9 | import 'package:generation/FrontEnd/MainScreens/main_screen.dart'; 10 | import 'package:generation/FrontEnd/NewUserEntry/new_user_entry.dart'; 11 | import 'package:generation/Global_Uses/foreground_receive_notificaion_management.dart'; 12 | 13 | Future main() async { 14 | WidgetsFlutterBinding.ensureInitialized(); 15 | await Firebase.initializeApp(); 16 | 17 | /// Initialize Notification Settings 18 | await notificationInitialize(); 19 | 20 | /// For Background Message Handling 21 | FirebaseMessaging.onBackgroundMessage(backgroundMsgAction); 22 | 23 | /// For Foreground Message Handling 24 | FirebaseMessaging.onMessage.listen((messageEvent) { 25 | print( 26 | "Message Data is: ${messageEvent.notification!.title} ${messageEvent.notification!.body}"); 27 | 28 | _receiveAndShowNotificationInitialization( 29 | title: messageEvent.notification!.title.toString(), 30 | body: messageEvent.notification!.body.toString()); 31 | }); 32 | 33 | runApp( 34 | MaterialApp( 35 | title: 'Generation', 36 | debugShowCheckedModeBanner: false, 37 | themeMode: ThemeMode.dark, 38 | home: await differentContextDecisionTake(), 39 | ), 40 | ); 41 | } 42 | 43 | Future differentContextDecisionTake() async { 44 | if (FirebaseAuth.instance.currentUser == null) { 45 | return LogInScreen(); 46 | } else { 47 | final CloudStoreDataManagement _cloudStoreDataManagement = 48 | CloudStoreDataManagement(); 49 | 50 | final bool _dataPresentResponse = 51 | await _cloudStoreDataManagement.userRecordPresentOrNot( 52 | email: FirebaseAuth.instance.currentUser!.email.toString()); 53 | 54 | return _dataPresentResponse ? MainScreen() : TakePrimaryUserData(); 55 | } 56 | } 57 | 58 | Future notificationInitialize() async { 59 | /// Subscribe to a topic 60 | await FirebaseMessaging.instance.subscribeToTopic("Generation_YT"); 61 | 62 | /// Foreground Notification Options Enabled 63 | await FirebaseMessaging.instance.setForegroundNotificationPresentationOptions( 64 | alert: true, 65 | badge: true, 66 | sound: true, 67 | ); 68 | } 69 | 70 | /// Receive And show Notification Customization 71 | void _receiveAndShowNotificationInitialization( 72 | {required String title, required String body}) async { 73 | final ForegroundNotificationManagement _fgNotifyManagement = 74 | ForegroundNotificationManagement(); 75 | 76 | print("Notification Activated"); 77 | 78 | await _fgNotifyManagement.showNotification(title: title, body: body); 79 | } 80 | 81 | Future backgroundMsgAction(RemoteMessage message) async { 82 | await Firebase.initializeApp(); 83 | 84 | _receiveAndShowNotificationInitialization( 85 | title: message.notification!.title.toString(), 86 | body: message.notification!.body.toString()); 87 | } 88 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: generation 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 | firebase_auth: 27 | firebase_core: 28 | google_sign_in: ^5.0.5 29 | flutter_facebook_auth: ^3.5.3 30 | cloud_firestore: ^2.5.1 31 | intl: ^0.17.0 32 | firebase_messaging: ^10.0.9 33 | animations: ^2.0.1 34 | circle_list: ^1.0.5 35 | flutter_icons: 36 | git: 37 | url: git://github.com/jibiel/flutter-icons.git 38 | ref: master 39 | sqflite: ^2.0.0+3 40 | open_file: ^3.2.1 41 | photo_view: ^0.12.0 42 | image_picker: 43 | emoji_picker_flutter: ^1.0.6 44 | fluttertoast: ^8.0.8 45 | permission_handler: ^8.2.5 46 | file_picker: ^4.0.0 47 | pdf_viewer_plugin: 48 | git: 49 | url: https://github.com/boskokg/Pdf_Viewer_Plugin/ 50 | ref: master 51 | google_maps_flutter: ^2.0.11 52 | geolocator: ^7.7.1 53 | just_audio: ^0.9.7 54 | percent_indicator: ^3.0.1 55 | record: ^3.0.0 56 | path_provider: 57 | firebase_storage: ^10.0.4 58 | dio: ^4.0.0 59 | flutter_local_notifications: ^9.0.1 60 | http: ^0.13.4 61 | 62 | loading_overlay: ^0.3.0 63 | 64 | # The following adds the Cupertino Icons font to your application. 65 | # Use with the CupertinoIcons class for iOS style icons. 66 | cupertino_icons: ^1.0.2 67 | 68 | dev_dependencies: 69 | flutter_test: 70 | sdk: flutter 71 | 72 | # For information on the generic Dart part of this file, see the 73 | # following page: https://dart.dev/tools/pub/pubspec 74 | 75 | # The following section is specific to Flutter. 76 | flutter: 77 | 78 | # The following line ensures that the Material Icons font is 79 | # included with your application, so that you can use the icons in 80 | # the material Icons class. 81 | uses-material-design: true 82 | 83 | # To add assets to your application, add an assets section, like this: 84 | assets: 85 | - assets/images/ 86 | - assets/logo/ 87 | # - images/a_dot_ham.jpeg 88 | 89 | # An image asset can refer to one or more resolution-specific "variants", see 90 | # https://flutter.dev/assets-and-images/#resolution-aware. 91 | 92 | # For details regarding adding assets from package dependencies, see 93 | # https://flutter.dev/assets-and-images/#from-packages 94 | 95 | # To add custom fonts to your application, add a fonts section here, 96 | # in this "flutter" section. Each entry in this list should have a 97 | # "family" key with the font family name, and a "fonts" key with a 98 | # list giving the asset and other descriptors for the font. For 99 | # example: 100 | # fonts: 101 | # - family: Schyler 102 | # fonts: 103 | # - asset: fonts/Schyler-Regular.ttf 104 | # - asset: fonts/Schyler-Italic.ttf 105 | # style: italic 106 | # - family: Trajan Pro 107 | # fonts: 108 | # - asset: fonts/TrajanPro.ttf 109 | # - asset: fonts/TrajanPro_Bold.ttf 110 | # weight: 700 111 | # 112 | # For details regarding fonts from package dependencies, 113 | # see https://flutter.dev/custom-fonts/#from-packages 114 | --------------------------------------------------------------------------------