├── .gitignore ├── .metadata ├── README.md ├── android ├── .project ├── .settings │ └── org.eclipse.buildship.core.prefs ├── app │ ├── .classpath │ ├── .project │ ├── .settings │ │ └── org.eclipse.buildship.core.prefs │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── video_chat │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── assets ├── i18n │ ├── en.json │ ├── es.json │ └── fr.json └── images │ ├── Logoforchat.jpg │ ├── Logoforchat.png │ ├── backgroundpictureVIDEO.jpg │ ├── campfire.jpg │ ├── cartoonpicture.jpg │ ├── gc_im1.jpeg │ ├── gc_im2.jpeg │ ├── gc_im3.png │ ├── gc_im4.jpeg │ ├── huddleBackground.png │ ├── huddleLogo.png │ ├── huddleLogoInternet.png │ └── icon_huddlelogo.png ├── firebase.json ├── fonts ├── Baskervville-Regular.ttf ├── IndieFlower-Regular.ttf ├── Montserrat │ ├── Montserrat-Black.ttf │ ├── Montserrat-BlackItalic.ttf │ ├── Montserrat-Bold.ttf │ ├── Montserrat-BoldItalic.ttf │ ├── Montserrat-ExtraBold.ttf │ ├── Montserrat-ExtraBoldItalic.ttf │ ├── Montserrat-ExtraLight.ttf │ ├── Montserrat-ExtraLightItalic.ttf │ ├── Montserrat-Italic.ttf │ ├── Montserrat-Light.ttf │ ├── Montserrat-LightItalic.ttf │ ├── Montserrat-Medium.ttf │ ├── Montserrat-MediumItalic.ttf │ ├── Montserrat-Regular.ttf │ ├── Montserrat-SemiBold.ttf │ ├── Montserrat-SemiBoldItalic.ttf │ ├── Montserrat-Thin.ttf │ ├── Montserrat-ThinItalic.ttf │ └── OFL.txt └── NotoSerif-Regular.ttf ├── functions ├── .gitignore ├── index.js ├── package-lock.json └── package.json ├── ios ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ └── contents.xcworkspacedata └── 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-50x50@1x.png │ │ ├── Icon-App-50x50@2x.png │ │ ├── Icon-App-57x57@1x.png │ │ ├── Icon-App-57x57@2x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-72x72@1x.png │ │ ├── Icon-App-72x72@2x.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 ├── Auth │ ├── auth.dart │ ├── login.dart │ ├── logsignin_page.dart │ └── register.dart ├── GeoLocation │ ├── geolocation.dart │ ├── getLocation.dart │ └── maps.dart ├── Model │ ├── group_model.dart │ ├── message_model.dart │ └── user.dart ├── Notification │ └── notification.dart ├── SQFLITEMODEL │ ├── db_utils.dart │ ├── user_SQFLITE.dart │ └── users_model.dart ├── charts.dart ├── chat_page.dart ├── groups_page.dart ├── i18n │ └── i18n.dart ├── main.dart ├── messageui.dart ├── page_navigator.dart ├── snack.dart ├── video_room.dart └── wrapper.dart ├── pubspec.lock ├── pubspec.yaml └── test └── widget_test.dart /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | .dart_tool/ 26 | .flutter-plugins 27 | .packages 28 | .pub-cache/ 29 | .pub/ 30 | /build/ 31 | 32 | # Android related 33 | **/android/**/gradle-wrapper.jar 34 | **/android/.gradle 35 | **/android/captures/ 36 | **/android/gradlew 37 | **/android/gradlew.bat 38 | **/android/local.properties 39 | **/android/**/GeneratedPluginRegistrant.java 40 | 41 | # iOS/XCode related 42 | **/ios/**/*.mode1v3 43 | **/ios/**/*.mode2v3 44 | **/ios/**/*.moved-aside 45 | **/ios/**/*.pbxuser 46 | **/ios/**/*.perspectivev3 47 | **/ios/**/*sync/ 48 | **/ios/**/.sconsign.dblite 49 | **/ios/**/.tags* 50 | **/ios/**/.vagrant/ 51 | **/ios/**/DerivedData/ 52 | **/ios/**/Icon? 53 | **/ios/**/Pods/ 54 | **/ios/**/.symlinks/ 55 | **/ios/**/profile 56 | **/ios/**/xcuserdata 57 | **/ios/.generated/ 58 | **/ios/Flutter/App.framework 59 | **/ios/Flutter/Flutter.framework 60 | **/ios/Flutter/Generated.xcconfig 61 | **/ios/Flutter/app.flx 62 | **/ios/Flutter/app.zip 63 | **/ios/Flutter/flutter_assets/ 64 | **/ios/Flutter/flutter_export_environment.sh 65 | **/ios/ServiceDefinitions.json 66 | **/ios/Runner/GeneratedPluginRegistrant.* 67 | 68 | # Exceptions to above rules. 69 | !**/ios/**/default.mode1v3 70 | !**/ios/**/default.mode2v3 71 | !**/ios/**/default.pbxuser 72 | !**/ios/**/default.perspectivev3 73 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 74 | -------------------------------------------------------------------------------- /.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: 1aedbb1835bd6eb44550293d57d4d124f19901f0 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Flutter Video Chat w/ Agora.io 2 | 3 | ## Collaborators 4 | 5 | - [Jeremy Friesen](https://github.com/jeremydavidfriesen) 6 | - [Tamilselvan Balasuntharam](https://github.com/MegaTlash) 7 | - [Harry Thasarathan](https://github.com/Harry-Thasarathan) 8 | - [Spencer Denford](https://github.com/spencerdenford) 9 | 10 | flutter_video_chat is a simple front-end combining text-messaging (using Google Firebase) and video chat (using Agora.io for Flutter)!!!! 11 | 12 | ![Alt Text](https://media.giphy.com/media/kHCkBvBVbuOhfOQgwL/giphy.gif) 13 | 14 | ## Setup 15 | 16 | ### Firebase 17 | - In the cloned repository, replace the package names with your own 18 | - applicationId in build.gradle (android\app) 19 | - package in MainActivity.kt (android\app\src\main\kotlin\com\example\video_chat) 20 | - package in all three AndroidManifest.xml files (android\app\src\main, android\app\src\debug, android\app\src\profile) 21 | 22 | - go to https://console.firebase.google.com/ 23 | - create a project 24 | - register project for android (use the package name you chose earlier) 25 | - Download 'google-services.json' 26 | - move 'google-services.json' to android > app 27 | - change pubspec.yaml and both gradle files to include firebase 28 | - run 'flutter pub get' to import dependencies 29 | 30 | - in the firebase console, under "Develop" select "Authentication" 31 | - Click "Set up sign-in method" 32 | - Enable the "Email/Password" sign-in method 33 | 34 | - in the firebase console, under "Develop" select Database 35 | - Click "Create Database" 36 | - Accept defaults 37 | 38 | ### Agora.io 39 | 40 | - go to Agora's website, https://www.agora.io/ 41 | - sign up 42 | - create project 43 | - copy App ID and set the const APP_ID in lib\video_room.dart 44 | -------------------------------------------------------------------------------- /android/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | android 4 | Project android created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.buildship.core.gradleprojectbuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.buildship.core.gradleprojectnature 16 | 17 | 18 | -------------------------------------------------------------------------------- /android/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | connection.project.dir= 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /android/app/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /android/app/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | app 4 | Project app created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.buildship.core.gradleprojectbuilder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.buildship.core.gradleprojectnature 22 | 23 | 24 | -------------------------------------------------------------------------------- /android/app/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | connection.project.dir=.. 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion 28 30 | 31 | sourceSets { 32 | main.java.srcDirs += 'src/main/kotlin' 33 | } 34 | 35 | lintOptions { 36 | disable 'InvalidPackage' 37 | } 38 | 39 | defaultConfig { 40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 41 | applicationId "com.example.example" 42 | minSdkVersion 21 //set to 21 if multi-dex error 43 | targetSdkVersion 28 44 | versionCode flutterVersionCode.toInteger() 45 | versionName flutterVersionName 46 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 47 | } 48 | 49 | buildTypes { 50 | release { 51 | // TODO: Add your own signing config for the release build. 52 | // Signing with the debug keys for now, so `flutter run --release` works. 53 | signingConfig signingConfigs.debug 54 | } 55 | } 56 | } 57 | 58 | flutter { 59 | source '../..' 60 | } 61 | 62 | dependencies { 63 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 64 | //implementation 'com.google.firebase:firebase-analytics:17.2.0' 65 | testImplementation 'junit:junit:4.12' 66 | androidTestImplementation 'com.android.support.test:runner:1.0.2' 67 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 68 | //implementation 'com.google.firebase:firebase-core:15.0.0' 69 | } 70 | 71 | //Add to the bottom of the file 72 | apply plugin: 'com.google.gms.google-services' 73 | //Gotta replace this with something else when you find a better fix because this might become dangerous in the future 74 | com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true 75 | 76 | 77 | 78 | configurations.all { 79 | resolutionStrategy { 80 | resolutionStrategy.eachDependency { details -> 81 | if (details.requested.group == 'androidx.core') { 82 | details.useVersion "1.0.1" 83 | } 84 | if (details.requested.group == 'androidx.lifecycle') { 85 | details.useVersion "2.0.0" 86 | } 87 | if (details.requested.group == 'androidx.versionedparcelable') { 88 | details.useVersion "1.0.0" 89 | } 90 | if (details.requested.group == 'androidx.fragment') { 91 | details.useVersion "1.0.0" 92 | } 93 | if (details.requested.group == 'androidx.appcompat') { 94 | details.useVersion "1.0.1" 95 | } 96 | } 97 | } 98 | } -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 14 | 18 | 25 | 29 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/video_chat/MainActivity.kt: -------------------------------------------------------------------------------- 1 | /* Replace package name with your own */ 2 | package com.example.example 3 | 4 | import android.os.Bundle 5 | 6 | import io.flutter.app.FlutterActivity 7 | import io.flutter.plugins.GeneratedPluginRegistrant 8 | 9 | class MainActivity: FlutterActivity() { 10 | override fun onCreate(savedInstanceState: Bundle?) { 11 | super.onCreate(savedInstanceState) 12 | GeneratedPluginRegistrant.registerWith(this) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.0' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.3.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | classpath 'com.google.gms:google-services:4.2.0' 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | google() 18 | jcenter() 19 | } 20 | } 21 | 22 | rootProject.buildDir = '../build' 23 | subprojects { 24 | project.buildDir = "${rootProject.buildDir}/${project.name}" 25 | } 26 | subprojects { 27 | project.evaluationDependsOn(':app') 28 | } 29 | 30 | task clean(type: Delete) { 31 | delete rootProject.buildDir 32 | } 33 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | android.useAndroidX=true 2 | android.enableJetifier=true 3 | org.gradle.jvmargs=-Xmx1536M 4 | 5 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip 7 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /assets/i18n/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "groups": "Groups", 4 | "newgroup": "New Group", 5 | "groupname": "Group Name", 6 | "creategroup": "Create Group", 7 | "extras": "Extras", 8 | "maps": "Maps", 9 | "analytics": "Analytics", 10 | "logout": "Logout", 11 | "successfullysignedout": "Successfully Signed Out", 12 | "settings": "Settings", 13 | "writeamessage": "Write a Message", 14 | "chatanaylitics": "Chat Anaylitics", 15 | "timespentonproject": "Time Spent on Project", 16 | "register": "Register", 17 | "joinus": "Join us!", 18 | "email": "Email", 19 | "login": "Login", 20 | "enteranemail": "Enter an Email", 21 | "password": "Password", 22 | "enterapassword": "Enter a Password", 23 | "pleaseenteravalidemail": "Please enter a valid email", 24 | "succesfullyregisteredanaccount": "Succesfully Registered an account!", 25 | "welcomeback": "Welcome Back", 26 | "loginsuccessful": "Login Successful", 27 | "emailpasswordincorrect": "Email or Password Incorrect", 28 | "connectwithothers": "Connect with Others", 29 | "chat": "Chat", 30 | "selectgroup": "<- Select a Group from the groups page\n(Swipe Right)", 31 | "usersettings": "User Settings" 32 | } 33 | } -------------------------------------------------------------------------------- /assets/i18n/es.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "groups": "Grupos", 4 | "newgroup": "Nuevo Grupo", 5 | "groupname": "Nombre del Grupo", 6 | "creategroup": "Crear Grupo", 7 | "extras": "Extras", 8 | "maps": "Mapas", 9 | "analytics": "Analítica", 10 | "logout": "Cerrar Sesión", 11 | "successfullysignedout": "Salió Exitosamente", 12 | "settings": "Configuración", 13 | "writeamessage": "Escribir un Mensaje", 14 | "chatanaylitics": "Análisis de la Conversación", 15 | "timespentonproject": "Tiempo Invertido en el Proyecto", 16 | "register": "Registrarse", 17 | "joinus": "¡Únete a Nosotros!", 18 | "email": "Correo Electrónico", 19 | "login": "Iniciar Sesión", 20 | "enteranemail": "Ingrese un Correo Electrónico", 21 | "password": "Contraseña", 22 | "enterapassword": "Ingrese una Contraseña", 23 | "pleaseenteravalidemail": "Ingrese un Correo Electrónico Válido", 24 | "succesfullyregisteredanaccount": "¡Se registró una cuenta con éxito!", 25 | "welcomeback": "Bienvenido de Ruevo", 26 | "loginsuccessful": "Inicio de Sesión Exitoso", 27 | "emailpasswordincorrect": "Correo Electrónico o Contraseña Incorrecta", 28 | "connectwithothers": "Conectarse con Otros", 29 | "chat": "Charla", 30 | "selectgroup": "<- Seleccione un Grupo de la Página de Grupos\n(Deslizar Hacia la Derecha)", 31 | "usersettings": "Ajustes de usuario" 32 | } 33 | } -------------------------------------------------------------------------------- /assets/i18n/fr.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "groups": "Groupes", 4 | "newgroup": "Nouveau Groupe", 5 | "groupname": "Nom de Groupe", 6 | "creategroup": "Créer un Groupe", 7 | "extras": "Extras", 8 | "maps": "Plans", 9 | "analytics": "Analytique", 10 | "logout": "Connectez - Out", 11 | "successfullysignedout": "Déconnexion Réussie", 12 | "settings": "Paramètres", 13 | "writeamessage": "Écrire un Message", 14 | "chatanaylitics": "Bavarder Analytique", 15 | "timespentonproject": "Temps Passé sur le Projet", 16 | "register": "Registre", 17 | "joinus": "Rejoignez-nous!", 18 | "email": "E-mail", 19 | "login": "Ouvrir une Session", 20 | "enteranemail": "Entrez un E-mail", 21 | "password": "Mot de Passe", 22 | "enterapassword": "Entrer un mot de Passe", 23 | "pleaseenteravalidemail": "Veuillez Saisir un E-mail Valide", 24 | "succesfullyregisteredanaccount": "Un Compte Enregistré Avec Succès!", 25 | "welcomeback": "Nous Saluons le Retour", 26 | "loginsuccessful": "Connexion Réussie", 27 | "emailpasswordincorrect": "E-mail ou mot de Pssse Incorrect", 28 | "connectwithothers": "Se Connecter avec les Autres", 29 | "chat": "Bavarder", 30 | "selectgroup": "<- Sélectionnez un Groupe dans la Page des Groupes\n(Balayez vers la Droite)", 31 | "usersettings": "Paramètres utilisateur" 32 | } 33 | } -------------------------------------------------------------------------------- /assets/images/Logoforchat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/assets/images/Logoforchat.jpg -------------------------------------------------------------------------------- /assets/images/Logoforchat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/assets/images/Logoforchat.png -------------------------------------------------------------------------------- /assets/images/backgroundpictureVIDEO.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/assets/images/backgroundpictureVIDEO.jpg -------------------------------------------------------------------------------- /assets/images/campfire.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/assets/images/campfire.jpg -------------------------------------------------------------------------------- /assets/images/cartoonpicture.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/assets/images/cartoonpicture.jpg -------------------------------------------------------------------------------- /assets/images/gc_im1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/assets/images/gc_im1.jpeg -------------------------------------------------------------------------------- /assets/images/gc_im2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/assets/images/gc_im2.jpeg -------------------------------------------------------------------------------- /assets/images/gc_im3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/assets/images/gc_im3.png -------------------------------------------------------------------------------- /assets/images/gc_im4.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/assets/images/gc_im4.jpeg -------------------------------------------------------------------------------- /assets/images/huddleBackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/assets/images/huddleBackground.png -------------------------------------------------------------------------------- /assets/images/huddleLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/assets/images/huddleLogo.png -------------------------------------------------------------------------------- /assets/images/huddleLogoInternet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/assets/images/huddleLogoInternet.png -------------------------------------------------------------------------------- /assets/images/icon_huddlelogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/assets/images/icon_huddlelogo.png -------------------------------------------------------------------------------- /firebase.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /fonts/Baskervville-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/fonts/Baskervville-Regular.ttf -------------------------------------------------------------------------------- /fonts/IndieFlower-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/fonts/IndieFlower-Regular.ttf -------------------------------------------------------------------------------- /fonts/Montserrat/Montserrat-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/fonts/Montserrat/Montserrat-Black.ttf -------------------------------------------------------------------------------- /fonts/Montserrat/Montserrat-BlackItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/fonts/Montserrat/Montserrat-BlackItalic.ttf -------------------------------------------------------------------------------- /fonts/Montserrat/Montserrat-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/fonts/Montserrat/Montserrat-Bold.ttf -------------------------------------------------------------------------------- /fonts/Montserrat/Montserrat-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/fonts/Montserrat/Montserrat-BoldItalic.ttf -------------------------------------------------------------------------------- /fonts/Montserrat/Montserrat-ExtraBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/fonts/Montserrat/Montserrat-ExtraBold.ttf -------------------------------------------------------------------------------- /fonts/Montserrat/Montserrat-ExtraBoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/fonts/Montserrat/Montserrat-ExtraBoldItalic.ttf -------------------------------------------------------------------------------- /fonts/Montserrat/Montserrat-ExtraLight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/fonts/Montserrat/Montserrat-ExtraLight.ttf -------------------------------------------------------------------------------- /fonts/Montserrat/Montserrat-ExtraLightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/fonts/Montserrat/Montserrat-ExtraLightItalic.ttf -------------------------------------------------------------------------------- /fonts/Montserrat/Montserrat-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/fonts/Montserrat/Montserrat-Italic.ttf -------------------------------------------------------------------------------- /fonts/Montserrat/Montserrat-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/fonts/Montserrat/Montserrat-Light.ttf -------------------------------------------------------------------------------- /fonts/Montserrat/Montserrat-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/fonts/Montserrat/Montserrat-LightItalic.ttf -------------------------------------------------------------------------------- /fonts/Montserrat/Montserrat-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/fonts/Montserrat/Montserrat-Medium.ttf -------------------------------------------------------------------------------- /fonts/Montserrat/Montserrat-MediumItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/fonts/Montserrat/Montserrat-MediumItalic.ttf -------------------------------------------------------------------------------- /fonts/Montserrat/Montserrat-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/fonts/Montserrat/Montserrat-Regular.ttf -------------------------------------------------------------------------------- /fonts/Montserrat/Montserrat-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/fonts/Montserrat/Montserrat-SemiBold.ttf -------------------------------------------------------------------------------- /fonts/Montserrat/Montserrat-SemiBoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/fonts/Montserrat/Montserrat-SemiBoldItalic.ttf -------------------------------------------------------------------------------- /fonts/Montserrat/Montserrat-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/fonts/Montserrat/Montserrat-Thin.ttf -------------------------------------------------------------------------------- /fonts/Montserrat/Montserrat-ThinItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/fonts/Montserrat/Montserrat-ThinItalic.ttf -------------------------------------------------------------------------------- /fonts/Montserrat/OFL.txt: -------------------------------------------------------------------------------- 1 | Copyright 2011 The Montserrat Project Authors (https://github.com/JulietaUla/Montserrat) 2 | 3 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 4 | This license is copied below, and is also available with a FAQ at: 5 | http://scripts.sil.org/OFL 6 | 7 | 8 | ----------------------------------------------------------- 9 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 10 | ----------------------------------------------------------- 11 | 12 | PREAMBLE 13 | The goals of the Open Font License (OFL) are to stimulate worldwide 14 | development of collaborative font projects, to support the font creation 15 | efforts of academic and linguistic communities, and to provide a free and 16 | open framework in which fonts may be shared and improved in partnership 17 | with others. 18 | 19 | The OFL allows the licensed fonts to be used, studied, modified and 20 | redistributed freely as long as they are not sold by themselves. The 21 | fonts, including any derivative works, can be bundled, embedded, 22 | redistributed and/or sold with any software provided that any reserved 23 | names are not used by derivative works. The fonts and derivatives, 24 | however, cannot be released under any other type of license. The 25 | requirement for fonts to remain under this license does not apply 26 | to any document created using the fonts or their derivatives. 27 | 28 | DEFINITIONS 29 | "Font Software" refers to the set of files released by the Copyright 30 | Holder(s) under this license and clearly marked as such. This may 31 | include source files, build scripts and documentation. 32 | 33 | "Reserved Font Name" refers to any names specified as such after the 34 | copyright statement(s). 35 | 36 | "Original Version" refers to the collection of Font Software components as 37 | distributed by the Copyright Holder(s). 38 | 39 | "Modified Version" refers to any derivative made by adding to, deleting, 40 | or substituting -- in part or in whole -- any of the components of the 41 | Original Version, by changing formats or by porting the Font Software to a 42 | new environment. 43 | 44 | "Author" refers to any designer, engineer, programmer, technical 45 | writer or other person who contributed to the Font Software. 46 | 47 | PERMISSION & CONDITIONS 48 | Permission is hereby granted, free of charge, to any person obtaining 49 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 50 | redistribute, and sell modified and unmodified copies of the Font 51 | Software, subject to the following conditions: 52 | 53 | 1) Neither the Font Software nor any of its individual components, 54 | in Original or Modified Versions, may be sold by itself. 55 | 56 | 2) Original or Modified Versions of the Font Software may be bundled, 57 | redistributed and/or sold with any software, provided that each copy 58 | contains the above copyright notice and this license. These can be 59 | included either as stand-alone text files, human-readable headers or 60 | in the appropriate machine-readable metadata fields within text or 61 | binary files as long as those fields can be easily viewed by the user. 62 | 63 | 3) No Modified Version of the Font Software may use the Reserved Font 64 | Name(s) unless explicit written permission is granted by the corresponding 65 | Copyright Holder. This restriction only applies to the primary font name as 66 | presented to the users. 67 | 68 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 69 | Software shall not be used to promote, endorse or advertise any 70 | Modified Version, except to acknowledge the contribution(s) of the 71 | Copyright Holder(s) and the Author(s) or with their explicit written 72 | permission. 73 | 74 | 5) The Font Software, modified or unmodified, in part or in whole, 75 | must be distributed entirely under this license, and must not be 76 | distributed under any other license. The requirement for fonts to 77 | remain under this license does not apply to any document created 78 | using the Font Software. 79 | 80 | TERMINATION 81 | This license becomes null and void if any of the above conditions are 82 | not met. 83 | 84 | DISCLAIMER 85 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 86 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 87 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 88 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 89 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 90 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 91 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 92 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 93 | OTHER DEALINGS IN THE FONT SOFTWARE. 94 | -------------------------------------------------------------------------------- /fonts/NotoSerif-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/fonts/NotoSerif-Regular.ttf -------------------------------------------------------------------------------- /functions/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ -------------------------------------------------------------------------------- /functions/index.js: -------------------------------------------------------------------------------- 1 | const functions = require('firebase-functions') 2 | const admin = require('firebase-admin') 3 | admin.initializeApp() 4 | 5 | exports.sendNotification = functions.firestore 6 | .document('Groups/{groupId1}/{groupId2}/{message}') 7 | .onCreate((snap, context) => { 8 | console.log('----------------start function--------------------') 9 | 10 | const doc = snap.data() 11 | console.log(doc) 12 | 13 | const idFrom = doc.idFrom 14 | const idTo = doc.idTo 15 | const contentMessage = doc.text 16 | 17 | // Get push token user to (receive) 18 | admin 19 | .firestore() 20 | .collection('Users') 21 | .get() 22 | .then(querySnapshot => { 23 | querySnapshot.forEach(userTo => { 24 | console.log(`Found user to: ${userTo.data().username}`) 25 | if (userTo.data().pushToken) { 26 | // Get info user from (sent) 27 | const payload = { 28 | notification: { 29 | title: `You have a message from "${doc.username}"`, 30 | body: contentMessage, 31 | badge: '1', 32 | sound: 'default' 33 | } 34 | } 35 | // Let push to the target device 36 | admin 37 | .messaging() 38 | .sendToDevice(userTo.data().pushToken, payload) 39 | .then(response => { 40 | console.log('Successfully sent message:', response) 41 | }) 42 | .catch(error => { 43 | console.log('Error sending message:', error) 44 | }) 45 | } else { 46 | console.log('Can not find pushToken target user') 47 | } 48 | }) 49 | }) 50 | return null 51 | }) -------------------------------------------------------------------------------- /functions/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "functions", 3 | "description": "Cloud Functions for Firebase", 4 | "scripts": { 5 | "serve": "firebase serve --only functions", 6 | "shell": "firebase functions:shell", 7 | "start": "npm run shell", 8 | "deploy": "firebase deploy --only functions", 9 | "logs": "firebase functions:log" 10 | }, 11 | "engines": { 12 | "node": "8" 13 | }, 14 | "dependencies": { 15 | "firebase-admin": "^8.6.0", 16 | "firebase-functions": "^3.3.0" 17 | }, 18 | "devDependencies": { 19 | "firebase-functions-test": "^0.1.6" 20 | }, 21 | "private": true 22 | } 23 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 13 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 14 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 15 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 16 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 17 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; 18 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 19 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 20 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXCopyFilesBuildPhase section */ 24 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 25 | isa = PBXCopyFilesBuildPhase; 26 | buildActionMask = 2147483647; 27 | dstPath = ""; 28 | dstSubfolderSpec = 10; 29 | files = ( 30 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 31 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 32 | ); 33 | name = "Embed Frameworks"; 34 | runOnlyForDeploymentPostprocessing = 0; 35 | }; 36 | /* End PBXCopyFilesBuildPhase section */ 37 | 38 | /* Begin PBXFileReference section */ 39 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 40 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 41 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 42 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 43 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 44 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 45 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 46 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 47 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 48 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 49 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 51 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 52 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 53 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 54 | /* End PBXFileReference section */ 55 | 56 | /* Begin PBXFrameworksBuildPhase section */ 57 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 58 | isa = PBXFrameworksBuildPhase; 59 | buildActionMask = 2147483647; 60 | files = ( 61 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 62 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 63 | ); 64 | runOnlyForDeploymentPostprocessing = 0; 65 | }; 66 | /* End PBXFrameworksBuildPhase section */ 67 | 68 | /* Begin PBXGroup section */ 69 | 9740EEB11CF90186004384FC /* Flutter */ = { 70 | isa = PBXGroup; 71 | children = ( 72 | 3B80C3931E831B6300D905FE /* App.framework */, 73 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 74 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 75 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 76 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 77 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 78 | ); 79 | name = Flutter; 80 | sourceTree = ""; 81 | }; 82 | 97C146E51CF9000F007C117D = { 83 | isa = PBXGroup; 84 | children = ( 85 | 9740EEB11CF90186004384FC /* Flutter */, 86 | 97C146F01CF9000F007C117D /* Runner */, 87 | 97C146EF1CF9000F007C117D /* Products */, 88 | ); 89 | sourceTree = ""; 90 | }; 91 | 97C146EF1CF9000F007C117D /* Products */ = { 92 | isa = PBXGroup; 93 | children = ( 94 | 97C146EE1CF9000F007C117D /* Runner.app */, 95 | ); 96 | name = Products; 97 | sourceTree = ""; 98 | }; 99 | 97C146F01CF9000F007C117D /* Runner */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 103 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 104 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 105 | 97C147021CF9000F007C117D /* Info.plist */, 106 | 97C146F11CF9000F007C117D /* Supporting Files */, 107 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 108 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 109 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 110 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 111 | ); 112 | path = Runner; 113 | sourceTree = ""; 114 | }; 115 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | ); 119 | name = "Supporting Files"; 120 | sourceTree = ""; 121 | }; 122 | /* End PBXGroup section */ 123 | 124 | /* Begin PBXNativeTarget section */ 125 | 97C146ED1CF9000F007C117D /* Runner */ = { 126 | isa = PBXNativeTarget; 127 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 128 | buildPhases = ( 129 | 9740EEB61CF901F6004384FC /* Run Script */, 130 | 97C146EA1CF9000F007C117D /* Sources */, 131 | 97C146EB1CF9000F007C117D /* Frameworks */, 132 | 97C146EC1CF9000F007C117D /* Resources */, 133 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 134 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 135 | ); 136 | buildRules = ( 137 | ); 138 | dependencies = ( 139 | ); 140 | name = Runner; 141 | productName = Runner; 142 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 143 | productType = "com.apple.product-type.application"; 144 | }; 145 | /* End PBXNativeTarget section */ 146 | 147 | /* Begin PBXProject section */ 148 | 97C146E61CF9000F007C117D /* Project object */ = { 149 | isa = PBXProject; 150 | attributes = { 151 | LastUpgradeCheck = 1020; 152 | ORGANIZATIONNAME = "The Chromium Authors"; 153 | TargetAttributes = { 154 | 97C146ED1CF9000F007C117D = { 155 | CreatedOnToolsVersion = 7.3.1; 156 | LastSwiftMigration = 0910; 157 | }; 158 | }; 159 | }; 160 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 161 | compatibilityVersion = "Xcode 3.2"; 162 | developmentRegion = en; 163 | hasScannedForEncodings = 0; 164 | knownRegions = ( 165 | en, 166 | Base, 167 | ); 168 | mainGroup = 97C146E51CF9000F007C117D; 169 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 170 | projectDirPath = ""; 171 | projectRoot = ""; 172 | targets = ( 173 | 97C146ED1CF9000F007C117D /* Runner */, 174 | ); 175 | }; 176 | /* End PBXProject section */ 177 | 178 | /* Begin PBXResourcesBuildPhase section */ 179 | 97C146EC1CF9000F007C117D /* Resources */ = { 180 | isa = PBXResourcesBuildPhase; 181 | buildActionMask = 2147483647; 182 | files = ( 183 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 184 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 185 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, 186 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 187 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 188 | ); 189 | runOnlyForDeploymentPostprocessing = 0; 190 | }; 191 | /* End PBXResourcesBuildPhase section */ 192 | 193 | /* Begin PBXShellScriptBuildPhase section */ 194 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 195 | isa = PBXShellScriptBuildPhase; 196 | buildActionMask = 2147483647; 197 | files = ( 198 | ); 199 | inputPaths = ( 200 | ); 201 | name = "Thin Binary"; 202 | outputPaths = ( 203 | ); 204 | runOnlyForDeploymentPostprocessing = 0; 205 | shellPath = /bin/sh; 206 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 207 | }; 208 | 9740EEB61CF901F6004384FC /* Run Script */ = { 209 | isa = PBXShellScriptBuildPhase; 210 | buildActionMask = 2147483647; 211 | files = ( 212 | ); 213 | inputPaths = ( 214 | ); 215 | name = "Run Script"; 216 | outputPaths = ( 217 | ); 218 | runOnlyForDeploymentPostprocessing = 0; 219 | shellPath = /bin/sh; 220 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 221 | }; 222 | /* End PBXShellScriptBuildPhase section */ 223 | 224 | /* Begin PBXSourcesBuildPhase section */ 225 | 97C146EA1CF9000F007C117D /* Sources */ = { 226 | isa = PBXSourcesBuildPhase; 227 | buildActionMask = 2147483647; 228 | files = ( 229 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 230 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 231 | ); 232 | runOnlyForDeploymentPostprocessing = 0; 233 | }; 234 | /* End PBXSourcesBuildPhase section */ 235 | 236 | /* Begin PBXVariantGroup section */ 237 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 238 | isa = PBXVariantGroup; 239 | children = ( 240 | 97C146FB1CF9000F007C117D /* Base */, 241 | ); 242 | name = Main.storyboard; 243 | sourceTree = ""; 244 | }; 245 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 246 | isa = PBXVariantGroup; 247 | children = ( 248 | 97C147001CF9000F007C117D /* Base */, 249 | ); 250 | name = LaunchScreen.storyboard; 251 | sourceTree = ""; 252 | }; 253 | /* End PBXVariantGroup section */ 254 | 255 | /* Begin XCBuildConfiguration section */ 256 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 257 | isa = XCBuildConfiguration; 258 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 259 | buildSettings = { 260 | ALWAYS_SEARCH_USER_PATHS = NO; 261 | CLANG_ANALYZER_NONNULL = YES; 262 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 263 | CLANG_CXX_LIBRARY = "libc++"; 264 | CLANG_ENABLE_MODULES = YES; 265 | CLANG_ENABLE_OBJC_ARC = YES; 266 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 267 | CLANG_WARN_BOOL_CONVERSION = YES; 268 | CLANG_WARN_COMMA = YES; 269 | CLANG_WARN_CONSTANT_CONVERSION = YES; 270 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 271 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 272 | CLANG_WARN_EMPTY_BODY = YES; 273 | CLANG_WARN_ENUM_CONVERSION = YES; 274 | CLANG_WARN_INFINITE_RECURSION = YES; 275 | CLANG_WARN_INT_CONVERSION = YES; 276 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 277 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 278 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 279 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 280 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 281 | CLANG_WARN_STRICT_PROTOTYPES = YES; 282 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 283 | CLANG_WARN_UNREACHABLE_CODE = YES; 284 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 285 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 286 | COPY_PHASE_STRIP = NO; 287 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 288 | ENABLE_NS_ASSERTIONS = NO; 289 | ENABLE_STRICT_OBJC_MSGSEND = YES; 290 | GCC_C_LANGUAGE_STANDARD = gnu99; 291 | GCC_NO_COMMON_BLOCKS = YES; 292 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 293 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 294 | GCC_WARN_UNDECLARED_SELECTOR = YES; 295 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 296 | GCC_WARN_UNUSED_FUNCTION = YES; 297 | GCC_WARN_UNUSED_VARIABLE = YES; 298 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 299 | MTL_ENABLE_DEBUG_INFO = NO; 300 | SDKROOT = iphoneos; 301 | TARGETED_DEVICE_FAMILY = "1,2"; 302 | VALIDATE_PRODUCT = YES; 303 | }; 304 | name = Profile; 305 | }; 306 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 307 | isa = XCBuildConfiguration; 308 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 309 | buildSettings = { 310 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 311 | CLANG_ENABLE_MODULES = YES; 312 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 313 | ENABLE_BITCODE = NO; 314 | FRAMEWORK_SEARCH_PATHS = ( 315 | "$(inherited)", 316 | "$(PROJECT_DIR)/Flutter", 317 | ); 318 | INFOPLIST_FILE = Runner/Info.plist; 319 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 320 | LIBRARY_SEARCH_PATHS = ( 321 | "$(inherited)", 322 | "$(PROJECT_DIR)/Flutter", 323 | ); 324 | PRODUCT_BUNDLE_IDENTIFIER = com.example.videoChat; 325 | PRODUCT_NAME = "$(TARGET_NAME)"; 326 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 327 | SWIFT_VERSION = 4.0; 328 | VERSIONING_SYSTEM = "apple-generic"; 329 | }; 330 | name = Profile; 331 | }; 332 | 97C147031CF9000F007C117D /* Debug */ = { 333 | isa = XCBuildConfiguration; 334 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 335 | buildSettings = { 336 | ALWAYS_SEARCH_USER_PATHS = NO; 337 | CLANG_ANALYZER_NONNULL = YES; 338 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 339 | CLANG_CXX_LIBRARY = "libc++"; 340 | CLANG_ENABLE_MODULES = YES; 341 | CLANG_ENABLE_OBJC_ARC = YES; 342 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 343 | CLANG_WARN_BOOL_CONVERSION = YES; 344 | CLANG_WARN_COMMA = YES; 345 | CLANG_WARN_CONSTANT_CONVERSION = YES; 346 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 347 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 348 | CLANG_WARN_EMPTY_BODY = YES; 349 | CLANG_WARN_ENUM_CONVERSION = YES; 350 | CLANG_WARN_INFINITE_RECURSION = YES; 351 | CLANG_WARN_INT_CONVERSION = YES; 352 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 353 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 354 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 355 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 356 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 357 | CLANG_WARN_STRICT_PROTOTYPES = YES; 358 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 359 | CLANG_WARN_UNREACHABLE_CODE = YES; 360 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 361 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 362 | COPY_PHASE_STRIP = NO; 363 | DEBUG_INFORMATION_FORMAT = dwarf; 364 | ENABLE_STRICT_OBJC_MSGSEND = YES; 365 | ENABLE_TESTABILITY = YES; 366 | GCC_C_LANGUAGE_STANDARD = gnu99; 367 | GCC_DYNAMIC_NO_PIC = NO; 368 | GCC_NO_COMMON_BLOCKS = YES; 369 | GCC_OPTIMIZATION_LEVEL = 0; 370 | GCC_PREPROCESSOR_DEFINITIONS = ( 371 | "DEBUG=1", 372 | "$(inherited)", 373 | ); 374 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 375 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 376 | GCC_WARN_UNDECLARED_SELECTOR = YES; 377 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 378 | GCC_WARN_UNUSED_FUNCTION = YES; 379 | GCC_WARN_UNUSED_VARIABLE = YES; 380 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 381 | MTL_ENABLE_DEBUG_INFO = YES; 382 | ONLY_ACTIVE_ARCH = YES; 383 | SDKROOT = iphoneos; 384 | TARGETED_DEVICE_FAMILY = "1,2"; 385 | }; 386 | name = Debug; 387 | }; 388 | 97C147041CF9000F007C117D /* Release */ = { 389 | isa = XCBuildConfiguration; 390 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 391 | buildSettings = { 392 | ALWAYS_SEARCH_USER_PATHS = NO; 393 | CLANG_ANALYZER_NONNULL = YES; 394 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 395 | CLANG_CXX_LIBRARY = "libc++"; 396 | CLANG_ENABLE_MODULES = YES; 397 | CLANG_ENABLE_OBJC_ARC = YES; 398 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 399 | CLANG_WARN_BOOL_CONVERSION = YES; 400 | CLANG_WARN_COMMA = YES; 401 | CLANG_WARN_CONSTANT_CONVERSION = YES; 402 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 403 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 404 | CLANG_WARN_EMPTY_BODY = YES; 405 | CLANG_WARN_ENUM_CONVERSION = YES; 406 | CLANG_WARN_INFINITE_RECURSION = YES; 407 | CLANG_WARN_INT_CONVERSION = YES; 408 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 409 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 410 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 411 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 412 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 413 | CLANG_WARN_STRICT_PROTOTYPES = YES; 414 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 415 | CLANG_WARN_UNREACHABLE_CODE = YES; 416 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 417 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 418 | COPY_PHASE_STRIP = NO; 419 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 420 | ENABLE_NS_ASSERTIONS = NO; 421 | ENABLE_STRICT_OBJC_MSGSEND = YES; 422 | GCC_C_LANGUAGE_STANDARD = gnu99; 423 | GCC_NO_COMMON_BLOCKS = YES; 424 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 425 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 426 | GCC_WARN_UNDECLARED_SELECTOR = YES; 427 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 428 | GCC_WARN_UNUSED_FUNCTION = YES; 429 | GCC_WARN_UNUSED_VARIABLE = YES; 430 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 431 | MTL_ENABLE_DEBUG_INFO = NO; 432 | SDKROOT = iphoneos; 433 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 434 | TARGETED_DEVICE_FAMILY = "1,2"; 435 | VALIDATE_PRODUCT = YES; 436 | }; 437 | name = Release; 438 | }; 439 | 97C147061CF9000F007C117D /* Debug */ = { 440 | isa = XCBuildConfiguration; 441 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 442 | buildSettings = { 443 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 444 | CLANG_ENABLE_MODULES = YES; 445 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 446 | ENABLE_BITCODE = NO; 447 | FRAMEWORK_SEARCH_PATHS = ( 448 | "$(inherited)", 449 | "$(PROJECT_DIR)/Flutter", 450 | ); 451 | INFOPLIST_FILE = Runner/Info.plist; 452 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 453 | LIBRARY_SEARCH_PATHS = ( 454 | "$(inherited)", 455 | "$(PROJECT_DIR)/Flutter", 456 | ); 457 | PRODUCT_BUNDLE_IDENTIFIER = com.example.videoChat; 458 | PRODUCT_NAME = "$(TARGET_NAME)"; 459 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 460 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 461 | SWIFT_VERSION = 4.0; 462 | VERSIONING_SYSTEM = "apple-generic"; 463 | }; 464 | name = Debug; 465 | }; 466 | 97C147071CF9000F007C117D /* Release */ = { 467 | isa = XCBuildConfiguration; 468 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 469 | buildSettings = { 470 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 471 | CLANG_ENABLE_MODULES = YES; 472 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 473 | ENABLE_BITCODE = NO; 474 | FRAMEWORK_SEARCH_PATHS = ( 475 | "$(inherited)", 476 | "$(PROJECT_DIR)/Flutter", 477 | ); 478 | INFOPLIST_FILE = Runner/Info.plist; 479 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 480 | LIBRARY_SEARCH_PATHS = ( 481 | "$(inherited)", 482 | "$(PROJECT_DIR)/Flutter", 483 | ); 484 | PRODUCT_BUNDLE_IDENTIFIER = com.example.videoChat; 485 | PRODUCT_NAME = "$(TARGET_NAME)"; 486 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 487 | SWIFT_VERSION = 4.0; 488 | VERSIONING_SYSTEM = "apple-generic"; 489 | }; 490 | name = Release; 491 | }; 492 | /* End XCBuildConfiguration section */ 493 | 494 | /* Begin XCConfigurationList section */ 495 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 496 | isa = XCConfigurationList; 497 | buildConfigurations = ( 498 | 97C147031CF9000F007C117D /* Debug */, 499 | 97C147041CF9000F007C117D /* Release */, 500 | 249021D3217E4FDB00AE95B9 /* Profile */, 501 | ); 502 | defaultConfigurationIsVisible = 0; 503 | defaultConfigurationName = Release; 504 | }; 505 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 506 | isa = XCConfigurationList; 507 | buildConfigurations = ( 508 | 97C147061CF9000F007C117D /* Debug */, 509 | 97C147071CF9000F007C117D /* Release */, 510 | 249021D4217E4FDB00AE95B9 /* Profile */, 511 | ); 512 | defaultConfigurationIsVisible = 0; 513 | defaultConfigurationName = Release; 514 | }; 515 | /* End XCConfigurationList section */ 516 | 517 | }; 518 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 519 | } 520 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /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/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/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/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/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/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/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/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/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/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/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/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/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/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/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/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/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/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/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/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/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/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/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/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/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/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/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/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/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremy-friesen/flutter-video-chat/7d19b912f2158b9dc20516dc99925baa912884b3/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 | video_chat 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" -------------------------------------------------------------------------------- /lib/Auth/auth.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_auth/firebase_auth.dart'; 2 | import 'package:video_chat/Model/user.dart'; 3 | 4 | class AuthService{ 5 | 6 | final FirebaseAuth _auth = FirebaseAuth.instance; 7 | 8 | //creating a user object based on the firebase user class 9 | User userFromFirebaseUser(FirebaseUser user){ 10 | return user != null ? User(uid: user.uid, email: user.email) : null; 11 | } 12 | 13 | //Allowing us to see if the user is signed in or not 14 | Stream get user{ 15 | return _auth.onAuthStateChanged.map(userFromFirebaseUser); 16 | } 17 | 18 | //Sign in with email & password 19 | Future signInWithEmailAndPassword(String email, String password) async{ 20 | try{ 21 | AuthResult result = await _auth.signInWithEmailAndPassword(email: email, password: password); 22 | FirebaseUser user = result.user; 23 | return userFromFirebaseUser(user); 24 | }catch(e){ 25 | print(e.toString()); 26 | return null; 27 | } 28 | } 29 | //Register with email & password 30 | Future registerWithEmailAndPassword(String email, String password) async{ 31 | try{ 32 | AuthResult result = await _auth.createUserWithEmailAndPassword(email: email, password: password); 33 | FirebaseUser user = result.user; 34 | return userFromFirebaseUser(user); 35 | }catch(e){ 36 | print(e.toString()); 37 | return null; 38 | } 39 | } 40 | 41 | // sign out 42 | Future signOut() async{ 43 | try{ 44 | return await _auth.signOut(); 45 | }catch(e){ 46 | print(e.toString()); 47 | return null; 48 | } 49 | } 50 | } 51 | 52 | 53 | -------------------------------------------------------------------------------- /lib/Auth/login.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_i18n/flutter_i18n.dart'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:video_chat/Auth/auth.dart'; 5 | 6 | //LOGIN 7 | class Login extends StatefulWidget { 8 | static const String id = "LOGIN"; 9 | @override 10 | _LoginState createState() => _LoginState(); 11 | } 12 | 13 | class _LoginState extends State { 14 | //Getting the class from Services/auth.dart 15 | final AuthService _auth = AuthService(); 16 | //Getting a formkey for the validation section 17 | final _formKey = GlobalKey(); 18 | 19 | //Text field state 20 | String email = ''; 21 | String password = ''; 22 | String error = ''; 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | return Scaffold( 27 | backgroundColor: Colors.green[400], 28 | body: ListView( 29 | children:[ 30 | Padding( 31 | padding: EdgeInsets.only(top: 15.0, left: 10.0), 32 | child:Row( 33 | mainAxisAlignment: MainAxisAlignment.start, 34 | crossAxisAlignment: CrossAxisAlignment.start, 35 | children: [ 36 | IconButton( 37 | icon: Icon(Icons.arrow_back), 38 | color: Colors.white, 39 | iconSize: 30, 40 | onPressed: (){ 41 | Navigator.pop(context); 42 | }, 43 | ), 44 | Container( 45 | width: 300, 46 | padding: EdgeInsets.only(top: 5.5, left: 35.0), 47 | child: Text( 48 | FlutterI18n.translate(context, 'app.welcomeback'), 49 | style: TextStyle( 50 | color: Colors.white, 51 | fontFamily: 'Montserrat', 52 | fontSize: 25.0, 53 | ), 54 | ), 55 | ), 56 | ], 57 | ), 58 | ), 59 | SingleChildScrollView( 60 | child:Container( 61 | height: MediaQuery.of(context).size.height, 62 | decoration: BoxDecoration( 63 | color: Colors.white, 64 | borderRadius: BorderRadius.only(topLeft: Radius.circular(75.0)), 65 | ), 66 | padding: EdgeInsets.symmetric(vertical: 20.0, horizontal: 40.0), 67 | //Using the Form widget to create a validation for when the user inputs data 68 | child: Form( 69 | key: _formKey, 70 | child: Column( 71 | mainAxisAlignment: MainAxisAlignment.start, 72 | crossAxisAlignment: CrossAxisAlignment.center, 73 | children: [ 74 | //Size box to make a space between 75 | SizedBox(height: 10.0,), 76 | //The LOGO 77 | Hero( 78 | tag: 'logo', 79 | child: Container( 80 | width: 150.0, 81 | child: Image.asset("assets/images/huddleLogo.png") 82 | ), 83 | ), 84 | //USERNAME section 85 | SizedBox(height: 20.0,), 86 | Text( 87 | FlutterI18n.translate(context, 'app.email'), 88 | style: TextStyle( 89 | color: Color(0xff0E6D6A), 90 | fontFamily: 'IndieFlower', 91 | fontSize: 25.0, 92 | ), 93 | ), 94 | TextFormField( 95 | //The validation error where if the user types an empty string 96 | validator: (val) => val.isEmpty ? FlutterI18n.translate(context, 'app.enteranemail'): null, 97 | textAlign: TextAlign.center, 98 | onChanged: (val){ 99 | //Making the email variable be the value entered 100 | setState(() => email = val); 101 | }, 102 | ), 103 | //PASSWORD section 104 | SizedBox(height: 30.0), 105 | Text( 106 | FlutterI18n.translate(context, 'app.password'), 107 | style: TextStyle( 108 | color: Color(0xff0E6D6A), 109 | fontFamily: 'IndieFlower', 110 | fontSize: 25.0, 111 | ), 112 | ), 113 | TextFormField( 114 | //The validation error if the user types in a password with less than 8 characters 115 | validator: (val) => val.length < 3 ? FlutterI18n.translate(context, 'app.enterapassword'): null, 116 | textAlign: TextAlign.center, 117 | obscureText: true, 118 | onChanged: (val){ 119 | //making the password variable be the value entered 120 | setState(() => password = val); 121 | }, 122 | ), 123 | //SIGNING IN 124 | SizedBox(height: 50.0,), 125 | RaisedButton( 126 | color: Colors.green[700], 127 | child: Text( 128 | FlutterI18n.translate(context, 'app.login'), 129 | style: TextStyle( 130 | color: Colors.white, 131 | fontFamily: 'IndieFlower', 132 | fontSize: 20.0, 133 | ), 134 | ), 135 | //When the presses the button and sends the email information to the firebase auth 136 | onPressed: () async{ 137 | //This will check if the user has sent a valid email and password 138 | if (_formKey.currentState.validate()){ 139 | //Sending the information and checking if the information given is correct 140 | dynamic result = await _auth.signInWithEmailAndPassword(email, password); 141 | //If the infomration is wrong 142 | if(result == null){ 143 | setState(() => error = FlutterI18n.translate(context, 'app.emailpasswordincorrect')); 144 | } 145 | //Sending them to the main menu 146 | else{ 147 | Navigator.pop(context); 148 | //snack(context, FlutterI18n.translate(context, 'app.loginsuccessful')); 149 | } 150 | } 151 | }, 152 | ), 153 | //Making the space between the text and textfield 154 | SizedBox(height: 12.0,), 155 | //Giving the error from firebase to the bottom of the screen 156 | Text( 157 | error, 158 | style: TextStyle(color: Colors.red, fontFamily: 'IndieFlower'), 159 | ) 160 | ], 161 | ), 162 | ), 163 | ), 164 | ), 165 | ], 166 | ), 167 | ); 168 | } 169 | } 170 | -------------------------------------------------------------------------------- /lib/Auth/logsignin_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_i18n/flutter_i18n.dart'; 3 | import 'login.dart'; 4 | import 'register.dart'; 5 | 6 | //The main page of the sign it, this is where the user can either choose join or leave after 7 | class LogsignIn extends StatelessWidget { 8 | //This id is the "HOMESCREEN" of the applications 9 | static const String id = "HOMESCREEN"; 10 | @override 11 | Widget build(BuildContext context) { 12 | return Scaffold( 13 | backgroundColor: Colors.white, 14 | body:Center( 15 | //the widgets of the app, logo, text, and two buttons go in 16 | child: 17 | Stack( 18 | children: [ 19 | //For the image 20 | Container( 21 | height: MediaQuery.of(context).size.height, 22 | width: MediaQuery.of(context).size.width, 23 | decoration: BoxDecoration( 24 | image: new DecorationImage( 25 | image: AssetImage("assets/images/huddleBackground.png"), 26 | fit: BoxFit.cover, 27 | ), 28 | ), 29 | ), 30 | Center( 31 | child:Column( 32 | mainAxisAlignment: MainAxisAlignment.center, 33 | crossAxisAlignment: CrossAxisAlignment.center, 34 | children: [ 35 | Column( 36 | mainAxisAlignment: MainAxisAlignment.center, 37 | children: [ 38 | //Logo 39 | Hero( 40 | tag: 'logo', 41 | child: Container( 42 | width: 200.0, 43 | child: Image.asset("assets/images/huddleLogo.png") 44 | ), 45 | ), 46 | SizedBox(height: 40.0), 47 | ], 48 | ), 49 | //Seperates the space between the chat and the buttons 50 | SizedBox(height: 25.0), 51 | Text( 52 | FlutterI18n.translate(context, 'app.connectwithothers'), 53 | style: TextStyle( 54 | fontFamily: 'Montserrat', 55 | fontSize: 22.5, 56 | fontWeight: FontWeight.w900 57 | ), 58 | ), 59 | SizedBox(height: 25.0), 60 | //Navigates to the login page 61 | LogSigninButtons( 62 | text: FlutterI18n.translate(context, 'app.login'), 63 | callback: (){ 64 | Navigator.of(context).pushNamed(Login.id); 65 | }, 66 | ), 67 | 68 | SizedBox(height: 15.0), 69 | //Navigates to the register page 70 | LogSigninButtons( 71 | text: FlutterI18n.translate(context, 'app.register'), 72 | callback: (){ 73 | Navigator.of(context).pushNamed(Register.id); 74 | }, 75 | ), 76 | ], 77 | ), 78 | ), 79 | ], 80 | ), 81 | ), 82 | ); 83 | } 84 | } 85 | 86 | //Creating the button 87 | class LogSigninButtons extends StatelessWidget { 88 | 89 | final VoidCallback callback; 90 | final String text; 91 | 92 | const LogSigninButtons({Key key, this.callback, this.text}) : super(key: key); 93 | 94 | 95 | @override 96 | Widget build(BuildContext context) { 97 | //Using a container so you can use the padding 98 | return Container( 99 | padding: EdgeInsets.all(10), 100 | //Customizing the button for visual purposes 101 | child: Opacity( 102 | opacity: 0.8, 103 | child: Material( 104 | elevation: 6.0, 105 | borderRadius: BorderRadius.circular(30.0), 106 | color: Colors.white, 107 | child: MaterialButton( 108 | //The callback is the function where it navigates through each page 109 | onPressed: callback, 110 | minWidth: 200.0, 111 | height: 50.0, 112 | child: Text( 113 | text, 114 | style: TextStyle( 115 | fontFamily: 'Montserrat', 116 | fontSize: 22.5, 117 | fontWeight: FontWeight.w500 118 | ), 119 | ), 120 | ), 121 | ), 122 | ), 123 | ); 124 | } 125 | } 126 | 127 | -------------------------------------------------------------------------------- /lib/Auth/register.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_i18n/flutter_i18n.dart'; 2 | import 'package:video_chat/page_navigator.dart'; 3 | 4 | import 'package:flutter/material.dart'; 5 | import 'package:video_chat/Auth/auth.dart'; 6 | import 'package:flushbar/flushbar.dart'; 7 | 8 | // The Sign in and Register Widgets 9 | 10 | //REGISTER 11 | class Register extends StatefulWidget { 12 | static const String id = 'REGISTER'; 13 | @override 14 | _RegisterState createState() => _RegisterState(); 15 | } 16 | 17 | class _RegisterState extends State { 18 | //Getting the class AuthService from Services/auth.dart 19 | final AuthService _auth = AuthService(); 20 | //Creating a form key used in validation 21 | final _formKey = GlobalKey(); 22 | String email = ''; 23 | String password = ''; 24 | String error = ''; 25 | 26 | @override 27 | Widget build(BuildContext context) { 28 | return Scaffold( 29 | //Creating an AppBar so the user can go back to the main page 30 | backgroundColor: Colors.green[400], 31 | //Where all the widgets of the page is in 32 | body: ListView( 33 | children: [ 34 | Padding( 35 | padding: EdgeInsets.only(top: 15.0, left: 10.0), 36 | child:Row( 37 | mainAxisAlignment: MainAxisAlignment.start, 38 | crossAxisAlignment: CrossAxisAlignment.start, 39 | children: [ 40 | IconButton( 41 | icon: Icon(Icons.arrow_back), 42 | color: Colors.white, 43 | iconSize: 30, 44 | onPressed: (){ 45 | Navigator.pop(context); 46 | }, 47 | ), 48 | Container( 49 | width: 300, 50 | padding: EdgeInsets.only(top: 5.5, left: 70.0), 51 | child: Text( 52 | FlutterI18n.translate(context, 'app.joinus'), 53 | style: TextStyle( 54 | color: Colors.white, 55 | fontFamily: 'Montserrat', 56 | fontSize: 25.0, 57 | ), 58 | ), 59 | ), 60 | ], 61 | ), 62 | ), 63 | SingleChildScrollView( 64 | child: Container( 65 | height: MediaQuery.of(context).size.height, 66 | decoration: BoxDecoration( 67 | color: Colors.white, 68 | borderRadius: BorderRadius.only(topLeft: Radius.circular(75.0)), 69 | ), 70 | padding: EdgeInsets.symmetric(vertical: 20.0, horizontal: 40.0), 71 | //Creating a form where you can use validations (validations tell the user what is wrong with the information they are putting in) 72 | child: Form( 73 | key: _formKey, 74 | child: (Column( 75 | mainAxisAlignment: MainAxisAlignment.start, 76 | crossAxisAlignment: CrossAxisAlignment.center, 77 | children: [ 78 | SizedBox(height: 10.0,), 79 | //The LOGO 80 | Hero( 81 | tag: 'logo', 82 | child: Container( 83 | width: 150.0, 84 | child: Image.asset("assets/images/huddleLogo.png") 85 | ), 86 | ), 87 | //USERNAME section 88 | SizedBox(height: 20.0,), 89 | Text( 90 | FlutterI18n.translate(context, 'app.email'), 91 | style: TextStyle( 92 | color: Color(0xff0E6D6A), 93 | fontFamily: 'IndieFlower', 94 | fontSize: 25.0, 95 | ), 96 | ), 97 | TextFormField( 98 | //If the user does not put an email, the validation will tell them to enter an email 99 | validator: (val) => val.isEmpty ? FlutterI18n.translate(context, 'app.enteranemail'): null, 100 | onChanged: (val){ 101 | setState(() => email = val); 102 | }, 103 | ), 104 | //PASSWORD section 105 | SizedBox(height: 30.0,), 106 | Text( 107 | FlutterI18n.translate(context, 'app.password'), 108 | style: TextStyle( 109 | color: Color(0xff0E6D6A), 110 | fontFamily: 'IndieFlower', 111 | fontSize: 25.0, 112 | ), 113 | ), 114 | TextFormField( 115 | //If the user does not put a character with 8 or more characters it 116 | validator: (val) => val.length <= 3 ? FlutterI18n.translate(context, 'app.enterapassword'): null, 117 | obscureText: true, 118 | onChanged: (val){ 119 | setState(() => password = val); 120 | }, 121 | ), 122 | //REGISTERING IN 123 | SizedBox(height: 50.0,), 124 | RaisedButton( 125 | color: Colors.green[700], 126 | child: Text( 127 | FlutterI18n.translate(context, 'app.register'), 128 | style: TextStyle( 129 | color: Colors.white, 130 | fontFamily: 'IndieFlower', 131 | fontSize: 20.0, 132 | ), 133 | ), 134 | onPressed: () async{ 135 | //Sending it to firebase so you can check with the system if the email and password is valid 136 | if (_formKey.currentState.validate()){ 137 | //getting the results from firebase auth 138 | dynamic result = await _auth.registerWithEmailAndPassword(email, password); 139 | if(result == null){ 140 | //If the email is not valid 141 | setState(() => error = FlutterI18n.translate(context, 'app.pleaseenteravalidemail')); 142 | } 143 | //Sending them to the main menu of the chat 144 | else{ 145 | Navigator.pop(context); 146 | showSimpleFlushBar(context, FlutterI18n.translate(context, 'app.succesfullyregisteredanaccount')); 147 | // experimental: 148 | Navigator.push( 149 | context, 150 | MaterialPageRoute( 151 | builder: (context) => PageNavigator(), 152 | ), 153 | ); 154 | } 155 | } 156 | }, 157 | ), 158 | //Returning the error from firebase in text form 159 | SizedBox(height: 12.0,), 160 | Text( 161 | error, 162 | style: TextStyle(color: Colors.red, fontFamily: 'IndieFlower'), 163 | ) 164 | ], 165 | )), 166 | ), 167 | ), 168 | ), 169 | ], 170 | ), 171 | ); 172 | } 173 | //Simple flushbar 174 | void showSimpleFlushBar(BuildContext context, String message){ 175 | Flushbar( 176 | message: message, 177 | duration: Duration(seconds: 3), 178 | backgroundColor: Colors.green, 179 | )..show(context); 180 | } 181 | 182 | } -------------------------------------------------------------------------------- /lib/GeoLocation/geolocation.dart: -------------------------------------------------------------------------------- 1 | import 'package:geolocator/geolocator.dart'; 2 | 3 | String sayLocation(){ 4 | var location = Geolocator(); 5 | var message = ''; 6 | 7 | location.getCurrentPosition( 8 | desiredAccuracy: LocationAccuracy.best, 9 | ).then((Position userLocation){ 10 | 11 | location.placemarkFromCoordinates( 12 | userLocation.latitude, 13 | userLocation.longitude, 14 | ).then((List places) { 15 | print('Reverse geocoding results: '); 16 | for (Placemark place in places){ 17 | message = ('\t${place.name},${place.subThoroughfare},${place.thoroughfare},${place.locality}, ${place.subAdministrativeArea}'); 18 | } 19 | }); 20 | }); 21 | 22 | return message; 23 | } 24 | -------------------------------------------------------------------------------- /lib/GeoLocation/getLocation.dart: -------------------------------------------------------------------------------- 1 | import 'package:geolocator/geolocator.dart'; 2 | import 'package:latlong/latlong.dart'; 3 | 4 | import 'dart:async'; 5 | import 'maps.dart'; 6 | 7 | Future getLocation() async{ 8 | var geolocator = Geolocator(); 9 | Position currentLocation; 10 | 11 | try{ 12 | currentLocation = await geolocator.getCurrentPosition( 13 | desiredAccuracy: LocationAccuracy.best, 14 | ); 15 | } catch (e) { 16 | currentLocation = null; 17 | } 18 | 19 | mapcontroller.move(LatLng(currentLocation.latitude, currentLocation.longitude), 16.0); 20 | 21 | print('in _getLocation'); 22 | print('lat: ${currentLocation.latitude} long: ${currentLocation.longitude} '); 23 | 24 | return currentLocation; 25 | } -------------------------------------------------------------------------------- /lib/GeoLocation/maps.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/cupertino.dart'; 3 | import 'package:flutter_i18n/flutter_i18n.dart'; 4 | 5 | import 'package:flutter_map/flutter_map.dart'; 6 | import 'package:latlong/latlong.dart'; 7 | 8 | import 'package:geolocator/geolocator.dart'; 9 | 10 | import 'getLocation.dart'; 11 | 12 | class MapsPage extends StatefulWidget { 13 | @override 14 | Maps createState() => Maps(); 15 | } 16 | 17 | MapController mapcontroller = MapController(); 18 | 19 | List _markers = []; 20 | 21 | class Maps extends State { 22 | Position user; 23 | LatLng loc; 24 | 25 | @override 26 | Widget build(BuildContext context) { 27 | double lat = 0.0; 28 | double long = 0.0; 29 | 30 | getLocation().then((position){ 31 | user = position; 32 | setMarkers(user); 33 | }); 34 | 35 | if (user == null){ 36 | lat = 28.374139; 37 | long = -81.549396; 38 | } 39 | else{ 40 | lat = user.latitude; 41 | long = user.longitude; 42 | } 43 | 44 | loc = LatLng(lat, long); 45 | 46 | return Scaffold( 47 | appBar: AppBar( 48 | title: Text(FlutterI18n.translate(context, 'app.maps')), 49 | backgroundColor: Colors.green, 50 | ), 51 | body: FlutterMap ( 52 | mapController: mapcontroller, 53 | 54 | options: MapOptions( 55 | minZoom: 16.0, 56 | center: loc, 57 | ), 58 | layers: [ 59 | TileLayerOptions( 60 | // for OpenStreetMaps: 61 | urlTemplate: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', 62 | subdomains: ['a', 'b', 'c'], 63 | ), 64 | MarkerLayerOptions( 65 | markers: _markers, 66 | ), 67 | ], 68 | ), 69 | ); 70 | } 71 | 72 | void setMarkers(pos){ 73 | LatLng point = LatLng(pos.latitude, pos.longitude); 74 | 75 | List markers = [ 76 | Marker( 77 | width: 45.0, 78 | height: 45.0, 79 | point: point, 80 | builder: (context) => Container( 81 | child: IconButton( 82 | icon: Icon(Icons.location_on), 83 | color: Colors.blue, 84 | iconSize: 45.0, 85 | onPressed: () {}, 86 | ), 87 | ), 88 | ), 89 | ]; 90 | 91 | setState(() { 92 | _markers.clear(); 93 | _markers = markers; 94 | }); 95 | } 96 | } 97 | 98 | -------------------------------------------------------------------------------- /lib/Model/group_model.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:cloud_firestore/cloud_firestore.dart'; 4 | 5 | class GroupModel { 6 | final databaseReference = Firestore.instance; 7 | 8 | Future insertGroup(Group group) async { 9 | await databaseReference.collection("Groups") 10 | .document(group.groupId).setData(group.toMap()); 11 | } 12 | 13 | Future updateGroupName(Group group) async { 14 | await databaseReference.collection('Groups').document(group.groupId).updateData({ 15 | "Name":group.groupName, 16 | }); 17 | return 1; 18 | } 19 | 20 | Future deleteTodo(String sid) async { 21 | try{ 22 | databaseReference.collection('Groups') 23 | .document(sid).delete(); 24 | }catch(e){ 25 | print(e); 26 | } 27 | return 0; 28 | } 29 | 30 | void getAllGroups() { 31 | databaseReference.collection('Groups') 32 | .getDocuments().then((QuerySnapshot snapshot){ 33 | snapshot.documents.forEach((f)=> print('{f.data}')); 34 | }); 35 | } 36 | } 37 | 38 | class Group{ 39 | String groupId; 40 | //final String groupIconPath; 41 | String groupName; 42 | //var lastMessageTime; 43 | List memberIDs; 44 | 45 | DocumentReference documentReference; 46 | 47 | Group({this.groupId, this.groupName, this.memberIDs}); 48 | 49 | Group.fromMap(Map map,{this.documentReference}) { 50 | this.groupId = map['id']; 51 | this.groupName = map['name']; 52 | this.memberIDs = map['member_ids']; 53 | } 54 | 55 | Map toMap() { 56 | return { 57 | 'id': this.groupId, 58 | 'name': this.groupName, 59 | 'member_ids': this.memberIDs, 60 | }; 61 | } 62 | } -------------------------------------------------------------------------------- /lib/Model/message_model.dart: -------------------------------------------------------------------------------- 1 | class Message { 2 | //final Group group; 3 | //final User sender; 4 | final String text; 5 | final bool isReacted; 6 | var lastMessageTime; 7 | 8 | Message({this.text, this.isReacted, this.lastMessageTime}); 9 | 10 | } -------------------------------------------------------------------------------- /lib/Model/user.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:intl/intl.dart'; 3 | 4 | class User{ 5 | String email; 6 | final String uid; 7 | String userName; 8 | String picture; 9 | 10 | //This is to check if the user has its unique user name from firebase 11 | User({this.uid, this.email, this.userName, this.picture}); 12 | } 13 | 14 | String formatTimeOfDay(TimeOfDay tod) { 15 | final now = new DateTime.now(); 16 | final dt = DateTime(now.year, now.month, now.day, tod.hour, tod.minute); 17 | final format = DateFormat.jm(); //"6:00 AM" 18 | return format.format(dt); 19 | } 20 | 21 | class UserModel { 22 | final int id; 23 | final String iconPath; 24 | final String userName; 25 | 26 | UserModel({this.id, this.iconPath, this.userName}); 27 | } -------------------------------------------------------------------------------- /lib/Notification/notification.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_local_notifications/flutter_local_notifications.dart'; 2 | 3 | class Notifications { 4 | final channelId = 'testNotifications'; 5 | final channelName = 'Test Notifications'; 6 | final channelDescription = 'Test Notification Channel'; 7 | 8 | var _flutterLocalNotificationsPlugin = new FlutterLocalNotificationsPlugin(); 9 | NotificationDetails _platformChannelInfo; 10 | var notificationId = 100; 11 | 12 | void init() { 13 | var initializationSettingsAndroid = new AndroidInitializationSettings('mipmap/ic_launcher'); 14 | var initializationSettingsIOS = new IOSInitializationSettings( 15 | onDidReceiveLocalNotification: (int id, String title, String body, String payload) { return null; } 16 | ); 17 | var initializationSettings = new InitializationSettings( 18 | initializationSettingsAndroid, 19 | initializationSettingsIOS 20 | ); 21 | _flutterLocalNotificationsPlugin.initialize( 22 | initializationSettings, 23 | onSelectNotification: onSelectNotification 24 | ); 25 | 26 | // setup a channel for notifications 27 | var androidPlatformChannelInfo = AndroidNotificationDetails( 28 | channelId, 29 | channelName, 30 | channelDescription, 31 | importance: Importance.Max, 32 | priority: Priority.High, 33 | ticker: 'ticker'); 34 | 35 | var iOSPlatformChannelInfo = IOSNotificationDetails(); 36 | _platformChannelInfo = NotificationDetails( 37 | androidPlatformChannelInfo, 38 | iOSPlatformChannelInfo 39 | ); 40 | 41 | } 42 | 43 | Future onSelectNotification(var payload) async { 44 | if (payload != null) { 45 | print('notificationSelected: payload=$payload.'); 46 | } 47 | } 48 | 49 | Future sendNotificationNow(String title, String body, String payload) async { 50 | _flutterLocalNotificationsPlugin.show( 51 | notificationId++, 52 | title, 53 | body, 54 | _platformChannelInfo, 55 | payload: payload 56 | ); 57 | } 58 | 59 | Future> getPendingNotificationRequests() async { 60 | return _flutterLocalNotificationsPlugin.pendingNotificationRequests(); 61 | } 62 | } -------------------------------------------------------------------------------- /lib/SQFLITEMODEL/db_utils.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'package:sqflite/sqflite.dart'; 3 | import 'package:path/path.dart' as path; 4 | 5 | //Just used for sqflite 6 | 7 | class DBUtils{ 8 | static Future init() async { 9 | return openDatabase( 10 | path.join(await getDatabasesPath(), 'user_items.db'), 11 | onCreate: (db, version) { 12 | if (version > 1) { 13 | // downgrade path 14 | } 15 | db.execute('CREATE TABLE user_items(id INTEGER PRIMARY KEY, userName TEXT, email TEXT, age INT)'); 16 | }, 17 | version: 1, 18 | ); 19 | } 20 | } -------------------------------------------------------------------------------- /lib/SQFLITEMODEL/user_SQFLITE.dart: -------------------------------------------------------------------------------- 1 | class User{ 2 | //Creating the variables first 3 | int userName; 4 | int email; 5 | String age; 6 | 7 | //Making a Constructor 8 | User({ 9 | this.userName, 10 | this.email, 11 | this.age, 12 | }); 13 | 14 | User.fromMap(Map map){ 15 | this.userName = map['userName']; 16 | this.email = map['email']; 17 | this.age = map['age']; 18 | } 19 | 20 | //Putting these elements to a map 21 | Map toMap(){ 22 | return{ 23 | 'id': this.userName, 24 | 'sid': this.email, 25 | 'grades' : this.age, 26 | }; 27 | } 28 | 29 | //Overriding the toString function 30 | @override 31 | String toString(){ 32 | return 'Grades{id: $userName, sid: $email, grades: $age}'; 33 | } 34 | 35 | }// Grade -------------------------------------------------------------------------------- /lib/SQFLITEMODEL/users_model.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'package:sqflite/sqflite.dart'; 3 | import 'db_utils.dart'; 4 | import 'user_SQFLITE.dart'; 5 | //import 'package:lab045/grades.dart'; 6 | 7 | class GradesModel { 8 | //For Inserting into the database 9 | Future insertUsers(User users) async { 10 | final db = await DBUtils.init(); 11 | return await db.insert( 12 | 'user_items', 13 | users.toMap(), 14 | conflictAlgorithm: ConflictAlgorithm.replace, 15 | ); 16 | } 17 | 18 | //For updating Grades in the database 19 | Future updateUsers(User users) async { 20 | final db = await DBUtils.init(); 21 | return await db.update('user_items', users.toMap(), 22 | where: 'userName = ?', whereArgs: [users.userName]); 23 | } 24 | 25 | //For deleteing A student in the databse 26 | Future deleteUsers(int id) async { 27 | final db = await DBUtils.init(); 28 | return await db.delete( 29 | 'user_items', 30 | where: 'userName = ?', 31 | whereArgs: [id], 32 | ); 33 | } 34 | 35 | //Getting all the grades 36 | Future> getAllUsers() async { 37 | final db = await DBUtils.init(); 38 | List> maps = await db.query('user_items'); 39 | List users = []; 40 | for (int x = 0; x < maps.length; x++) { 41 | users.add(User.fromMap(maps[x])); 42 | } 43 | return users; 44 | } 45 | 46 | //Getting a certain student 47 | Future getUsersWithId(int id) async { 48 | final db = await DBUtils.init(); 49 | List> maps = await db.query( 50 | 'user_items', 51 | where: 'id = ?', 52 | whereArgs: [id], 53 | ); 54 | if (maps.length > 0) { 55 | return User.fromMap(maps[0]); 56 | } else { 57 | return null; 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /lib/charts.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:charts_flutter/flutter.dart' as charts; 3 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 4 | 5 | class Chart extends StatefulWidget { 6 | @override 7 | _ChartState createState() => _ChartState(); 8 | } 9 | 10 | class _ChartState extends State { 11 | 12 | List> _seriesPieData; 13 | _generateData(){ 14 | var pieData = [ 15 | new Task(task: 'Tam', taskvalue: 25, colorval: Colors.green), 16 | new Task(task: 'Spencer', taskvalue: 25, colorval: Colors.blue), 17 | new Task(task: 'Harry', taskvalue: 25, colorval: Colors.red), 18 | new Task(task: 'Jeremy', taskvalue: 25, colorval: Colors.purple), 19 | ]; 20 | 21 | _seriesPieData.add( 22 | charts.Series( 23 | data: pieData, 24 | domainFn: (Task task,_)=> task.task, 25 | measureFn: (Task task,_)=> task.taskvalue, 26 | id: "Work Spilted on App", 27 | labelAccessorFn: (Task row,_)=>'${row.taskvalue}', 28 | ) 29 | ); 30 | } 31 | 32 | @override 33 | void initState() { 34 | super.initState(); 35 | _seriesPieData = List>(); 36 | _generateData(); 37 | } 38 | 39 | @override 40 | Widget build(BuildContext context) { 41 | return MaterialApp( 42 | home: DefaultTabController( 43 | length: 1, 44 | child: Scaffold( 45 | appBar: AppBar( 46 | backgroundColor: Colors.green, 47 | bottom: TabBar( 48 | tabs: [Tab(icon: Icon(FontAwesomeIcons.chartPie))], 49 | ), 50 | title: Text('Chat Anayltics'), 51 | ), 52 | body: TabBarView( 53 | children: [ 54 | Padding( 55 | padding: EdgeInsets.all(8.0), 56 | child: Container( 57 | child: Center( 58 | child: Column( 59 | children: [ 60 | Text('Time spent on the project', style: TextStyle(fontSize: 20.0,fontWeight: FontWeight.bold)), 61 | SizedBox(height: 10.0,), 62 | Expanded( 63 | child: charts.PieChart( 64 | _seriesPieData, 65 | animate: true, 66 | animationDuration: Duration(seconds: 3), 67 | behaviors: [ 68 | new charts.DatumLegend( 69 | outsideJustification: charts.OutsideJustification.endDrawArea, 70 | horizontalFirst: false, 71 | desiredMaxRows: 2, 72 | cellPadding: new EdgeInsets.only(right: 4.0, bottom: 4.0), 73 | entryTextStyle: charts.TextStyleSpec( 74 | color: charts.MaterialPalette.green.shadeDefault, 75 | fontFamily: 'Georgia', 76 | fontSize: 12 77 | ), 78 | ) 79 | ], 80 | defaultRenderer: new charts.ArcRendererConfig( 81 | arcWidth: 100, 82 | arcRendererDecorators: [ 83 | new charts.ArcLabelDecorator(labelPosition: charts.ArcLabelPosition.inside) 84 | ] 85 | ) 86 | ), 87 | ), 88 | ], 89 | ), 90 | ), 91 | ), 92 | ), 93 | ], 94 | ), 95 | floatingActionButton: FloatingActionButton( 96 | onPressed:(){ 97 | Navigator.pop(context); 98 | }, 99 | child: Icon(Icons.arrow_back), 100 | ), 101 | ), 102 | ), 103 | ); 104 | } 105 | } 106 | 107 | 108 | class Task{ 109 | String task; 110 | double taskvalue; 111 | MaterialColor colorval; 112 | 113 | Task({this.task, this.taskvalue, this.colorval}); 114 | } -------------------------------------------------------------------------------- /lib/chat_page.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:convert'; 3 | import 'dart:io'; 4 | 5 | import 'package:flutter/material.dart'; 6 | import 'package:flutter_i18n/flutter_i18n.dart'; 7 | import 'package:provider/provider.dart'; 8 | import 'package:video_chat/Auth/auth.dart'; 9 | import 'messageui.dart'; 10 | import 'package:cloud_firestore/cloud_firestore.dart'; 11 | import 'Model/user.dart'; 12 | import 'package:flushbar/flushbar.dart'; 13 | import 'package:firebase_messaging/firebase_messaging.dart'; 14 | import 'package:flutter_local_notifications/flutter_local_notifications.dart'; 15 | import 'page_navigator.dart'; 16 | import 'package:fluttertoast/fluttertoast.dart'; 17 | import 'package:date_format/date_format.dart'; 18 | 19 | class ChatPage extends StatefulWidget { 20 | String groupId; 21 | final User user; 22 | PageNavigatorState pageNavigatorState; 23 | String groupName; 24 | 25 | ChatPage({this.groupId, this.user, this.pageNavigatorState, this.groupName}); 26 | 27 | @override 28 | _ChatPageState createState() => _ChatPageState(); 29 | } 30 | 31 | class _ChatPageState extends State with AutomaticKeepAliveClientMixin{ 32 | //Going to be used for firebase 33 | final FirebaseMessaging firebaseMessaging = FirebaseMessaging(); 34 | final FlutterLocalNotificationsPlugin _flutterLocalNotificationsPlugin = new FlutterLocalNotificationsPlugin(); 35 | 36 | //Google services 37 | final Firestore _firestore = Firestore.instance; 38 | final AuthService _auth = AuthService(); 39 | @override 40 | bool get wantKeepAlive => true; 41 | //Init statment to setup the notifiactions 42 | void initState(){ 43 | super.initState(); 44 | registerNotification(); 45 | configLocalNotification(); 46 | } 47 | 48 | /*Notificiations ---------------------------------------------------- */ 49 | 50 | void registerNotification() { 51 | firebaseMessaging.requestNotificationPermissions(); 52 | firebaseMessaging.configure(onMessage: (Map message) { 53 | print('onMessage: $message'); 54 | showNotification(message['notification']); 55 | return; 56 | }, onResume: (Map message) { 57 | print('onResume: $message'); 58 | return; 59 | }, onLaunch: (Map message) { 60 | print('onLaunch: $message'); 61 | return; 62 | }); 63 | 64 | 65 | firebaseMessaging.getToken().then((token){ 66 | print('token: $token'); 67 | Firestore.instance.collection('Users').document(widget.user.uid).updateData({'pushToken': token}); 68 | }).catchError((err) { 69 | Fluttertoast.showToast(msg: err.message.toString()); 70 | }); 71 | } 72 | 73 | //For Local Notifications 74 | void configLocalNotification() { 75 | var initializationSettingsAndroid = new AndroidInitializationSettings('mipmap/ic_launcher'); 76 | var initializationSettingsIOS = new IOSInitializationSettings(); 77 | var initializationSettings = new InitializationSettings(initializationSettingsAndroid, initializationSettingsIOS); 78 | _flutterLocalNotificationsPlugin.initialize(initializationSettings); 79 | } 80 | 81 | //Displaying the notification 82 | void showNotification(message) async { 83 | var androidPlatformChannelSpecifics = new AndroidNotificationDetails( 84 | 'com.example.video_chat', 85 | 'Flutter chat demo', 86 | 'your channel description', 87 | playSound: true, 88 | enableVibration: true, 89 | importance: Importance.Max, 90 | priority: Priority.High, 91 | ); 92 | var iOSPlatformChannelSpecifics = new IOSNotificationDetails(); 93 | var platformChannelSpecifics = 94 | new NotificationDetails(androidPlatformChannelSpecifics, iOSPlatformChannelSpecifics); 95 | await _flutterLocalNotificationsPlugin.show( 96 | 0, message['title'].toString(), message['body'].toString(), platformChannelSpecifics, 97 | payload: json.encode(message)); 98 | } 99 | 100 | /*Notificiations End---------------------------------------------------- */ 101 | 102 | @override 103 | TextEditingController messageController = TextEditingController(); 104 | ScrollController scrollController = ScrollController(); 105 | 106 | Future callback() async { 107 | String text = messageController.text; 108 | if (text.length > 0) { 109 | await _firestore.collection('Groups').document(widget.groupId).collection("messages").add({ 110 | 'text': text, 111 | 'email': widget.user.email, 112 | 'date': DateTime.now().toIso8601String().toString(), 113 | 'from': widget.user.email, 114 | 'uid': widget.user.uid, 115 | 'username': widget.user.userName, 116 | 'picture': widget.user.picture, 117 | }); 118 | messageController.clear(); 119 | scrollController.animateTo( 120 | scrollController.position.minScrollExtent, 121 | curve: Curves.easeOut, 122 | duration: const Duration(milliseconds: 300), 123 | ); 124 | } 125 | _updateGroupPageText(widget.groupId, widget.user.userName, text, formatDate(DateTime.now(),[yy,'-',M,'-',d,'-',hh,":",nn,am]).toString()); 126 | } 127 | 128 | _updateGroupPageText(String groupid, String lastUser, String lastMessage, String time){ 129 | if(lastMessage.length > 20){ 130 | lastMessage = lastMessage.substring(0, 20)+ "..."; 131 | } 132 | Firestore.instance.collection('Groups').document(groupid).updateData({ 133 | 'lastUser': lastUser, 134 | 'time':time, 135 | 'lastMessage':lastMessage}); 136 | } 137 | 138 | DocumentReference getGroup(){ 139 | return _firestore.collection('Groups').document(widget.groupId); 140 | } 141 | 142 | Widget build(BuildContext context) { 143 | User user = Provider.of(context); 144 | 145 | return Scaffold( 146 | appBar: AppBar( 147 | backgroundColor: Colors.green[400], 148 | title: Text( 149 | widget.groupName != null ? widget.groupName : "Chat", 150 | style: TextStyle(color: Colors.white,) 151 | ), 152 | actions: [ 153 | IconButton( 154 | icon: Icon(Icons.video_call, color: Colors.white,), 155 | onPressed: (){ 156 | widget.pageNavigatorState.setPage(2); 157 | }, 158 | iconSize: 35.0, 159 | ), 160 | ], 161 | ), 162 | body: Container( 163 | child: (){ 164 | if(widget.groupId == null){ 165 | return Center(child: Text(FlutterI18n.translate(context, 'app.selectgroup'),textAlign: TextAlign.center,),); 166 | }else { 167 | return Column( 168 | children: [ 169 | Expanded( 170 | child: StreamBuilder( 171 | stream: _firestore.collection('Groups').document(widget.groupId).collection("messages").orderBy('date').snapshots(), 172 | builder: (context, snapshot) { 173 | if (!snapshot.hasData){ 174 | return Center( 175 | child: CircularProgressIndicator(), 176 | ); 177 | } 178 | List docs = snapshot.data.documents; 179 | 180 | List messages = docs.map( 181 | (doc) { 182 | print(doc.data['uid']); 183 | if(doc.data['uid'] == null){ 184 | return MessageUI( 185 | user: doc.data['from'], 186 | text: doc.data['text'], 187 | picture: null, 188 | date: doc.data['date'], 189 | isMe: user.email == doc.data['email'], 190 | ); 191 | } 192 | return MessageUI( 193 | text: doc.data['text'], 194 | user: doc.data['username'] != null ? doc.data['username'] : "noUsername", 195 | picture: doc.data['picture'], 196 | date: doc.data['date'], 197 | isMe: user.email == doc.data['email'], 198 | ); 199 | }).toList(); 200 | 201 | return ListView( 202 | controller: scrollController, 203 | children: messages.reversed.toList(), 204 | reverse: true, 205 | ); 206 | } 207 | ) 208 | ), 209 | Container( 210 | padding: EdgeInsets.fromLTRB(10.0,0.0,10.0,10.0), 211 | child:Container( 212 | padding: EdgeInsets.fromLTRB(10.0,0.0,0.0,0.0), 213 | decoration: BoxDecoration( 214 | color: Colors.white, 215 | border: Border(), 216 | boxShadow: [BoxShadow(blurRadius: 1.0)] 217 | ), 218 | child: Row( 219 | children: [ 220 | Flexible( 221 | child: TextField( 222 | controller: messageController, 223 | onSubmitted: (value) => callback(), 224 | decoration: InputDecoration( 225 | border: InputBorder.none, 226 | hintText: FlutterI18n.translate(context, 'app.writeamessage') 227 | ), 228 | ), 229 | ), 230 | FlatButton( 231 | padding: EdgeInsets.all(0), 232 | onPressed: callback, 233 | child: Icon(Icons.send, color: Colors.blue,), 234 | clipBehavior: Clip.none, 235 | ) 236 | ], 237 | ), 238 | ), 239 | ), 240 | ], 241 | ); 242 | } 243 | }(), 244 | ), 245 | ); 246 | 247 | } 248 | //Simple flushbar 249 | void showSimpleFlushBar(BuildContext context, String message){ 250 | Flushbar( 251 | message: message, 252 | duration: Duration(seconds: 3), 253 | backgroundColor: Colors.green, 254 | )..show(context); 255 | 256 | } 257 | 258 | void refresh(){ 259 | sleep(const Duration(seconds: 1)); 260 | setState(() {}); 261 | } 262 | 263 | /*Future getName(String email) async { 264 | //if(_firestore.collection('Users').) 265 | //print('email ' + doc.data['email'] + 'is not in the database'); 266 | //return 'email = ' + doc.data['email']; 267 | var userQuery = _firestore.collection('Users').where('email', isEqualTo: email).limit(1); 268 | return userQuery.getDocuments().then((data){ 269 | if (data.documents.length > 0 && data.documents[0].data['username'] != null){ 270 | return data.documents[0].data['username']; 271 | } else{ 272 | return 'username == null'; 273 | } 274 | }); 275 | //return doc.data['from']; 276 | }*/ 277 | } -------------------------------------------------------------------------------- /lib/groups_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:video_chat/page_navigator.dart'; 4 | import 'package:video_chat/GeoLocation/geolocation.dart'; 5 | import 'package:flushbar/flushbar.dart'; 6 | import 'package:video_chat/charts.dart'; 7 | import 'Auth/auth.dart'; 8 | import 'GeoLocation/maps.dart'; 9 | import 'i18n/i18n.dart'; 10 | 11 | import 'package:flutter_i18n/flutter_i18n.dart'; 12 | 13 | class GroupsPage extends StatefulWidget { 14 | final PageNavigatorState pageNavigatorState; 15 | 16 | GroupsPage(this.pageNavigatorState); 17 | 18 | @override 19 | _GroupsPageState createState() => _GroupsPageState(); 20 | } 21 | 22 | class _GroupsPageState extends State with AutomaticKeepAliveClientMixin{ 23 | 24 | @override 25 | bool get wantKeepAlive => true; 26 | 27 | Firestore _firestore = Firestore.instance; 28 | var newGroupName = ""; 29 | 30 | final AuthService _auth = AuthService(); 31 | 32 | @override 33 | Widget build(BuildContext context) { 34 | return Scaffold( 35 | appBar: AppBar( 36 | iconTheme: IconThemeData(color: Colors.white), 37 | backgroundColor: Colors.green[400], 38 | centerTitle: true, 39 | title: Text( 40 | FlutterI18n.translate(context, 'app.groups'), 41 | style: TextStyle( 42 | fontSize: 30, 43 | fontWeight: FontWeight.bold, 44 | color: Colors.white, 45 | ), 46 | ), 47 | elevation: 5.0, 48 | actions: [ 49 | IconButton( 50 | icon: Icon(Icons.add), 51 | iconSize: 30.0, 52 | color: Colors.white, 53 | onPressed: () { 54 | showDialog( 55 | context: context, 56 | builder: (_) => AlertDialog( 57 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(10))), 58 | elevation: 24.0, 59 | title: Text(FlutterI18n.translate(context, 'app.newgroup'), style: TextStyle(color: Colors.lightBlue),), 60 | content: TextField( 61 | decoration: InputDecoration( 62 | border: InputBorder.none, 63 | hintText: FlutterI18n.translate(context, 'app.groupname'), 64 | ), 65 | onChanged: (value){ 66 | newGroupName = value; 67 | }, 68 | ), 69 | 70 | actions: [ 71 | FlatButton( 72 | child: Text(FlutterI18n.translate(context, 'app.creategroup')), // newgroup in i18n 73 | onPressed: (){ 74 | _firestore.collection("Groups").add({ 75 | 'groupName': newGroupName, 76 | 'picture': '', 77 | }); 78 | Navigator.of(context, rootNavigator: true).pop('dialog'); 79 | }, 80 | ), 81 | ], 82 | ), 83 | barrierDismissible: true, 84 | ); 85 | }, 86 | ), 87 | 88 | ], 89 | ), 90 | body: Column( 91 | children: [ 92 | Flexible( 93 | child: StreamBuilder( 94 | stream: _firestore.collection("Groups").snapshots(), 95 | builder: (context,snapshot){ 96 | switch(snapshot.connectionState){ 97 | case ConnectionState.waiting: 98 | return CircularProgressIndicator(); 99 | default: 100 | return ListView( 101 | children: makeListWidget(snapshot), 102 | ); 103 | } 104 | }, 105 | ), 106 | ), 107 | ], 108 | ), 109 | 110 | //Adding a drawer 111 | drawer: Drawer( 112 | child: Scaffold( 113 | appBar: AppBar( 114 | backgroundColor: Colors.green[400], 115 | title: Text(FlutterI18n.translate(context, 'app.extras'), style: TextStyle(color: Colors.white)), 116 | iconTheme: IconThemeData(color: Colors.white), 117 | ), 118 | body:ListView( 119 | // Important: Remove any padding from the ListView. 120 | padding: EdgeInsets.zero, 121 | children: [ 122 | ListTile( 123 | title: Text(FlutterI18n.translate(context, 'app.maps')), 124 | onTap: () { 125 | // Update the state of the app. 126 | // ... 127 | print(sayLocation()); 128 | 129 | Navigator.push( 130 | context, 131 | MaterialPageRoute(builder: (context) => MapsPage()), 132 | ); 133 | }, 134 | ), 135 | ListTile( 136 | title: Text(FlutterI18n.translate(context, 'app.analytics')), 137 | onTap: () { 138 | // Update the state of the app. 139 | Navigator.push(context, MaterialPageRoute(builder: (context) => Chart())); 140 | }, 141 | ), 142 | 143 | ListTile( 144 | leading: Icon(Icons.person, color: Colors.black,), 145 | title: Text(FlutterI18n.translate(context, 'app.logout'), style: TextStyle(color: Colors.black)), 146 | onTap: () async{ 147 | showSimpleFlushBar(context, FlutterI18n.translate(context, 'app.successfullysignedout')); 148 | await _auth.signOut(); 149 | }, 150 | ), 151 | ListTile( 152 | leading: Icon( 153 | Icons.settings, 154 | color: Colors.black, 155 | ), 156 | title: Text(FlutterI18n.translate(context, 'app.usersettings'), style: TextStyle(color: Colors.black)), 157 | onTap: (){ 158 | // go to i18n selection page 159 | print('Settings button pressed, going to i18n page'); 160 | Navigator.push( 161 | context, 162 | MaterialPageRoute(builder: (context) => InternationalizationPage()), 163 | ); 164 | }, 165 | ) 166 | ], 167 | ), 168 | ), 169 | ), 170 | ); 171 | } 172 | 173 | List makeListWidget(AsyncSnapshot snapshot){ 174 | return snapshot.data.documents.map((document){ 175 | return ListTile( 176 | onTap: () { 177 | showSimpleFlushBar(context, 'Selected ${document["groupName"]}'); 178 | print('onTap, setting selectedGroupID to ${document["groupName"]}'); 179 | widget.pageNavigatorState.selectedGroupID = document.documentID; 180 | widget.pageNavigatorState.selectedGroupName = document.data['groupName']; 181 | widget.pageNavigatorState.setState((){}); 182 | widget.pageNavigatorState.setPage(1); 183 | }, 184 | leading: CircleAvatar( 185 | radius: 30.0, 186 | backgroundColor: Colors.blue, 187 | backgroundImage: NetworkImage(document["picture"]) != null? NetworkImage(document["picture"]) : null, 188 | ), 189 | title: Row( 190 | children: [ 191 | Text(document["groupName"], 192 | textAlign: TextAlign.center, 193 | style: TextStyle( 194 | color: Colors.blueGrey, 195 | fontSize: 18.0, 196 | fontWeight: FontWeight.bold, 197 | letterSpacing: 1.0 198 | ), 199 | ), 200 | SizedBox(width: 16.0), 201 | Text( 202 | document['time'] != null ? document['time'] : " ", 203 | textAlign: TextAlign.end, 204 | style: TextStyle( 205 | color: Colors.black45, 206 | fontSize: 10.0, 207 | fontWeight: FontWeight.w300 208 | ), 209 | ), 210 | ], 211 | ), 212 | subtitle: Row( 213 | children: [ 214 | Text((document['lastUser'] != null ? document['lastUser'] : " " )+ ": "), 215 | Text((document['lastMessage'] != null? document['lastMessage'] : " ")), 216 | ], 217 | ) 218 | ); 219 | }).toList(); 220 | } 221 | 222 | //Simple flushbar 223 | void showSimpleFlushBar(BuildContext context, String message){ 224 | Flushbar( 225 | message: message, 226 | duration: Duration(seconds: 3), 227 | )..show(context); 228 | } 229 | } 230 | 231 | -------------------------------------------------------------------------------- /lib/i18n/i18n.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:flutter_i18n/flutter_i18n.dart'; 4 | import 'package:video_chat/snack.dart'; 5 | 6 | class InternationalizationPage extends StatefulWidget { 7 | @override 8 | 9 | I18n createState() => I18n(); 10 | } 11 | 12 | class I18n extends State { 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return Scaffold( 17 | appBar: AppBar( 18 | backgroundColor: Colors.green, 19 | title: Text(FlutterI18n.translate(context, 'app.settings')), 20 | ), 21 | body: Builder(builder: (BuildContext context) { 22 | BuildContext scaffoldContext = context; 23 | return ListView( 24 | children: [ 25 | ListTile( 26 | title: Text('English'), 27 | onTap: () { 28 | Locale newLocale = Locale('en'); 29 | setState(() { 30 | FlutterI18n.refresh(context, newLocale); 31 | snack(scaffoldContext, 'Language Changed to English'); 32 | }); 33 | }, 34 | ), 35 | ListTile( 36 | title: Text('Français'), 37 | onTap: () { 38 | Locale newLocale = Locale('fr'); 39 | setState(() { 40 | FlutterI18n.refresh(context, newLocale); 41 | snack(scaffoldContext, 'Langue Changée en Français'); 42 | }); 43 | }, 44 | ), 45 | ListTile( 46 | title: Text('Español'), 47 | onTap: () { 48 | Locale newLocale = Locale('es'); 49 | setState(() { 50 | FlutterI18n.refresh(context, newLocale); 51 | snack(scaffoldContext, 'Idioma Cambiado a Español'); 52 | }); 53 | }, 54 | ), 55 | ], 56 | ); 57 | }), 58 | ); 59 | } 60 | 61 | } -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_i18n/flutter_i18n.dart'; 3 | import 'package:provider/provider.dart'; 4 | import 'page_navigator.dart'; 5 | import 'Auth/logsignin_page.dart'; 6 | import 'Auth/auth.dart'; 7 | import 'wrapper.dart'; 8 | import 'Model/user.dart'; 9 | import 'Auth/login.dart'; 10 | import 'Auth/register.dart'; 11 | import 'package:permission_handler/permission_handler.dart'; 12 | 13 | import 'package:flutter_i18n/flutter_i18n_delegate.dart'; 14 | import 'package:flutter_localizations/flutter_localizations.dart'; 15 | 16 | void main() => runApp(MyApp()); 17 | 18 | class MyApp extends StatelessWidget { 19 | final PageController pageController = new PageController(initialPage: 0); 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | _handleCameraAndMic(); 24 | return StreamProvider.value( 25 | value: AuthService().user, 26 | child: MaterialApp( 27 | title: 'Video Chat', 28 | theme: ThemeData( 29 | primarySwatch: Colors.lightBlue, 30 | backgroundColor: Color(0xffF1FAEE), 31 | ), 32 | home: Wrapper( 33 | homePage: PageNavigator(), 34 | ), 35 | routes: { 36 | LogsignIn.id: (context) => LogsignIn(), 37 | Login.id: (context) => Login(), 38 | Register.id: (context) => Register(), 39 | }, 40 | debugShowCheckedModeBanner: false, 41 | 42 | //i18n stuff 43 | // Updated deprecated code 44 | localizationsDelegates: [ 45 | FlutterI18nDelegate( 46 | translationLoader: FileTranslationLoader( 47 | fallbackFile: 'en', 48 | basePath: 'assets/i18n', 49 | useCountryCode: false, 50 | ), 51 | ), 52 | GlobalMaterialLocalizations.delegate, 53 | GlobalWidgetsLocalizations.delegate, 54 | GlobalCupertinoLocalizations.delegate, 55 | ], 56 | ), 57 | ); 58 | } 59 | 60 | _handleCameraAndMic() async { 61 | await [Permission.camera,Permission.microphone].request(); 62 | 63 | // The following code is deprecated. Can't use in future versions. 64 | // await PermissionHandler().requestPermissions( 65 | // [PermissionGroup.camera, PermissionGroup.microphone]); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /lib/messageui.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class MessageUI extends StatelessWidget { 4 | final String user; 5 | final String text; 6 | final String picture; 7 | final String date; 8 | 9 | // isMe is used to determine which type of messageUI to use, 10 | // since there are differences to how messages look when you're the sender 11 | bool isMe; 12 | 13 | MessageUI({this.user, this.text, this.picture, this.date, this.isMe}); 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | 18 | final Container msg = Container( 19 | margin: isMe 20 | ? EdgeInsets.only( 21 | top: 8.0, 22 | bottom: 8.0, 23 | left: 80.0, 24 | ) 25 | : EdgeInsets.only( 26 | top: 8.0, 27 | bottom: 8.0, 28 | ), 29 | padding: EdgeInsets.symmetric(horizontal: 20.0, vertical: 15.0), 30 | width: MediaQuery.of(context).size.width * 0.60, 31 | decoration: BoxDecoration( 32 | color: isMe ? Color(0xFFC9F9AF) : Color(0xFFFFEFEE), 33 | borderRadius: isMe 34 | ? BorderRadius.only( 35 | topLeft: Radius.circular(15.0), 36 | topRight: Radius.circular(15.0), 37 | bottomLeft: Radius.circular(15.0), 38 | ) 39 | : BorderRadius.only( 40 | topRight: Radius.circular(15.0), 41 | topLeft: Radius.circular(15.0), 42 | bottomRight: Radius.circular(15.0), 43 | ), 44 | ), 45 | child: Column( 46 | crossAxisAlignment: CrossAxisAlignment.start, 47 | children: [ 48 | Text( 49 | user, 50 | style: TextStyle( 51 | color: Colors.black.withOpacity(0.5), 52 | fontSize: 14.0, 53 | fontWeight: FontWeight.w400, 54 | 55 | ), 56 | ), 57 | SizedBox(height: 8.0), 58 | Text( 59 | text, 60 | style: TextStyle( 61 | color: Colors.black, 62 | fontSize: 16.0, 63 | fontWeight: FontWeight.w400, 64 | ), 65 | ), 66 | ], 67 | ), 68 | ); 69 | if (isMe) { // to print user's messages on right side 70 | return Padding( 71 | padding: const EdgeInsets.all(3.0), 72 | child: Row( 73 | mainAxisAlignment: MainAxisAlignment.end, 74 | crossAxisAlignment: CrossAxisAlignment.end, 75 | 76 | children: [ 77 | Container( 78 | padding: EdgeInsets.all(2.0), 79 | child: Row( 80 | children: [ 81 | msg, 82 | ] 83 | ) 84 | ), 85 | Container( 86 | padding: EdgeInsets.all(2.0), 87 | child: Row( 88 | children: [ 89 | CircleAvatar( 90 | backgroundColor: Colors.green[200], 91 | backgroundImage: picture != null && NetworkImage(picture) != null? 92 | NetworkImage(picture) : null, 93 | ) 94 | ] 95 | ) 96 | ), 97 | ], 98 | ), 99 | ); 100 | } 101 | return Padding( // to print other member's messages on right side 102 | padding: const EdgeInsets.all(3.0), 103 | child: Row( 104 | mainAxisAlignment: MainAxisAlignment.start, 105 | crossAxisAlignment: CrossAxisAlignment.end, 106 | 107 | children: [ 108 | Container( 109 | padding: EdgeInsets.all(2.0), 110 | child: Row( 111 | children: [ 112 | CircleAvatar( 113 | backgroundColor: Colors.blue, 114 | backgroundImage: picture != null ? NetworkImage(picture) : null, 115 | ) 116 | ] 117 | ) 118 | ), 119 | Container( 120 | padding: EdgeInsets.all(2.0), 121 | child: Row( 122 | children: [ 123 | msg, 124 | ] 125 | ) 126 | ), 127 | ], 128 | 129 | ), 130 | ); 131 | } 132 | } -------------------------------------------------------------------------------- /lib/page_navigator.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:video_chat/Auth/auth.dart'; 4 | import 'groups_page.dart'; 5 | import 'chat_page.dart'; 6 | import 'video_room.dart'; 7 | import 'package:provider/provider.dart'; 8 | import 'Model/user.dart'; 9 | 10 | class PageNavigator extends StatefulWidget{ 11 | PageNavigator(); 12 | 13 | @override 14 | PageNavigatorState createState() => PageNavigatorState(); 15 | } 16 | 17 | class PageNavigatorState extends State { 18 | AuthService _auth = AuthService(); 19 | 20 | String selectedGroupID; 21 | String selectedGroupName; 22 | PageController controller = PageController(initialPage: 0); 23 | 24 | Firestore _firestore = Firestore.instance; 25 | 26 | String newUsername; 27 | String newImageURL; 28 | 29 | bool dialogueUp = false; 30 | 31 | @override 32 | Widget build(BuildContext context) { 33 | User user = Provider.of(context); 34 | 35 | // Enter username/image dialogue 36 | _firestore.collection('Users').document(user.uid).get().then( (doc) { 37 | if(doc.exists && doc.data['username'] != null){ 38 | print("user exists"); 39 | print("username: " + doc.data['username']); 40 | user.userName = doc.data['username']; 41 | user.picture = doc.data['picture']; 42 | }else if(!dialogueUp){ 43 | dialogueUp = true; 44 | print("user does not exist"); 45 | showDialog( 46 | context: context, 47 | builder: (_) => AlertDialog( 48 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(10))), 49 | elevation: 24.0, 50 | title: Text("Choose Username", style: TextStyle(color: Colors.lightBlue),), 51 | content: SingleChildScrollView( 52 | child: ListBody( 53 | children: [ 54 | TextField( 55 | decoration: InputDecoration( 56 | border: InputBorder.none, 57 | hintText: 'Username', 58 | ), 59 | onChanged: (value){ 60 | newUsername = value; 61 | }, 62 | ), 63 | TextField( 64 | decoration: InputDecoration( 65 | border: InputBorder.none, 66 | hintText: 'Image URL', 67 | ), 68 | onChanged: (value){ 69 | newImageURL = value; 70 | }, 71 | ), 72 | ], 73 | ), 74 | ), 75 | actions: [ 76 | FlatButton( 77 | child: Text("Done"), 78 | onPressed: (){ 79 | _firestore.collection("Users").document(user.uid).setData({ 80 | 'username': newUsername, 81 | 'picture': newImageURL, 82 | }); 83 | Navigator.of(context, rootNavigator: true).pop('dialog'); 84 | user.userName = newUsername; 85 | user.picture = newImageURL; 86 | User u = Provider.of(context); 87 | print('username: ' + u.userName); 88 | }, 89 | ), 90 | ], 91 | ), 92 | barrierDismissible: true, 93 | ); 94 | } 95 | }); 96 | 97 | // main PageView, contains group page, chat page, and video room 98 | return PageView( 99 | scrollDirection: Axis.horizontal, 100 | controller: controller, 101 | children: [ 102 | //Page 1: Group Selection 103 | GroupsPage(this), 104 | //Page 2: Text Chat 105 | Container( 106 | child: ChatPage( 107 | groupId: selectedGroupID, 108 | groupName: selectedGroupName, 109 | user: user, 110 | pageNavigatorState: this, 111 | ), 112 | decoration: ShapeDecoration( 113 | color: Colors.white, 114 | shape: RoundedRectangleBorder( 115 | borderRadius: BorderRadius.only(), 116 | ), 117 | shadows: [new BoxShadow(blurRadius:5.0)], 118 | ), 119 | ), 120 | //Page 3: Video Room 121 | Container( 122 | child: VideoRoom( 123 | groupId: selectedGroupID == null? "test": selectedGroupID, 124 | ), 125 | decoration: ShapeDecoration( 126 | color: Colors.white, 127 | shape: RoundedRectangleBorder( 128 | borderRadius: BorderRadius.only(), 129 | ), 130 | shadows: [new BoxShadow(blurRadius:5.0)], 131 | ), 132 | ), 133 | ], 134 | ); 135 | } 136 | 137 | // Used in other pages to set the selected page of the PageView 138 | void setPage(int page){ 139 | controller.animateToPage(page, duration: Duration(milliseconds: 250), curve: Curves.bounceInOut); 140 | } 141 | 142 | } 143 | -------------------------------------------------------------------------------- /lib/snack.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | //in its own file to call from multiple classes 4 | void snack(BuildContext context, String message){ 5 | Scaffold.of(context).showSnackBar( 6 | SnackBar( 7 | content: Text(message), 8 | ), 9 | ); 10 | } -------------------------------------------------------------------------------- /lib/video_room.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | //Agora stuff 4 | import 'package:agora_rtc_engine/agora_rtc_engine.dart'; 5 | // replace with your App ID from Agora.io 6 | const APP_ID = "example"; 7 | 8 | class VideoRoom extends StatefulWidget { 9 | /// non-modifiable channel name of the page 10 | final String groupId; 11 | 12 | /// Creates a call page with given channel name. 13 | const VideoRoom({Key key, this.groupId}) : super(key: key); 14 | 15 | @override 16 | VideoRoomState createState() { 17 | return new VideoRoomState(); 18 | } 19 | } 20 | 21 | class VideoRoomState extends State{ 22 | 23 | static final _users = List(); 24 | final _infoStrings = []; 25 | bool muted = false; 26 | 27 | @override 28 | void dispose() { 29 | // clear users 30 | _users.clear(); 31 | // destroy sdk 32 | AgoraRtcEngine.leaveChannel(); 33 | AgoraRtcEngine.destroy(); 34 | super.dispose(); 35 | } 36 | 37 | @override 38 | void initState(){ 39 | super.initState(); 40 | init(); 41 | } 42 | 43 | // initialize agora sdk 44 | init() async{ 45 | initialize(); 46 | } 47 | 48 | void initialize() { 49 | if (APP_ID.isEmpty) { 50 | setState(() { 51 | _infoStrings 52 | .add("APP_ID missing, please provide your APP_ID in settings.dart"); 53 | _infoStrings.add("Agora Engine is not starting"); 54 | }); 55 | return; 56 | } 57 | 58 | _initAgoraRtcEngine(); 59 | _addAgoraEventHandlers(); 60 | AgoraRtcEngine.enableWebSdkInteroperability(true); 61 | // set parameters for Agora Engine 62 | AgoraRtcEngine.setParameters('{\"che.video.lowBitRateStreamParameter\"' 63 | +':{\"width\":320,\"height\":180,\"frameRate\":15,\"bitRate\":140}}'); 64 | // join channel corresponding to current group 65 | AgoraRtcEngine.joinChannel(null, widget.groupId, null, 0); 66 | } 67 | 68 | /// Create agora sdk instance and initialze 69 | Future _initAgoraRtcEngine() async { 70 | AgoraRtcEngine.create(APP_ID); 71 | AgoraRtcEngine.enableVideo(); 72 | } 73 | 74 | /// Add agora event handlers 75 | void _addAgoraEventHandlers() { 76 | AgoraRtcEngine.onError = (dynamic code) { 77 | setState(() { 78 | String info = 'onError: ' + code.toString(); 79 | _infoStrings.add(info); 80 | }); 81 | }; 82 | 83 | AgoraRtcEngine.onJoinChannelSuccess = 84 | (String channel, int uid, int elapsed) { 85 | setState(() { 86 | String info = 'onJoinChannel: ' + channel + ', uid: ' + uid.toString(); 87 | _infoStrings.add(info); 88 | }); 89 | }; 90 | 91 | AgoraRtcEngine.onLeaveChannel = () { 92 | setState(() { 93 | _infoStrings.add('onLeaveChannel'); 94 | _users.clear(); 95 | }); 96 | }; 97 | 98 | AgoraRtcEngine.onUserJoined = (int uid, int elapsed) { 99 | setState(() { 100 | String info = 'userJoined: ' + uid.toString(); 101 | _infoStrings.add(info); 102 | _users.add(uid); 103 | }); 104 | }; 105 | 106 | AgoraRtcEngine.onUserOffline = (int uid, int reason) { 107 | setState(() { 108 | String info = 'userOffline: ' + uid.toString(); 109 | _infoStrings.add(info); 110 | _users.remove(uid); 111 | }); 112 | }; 113 | 114 | AgoraRtcEngine.onFirstRemoteVideoFrame = 115 | (int uid, int width, int height, int elapsed) { 116 | setState(() { 117 | String info = 'firstRemoteVideo: ' + 118 | uid.toString() + 119 | ' ' + 120 | width.toString() + 121 | 'x' + 122 | height.toString(); 123 | _infoStrings.add(info); 124 | }); 125 | }; 126 | } 127 | 128 | /// Helper function to get list of native views 129 | List _getRenderViews() { 130 | List list = [AgoraRenderWidget(0, local: true, preview: true)]; 131 | _users.forEach((int uid) => { 132 | list.add(AgoraRenderWidget(uid)) 133 | }); 134 | return list; 135 | } 136 | 137 | /// Video view wrapper 138 | Widget _videoView(view) { 139 | return Expanded(child: Container(child: view)); 140 | } 141 | 142 | /// Video view row wrapper 143 | Widget _expandedVideoRow(List views) { 144 | List wrappedViews = 145 | views.map((Widget view) => _videoView(view)).toList(); 146 | return Expanded( 147 | child: Row( 148 | children: wrappedViews, 149 | ) 150 | ); 151 | } 152 | 153 | /// Video layout wrapper 154 | Widget _viewRows() { 155 | List views = _getRenderViews(); 156 | switch (views.length) { 157 | case 1: 158 | return Container( 159 | child: Column( 160 | children: [_videoView(views[0])], 161 | )); 162 | case 2: 163 | return Container( 164 | child: Column( 165 | children: [ 166 | _expandedVideoRow([views[0]]), 167 | _expandedVideoRow([views[1]]) 168 | ], 169 | )); 170 | case 3: 171 | return Container( 172 | child: Column( 173 | children: [ 174 | _expandedVideoRow(views.sublist(0, 2)), 175 | _expandedVideoRow(views.sublist(2, 3)) 176 | ], 177 | )); 178 | case 4: 179 | return Container( 180 | child: Column( 181 | children: [ 182 | _expandedVideoRow(views.sublist(0, 2)), 183 | _expandedVideoRow(views.sublist(2, 4)) 184 | ], 185 | )); 186 | default: 187 | } 188 | return Container(); 189 | } 190 | 191 | /// Toolbar layout 192 | Widget _toolbar() { 193 | return Container( 194 | child: Column( 195 | children: [ 196 | Container( 197 | alignment: Alignment.topRight, 198 | padding: EdgeInsets.symmetric(vertical: 48), 199 | child: Column( 200 | mainAxisAlignment: MainAxisAlignment.start, 201 | children: [ 202 | RawMaterialButton( 203 | onPressed: () => _onToggleMute(), 204 | child: new Icon( 205 | muted ? Icons.mic : Icons.mic_off, 206 | color: muted ? Colors.white : Colors.blueAccent, 207 | size: 20.0, 208 | ), 209 | shape: new CircleBorder(), 210 | elevation: 2.0, 211 | fillColor: muted ? Colors.blueAccent : Colors.white, 212 | padding: const EdgeInsets.all(12.0), 213 | ), 214 | RawMaterialButton( 215 | onPressed: () => _onSwitchCamera(), 216 | child: new Icon( 217 | Icons.switch_camera, 218 | color: Colors.blueAccent, 219 | size: 20.0, 220 | ), 221 | shape: new CircleBorder(), 222 | elevation: 2.0, 223 | fillColor: Colors.white, 224 | padding: const EdgeInsets.all(12.0), 225 | ), 226 | ], 227 | ), 228 | ), 229 | ], 230 | ), 231 | ); 232 | } 233 | 234 | /// Info panel to show logs 235 | Widget _panel() { 236 | return Container( 237 | padding: EdgeInsets.symmetric(vertical: 48), 238 | alignment: Alignment.bottomCenter, 239 | child: FractionallySizedBox( 240 | heightFactor: 0.5, 241 | child: Container( 242 | padding: EdgeInsets.symmetric(vertical: 48), 243 | child: ListView.builder( 244 | reverse: true, 245 | itemCount: _infoStrings.length, 246 | itemBuilder: (BuildContext context, int index) { 247 | if (_infoStrings.length == 0) { 248 | return null; 249 | } 250 | return Padding( 251 | padding: EdgeInsets.symmetric(vertical: 3, horizontal: 10), 252 | child: Row( 253 | mainAxisSize: MainAxisSize.min, 254 | children: [ 255 | Flexible( 256 | child: Container( 257 | padding: EdgeInsets.symmetric( 258 | vertical: 2, horizontal: 5), 259 | decoration: BoxDecoration( 260 | color: Colors.yellowAccent, 261 | borderRadius: BorderRadius.circular(5)), 262 | child: Text( 263 | _infoStrings[index], 264 | style:TextStyle(color: Colors.blueGrey) 265 | ) 266 | ) 267 | ) 268 | ] 269 | ) 270 | ); 271 | } 272 | ) 273 | ), 274 | ) 275 | ); 276 | } 277 | 278 | void _onCallEnd(BuildContext context) { 279 | Navigator.pop(context); 280 | } 281 | 282 | void _onToggleMute() { 283 | setState(() { 284 | muted = !muted; 285 | }); 286 | AgoraRtcEngine.muteLocalAudioStream(muted); 287 | } 288 | 289 | void _onSwitchCamera() { 290 | AgoraRtcEngine.switchCamera(); 291 | } 292 | 293 | @override 294 | Widget build(BuildContext context) { 295 | return Scaffold( 296 | backgroundColor: Colors.black, 297 | body: Center( 298 | child: Stack( 299 | //uncomment _panel for debugging 300 | children: [_viewRows(), _toolbar()], 301 | ) 302 | ) 303 | ); 304 | } 305 | } 306 | -------------------------------------------------------------------------------- /lib/wrapper.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:provider/provider.dart'; 3 | import 'package:video_chat/Auth/logsignin_page.dart'; 4 | import 'Model/user.dart'; 5 | 6 | class Wrapper extends StatelessWidget { 7 | final Widget homePage; 8 | 9 | Wrapper({this.homePage}); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | 14 | final user = Provider.of(context); 15 | 16 | //Checking if the user is logged in or not 17 | if(user == null) { 18 | return LogsignIn(); 19 | }else{ 20 | print(user.uid); 21 | return homePage; 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | agora_rtc_engine: 5 | dependency: "direct main" 6 | description: 7 | name: agora_rtc_engine 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "1.0.1" 11 | ansicolor: 12 | dependency: transitive 13 | description: 14 | name: ansicolor 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "1.0.2" 18 | archive: 19 | dependency: transitive 20 | description: 21 | name: archive 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.0.11" 25 | args: 26 | dependency: transitive 27 | description: 28 | name: args 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.5.2" 32 | async: 33 | dependency: transitive 34 | description: 35 | name: async 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "2.4.1" 39 | boolean_selector: 40 | dependency: transitive 41 | description: 42 | name: boolean_selector 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "2.0.0" 46 | cached_network_image: 47 | dependency: transitive 48 | description: 49 | name: cached_network_image 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "2.2.0+1" 53 | charcode: 54 | dependency: transitive 55 | description: 56 | name: charcode 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "1.1.3" 60 | charts_common: 61 | dependency: transitive 62 | description: 63 | name: charts_common 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "0.8.1" 67 | charts_flutter: 68 | dependency: "direct main" 69 | description: 70 | name: charts_flutter 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "0.8.1" 74 | clock: 75 | dependency: transitive 76 | description: 77 | name: clock 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "1.0.1" 81 | cloud_firestore: 82 | dependency: "direct main" 83 | description: 84 | name: cloud_firestore 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "0.13.6" 88 | cloud_firestore_platform_interface: 89 | dependency: transitive 90 | description: 91 | name: cloud_firestore_platform_interface 92 | url: "https://pub.dartlang.org" 93 | source: hosted 94 | version: "1.1.2" 95 | cloud_firestore_web: 96 | dependency: transitive 97 | description: 98 | name: cloud_firestore_web 99 | url: "https://pub.dartlang.org" 100 | source: hosted 101 | version: "0.1.1+2" 102 | collection: 103 | dependency: transitive 104 | description: 105 | name: collection 106 | url: "https://pub.dartlang.org" 107 | source: hosted 108 | version: "1.14.12" 109 | console_log_handler: 110 | dependency: transitive 111 | description: 112 | name: console_log_handler 113 | url: "https://pub.dartlang.org" 114 | source: hosted 115 | version: "1.1.6" 116 | convert: 117 | dependency: transitive 118 | description: 119 | name: convert 120 | url: "https://pub.dartlang.org" 121 | source: hosted 122 | version: "2.1.1" 123 | crypto: 124 | dependency: transitive 125 | description: 126 | name: crypto 127 | url: "https://pub.dartlang.org" 128 | source: hosted 129 | version: "2.1.3" 130 | cupertino_icons: 131 | dependency: "direct main" 132 | description: 133 | name: cupertino_icons 134 | url: "https://pub.dartlang.org" 135 | source: hosted 136 | version: "0.1.2" 137 | date_format: 138 | dependency: "direct main" 139 | description: 140 | name: date_format 141 | url: "https://pub.dartlang.org" 142 | source: hosted 143 | version: "1.0.8" 144 | equatable: 145 | dependency: transitive 146 | description: 147 | name: equatable 148 | url: "https://pub.dartlang.org" 149 | source: hosted 150 | version: "1.2.0" 151 | fake_async: 152 | dependency: transitive 153 | description: 154 | name: fake_async 155 | url: "https://pub.dartlang.org" 156 | source: hosted 157 | version: "1.1.0" 158 | file: 159 | dependency: transitive 160 | description: 161 | name: file 162 | url: "https://pub.dartlang.org" 163 | source: hosted 164 | version: "5.1.0" 165 | firebase: 166 | dependency: transitive 167 | description: 168 | name: firebase 169 | url: "https://pub.dartlang.org" 170 | source: hosted 171 | version: "7.3.0" 172 | firebase_auth: 173 | dependency: "direct main" 174 | description: 175 | name: firebase_auth 176 | url: "https://pub.dartlang.org" 177 | source: hosted 178 | version: "0.16.1" 179 | firebase_auth_platform_interface: 180 | dependency: transitive 181 | description: 182 | name: firebase_auth_platform_interface 183 | url: "https://pub.dartlang.org" 184 | source: hosted 185 | version: "1.1.8" 186 | firebase_auth_web: 187 | dependency: transitive 188 | description: 189 | name: firebase_auth_web 190 | url: "https://pub.dartlang.org" 191 | source: hosted 192 | version: "0.1.3+1" 193 | firebase_core: 194 | dependency: "direct main" 195 | description: 196 | name: firebase_core 197 | url: "https://pub.dartlang.org" 198 | source: hosted 199 | version: "0.4.5" 200 | firebase_core_platform_interface: 201 | dependency: transitive 202 | description: 203 | name: firebase_core_platform_interface 204 | url: "https://pub.dartlang.org" 205 | source: hosted 206 | version: "1.0.4" 207 | firebase_core_web: 208 | dependency: transitive 209 | description: 210 | name: firebase_core_web 211 | url: "https://pub.dartlang.org" 212 | source: hosted 213 | version: "0.1.1+2" 214 | firebase_messaging: 215 | dependency: "direct main" 216 | description: 217 | name: firebase_messaging 218 | url: "https://pub.dartlang.org" 219 | source: hosted 220 | version: "6.0.3" 221 | flushbar: 222 | dependency: "direct main" 223 | description: 224 | name: flushbar 225 | url: "https://pub.dartlang.org" 226 | source: hosted 227 | version: "1.9.1" 228 | flutter: 229 | dependency: "direct main" 230 | description: flutter 231 | source: sdk 232 | version: "0.0.0" 233 | flutter_cache_manager: 234 | dependency: transitive 235 | description: 236 | name: flutter_cache_manager 237 | url: "https://pub.dartlang.org" 238 | source: hosted 239 | version: "1.4.0" 240 | flutter_i18n: 241 | dependency: "direct main" 242 | description: 243 | name: flutter_i18n 244 | url: "https://pub.dartlang.org" 245 | source: hosted 246 | version: "0.16.0" 247 | flutter_image: 248 | dependency: transitive 249 | description: 250 | name: flutter_image 251 | url: "https://pub.dartlang.org" 252 | source: hosted 253 | version: "3.0.0" 254 | flutter_launcher_icons: 255 | dependency: "direct main" 256 | description: 257 | name: flutter_launcher_icons 258 | url: "https://pub.dartlang.org" 259 | source: hosted 260 | version: "0.7.4" 261 | flutter_local_notifications: 262 | dependency: "direct main" 263 | description: 264 | name: flutter_local_notifications 265 | url: "https://pub.dartlang.org" 266 | source: hosted 267 | version: "0.8.4+3" 268 | flutter_localizations: 269 | dependency: transitive 270 | description: flutter 271 | source: sdk 272 | version: "0.0.0" 273 | flutter_map: 274 | dependency: "direct main" 275 | description: 276 | name: flutter_map 277 | url: "https://pub.dartlang.org" 278 | source: hosted 279 | version: "0.9.0" 280 | flutter_test: 281 | dependency: "direct dev" 282 | description: flutter 283 | source: sdk 284 | version: "0.0.0" 285 | flutter_web_plugins: 286 | dependency: transitive 287 | description: flutter 288 | source: sdk 289 | version: "0.0.0" 290 | fluttertoast: 291 | dependency: "direct main" 292 | description: 293 | name: fluttertoast 294 | url: "https://pub.dartlang.org" 295 | source: hosted 296 | version: "3.1.3" 297 | font_awesome_flutter: 298 | dependency: "direct main" 299 | description: 300 | name: font_awesome_flutter 301 | url: "https://pub.dartlang.org" 302 | source: hosted 303 | version: "8.5.0" 304 | geolocator: 305 | dependency: "direct main" 306 | description: 307 | name: geolocator 308 | url: "https://pub.dartlang.org" 309 | source: hosted 310 | version: "5.3.2+2" 311 | google_api_availability: 312 | dependency: transitive 313 | description: 314 | name: google_api_availability 315 | url: "https://pub.dartlang.org" 316 | source: hosted 317 | version: "2.0.4" 318 | http: 319 | dependency: transitive 320 | description: 321 | name: http 322 | url: "https://pub.dartlang.org" 323 | source: hosted 324 | version: "0.12.0+2" 325 | http_parser: 326 | dependency: transitive 327 | description: 328 | name: http_parser 329 | url: "https://pub.dartlang.org" 330 | source: hosted 331 | version: "3.1.3" 332 | image: 333 | dependency: transitive 334 | description: 335 | name: image 336 | url: "https://pub.dartlang.org" 337 | source: hosted 338 | version: "2.1.9" 339 | intl: 340 | dependency: "direct main" 341 | description: 342 | name: intl 343 | url: "https://pub.dartlang.org" 344 | source: hosted 345 | version: "0.16.1" 346 | js: 347 | dependency: transitive 348 | description: 349 | name: js 350 | url: "https://pub.dartlang.org" 351 | source: hosted 352 | version: "0.6.1+1" 353 | latlong: 354 | dependency: "direct main" 355 | description: 356 | name: latlong 357 | url: "https://pub.dartlang.org" 358 | source: hosted 359 | version: "0.6.1" 360 | lists: 361 | dependency: transitive 362 | description: 363 | name: lists 364 | url: "https://pub.dartlang.org" 365 | source: hosted 366 | version: "0.1.6" 367 | location_permissions: 368 | dependency: transitive 369 | description: 370 | name: location_permissions 371 | url: "https://pub.dartlang.org" 372 | source: hosted 373 | version: "3.0.0" 374 | logging: 375 | dependency: transitive 376 | description: 377 | name: logging 378 | url: "https://pub.dartlang.org" 379 | source: hosted 380 | version: "0.11.3+2" 381 | matcher: 382 | dependency: transitive 383 | description: 384 | name: matcher 385 | url: "https://pub.dartlang.org" 386 | source: hosted 387 | version: "0.12.6" 388 | merge_map: 389 | dependency: transitive 390 | description: 391 | name: merge_map 392 | url: "https://pub.dartlang.org" 393 | source: hosted 394 | version: "1.0.2" 395 | meta: 396 | dependency: transitive 397 | description: 398 | name: meta 399 | url: "https://pub.dartlang.org" 400 | source: hosted 401 | version: "1.1.8" 402 | mgrs_dart: 403 | dependency: transitive 404 | description: 405 | name: mgrs_dart 406 | url: "https://pub.dartlang.org" 407 | source: hosted 408 | version: "1.0.1" 409 | nested: 410 | dependency: transitive 411 | description: 412 | name: nested 413 | url: "https://pub.dartlang.org" 414 | source: hosted 415 | version: "0.0.4" 416 | path: 417 | dependency: transitive 418 | description: 419 | name: path 420 | url: "https://pub.dartlang.org" 421 | source: hosted 422 | version: "1.7.0" 423 | path_provider: 424 | dependency: "direct main" 425 | description: 426 | name: path_provider 427 | url: "https://pub.dartlang.org" 428 | source: hosted 429 | version: "1.6.10" 430 | path_provider_linux: 431 | dependency: transitive 432 | description: 433 | name: path_provider_linux 434 | url: "https://pub.dartlang.org" 435 | source: hosted 436 | version: "0.0.1+1" 437 | path_provider_macos: 438 | dependency: transitive 439 | description: 440 | name: path_provider_macos 441 | url: "https://pub.dartlang.org" 442 | source: hosted 443 | version: "0.0.4+3" 444 | path_provider_platform_interface: 445 | dependency: transitive 446 | description: 447 | name: path_provider_platform_interface 448 | url: "https://pub.dartlang.org" 449 | source: hosted 450 | version: "1.0.2" 451 | pedantic: 452 | dependency: transitive 453 | description: 454 | name: pedantic 455 | url: "https://pub.dartlang.org" 456 | source: hosted 457 | version: "1.8.0+1" 458 | permission_handler: 459 | dependency: "direct main" 460 | description: 461 | name: permission_handler 462 | url: "https://pub.dartlang.org" 463 | source: hosted 464 | version: "5.0.0+hotfix.8" 465 | permission_handler_platform_interface: 466 | dependency: transitive 467 | description: 468 | name: permission_handler_platform_interface 469 | url: "https://pub.dartlang.org" 470 | source: hosted 471 | version: "2.0.0" 472 | petitparser: 473 | dependency: transitive 474 | description: 475 | name: petitparser 476 | url: "https://pub.dartlang.org" 477 | source: hosted 478 | version: "2.4.0" 479 | platform: 480 | dependency: transitive 481 | description: 482 | name: platform 483 | url: "https://pub.dartlang.org" 484 | source: hosted 485 | version: "2.2.1" 486 | plugin_platform_interface: 487 | dependency: transitive 488 | description: 489 | name: plugin_platform_interface 490 | url: "https://pub.dartlang.org" 491 | source: hosted 492 | version: "1.0.2" 493 | positioned_tap_detector: 494 | dependency: transitive 495 | description: 496 | name: positioned_tap_detector 497 | url: "https://pub.dartlang.org" 498 | source: hosted 499 | version: "1.0.3" 500 | process: 501 | dependency: transitive 502 | description: 503 | name: process 504 | url: "https://pub.dartlang.org" 505 | source: hosted 506 | version: "3.0.13" 507 | proj4dart: 508 | dependency: transitive 509 | description: 510 | name: proj4dart 511 | url: "https://pub.dartlang.org" 512 | source: hosted 513 | version: "1.0.5" 514 | provider: 515 | dependency: "direct main" 516 | description: 517 | name: provider 518 | url: "https://pub.dartlang.org" 519 | source: hosted 520 | version: "4.1.3" 521 | quiver: 522 | dependency: transitive 523 | description: 524 | name: quiver 525 | url: "https://pub.dartlang.org" 526 | source: hosted 527 | version: "2.0.5" 528 | rxdart: 529 | dependency: transitive 530 | description: 531 | name: rxdart 532 | url: "https://pub.dartlang.org" 533 | source: hosted 534 | version: "0.24.1" 535 | sky_engine: 536 | dependency: transitive 537 | description: flutter 538 | source: sdk 539 | version: "0.0.99" 540 | source_span: 541 | dependency: transitive 542 | description: 543 | name: source_span 544 | url: "https://pub.dartlang.org" 545 | source: hosted 546 | version: "1.7.0" 547 | sqflite: 548 | dependency: "direct main" 549 | description: 550 | name: sqflite 551 | url: "https://pub.dartlang.org" 552 | source: hosted 553 | version: "1.1.7+3" 554 | stack_trace: 555 | dependency: transitive 556 | description: 557 | name: stack_trace 558 | url: "https://pub.dartlang.org" 559 | source: hosted 560 | version: "1.9.3" 561 | stream_channel: 562 | dependency: transitive 563 | description: 564 | name: stream_channel 565 | url: "https://pub.dartlang.org" 566 | source: hosted 567 | version: "2.0.0" 568 | string_scanner: 569 | dependency: transitive 570 | description: 571 | name: string_scanner 572 | url: "https://pub.dartlang.org" 573 | source: hosted 574 | version: "1.0.5" 575 | synchronized: 576 | dependency: transitive 577 | description: 578 | name: synchronized 579 | url: "https://pub.dartlang.org" 580 | source: hosted 581 | version: "2.1.0+2" 582 | term_glyph: 583 | dependency: transitive 584 | description: 585 | name: term_glyph 586 | url: "https://pub.dartlang.org" 587 | source: hosted 588 | version: "1.1.0" 589 | test_api: 590 | dependency: transitive 591 | description: 592 | name: test_api 593 | url: "https://pub.dartlang.org" 594 | source: hosted 595 | version: "0.2.16" 596 | transparent_image: 597 | dependency: transitive 598 | description: 599 | name: transparent_image 600 | url: "https://pub.dartlang.org" 601 | source: hosted 602 | version: "1.0.0" 603 | tuple: 604 | dependency: transitive 605 | description: 606 | name: tuple 607 | url: "https://pub.dartlang.org" 608 | source: hosted 609 | version: "1.0.3" 610 | typed_data: 611 | dependency: transitive 612 | description: 613 | name: typed_data 614 | url: "https://pub.dartlang.org" 615 | source: hosted 616 | version: "1.1.6" 617 | unicode: 618 | dependency: transitive 619 | description: 620 | name: unicode 621 | url: "https://pub.dartlang.org" 622 | source: hosted 623 | version: "0.2.3" 624 | uuid: 625 | dependency: transitive 626 | description: 627 | name: uuid 628 | url: "https://pub.dartlang.org" 629 | source: hosted 630 | version: "2.0.4" 631 | validate: 632 | dependency: transitive 633 | description: 634 | name: validate 635 | url: "https://pub.dartlang.org" 636 | source: hosted 637 | version: "1.7.0" 638 | vector_math: 639 | dependency: transitive 640 | description: 641 | name: vector_math 642 | url: "https://pub.dartlang.org" 643 | source: hosted 644 | version: "2.0.8" 645 | wkt_parser: 646 | dependency: transitive 647 | description: 648 | name: wkt_parser 649 | url: "https://pub.dartlang.org" 650 | source: hosted 651 | version: "1.0.7" 652 | xdg_directories: 653 | dependency: transitive 654 | description: 655 | name: xdg_directories 656 | url: "https://pub.dartlang.org" 657 | source: hosted 658 | version: "0.1.0" 659 | xml: 660 | dependency: transitive 661 | description: 662 | name: xml 663 | url: "https://pub.dartlang.org" 664 | source: hosted 665 | version: "3.5.0" 666 | xml2json: 667 | dependency: transitive 668 | description: 669 | name: xml2json 670 | url: "https://pub.dartlang.org" 671 | source: hosted 672 | version: "4.2.0" 673 | yaml: 674 | dependency: transitive 675 | description: 676 | name: yaml 677 | url: "https://pub.dartlang.org" 678 | source: hosted 679 | version: "2.2.0" 680 | sdks: 681 | dart: ">=2.7.0 <3.0.0" 682 | flutter: ">=1.16.0 <2.0.0" 683 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: video_chat 2 | description: A new Flutter project. 3 | 4 | # The following defines the version and build number for your application. 5 | # A version number is three numbers separated by dots, like 1.2.43 6 | # followed by an optional build number separated by a +. 7 | # Both the version and the builder number may be overridden in flutter 8 | # build by specifying --build-name and --build-number, respectively. 9 | # In Android, build-name is used as versionName while build-number used as versionCode. 10 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 11 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 12 | # Read more about iOS versioning at 13 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 14 | version: 1.0.0+1 15 | 16 | environment: 17 | sdk: ">=2.7.0 <3.0.0" 18 | 19 | dependencies: 20 | intl: ^0.16.1 21 | flutter: 22 | sdk: flutter 23 | 24 | # The following adds the Cupertino Icons font to your application. 25 | # Use with the CupertinoIcons class for iOS style icons. 26 | cupertino_icons: ^0.1.2 27 | 28 | #Firebase packages 29 | #firebase_core: 30 | firebase_auth: ^0.16.1 31 | firebase_core: ^0.4.0+9 32 | #cloud_firestore: 33 | cloud_firestore: ^0.13.6 34 | provider: ^4.1.3 35 | 36 | #GeoLocation 37 | geolocator: ^5.3.2+2 38 | latlong: ^0.6.1 39 | flutter_map: ^0.9.0 40 | 41 | #Agora permissions 42 | agora_rtc_engine: #1.0.1 43 | permission_handler: 5.0.0+hotfix.8 44 | 45 | #Asthetics 46 | flushbar: 47 | charts_flutter: 48 | font_awesome_flutter: 49 | flutter_launcher_icons: ^0.7.4 50 | 51 | #Sqlfite 52 | sqflite: 53 | 54 | #i18n 55 | flutter_i18n: 0.16.0 56 | 57 | date_format: ^1.0.8 58 | 59 | 60 | #Notification 61 | flutter_local_notifications: 62 | path_provider: 63 | firebase_messaging: ^6.0.3 64 | fluttertoast: ^3.1.3 65 | 66 | 67 | 68 | 69 | dev_dependencies: 70 | flutter_test: 71 | sdk: flutter 72 | 73 | flutter_icons: 74 | android: true 75 | ios: true 76 | image_path: "assets/images/huddleLogo.png" 77 | # For information on the generic Dart part of this file, see the 78 | # following page: https://dart.dev/tools/pub/pubspec 79 | 80 | # The following section is specific to Flutter. 81 | flutter: 82 | 83 | # The following line ensures that the Material Icons font is 84 | # included with your application, so that you can use the icons in 85 | # the material Icons class. 86 | uses-material-design: true 87 | 88 | # To add assets to your application, add an assets section, like this: 89 | assets: 90 | - assets/images/ 91 | - assets/i18n/ 92 | # - images/a_dot_ham.jpeg 93 | 94 | # An image asset can refer to one or more resolution-specific "variants", see 95 | # https://flutter.dev/assets-and-images/#resolution-aware. 96 | 97 | # For details regarding adding assets from package dependencies, see 98 | # https://flutter.dev/assets-and-images/#from-packages 99 | 100 | # To add custom fonts to your application, add a fonts section here, 101 | # in this "flutter" section. Each entry in this list should have a 102 | # "family" key with the font family name, and a "fonts" key with a 103 | # list giving the asset and other descriptors for the font. For 104 | # example: 105 | fonts: 106 | - family: IndieFlower 107 | fonts: 108 | - asset: fonts/IndieFlower-Regular.ttf 109 | weight: 400 110 | # - asset: fonts/Schyler-Italic.ttf 111 | # style: italic 112 | - family: Montserrat 113 | fonts: 114 | - asset: fonts/Montserrat/Montserrat-Regular.ttf 115 | weight: 400 116 | - family: Baskervville 117 | fonts: 118 | - asset: fonts/Baskervville-Regular.ttf 119 | weight: 400 120 | - family: NotoSerif 121 | fonts: 122 | - asset: fonts/NotoSerif-Regular.ttf 123 | weight: 400 124 | 125 | # For details regarding fonts from package dependencies, 126 | # see https://flutter.dev/custom-fonts/#from-packages 127 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:video_chat/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | --------------------------------------------------------------------------------