├── .gitignore
├── .metadata
├── .vscode
└── launch.json
├── README.md
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ ├── google-services.json
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── messanger
│ │ │ │ └── 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
└── images
│ ├── drawer_image.png
│ ├── olivia.jpg
│ ├── sam.jpg
│ ├── sophia.jpg
│ ├── splashimage.png
│ └── user.png
├── ios
├── .gitignore
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── WorkspaceSettings.xcsettings
└── Runner
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── Icon-App-1024x1024@1x.png
│ │ ├── Icon-App-20x20@1x.png
│ │ ├── Icon-App-20x20@2x.png
│ │ ├── Icon-App-20x20@3x.png
│ │ ├── Icon-App-29x29@1x.png
│ │ ├── Icon-App-29x29@2x.png
│ │ ├── Icon-App-29x29@3x.png
│ │ ├── Icon-App-40x40@1x.png
│ │ ├── Icon-App-40x40@2x.png
│ │ ├── Icon-App-40x40@3x.png
│ │ ├── Icon-App-60x60@2x.png
│ │ ├── Icon-App-60x60@3x.png
│ │ ├── Icon-App-76x76@1x.png
│ │ ├── Icon-App-76x76@2x.png
│ │ └── Icon-App-83.5x83.5@2x.png
│ └── LaunchImage.imageset
│ │ ├── Contents.json
│ │ ├── LaunchImage.png
│ │ ├── LaunchImage@2x.png
│ │ ├── LaunchImage@3x.png
│ │ └── README.md
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── Runner-Bridging-Header.h
├── lib
├── main.dart
├── screens
│ ├── auth_screen.dart
│ ├── chat_screen.dart
│ ├── home_screen.dart
│ ├── photo_view_screen.dart
│ └── profile_screen.dart
└── widgets
│ ├── category_selector.dart
│ ├── chat
│ ├── messages.dart
│ └── newMessageField.dart
│ ├── outline_button.dart
│ ├── primary_button.dart
│ └── text_field_with_icon.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 | **/ios/Flutter/.last_build_id
26 | .dart_tool/
27 | .flutter-plugins
28 | .flutter-plugins-dependencies
29 | .packages
30 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Web related
35 | lib/generated_plugin_registrant.dart
36 |
37 | # Symbolication related
38 | app.*.symbols
39 |
40 | # Obfuscation related
41 | app.*.map.json
42 |
--------------------------------------------------------------------------------
/.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: 78910062997c3a836feee883712c241a5fd22983
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 | {
8 | "name": "messanger",
9 | "request": "launch",
10 | "type": "dart"
11 | }
12 | ]
13 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Flutter Chat App
2 | This is a simple Real-time chat app using Firebase firestore.
3 |
4 | # Some Features
5 | ◾one to one private chat
6 | ◾ Search about registered users
7 | ◾ Send pictures from your phone
8 | ◾ Edit your image profile
9 | ..
10 | # Techniques used:
11 | ◾Flutter framework
12 | ◾Firebase firestore
13 | ◾Firebase Authentication
14 | ◾Firebase Storage
15 | ◾Shared preferences
16 |
17 | # Screenshots
18 | 
19 |
20 |
21 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 | apply plugin: 'com.google.gms.google-services'
28 |
29 | android {
30 | compileSdkVersion 29
31 |
32 | sourceSets {
33 | main.java.srcDirs += 'src/main/kotlin'
34 | }
35 |
36 | lintOptions {
37 | disable 'InvalidPackage'
38 | }
39 |
40 | defaultConfig {
41 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
42 | applicationId "com.example.messanger"
43 | minSdkVersion 21
44 | targetSdkVersion 29
45 | multiDexEnabled true
46 | versionCode flutterVersionCode.toInteger()
47 | versionName flutterVersionName
48 | }
49 |
50 | buildTypes {
51 | release {
52 | // TODO: Add your own signing config for the release build.
53 | // Signing with the debug keys for now, so `flutter run --release` works.
54 | signingConfig signingConfigs.debug
55 | }
56 | }
57 | }
58 |
59 | flutter {
60 | source '../..'
61 | }
62 |
63 | dependencies {
64 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
65 | implementation platform('com.google.firebase:firebase-bom:26.4.0')
66 | implementation 'com.google.firebase:firebase-analytics'
67 | }
68 |
--------------------------------------------------------------------------------
/android/app/google-services.json:
--------------------------------------------------------------------------------
1 | {
2 | "project_info": {
3 | "project_number": "54580260606",
4 | "project_id": "messanger-5dad0",
5 | "storage_bucket": "messanger-5dad0.appspot.com"
6 | },
7 | "client": [
8 | {
9 | "client_info": {
10 | "mobilesdk_app_id": "1:54580260606:android:b0cf39a39f89cd48797faf",
11 | "android_client_info": {
12 | "package_name": "com.example.messanger"
13 | }
14 | },
15 | "oauth_client": [
16 | {
17 | "client_id": "54580260606-hd2d5fbpfdhl3cv6t9i0t0l5l8bdhoql.apps.googleusercontent.com",
18 | "client_type": 1,
19 | "android_info": {
20 | "package_name": "com.example.messanger",
21 | "certificate_hash": "a237de244e6910970cf532bb5219aa433a75cfd2"
22 | }
23 | },
24 | {
25 | "client_id": "54580260606-9rkqt07mp465l29bq9eiap4r3b58e49n.apps.googleusercontent.com",
26 | "client_type": 3
27 | }
28 | ],
29 | "api_key": [
30 | {
31 | "current_key": "AIzaSyCcTE8qEeuUbx-B0XjFpOXhQF5dv56hHY8"
32 | }
33 | ],
34 | "services": {
35 | "appinvite_service": {
36 | "other_platform_oauth_client": [
37 | {
38 | "client_id": "54580260606-9rkqt07mp465l29bq9eiap4r3b58e49n.apps.googleusercontent.com",
39 | "client_type": 3
40 | }
41 | ]
42 | }
43 | }
44 | }
45 | ],
46 | "configuration_version": "1"
47 | }
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
8 |
12 |
19 |
23 |
27 |
32 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
47 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/messanger/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.messanger
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ma7moudk3/FireStore-Chat-App/7f85932c0b0c0f7a0f54ab59fc140d9902b6f812/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ma7moudk3/FireStore-Chat-App/7f85932c0b0c0f7a0f54ab59fc140d9902b6f812/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ma7moudk3/FireStore-Chat-App/7f85932c0b0c0f7a0f54ab59fc140d9902b6f812/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ma7moudk3/FireStore-Chat-App/7f85932c0b0c0f7a0f54ab59fc140d9902b6f812/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ma7moudk3/FireStore-Chat-App/7f85932c0b0c0f7a0f54ab59fc140d9902b6f812/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.3.50'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:3.5.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | classpath 'com.google.gms:google-services:4.3.5'
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | google()
18 | jcenter()
19 | }
20 | }
21 |
22 | rootProject.buildDir = '../build'
23 | subprojects {
24 | project.buildDir = "${rootProject.buildDir}/${project.name}"
25 | }
26 | subprojects {
27 | project.evaluationDependsOn(':app')
28 | }
29 |
30 | task clean(type: Delete) {
31 | delete rootProject.buildDir
32 | }
33 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 | android.enableR8=true
5 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
7 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4 | def properties = new Properties()
5 |
6 | assert localPropertiesFile.exists()
7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
8 |
9 | def flutterSdkPath = properties.getProperty("flutter.sdk")
10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12 |
--------------------------------------------------------------------------------
/assets/images/drawer_image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ma7moudk3/FireStore-Chat-App/7f85932c0b0c0f7a0f54ab59fc140d9902b6f812/assets/images/drawer_image.png
--------------------------------------------------------------------------------
/assets/images/olivia.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ma7moudk3/FireStore-Chat-App/7f85932c0b0c0f7a0f54ab59fc140d9902b6f812/assets/images/olivia.jpg
--------------------------------------------------------------------------------
/assets/images/sam.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ma7moudk3/FireStore-Chat-App/7f85932c0b0c0f7a0f54ab59fc140d9902b6f812/assets/images/sam.jpg
--------------------------------------------------------------------------------
/assets/images/sophia.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ma7moudk3/FireStore-Chat-App/7f85932c0b0c0f7a0f54ab59fc140d9902b6f812/assets/images/sophia.jpg
--------------------------------------------------------------------------------
/assets/images/splashimage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ma7moudk3/FireStore-Chat-App/7f85932c0b0c0f7a0f54ab59fc140d9902b6f812/assets/images/splashimage.png
--------------------------------------------------------------------------------
/assets/images/user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ma7moudk3/FireStore-Chat-App/7f85932c0b0c0f7a0f54ab59fc140d9902b6f812/assets/images/user.png
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | *.mode1v3
2 | *.mode2v3
3 | *.moved-aside
4 | *.pbxuser
5 | *.perspectivev3
6 | **/*sync/
7 | .sconsign.dblite
8 | .tags*
9 | **/.vagrant/
10 | **/DerivedData/
11 | Icon?
12 | **/Pods/
13 | **/.symlinks/
14 | profile
15 | xcuserdata
16 | **/.generated/
17 | Flutter/App.framework
18 | Flutter/Flutter.framework
19 | Flutter/Flutter.podspec
20 | Flutter/Generated.xcconfig
21 | Flutter/app.flx
22 | Flutter/app.zip
23 | Flutter/flutter_assets/
24 | Flutter/flutter_export_environment.sh
25 | ServiceDefinitions.json
26 | Runner/GeneratedPluginRegistrant.*
27 |
28 | # Exceptions to above rules.
29 | !default.mode1v3
30 | !default.mode2v3
31 | !default.pbxuser
32 | !default.perspectivev3
33 |
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "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 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
16 | /* End PBXBuildFile section */
17 |
18 | /* Begin PBXCopyFilesBuildPhase section */
19 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
20 | isa = PBXCopyFilesBuildPhase;
21 | buildActionMask = 2147483647;
22 | dstPath = "";
23 | dstSubfolderSpec = 10;
24 | files = (
25 | );
26 | name = "Embed Frameworks";
27 | runOnlyForDeploymentPostprocessing = 0;
28 | };
29 | /* End PBXCopyFilesBuildPhase section */
30 |
31 | /* Begin PBXFileReference section */
32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
41 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
45 | /* End PBXFileReference section */
46 |
47 | /* Begin PBXFrameworksBuildPhase section */
48 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
49 | isa = PBXFrameworksBuildPhase;
50 | buildActionMask = 2147483647;
51 | files = (
52 | );
53 | runOnlyForDeploymentPostprocessing = 0;
54 | };
55 | /* End PBXFrameworksBuildPhase section */
56 |
57 | /* Begin PBXGroup section */
58 | 9740EEB11CF90186004384FC /* Flutter */ = {
59 | isa = PBXGroup;
60 | children = (
61 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
62 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
63 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
64 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
65 | );
66 | name = Flutter;
67 | sourceTree = "";
68 | };
69 | 97C146E51CF9000F007C117D = {
70 | isa = PBXGroup;
71 | children = (
72 | 9740EEB11CF90186004384FC /* Flutter */,
73 | 97C146F01CF9000F007C117D /* Runner */,
74 | 97C146EF1CF9000F007C117D /* Products */,
75 | );
76 | sourceTree = "";
77 | };
78 | 97C146EF1CF9000F007C117D /* Products */ = {
79 | isa = PBXGroup;
80 | children = (
81 | 97C146EE1CF9000F007C117D /* Runner.app */,
82 | );
83 | name = Products;
84 | sourceTree = "";
85 | };
86 | 97C146F01CF9000F007C117D /* Runner */ = {
87 | isa = PBXGroup;
88 | children = (
89 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
92 | 97C147021CF9000F007C117D /* Info.plist */,
93 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
94 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
95 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
96 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
97 | );
98 | path = Runner;
99 | sourceTree = "";
100 | };
101 | /* End PBXGroup section */
102 |
103 | /* Begin PBXNativeTarget section */
104 | 97C146ED1CF9000F007C117D /* Runner */ = {
105 | isa = PBXNativeTarget;
106 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
107 | buildPhases = (
108 | 9740EEB61CF901F6004384FC /* Run Script */,
109 | 97C146EA1CF9000F007C117D /* Sources */,
110 | 97C146EB1CF9000F007C117D /* Frameworks */,
111 | 97C146EC1CF9000F007C117D /* Resources */,
112 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
113 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
114 | );
115 | buildRules = (
116 | );
117 | dependencies = (
118 | );
119 | name = Runner;
120 | productName = Runner;
121 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
122 | productType = "com.apple.product-type.application";
123 | };
124 | /* End PBXNativeTarget section */
125 |
126 | /* Begin PBXProject section */
127 | 97C146E61CF9000F007C117D /* Project object */ = {
128 | isa = PBXProject;
129 | attributes = {
130 | LastUpgradeCheck = 1020;
131 | ORGANIZATIONNAME = "";
132 | TargetAttributes = {
133 | 97C146ED1CF9000F007C117D = {
134 | CreatedOnToolsVersion = 7.3.1;
135 | LastSwiftMigration = 1100;
136 | };
137 | };
138 | };
139 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
140 | compatibilityVersion = "Xcode 9.3";
141 | developmentRegion = en;
142 | hasScannedForEncodings = 0;
143 | knownRegions = (
144 | en,
145 | Base,
146 | );
147 | mainGroup = 97C146E51CF9000F007C117D;
148 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
149 | projectDirPath = "";
150 | projectRoot = "";
151 | targets = (
152 | 97C146ED1CF9000F007C117D /* Runner */,
153 | );
154 | };
155 | /* End PBXProject section */
156 |
157 | /* Begin PBXResourcesBuildPhase section */
158 | 97C146EC1CF9000F007C117D /* Resources */ = {
159 | isa = PBXResourcesBuildPhase;
160 | buildActionMask = 2147483647;
161 | files = (
162 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
163 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
164 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
165 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
166 | );
167 | runOnlyForDeploymentPostprocessing = 0;
168 | };
169 | /* End PBXResourcesBuildPhase section */
170 |
171 | /* Begin PBXShellScriptBuildPhase section */
172 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
173 | isa = PBXShellScriptBuildPhase;
174 | buildActionMask = 2147483647;
175 | files = (
176 | );
177 | inputPaths = (
178 | );
179 | name = "Thin Binary";
180 | outputPaths = (
181 | );
182 | runOnlyForDeploymentPostprocessing = 0;
183 | shellPath = /bin/sh;
184 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
185 | };
186 | 9740EEB61CF901F6004384FC /* Run Script */ = {
187 | isa = PBXShellScriptBuildPhase;
188 | buildActionMask = 2147483647;
189 | files = (
190 | );
191 | inputPaths = (
192 | );
193 | name = "Run Script";
194 | outputPaths = (
195 | );
196 | runOnlyForDeploymentPostprocessing = 0;
197 | shellPath = /bin/sh;
198 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
199 | };
200 | /* End PBXShellScriptBuildPhase section */
201 |
202 | /* Begin PBXSourcesBuildPhase section */
203 | 97C146EA1CF9000F007C117D /* Sources */ = {
204 | isa = PBXSourcesBuildPhase;
205 | buildActionMask = 2147483647;
206 | files = (
207 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
208 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
209 | );
210 | runOnlyForDeploymentPostprocessing = 0;
211 | };
212 | /* End PBXSourcesBuildPhase section */
213 |
214 | /* Begin PBXVariantGroup section */
215 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
216 | isa = PBXVariantGroup;
217 | children = (
218 | 97C146FB1CF9000F007C117D /* Base */,
219 | );
220 | name = Main.storyboard;
221 | sourceTree = "";
222 | };
223 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
224 | isa = PBXVariantGroup;
225 | children = (
226 | 97C147001CF9000F007C117D /* Base */,
227 | );
228 | name = LaunchScreen.storyboard;
229 | sourceTree = "";
230 | };
231 | /* End PBXVariantGroup section */
232 |
233 | /* Begin XCBuildConfiguration section */
234 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
235 | isa = XCBuildConfiguration;
236 | buildSettings = {
237 | ALWAYS_SEARCH_USER_PATHS = NO;
238 | CLANG_ANALYZER_NONNULL = YES;
239 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
240 | CLANG_CXX_LIBRARY = "libc++";
241 | CLANG_ENABLE_MODULES = YES;
242 | CLANG_ENABLE_OBJC_ARC = YES;
243 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
244 | CLANG_WARN_BOOL_CONVERSION = YES;
245 | CLANG_WARN_COMMA = YES;
246 | CLANG_WARN_CONSTANT_CONVERSION = YES;
247 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
248 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
249 | CLANG_WARN_EMPTY_BODY = YES;
250 | CLANG_WARN_ENUM_CONVERSION = YES;
251 | CLANG_WARN_INFINITE_RECURSION = YES;
252 | CLANG_WARN_INT_CONVERSION = YES;
253 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
254 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
255 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
256 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
257 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
258 | CLANG_WARN_STRICT_PROTOTYPES = YES;
259 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
260 | CLANG_WARN_UNREACHABLE_CODE = YES;
261 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
262 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
263 | COPY_PHASE_STRIP = NO;
264 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
265 | ENABLE_NS_ASSERTIONS = NO;
266 | ENABLE_STRICT_OBJC_MSGSEND = YES;
267 | GCC_C_LANGUAGE_STANDARD = gnu99;
268 | GCC_NO_COMMON_BLOCKS = YES;
269 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
270 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
271 | GCC_WARN_UNDECLARED_SELECTOR = YES;
272 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
273 | GCC_WARN_UNUSED_FUNCTION = YES;
274 | GCC_WARN_UNUSED_VARIABLE = YES;
275 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
276 | MTL_ENABLE_DEBUG_INFO = NO;
277 | SDKROOT = iphoneos;
278 | SUPPORTED_PLATFORMS = iphoneos;
279 | TARGETED_DEVICE_FAMILY = "1,2";
280 | VALIDATE_PRODUCT = YES;
281 | };
282 | name = Profile;
283 | };
284 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
285 | isa = XCBuildConfiguration;
286 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
287 | buildSettings = {
288 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
289 | CLANG_ENABLE_MODULES = YES;
290 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
291 | ENABLE_BITCODE = NO;
292 | FRAMEWORK_SEARCH_PATHS = (
293 | "$(inherited)",
294 | "$(PROJECT_DIR)/Flutter",
295 | );
296 | INFOPLIST_FILE = Runner/Info.plist;
297 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
298 | LIBRARY_SEARCH_PATHS = (
299 | "$(inherited)",
300 | "$(PROJECT_DIR)/Flutter",
301 | );
302 | PRODUCT_BUNDLE_IDENTIFIER = com.example.messanger;
303 | PRODUCT_NAME = "$(TARGET_NAME)";
304 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
305 | SWIFT_VERSION = 5.0;
306 | VERSIONING_SYSTEM = "apple-generic";
307 | };
308 | name = Profile;
309 | };
310 | 97C147031CF9000F007C117D /* Debug */ = {
311 | isa = XCBuildConfiguration;
312 | buildSettings = {
313 | ALWAYS_SEARCH_USER_PATHS = NO;
314 | CLANG_ANALYZER_NONNULL = YES;
315 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
316 | CLANG_CXX_LIBRARY = "libc++";
317 | CLANG_ENABLE_MODULES = YES;
318 | CLANG_ENABLE_OBJC_ARC = YES;
319 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
320 | CLANG_WARN_BOOL_CONVERSION = YES;
321 | CLANG_WARN_COMMA = YES;
322 | CLANG_WARN_CONSTANT_CONVERSION = YES;
323 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
324 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
325 | CLANG_WARN_EMPTY_BODY = YES;
326 | CLANG_WARN_ENUM_CONVERSION = YES;
327 | CLANG_WARN_INFINITE_RECURSION = YES;
328 | CLANG_WARN_INT_CONVERSION = YES;
329 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
330 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
331 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
332 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
333 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
334 | CLANG_WARN_STRICT_PROTOTYPES = YES;
335 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
336 | CLANG_WARN_UNREACHABLE_CODE = YES;
337 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
338 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
339 | COPY_PHASE_STRIP = NO;
340 | DEBUG_INFORMATION_FORMAT = dwarf;
341 | ENABLE_STRICT_OBJC_MSGSEND = YES;
342 | ENABLE_TESTABILITY = YES;
343 | GCC_C_LANGUAGE_STANDARD = gnu99;
344 | GCC_DYNAMIC_NO_PIC = NO;
345 | GCC_NO_COMMON_BLOCKS = YES;
346 | GCC_OPTIMIZATION_LEVEL = 0;
347 | GCC_PREPROCESSOR_DEFINITIONS = (
348 | "DEBUG=1",
349 | "$(inherited)",
350 | );
351 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
352 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
353 | GCC_WARN_UNDECLARED_SELECTOR = YES;
354 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
355 | GCC_WARN_UNUSED_FUNCTION = YES;
356 | GCC_WARN_UNUSED_VARIABLE = YES;
357 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
358 | MTL_ENABLE_DEBUG_INFO = YES;
359 | ONLY_ACTIVE_ARCH = YES;
360 | SDKROOT = iphoneos;
361 | TARGETED_DEVICE_FAMILY = "1,2";
362 | };
363 | name = Debug;
364 | };
365 | 97C147041CF9000F007C117D /* Release */ = {
366 | isa = XCBuildConfiguration;
367 | buildSettings = {
368 | ALWAYS_SEARCH_USER_PATHS = NO;
369 | CLANG_ANALYZER_NONNULL = YES;
370 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
371 | CLANG_CXX_LIBRARY = "libc++";
372 | CLANG_ENABLE_MODULES = YES;
373 | CLANG_ENABLE_OBJC_ARC = YES;
374 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
375 | CLANG_WARN_BOOL_CONVERSION = YES;
376 | CLANG_WARN_COMMA = YES;
377 | CLANG_WARN_CONSTANT_CONVERSION = YES;
378 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
379 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
380 | CLANG_WARN_EMPTY_BODY = YES;
381 | CLANG_WARN_ENUM_CONVERSION = YES;
382 | CLANG_WARN_INFINITE_RECURSION = YES;
383 | CLANG_WARN_INT_CONVERSION = YES;
384 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
385 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
386 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
387 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
388 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
389 | CLANG_WARN_STRICT_PROTOTYPES = YES;
390 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
391 | CLANG_WARN_UNREACHABLE_CODE = YES;
392 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
393 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
394 | COPY_PHASE_STRIP = NO;
395 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
396 | ENABLE_NS_ASSERTIONS = NO;
397 | ENABLE_STRICT_OBJC_MSGSEND = YES;
398 | GCC_C_LANGUAGE_STANDARD = gnu99;
399 | GCC_NO_COMMON_BLOCKS = YES;
400 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
401 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
402 | GCC_WARN_UNDECLARED_SELECTOR = YES;
403 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
404 | GCC_WARN_UNUSED_FUNCTION = YES;
405 | GCC_WARN_UNUSED_VARIABLE = YES;
406 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
407 | MTL_ENABLE_DEBUG_INFO = NO;
408 | SDKROOT = iphoneos;
409 | SUPPORTED_PLATFORMS = iphoneos;
410 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
411 | TARGETED_DEVICE_FAMILY = "1,2";
412 | VALIDATE_PRODUCT = YES;
413 | };
414 | name = Release;
415 | };
416 | 97C147061CF9000F007C117D /* Debug */ = {
417 | isa = XCBuildConfiguration;
418 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
419 | buildSettings = {
420 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
421 | CLANG_ENABLE_MODULES = YES;
422 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
423 | ENABLE_BITCODE = NO;
424 | FRAMEWORK_SEARCH_PATHS = (
425 | "$(inherited)",
426 | "$(PROJECT_DIR)/Flutter",
427 | );
428 | INFOPLIST_FILE = Runner/Info.plist;
429 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
430 | LIBRARY_SEARCH_PATHS = (
431 | "$(inherited)",
432 | "$(PROJECT_DIR)/Flutter",
433 | );
434 | PRODUCT_BUNDLE_IDENTIFIER = com.example.messanger;
435 | PRODUCT_NAME = "$(TARGET_NAME)";
436 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
437 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
438 | SWIFT_VERSION = 5.0;
439 | VERSIONING_SYSTEM = "apple-generic";
440 | };
441 | name = Debug;
442 | };
443 | 97C147071CF9000F007C117D /* Release */ = {
444 | isa = XCBuildConfiguration;
445 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
446 | buildSettings = {
447 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
448 | CLANG_ENABLE_MODULES = YES;
449 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
450 | ENABLE_BITCODE = NO;
451 | FRAMEWORK_SEARCH_PATHS = (
452 | "$(inherited)",
453 | "$(PROJECT_DIR)/Flutter",
454 | );
455 | INFOPLIST_FILE = Runner/Info.plist;
456 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
457 | LIBRARY_SEARCH_PATHS = (
458 | "$(inherited)",
459 | "$(PROJECT_DIR)/Flutter",
460 | );
461 | PRODUCT_BUNDLE_IDENTIFIER = com.example.messanger;
462 | PRODUCT_NAME = "$(TARGET_NAME)";
463 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
464 | SWIFT_VERSION = 5.0;
465 | VERSIONING_SYSTEM = "apple-generic";
466 | };
467 | name = Release;
468 | };
469 | /* End XCBuildConfiguration section */
470 |
471 | /* Begin XCConfigurationList section */
472 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
473 | isa = XCConfigurationList;
474 | buildConfigurations = (
475 | 97C147031CF9000F007C117D /* Debug */,
476 | 97C147041CF9000F007C117D /* Release */,
477 | 249021D3217E4FDB00AE95B9 /* Profile */,
478 | );
479 | defaultConfigurationIsVisible = 0;
480 | defaultConfigurationName = Release;
481 | };
482 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
483 | isa = XCConfigurationList;
484 | buildConfigurations = (
485 | 97C147061CF9000F007C117D /* Debug */,
486 | 97C147071CF9000F007C117D /* Release */,
487 | 249021D4217E4FDB00AE95B9 /* Profile */,
488 | );
489 | defaultConfigurationIsVisible = 0;
490 | defaultConfigurationName = Release;
491 | };
492 | /* End XCConfigurationList section */
493 | };
494 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
495 | }
496 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ma7moudk3/FireStore-Chat-App/7f85932c0b0c0f7a0f54ab59fc140d9902b6f812/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/ma7moudk3/FireStore-Chat-App/7f85932c0b0c0f7a0f54ab59fc140d9902b6f812/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/ma7moudk3/FireStore-Chat-App/7f85932c0b0c0f7a0f54ab59fc140d9902b6f812/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/ma7moudk3/FireStore-Chat-App/7f85932c0b0c0f7a0f54ab59fc140d9902b6f812/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/ma7moudk3/FireStore-Chat-App/7f85932c0b0c0f7a0f54ab59fc140d9902b6f812/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/ma7moudk3/FireStore-Chat-App/7f85932c0b0c0f7a0f54ab59fc140d9902b6f812/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/ma7moudk3/FireStore-Chat-App/7f85932c0b0c0f7a0f54ab59fc140d9902b6f812/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/ma7moudk3/FireStore-Chat-App/7f85932c0b0c0f7a0f54ab59fc140d9902b6f812/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/ma7moudk3/FireStore-Chat-App/7f85932c0b0c0f7a0f54ab59fc140d9902b6f812/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/ma7moudk3/FireStore-Chat-App/7f85932c0b0c0f7a0f54ab59fc140d9902b6f812/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ma7moudk3/FireStore-Chat-App/7f85932c0b0c0f7a0f54ab59fc140d9902b6f812/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/ma7moudk3/FireStore-Chat-App/7f85932c0b0c0f7a0f54ab59fc140d9902b6f812/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ma7moudk3/FireStore-Chat-App/7f85932c0b0c0f7a0f54ab59fc140d9902b6f812/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/ma7moudk3/FireStore-Chat-App/7f85932c0b0c0f7a0f54ab59fc140d9902b6f812/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/ma7moudk3/FireStore-Chat-App/7f85932c0b0c0f7a0f54ab59fc140d9902b6f812/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/ma7moudk3/FireStore-Chat-App/7f85932c0b0c0f7a0f54ab59fc140d9902b6f812/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ma7moudk3/FireStore-Chat-App/7f85932c0b0c0f7a0f54ab59fc140d9902b6f812/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ma7moudk3/FireStore-Chat-App/7f85932c0b0c0f7a0f54ab59fc140d9902b6f812/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 | messanger
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'dart:ui';
2 | import 'package:chatting/screens/auth_screen.dart';
3 | import 'package:chatting/screens/chat_screen.dart';
4 | import 'package:chatting/screens/home_screen.dart';
5 | import 'package:firebase_auth/firebase_auth.dart';
6 | import 'package:firebase_core/firebase_core.dart';
7 | import 'package:flutter/material.dart';
8 |
9 | Future main() async {
10 | WidgetsFlutterBinding.ensureInitialized();
11 | await Firebase.initializeApp();
12 | runApp(MyApp());
13 | }
14 | class MyApp extends StatelessWidget {
15 | @override
16 | Widget build(BuildContext context) {
17 | return MaterialApp(
18 | title: 'Flutter Demo',
19 | theme: ThemeData(
20 | primarySwatch: Colors.blue,
21 | primaryColor: Color(0xFF272D3D),
22 | accentColor: Color(0xFF48495E),
23 | buttonColor: Color(0xFF0b8ba3),
24 | visualDensity: VisualDensity.adaptivePlatformDensity,
25 | ),
26 | home: StreamBuilder(
27 | stream: FirebaseAuth.instance.authStateChanges(),
28 | builder: (ctx , snapshot) {
29 | if(snapshot.hasData){
30 | return HomeScreen();
31 | }else{
32 | return SplashScreen();
33 | }
34 | }
35 | ,
36 | ),
37 | );
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/lib/screens/auth_screen.dart:
--------------------------------------------------------------------------------
1 | import 'package:chatting/widgets/outline_button.dart';
2 | import 'package:chatting/widgets/primary_button.dart';
3 | import 'package:chatting/widgets/text_field_with_icon.dart';
4 | import 'package:cloud_firestore/cloud_firestore.dart';
5 | import 'package:firebase_auth/firebase_auth.dart';
6 | import 'package:flutter/material.dart';
7 | import 'package:flutter/rendering.dart';
8 |
9 | class SplashScreen extends StatefulWidget {
10 | @override
11 | _SplashScreenState createState() => _SplashScreenState();
12 | }
13 |
14 | class _SplashScreenState extends State {
15 | //fireBase
16 | FirebaseAuth auth = FirebaseAuth.instance;
17 |
18 | //
19 | double windowWidth = 0;
20 | double windowHight = 0;
21 | double _loginOffsit = 0;
22 | double _registerOffsit = 0;
23 | double _loginXoffsit = 0;
24 | double _loginWidth = 0;
25 | Color loginColor = Colors.white;
26 | int _pageState = 0;
27 |
28 | // Login And registration
29 | String signupEmail;
30 | String signupPassword;
31 | String signUpUserName;
32 | String loginEmail;
33 | String loginPassword;
34 | //
35 | final _registerFormKey = GlobalKey();
36 | final _loginFormKey = GlobalKey();
37 | final GlobalKey _scaffoldKey = new GlobalKey();
38 | bool _isLoading = false;
39 |
40 | @override
41 | Widget build(BuildContext context) {
42 | //signUp();
43 | windowHight = MediaQuery.of(context).size.height;
44 | windowWidth = MediaQuery.of(context).size.width;
45 |
46 | var _backgroundColor = Theme.of(context).primaryColor;
47 | var _headingColor = Colors.white;
48 | switch (_pageState) {
49 | case 0:
50 | _backgroundColor = Theme.of(context).primaryColor;
51 | _loginOffsit = windowHight;
52 | _registerOffsit = windowHight;
53 | _loginXoffsit = 0;
54 | _loginWidth = windowWidth;
55 | loginColor = Colors.white;
56 | break;
57 | case 1:
58 | _backgroundColor = Theme.of(context).primaryColor;
59 | _headingColor = Colors.white;
60 | _loginOffsit = 270;
61 | _registerOffsit = windowHight;
62 | _loginXoffsit = 0;
63 | _loginWidth = windowWidth;
64 | loginColor = Theme.of(context).accentColor;
65 | break;
66 | case 2:
67 | _backgroundColor = Theme.of(context).primaryColor;
68 | _headingColor = Colors.white;
69 | _loginOffsit = 250;
70 | _registerOffsit = 270;
71 | _loginXoffsit = 20;
72 | _loginWidth = windowWidth - 40;
73 | loginColor = Color(0x7048495E);
74 |
75 | break;
76 | }
77 |
78 | return Scaffold(
79 | key: _scaffoldKey,
80 | backgroundColor: Theme.of(context).primaryColor,
81 | body: Stack(
82 | children: [
83 | GestureDetector(
84 | onTap: () {
85 | setState(() {
86 | _pageState = 0;
87 | });
88 | },
89 | child: AnimatedContainer(
90 | curve: Curves.fastLinearToSlowEaseIn,
91 | color: _backgroundColor,
92 | duration: Duration(milliseconds: 500),
93 | child: SizedBox.expand(
94 | child: Column(
95 | crossAxisAlignment: CrossAxisAlignment.center,
96 | children: [
97 | Container(
98 | padding: EdgeInsets.only(top: 97, bottom: 15),
99 | child: Text(
100 | 'Chat App',
101 | style: TextStyle(
102 | fontSize: 28,
103 | color: _headingColor,
104 | fontWeight: FontWeight.w700,
105 | ),
106 | ),
107 | ),
108 | SizedBox(
109 | width: 260.0,
110 | height: 130.0,
111 | child: Text(
112 | 'Connect with friends and family at any time, with our comprehensive free app',
113 | style: TextStyle(
114 | fontSize: 16,
115 | color: _headingColor,
116 | fontWeight: FontWeight.w500,
117 | ),
118 | textAlign: TextAlign.center,
119 | ),
120 | ),
121 | Image.asset(
122 | 'assets/images/splashimage.png',
123 | width: 300,
124 | height: 300,
125 | ),
126 | SizedBox(
127 | height: 100,
128 | ),
129 | GestureDetector(
130 | onTap: () {
131 | setState(() {
132 | if (_pageState != 0)
133 | _pageState = 0;
134 | else
135 | _pageState = 1;
136 | });
137 | },
138 | child: Container(
139 | padding: EdgeInsets.all(20),
140 | width: 350.0,
141 | decoration: BoxDecoration(
142 | borderRadius: BorderRadius.circular(27.0),
143 | color: Theme.of(context).buttonColor,
144 | ),
145 | child: Text(
146 | 'Get Started',
147 | style: TextStyle(
148 | fontSize: 16,
149 | color: const Color(0xffffffff),
150 | fontWeight: FontWeight.w700,
151 | ),
152 | textAlign: TextAlign.center,
153 | )),
154 | )
155 | ],
156 | ),
157 | ),
158 | ),
159 | ),
160 | GestureDetector(
161 | onTap: () {
162 | setState(() {
163 | _pageState = 2;
164 | });
165 | },
166 | child: AnimatedContainer(
167 | width: _loginWidth,
168 | duration: Duration(milliseconds: 1000),
169 | curve: Curves.fastLinearToSlowEaseIn,
170 | transform:
171 | Matrix4.translationValues(_loginXoffsit, _loginOffsit, 0),
172 | decoration: BoxDecoration(
173 | color: loginColor,
174 | borderRadius: BorderRadius.only(
175 | topLeft: Radius.circular(25),
176 | topRight: Radius.circular(25))),
177 | child: Padding(
178 | padding: const EdgeInsets.only(top: 55, left: 25, right: 25),
179 | child: Form(
180 | key: _loginFormKey,
181 | child: Column(
182 | mainAxisAlignment: MainAxisAlignment.start,
183 | children: [
184 | Column(
185 | children: [
186 | Container(
187 | margin: EdgeInsets.only(bottom: 20),
188 | child: Text(
189 | "Login To Continue",
190 | style:
191 | TextStyle(fontSize: 20, color: Colors.white),
192 | ),
193 | ),
194 | SizedBox(
195 | height: 25,
196 | ),
197 | InputWithIcon(
198 | icon: Icons.email,
199 | keyboardType: TextInputType.emailAddress,
200 | hint: "Enter Email...",
201 | onSaved: (value) {
202 | loginEmail = value;
203 | },
204 | validator: (String val) {
205 | if (val.isEmpty || !val.contains('@')) {
206 | return "please Enter A valid email Address";
207 | }
208 | return null;
209 | }),
210 | SizedBox(
211 | height: 20,
212 | ),
213 | InputWithIcon(
214 | icon: Icons.vpn_key,
215 | keyboardType: TextInputType.visiblePassword,
216 | hint: "Enter Password...",
217 | obscureText: true,
218 | onSaved: (value) {
219 | loginPassword = value;
220 | },
221 | validator: (String val) {
222 | if (val.isEmpty || val.length < 7) {
223 | return "password should be at least 7 charcters";
224 | }
225 | return null;
226 | })
227 | ],
228 | ),
229 | SizedBox(
230 | height: 55,
231 | ),
232 | if (_isLoading)
233 | CircularProgressIndicator(
234 | backgroundColor: Colors.white,
235 | ),
236 | if (!_isLoading)
237 | Column(
238 | children: [
239 | PrimaryButton(
240 | btnText: "Login",
241 | onTap: () {
242 | _submit();
243 | },
244 | ),
245 | SizedBox(
246 | height: 10,
247 | ),
248 | GestureDetector(
249 | onTap: () {
250 | setState(() {
251 | _pageState = 2;
252 | });
253 | },
254 | child: OutlineBtn(
255 | btnText: "Create New Account",
256 | ),
257 | )
258 | ],
259 | ),
260 | ],
261 | ),
262 | ),
263 | ),
264 | ),
265 | ),
266 | GestureDetector(
267 | onTap: () {
268 | setState(() {
269 | _pageState = 1;
270 | });
271 | },
272 | child: AnimatedContainer(
273 | duration: Duration(milliseconds: 1000),
274 | curve: Curves.fastLinearToSlowEaseIn,
275 | transform: Matrix4.translationValues(0, _registerOffsit, 0),
276 | decoration: BoxDecoration(
277 | color: Theme.of(context).accentColor,
278 | borderRadius: BorderRadius.only(
279 | topLeft: Radius.circular(25),
280 | topRight: Radius.circular(25))),
281 | child: Padding(
282 | padding: const EdgeInsets.only(top: 40, left: 25, right: 25),
283 | child: Form(
284 | key: _registerFormKey,
285 | child: Column(
286 | mainAxisAlignment: MainAxisAlignment.start,
287 | children: [
288 | Column(
289 | children: [
290 | Container(
291 | margin: EdgeInsets.only(bottom: 20),
292 | child: Text(
293 | "Create New Account",
294 | style:
295 | TextStyle(fontSize: 20, color: Colors.white),
296 | ),
297 | ),
298 | SizedBox(
299 | height: 5,
300 | ),
301 | InputWithIcon(
302 | keyboardType: TextInputType.emailAddress,
303 | icon: Icons.email,
304 | hint: "Enter Your Email",
305 | onSaved: (value) {
306 | signupEmail = value;
307 | },
308 | validator: (String val) {
309 | if (val.isEmpty || !val.contains('@')) {
310 | return "please Enter A valid email Address";
311 | }
312 | return null;
313 | }),
314 | SizedBox(
315 | height: 20,
316 | ),
317 | InputWithIcon(
318 | icon: Icons.person,
319 | keyboardType: TextInputType.text,
320 | hint: "Enter UserName",
321 | onSaved: (value) {
322 | signUpUserName = value;
323 | },
324 | validator: (String val) {
325 | if (val.isEmpty || val.length < 4) {
326 | return "please Enter at least four charcters";
327 | }
328 | return null;
329 | },
330 | ),
331 | SizedBox(
332 | height: 20,
333 | ),
334 | InputWithIcon(
335 | icon: Icons.vpn_key,
336 | keyboardType: TextInputType.visiblePassword,
337 | hint: "Enter Your Password",
338 | obscureText: true,
339 | onSaved: (value) {
340 | signupPassword = value;
341 | },
342 | validator: (String val) {
343 | if (val.isEmpty || val.length < 7) {
344 | return "password should be at least 7 charcters";
345 | }
346 | return null;
347 | })
348 | ],
349 | ),
350 | SizedBox(
351 | height: 23,
352 | ),
353 | if (!_isLoading)
354 | Column(
355 | children: [
356 | PrimaryButton(
357 | btnText: "Signup",
358 | onTap: () {
359 | _submit();
360 | },
361 | ),
362 | SizedBox(
363 | height: 10,
364 | ),
365 | GestureDetector(
366 | onTap: () {
367 | setState(() {
368 | _pageState = 2;
369 | });
370 | },
371 | child: OutlineBtn(
372 | btnText: "Login",
373 | ),
374 | ),
375 | SizedBox(
376 | height: 50,
377 | )
378 | ],
379 | ),
380 | if (_isLoading)
381 | CircularProgressIndicator(
382 | backgroundColor: Colors.white,
383 | )
384 | ],
385 | ),
386 | ),
387 | ),
388 | ),
389 | )
390 | ],
391 | ),
392 | );
393 | }
394 |
395 | void _submit() {
396 | final isValid1 = _registerFormKey.currentState.validate();
397 | final isValid2 = _loginFormKey.currentState.validate();
398 | FocusScope.of(context).unfocus();
399 | if (isValid1) {
400 | _registerFormKey.currentState.save();
401 | _submitAuthForm(signupEmail.trim(), signUpUserName.trim(), signupPassword,
402 | context, 2);
403 | } else if (isValid2) {
404 | _loginFormKey.currentState.save();
405 | _submitAuthForm(loginEmail.trim(), '', loginPassword, context, 1);
406 | }
407 | }
408 |
409 | void _submitAuthForm(String email, String userName, String password,
410 | BuildContext buildContext, int pageState) async {
411 | final _auth = FirebaseAuth.instance;
412 | UserCredential authResault;
413 | try {
414 | setState(() {
415 | _isLoading = true;
416 | });
417 | if (pageState == 1) {
418 | authResault = await _auth.signInWithEmailAndPassword(
419 | email: email, password: password);
420 | } else if (pageState == 2) {
421 | authResault = await _auth.createUserWithEmailAndPassword(
422 | email: email, password: password);
423 | await FirebaseFirestore.instance
424 | .collection('user')
425 | .doc(authResault.user.uid)
426 | .set({
427 | 'username': userName,
428 | 'email': email,
429 | 'uid': auth.currentUser.uid,
430 | 'imageUrl': null
431 | });
432 | }
433 | } on FirebaseAuthException catch (e) {
434 | String message;
435 | if (e.code == 'weak-password') {
436 | message = 'The password provided is too weak.';
437 | } else if (e.code == 'email-already-in-use') {
438 | message = 'The account already exists for that email.';
439 | } else if (e.code == 'user-not-found') {
440 | message = 'No user found for that email.';
441 | } else if (e.code == 'wrong-password') {
442 | message = 'Wrong password provided for that user.';
443 | }
444 | _scaffoldKey.currentState.showSnackBar(SnackBar(
445 | content: Text(message),
446 | backgroundColor: Theme.of(buildContext).errorColor,
447 | ));
448 | setState(() {
449 | _isLoading = false;
450 | });
451 | } catch (e) {
452 | print(e);
453 | setState(() {
454 | _isLoading = false;
455 | });
456 | }
457 | }
458 | }
459 |
--------------------------------------------------------------------------------
/lib/screens/chat_screen.dart:
--------------------------------------------------------------------------------
1 | import 'package:chatting/widgets/chat/messages.dart';
2 | import 'package:chatting/widgets/chat/newMessageField.dart';
3 | import 'package:firebase_auth/firebase_auth.dart';
4 | import 'package:flutter/material.dart';
5 |
6 | class ChatScreen extends StatefulWidget {
7 | final String receiverId;
8 | final String userName;
9 | final String userImage;
10 |
11 | const ChatScreen({Key key, this.receiverId, this.userName, this.userImage})
12 | : super(key: key);
13 |
14 | @override
15 | _ChatScreenState createState() => _ChatScreenState();
16 | }
17 |
18 | class _ChatScreenState extends State {
19 | Widget build(BuildContext context) {
20 | return Scaffold(
21 | backgroundColor: Theme.of(context).primaryColor,
22 | appBar: AppBar(
23 | toolbarHeight: 70,
24 | elevation: 0,
25 | leading: Padding(
26 | padding: const EdgeInsets.only(left: 20.0),
27 | child: CircleAvatar(
28 | radius: 20.0,
29 | backgroundImage: widget.userImage == null
30 | ? AssetImage('assets/images/user.png')
31 | : NetworkImage(widget.userImage)),
32 | ),
33 | title: Text(widget.userName),
34 | actions: [
35 | DropdownButton(
36 | underline: Container(),
37 | onChanged: (itemIdentifier) async {
38 | if (itemIdentifier == 'logout') {
39 | await FirebaseAuth.instance.signOut();
40 | }
41 | },
42 | icon: Icon(
43 | Icons.more_horiz_rounded,
44 | color: Colors.white,
45 | ),
46 | items: [
47 | DropdownMenuItem(
48 | child: Row(
49 | children: [
50 | Icon(Icons.exit_to_app),
51 | SizedBox(
52 | width: 10,
53 | ),
54 | Text('Logout')
55 | ],
56 | ),
57 | value: 'logout',
58 | )
59 | ],
60 | )
61 | ],
62 | ),
63 | body: Column(
64 | children: [
65 | Expanded(
66 | flex: 5,
67 | child: Container(child: Messages(receiverId: widget.receiverId))),
68 | Expanded(
69 | flex: 0,
70 | child: NewMessageField(
71 | receiverId: widget.receiverId,
72 | ),
73 | )
74 | ],
75 | ),
76 | );
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/lib/screens/home_screen.dart:
--------------------------------------------------------------------------------
1 | import 'dart:ui';
2 | import 'package:animated_drawer/views/animated_drawer.dart';
3 | import 'package:chatting/screens/chat_screen.dart';
4 | import 'package:chatting/screens/profile_screen.dart';
5 | import 'package:cloud_firestore/cloud_firestore.dart';
6 | import 'package:firebase_auth/firebase_auth.dart';
7 | import 'package:flutter/material.dart';
8 |
9 | class HomeScreen extends StatefulWidget {
10 | @override
11 | _HomeScreenState createState() => _HomeScreenState();
12 | }
13 |
14 | class _HomeScreenState extends State {
15 | String searchValue;
16 | @override
17 | Widget build(BuildContext context) {
18 | var theme = Theme.of(context);
19 | return AnimatedDrawer(
20 | openIcon: Padding(
21 | padding: const EdgeInsets.only(top: 5, right: 10, left: 15),
22 | child: Icon(
23 | Icons.menu_open,
24 | color: Colors.white,
25 | ),
26 | ),
27 | closeIcon: Padding(
28 | padding: const EdgeInsets.all(8.0),
29 | child: Icon(
30 | Icons.arrow_back_ios,
31 | color: Colors.white,
32 | ),
33 | ),
34 | shadowColor: Color(0x090272D3D),
35 | backgroundGradient: LinearGradient(
36 | colors: [
37 | Theme.of(context).primaryColor,
38 | Theme.of(context).accentColor
39 | ],
40 | ),
41 | homePageXValue: 150,
42 | homePageYValue: 80,
43 | homePageAngle: -0.1,
44 | homePageSpeed: 250,
45 | shadowXValue: 122,
46 | shadowYValue: 110,
47 | shadowAngle: -0.175,
48 | shadowSpeed: 550,
49 | menuPageContent: Padding(
50 | padding: const EdgeInsets.only(top: 120.0, right: 180, left: 10),
51 | child: Column(
52 | crossAxisAlignment: CrossAxisAlignment.start,
53 | children: [
54 | Padding(
55 | padding: const EdgeInsets.only(right: 80),
56 | child: Image.asset(
57 | 'assets/images/drawer_image.png',
58 | width: MediaQuery.of(context).size.width / 3,
59 | ),
60 | ),
61 | SizedBox(
62 | height: 110,
63 | ),
64 | Padding(
65 | padding: EdgeInsets.only(bottom: 40),
66 | ),
67 | Text(
68 | "Home Screen",
69 | style: TextStyle(
70 | fontSize: 16,
71 | color: Colors.white,
72 | ),
73 | ),
74 | Padding(
75 | padding: EdgeInsets.only(bottom: 20),
76 | ),
77 | InkWell(
78 | onTap: () {
79 | Navigator.push(
80 | context,
81 | MaterialPageRoute(
82 | builder: (BuildContext context) =>
83 | ProfileScreen()));
84 | },
85 | child: Text(
86 | "Profile",
87 | style: TextStyle(
88 | fontSize: 16,
89 | color: Colors.white,
90 | ),
91 | ),
92 | ),
93 | Padding(
94 | padding: EdgeInsets.only(bottom: 20),
95 | ),
96 | Divider(
97 | color: Colors.white38,
98 | thickness: 2,
99 | ),
100 | Padding(
101 | padding: EdgeInsets.only(bottom: 20),
102 | ),
103 | Text(
104 | "About",
105 | style: TextStyle(
106 | fontSize: 16,
107 | color: Colors.white,
108 | ),
109 | ),
110 | Padding(
111 | padding: EdgeInsets.only(bottom: 20),
112 | ),
113 | Text(
114 | "Share App",
115 | style: TextStyle(
116 | fontSize: 16,
117 | color: Colors.white,
118 | ),
119 | ),
120 | Padding(
121 | padding: EdgeInsets.only(bottom: 20),
122 | ),
123 | Divider(
124 | color: Colors.white38,
125 | thickness: 2,
126 | ),
127 | Padding(
128 | padding: EdgeInsets.only(bottom: 20),
129 | ),
130 | InkWell(
131 | onTap: () async {
132 | await FirebaseAuth.instance.signOut();
133 | },
134 | child: Text(
135 | "Logout",
136 | style: TextStyle(
137 | fontSize: 16,
138 | color: Colors.white,
139 | ),
140 | ),
141 | ),
142 | ],
143 | )),
144 | homePageContent: Scaffold(
145 | backgroundColor: Theme.of(context).primaryColor,
146 | appBar: AppBar(
147 | elevation: 0,
148 | backgroundColor: theme.primaryColor,
149 | title: Text(
150 | ' My Chat',
151 | style: TextStyle(fontWeight: FontWeight.bold, fontSize: 25),
152 | ),
153 | ),
154 | body: SingleChildScrollView(
155 | child: Column(
156 | mainAxisSize: MainAxisSize.min,
157 | children: [
158 | Padding(
159 | padding: const EdgeInsets.only(
160 | right: 15.0, left: 15, bottom: 10, top: 10),
161 | child: TextField(
162 | style: TextStyle(color: Colors.white),
163 | onChanged: (value) {
164 | searchValue = value;
165 | },
166 | decoration: InputDecoration(
167 | contentPadding: EdgeInsets.all(17),
168 | hintStyle: TextStyle(color: Colors.white24),
169 | hintText: 'Search Contact',
170 | border: new OutlineInputBorder(
171 | borderRadius: BorderRadius.all(Radius.circular(50)),
172 | borderSide: BorderSide(
173 | width: 0,
174 | style: BorderStyle.none,
175 | ),
176 | ),
177 | filled: true,
178 | fillColor: theme.accentColor,
179 | suffixIcon: Container(
180 | margin: EdgeInsets.only(right: 10),
181 | width: 39.0,
182 | height: 39.0,
183 | child: new RawMaterialButton(
184 | fillColor: Theme.of(context).primaryColor,
185 | shape: new CircleBorder(),
186 | elevation: 0.0,
187 | child: Icon(
188 | Icons.search_rounded,
189 | color: Colors.white,
190 | ),
191 | onPressed: () {
192 | searchData(searchValue);
193 | },
194 | ))),
195 | ),
196 | ),
197 | StreamBuilder(
198 | stream: (searchValue == "" || searchValue == null)
199 | ? FirebaseFirestore.instance
200 | .collection('user')
201 | .snapshots()
202 | : searchData(searchValue),
203 | builder: (ctx, snapshot) {
204 | if (snapshot.connectionState == ConnectionState.waiting) {
205 | return Center(
206 | child: CircularProgressIndicator(
207 | backgroundColor: Colors.white,
208 | ));
209 | } else {
210 | final docs = snapshot.data.docs;
211 | return ListView.builder(
212 | itemCount: docs.length,
213 | shrinkWrap: true,
214 | itemBuilder: (ctx, index) {
215 | return InkWell(
216 | onTap: () {
217 | Navigator.push(
218 | context,
219 | MaterialPageRoute(
220 | builder: (ctx) => ChatScreen(
221 | receiverId: docs[index]['uid'],
222 | userName: docs[index]
223 | ['username'],
224 | userImage: docs[index]
225 | ['imageUrl'],
226 | )));
227 | },
228 | child: Padding(
229 | padding: const EdgeInsets.only(
230 | right: 15.0, left: 15, top: 8),
231 | child: ListTile(
232 | title: Text(
233 | docs[index]['username'],
234 | style: TextStyle(
235 | color: Colors.white,
236 | fontWeight: FontWeight.bold,
237 | fontSize: 18),
238 | ),
239 | leading: CircleAvatar(
240 | backgroundImage:
241 | docs[index]['imageUrl'] == null
242 | ? AssetImage(
243 | 'assets/images/user.png')
244 | : NetworkImage(
245 | docs[index]['imageUrl']),
246 | ),
247 | subtitle: Text(
248 | docs[index]['email'],
249 | style: TextStyle(color: Colors.white38),
250 | ),
251 | trailing: Icon(
252 | Icons.arrow_forward_ios,
253 | color: Colors.white,
254 | size: 18,
255 | )),
256 | ),
257 | );
258 | });
259 | }
260 | },
261 | ),
262 | ],
263 | ),
264 | )));
265 | }
266 |
267 | Stream stream() async* {
268 | var _stream = FirebaseFirestore.instance.collection('user').snapshots();
269 | yield* _stream;
270 | }
271 |
272 | Stream searchData(String string) async* {
273 | var firestore = FirebaseFirestore.instance;
274 | var _search = firestore
275 | .collection('user')
276 | .where('username', isGreaterThanOrEqualTo: string)
277 | .where('username', isLessThan: string + 'z')
278 | .snapshots();
279 | yield* _search;
280 | }
281 | }
282 |
--------------------------------------------------------------------------------
/lib/screens/photo_view_screen.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:photo_view/photo_view.dart';
3 |
4 | class ImageViewScreen extends StatelessWidget {
5 | final String imageUrl;
6 |
7 | const ImageViewScreen({Key key, this.imageUrl}) : super(key: key);
8 | @override
9 | Widget build(BuildContext context) {
10 | return Container(
11 | child: PhotoView(
12 | imageProvider: NetworkImage(imageUrl),
13 | ));
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/lib/screens/profile_screen.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 | import 'dart:ui';
3 |
4 | import 'package:cloud_firestore/cloud_firestore.dart';
5 | import 'package:firebase_auth/firebase_auth.dart';
6 | import 'package:firebase_storage/firebase_storage.dart';
7 | import 'package:flutter/material.dart';
8 | import 'package:image_picker/image_picker.dart';
9 |
10 | class ProfileScreen extends StatefulWidget {
11 | @override
12 | _ProfileScreenState createState() => _ProfileScreenState();
13 | }
14 |
15 | class _ProfileScreenState extends State {
16 | File _pickedImage;
17 | final ImagePicker _picker = ImagePicker();
18 | FirebaseAuth auth = FirebaseAuth.instance;
19 |
20 | void _pickImage(ImageSource src) async {
21 | final pickedImageFile =
22 | await _picker.getImage(source: src, imageQuality: 40, maxWidth: 200);
23 | if (pickedImageFile != null) {
24 | setState(() {
25 | _pickedImage = File(pickedImageFile.path);
26 | });
27 | final ref = FirebaseStorage.instance
28 | .ref()
29 | .child('userImage')
30 | .child(auth.currentUser.uid + "jpg");
31 | await ref.putFile(_pickedImage);
32 | var url = await ref.getDownloadURL();
33 | await FirebaseFirestore.instance
34 | .collection('user')
35 | .doc(auth.currentUser.uid)
36 | .update({'imageUrl': url});
37 | } else {
38 | print('no Image selected');
39 | }
40 | }
41 |
42 | String userImage;
43 | void getUserImage() async {
44 | FirebaseFirestore.instance
45 | .collection('user')
46 | .get()
47 | .then((QuerySnapshot querySnapshot) => {
48 | querySnapshot.docs.forEach((doc) {
49 | userImage = doc["imageUrl"];
50 | })
51 | });
52 | }
53 |
54 | @override
55 | Widget build(BuildContext context) {
56 | return Scaffold(
57 | backgroundColor: Theme.of(context).primaryColor,
58 | appBar: AppBar(
59 | elevation: 0,
60 | title: Text('Profile',
61 | style: TextStyle(fontWeight: FontWeight.bold, fontSize: 25)),
62 | ),
63 | body: SingleChildScrollView(
64 | child: Column(
65 | crossAxisAlignment: CrossAxisAlignment.center,
66 | children: [
67 | SizedBox(
68 | height: 40,
69 | ),
70 | Center(
71 | child: Stack(children: [
72 | CircleAvatar(
73 | radius: 80,
74 | backgroundColor: Colors.grey,
75 | backgroundImage: _pickedImage != null
76 | ? FileImage(_pickedImage)
77 | : AssetImage('assets/images/user.png')),
78 | Positioned(
79 | right: 0,
80 | bottom: 0,
81 | child: Container(
82 | margin: EdgeInsets.only(right: 10),
83 | width: 50,
84 | height: 50,
85 | child: new RawMaterialButton(
86 | fillColor: Theme.of(context).buttonColor,
87 | shape: new CircleBorder(),
88 | elevation: 0.0,
89 | child: Icon(
90 | Icons.camera_alt_rounded,
91 | color: Colors.white,
92 | ),
93 | onPressed: () {
94 | displayBottomSheet(context);
95 | },
96 | )),
97 | )
98 | ]),
99 | ),
100 | SizedBox(height: 25),
101 | Padding(
102 | padding: const EdgeInsets.all(10),
103 | child: Row(
104 | children: [
105 | Icon(
106 | Icons.person,
107 | color: Theme.of(context).buttonColor,
108 | size: 30,
109 | ),
110 | SizedBox(
111 | width: 25,
112 | ),
113 | Column(
114 | crossAxisAlignment: CrossAxisAlignment.start,
115 | children: [
116 | Text(
117 | 'Name',
118 | style: TextStyle(color: Colors.white54),
119 | ),
120 | SizedBox(
121 | height: 10,
122 | ),
123 | Text(
124 | 'Mahmoud Ibrahim',
125 | style: TextStyle(color: Colors.white, fontSize: 16),
126 | ),
127 | ],
128 | ),
129 | ],
130 | ),
131 | ),
132 | Divider(
133 | color: Colors.white24,
134 | indent: 15,
135 | endIndent: 15,
136 | ),
137 | Padding(
138 | padding: const EdgeInsets.all(10),
139 | child: Row(
140 | children: [
141 | Icon(
142 | Icons.email,
143 | color: Theme.of(context).buttonColor,
144 | size: 25,
145 | ),
146 | SizedBox(
147 | width: 25,
148 | ),
149 | Column(
150 | crossAxisAlignment: CrossAxisAlignment.start,
151 | children: [
152 | Text(
153 | 'Email',
154 | style: TextStyle(color: Colors.white54),
155 | ),
156 | SizedBox(
157 | height: 10,
158 | ),
159 | Text(
160 | 'mkk28112000@gmail.com',
161 | style: TextStyle(color: Colors.white, fontSize: 16),
162 | ),
163 | ],
164 | ),
165 | ],
166 | ),
167 | ),
168 | ],
169 | ),
170 | ),
171 | );
172 | }
173 |
174 | void displayBottomSheet(BuildContext context) {
175 | showModalBottomSheet(
176 | shape: RoundedRectangleBorder(
177 | borderRadius: BorderRadius.only(
178 | topRight: Radius.circular(22), topLeft: Radius.circular(22))),
179 | context: context,
180 | builder: (ctx) {
181 | return Container(
182 | decoration: BoxDecoration(
183 | color: Theme.of(context).primaryColor,
184 | borderRadius: BorderRadius.only(
185 | topRight: Radius.circular(20),
186 | topLeft: Radius.circular(20))),
187 | height: MediaQuery.of(context).size.height * 0.25,
188 | child: Padding(
189 | padding: const EdgeInsets.all(25.0),
190 | child: Column(
191 | crossAxisAlignment: CrossAxisAlignment.start,
192 | children: [
193 | Text(
194 | 'Edit Profile Photo',
195 | style: TextStyle(
196 | fontWeight: FontWeight.bold,
197 | fontSize: 22,
198 | color: Colors.white),
199 | ),
200 | SizedBox(
201 | height: 25,
202 | ),
203 | Row(
204 | children: [
205 | Column(
206 | children: [
207 | Container(
208 | margin: EdgeInsets.only(right: 10),
209 | width: 50,
210 | height: 50,
211 | child: new RawMaterialButton(
212 | fillColor: Theme.of(context).buttonColor,
213 | shape: new CircleBorder(),
214 | elevation: 0.0,
215 | child: Icon(
216 | Icons.camera_alt_rounded,
217 | color: Colors.white,
218 | ),
219 | onPressed: () {
220 | _pickImage(ImageSource.camera);
221 | },
222 | )),
223 | SizedBox(
224 | height: 10,
225 | ),
226 | Text(
227 | 'Camera',
228 | style: TextStyle(color: Colors.white),
229 | ),
230 | ],
231 | ),
232 | SizedBox(
233 | width: 20,
234 | ),
235 | Column(
236 | children: [
237 | Container(
238 | margin: EdgeInsets.only(right: 10),
239 | width: 50,
240 | height: 50,
241 | child: new RawMaterialButton(
242 | fillColor: Theme.of(context).buttonColor,
243 | shape: new CircleBorder(),
244 | elevation: 0.0,
245 | child: Icon(
246 | Icons.photo_size_select_actual,
247 | color: Colors.white,
248 | ),
249 | onPressed: () {
250 | _pickImage(ImageSource.gallery);
251 | },
252 | )),
253 | SizedBox(
254 | height: 10,
255 | ),
256 | Text(
257 | 'Gallery',
258 | style: TextStyle(color: Colors.white),
259 | ),
260 | ],
261 | ),
262 | ],
263 | ),
264 | ],
265 | ),
266 | ));
267 | });
268 | }
269 | }
270 |
--------------------------------------------------------------------------------
/lib/widgets/category_selector.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class CategorySelector extends StatefulWidget {
4 | @override
5 | _CategorySelectorState createState() => _CategorySelectorState();
6 | }
7 |
8 | class _CategorySelectorState extends State {
9 | int selectedIndex = 0;
10 | final List categories = ['Meassages', 'online', 'group', 'requests'];
11 |
12 | @override
13 | Widget build(BuildContext context) {
14 | return Container(
15 | height: 80,
16 | color: Theme.of(context).primaryColor,
17 | child: ListView.builder(
18 | scrollDirection: Axis.horizontal,
19 | itemCount: categories.length,
20 | itemBuilder: (BuildContext context, int index) {
21 | return GestureDetector(
22 | onTap: () {
23 | setState(() {
24 | selectedIndex = index;
25 | });
26 | },
27 | child: Padding(
28 | padding: EdgeInsets.symmetric(
29 | horizontal: 15.0,
30 | vertical: 20.0,
31 | ),
32 | child: Text(
33 | categories[index],
34 | style: TextStyle(
35 | color:
36 | index == selectedIndex ? Colors.white : Colors.white60,
37 | fontSize: 20.0,
38 | fontWeight: FontWeight.bold,
39 | letterSpacing: 1.2,
40 | ),
41 | ),
42 | ),
43 | );
44 | }),
45 | );
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/lib/widgets/chat/messages.dart:
--------------------------------------------------------------------------------
1 | import 'dart:ui';
2 | import 'package:cached_network_image/cached_network_image.dart';
3 | import 'package:chatting/screens/photo_view_screen.dart';
4 | import 'package:cloud_firestore/cloud_firestore.dart';
5 | import 'package:firebase_auth/firebase_auth.dart';
6 | import 'package:flutter/material.dart';
7 | import 'package:flutter_chat_bubble/bubble_type.dart';
8 | import 'package:flutter_chat_bubble/chat_bubble.dart';
9 | import 'package:flutter_chat_bubble/clippers/chat_bubble_clipper_4.dart';
10 | import 'package:intl/intl.dart';
11 |
12 | class Messages extends StatelessWidget {
13 | final FirebaseAuth auth = FirebaseAuth.instance;
14 | final bool isMe;
15 | final String receiverId;
16 |
17 | Messages({Key key, this.isMe, this.receiverId}) : super(key: key);
18 |
19 | @override
20 | Widget build(BuildContext context) {
21 | return StreamBuilder(
22 | stream: FirebaseFirestore.instance
23 | .collection('chat')
24 | .orderBy('time', descending: true)
25 | .snapshots(),
26 | builder: (ctx, snapshot) {
27 | if (snapshot.connectionState == ConnectionState.waiting) {
28 | return Center(
29 | child: CircularProgressIndicator(
30 | backgroundColor: Colors.white,
31 | ));
32 | } else {
33 | final docs = snapshot.data.docs;
34 | return ListView.builder(
35 | scrollDirection: Axis.vertical,
36 | shrinkWrap: true,
37 | reverse: true,
38 | itemCount: docs.length,
39 | itemBuilder: (ctx, index) {
40 | if ((docs[index]['receiverId'] == auth.currentUser.uid &&
41 | docs[index]['senderId'] == receiverId) ||
42 | (docs[index]['senderId'] == auth.currentUser.uid &&
43 | docs[index]['receiverId'] == receiverId) ||
44 | (docs[index]['senderId'] == auth.currentUser.uid &&
45 | docs[index]['receiverId'] == auth.currentUser.uid)) {
46 | Timestamp time = docs[index]['time'];
47 | String formatedTime =
48 | DateFormat('hh:mm').format(time.toDate());
49 | if (docs[index]['senderId'] == auth.currentUser.uid) {
50 | return Padding(
51 | padding: EdgeInsets.symmetric(vertical: 10),
52 | child: Row(
53 | mainAxisAlignment: MainAxisAlignment.end,
54 | crossAxisAlignment: CrossAxisAlignment.end,
55 | children: [
56 | InkWell(
57 | onTap: docs[index]['messageImageUrl'] == null
58 | ? () {}
59 | : () {
60 | Navigator.push(
61 | context,
62 | MaterialPageRoute(
63 | builder: (ctx) => ImageViewScreen(
64 | imageUrl: docs[index]
65 | ['messageImageUrl'],
66 | )));
67 | },
68 | child: ChatBubble(
69 | elevation: 0,
70 | clipper: ChatBubbleClipper4(
71 | type: BubbleType.sendBubble),
72 | alignment: Alignment.topRight,
73 | //margin: EdgeInsets.only(top: 20),
74 | backGroundColor: Theme.of(context).buttonColor,
75 | child: Container(
76 | constraints: BoxConstraints(
77 | maxWidth:
78 | MediaQuery.of(context).size.width * 0.7,
79 | ),
80 | child: Column(
81 | crossAxisAlignment: CrossAxisAlignment.end,
82 | children: [
83 | docs[index]['messageImageUrl'] == null
84 | ? Text(
85 | docs[index]['text'],
86 | style: TextStyle(
87 | color: Colors.white),
88 | )
89 | : CachedNetworkImage(
90 | imageUrl: docs[index]
91 | ['messageImageUrl'],
92 | placeholder: (context, url) =>
93 | CircularProgressIndicator(),
94 | errorWidget:
95 | (context, url, error) =>
96 | Icon(Icons.error),
97 | ),
98 | SizedBox(
99 | height: 3,
100 | ),
101 | Text(
102 | formatedTime,
103 | style: TextStyle(
104 | color: Colors.white38,
105 | fontSize: 12),
106 | ),
107 | ],
108 | ),
109 | ),
110 | ),
111 | ),
112 | SizedBox(
113 | width: 10,
114 | ),
115 | CircleAvatar(
116 | backgroundImage: docs[index]['imageUrl'] == null
117 | ? AssetImage('assets/images/sam.jpg')
118 | : NetworkImage(docs[index]['imageUrl']),
119 | ),
120 | SizedBox(
121 | width: 10,
122 | )
123 | ],
124 | ),
125 | );
126 | } else {
127 | return Padding(
128 | padding: const EdgeInsets.symmetric(vertical: 10),
129 | child: Row(
130 | mainAxisAlignment: MainAxisAlignment.start,
131 | crossAxisAlignment: CrossAxisAlignment.center,
132 | children: [
133 | SizedBox(
134 | width: 10,
135 | ),
136 | CircleAvatar(
137 | backgroundImage: docs[index]['imageUrl'] == null
138 | ? AssetImage('assets/images/sam.jpg')
139 | : NetworkImage(docs[index]['imageUrl']),
140 | ),
141 | SizedBox(
142 | width: 10,
143 | ),
144 | ChatBubble(
145 | elevation: 0,
146 | clipper: ChatBubbleClipper4(
147 | type: BubbleType.receiverBubble),
148 | alignment: Alignment.topRight,
149 | //margin: EdgeInsets.only(top: 20),
150 | backGroundColor: Theme.of(context).accentColor,
151 | child: Container(
152 | constraints: BoxConstraints(
153 | maxWidth:
154 | MediaQuery.of(context).size.width * 0.7,
155 | ),
156 | child: Column(
157 | crossAxisAlignment: CrossAxisAlignment.start,
158 | children: [
159 | docs[index]['messageImageUrl'] == null
160 | ? Text(
161 | docs[index]['text'],
162 | style:
163 | TextStyle(color: Colors.white),
164 | )
165 | : CachedNetworkImage(
166 | imageUrl: docs[index]
167 | ['messageImageUrl'],
168 | placeholder: (context, url) =>
169 | CircularProgressIndicator(),
170 | errorWidget:
171 | (context, url, error) =>
172 | Icon(Icons.error),
173 | ),
174 | SizedBox(
175 | height: 3,
176 | ),
177 | Text(
178 | formatedTime,
179 | style: TextStyle(
180 | color: Colors.white38, fontSize: 12),
181 | ),
182 | ],
183 | ),
184 | ),
185 | ),
186 | ],
187 | ),
188 | );
189 | }
190 | } else {
191 | return null;
192 | }
193 | });
194 | }
195 | });
196 | }
197 | }
198 |
--------------------------------------------------------------------------------
/lib/widgets/chat/newMessageField.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 | import 'dart:ui';
3 | import 'package:cloud_firestore/cloud_firestore.dart';
4 | import 'package:firebase_auth/firebase_auth.dart';
5 | import 'package:firebase_storage/firebase_storage.dart';
6 | import 'package:flutter/material.dart';
7 | import 'package:image_picker/image_picker.dart';
8 |
9 | class NewMessageField extends StatefulWidget {
10 | final String receiverId;
11 |
12 | const NewMessageField({Key key, this.receiverId}) : super(key: key);
13 | @override
14 | _NewMessageFieldState createState() => _NewMessageFieldState();
15 | }
16 |
17 | class _NewMessageFieldState extends State {
18 | File _pickedImage;
19 | final ImagePicker _picker = ImagePicker();
20 |
21 | void _pickImage(ImageSource src) async {
22 | final pickedImageFile =
23 | await _picker.getImage(source: src, imageQuality: 80, maxWidth: 600);
24 | if (pickedImageFile != null) {
25 | setState(() {
26 | _pickedImage = File(pickedImageFile.path);
27 | });
28 | final userData = await FirebaseFirestore.instance
29 | .collection('user')
30 | .doc(auth.currentUser.uid)
31 | .get();
32 | final ref = FirebaseStorage.instance
33 | .ref()
34 | .child('messagesImages')
35 | .child(auth.currentUser.uid + "jpg");
36 | await ref.putFile(_pickedImage);
37 | var url = await ref.getDownloadURL();
38 | FirebaseFirestore.instance.collection('chat').add({
39 | 'text': _controller.text,
40 | 'time': Timestamp.now(),
41 | 'messageImageUrl': url,
42 | 'imageUrl': userData['imageUrl'],
43 | 'senderId': auth.currentUser.uid,
44 | 'receiverId': widget.receiverId
45 | });
46 | } else {
47 | print('no Image selected');
48 | }
49 | }
50 |
51 | final _controller = TextEditingController();
52 | final FirebaseAuth auth = FirebaseAuth.instance;
53 |
54 | String message = "";
55 | @override
56 | Widget build(BuildContext context) {
57 | return Container(
58 | decoration: BoxDecoration(
59 | color: Theme.of(context).accentColor,
60 | borderRadius: BorderRadius.only(
61 | topLeft: Radius.circular(20), topRight: Radius.circular(20))),
62 | padding: EdgeInsets.symmetric(horizontal: 8.0),
63 | height: 85,
64 | child: Row(
65 | children: [
66 | Expanded(
67 | child: TextField(
68 | style: TextStyle(color: Colors.white),
69 | controller: _controller,
70 | onChanged: (value) {
71 | setState(() {
72 | message = value;
73 | });
74 | },
75 | decoration: InputDecoration(
76 | hintStyle: TextStyle(color: Colors.white),
77 | hintText: 'Send a message',
78 | border: new OutlineInputBorder(
79 | borderRadius: BorderRadius.all(Radius.circular(50)),
80 | borderSide: BorderSide(
81 | width: 0,
82 | style: BorderStyle.none,
83 | ),
84 | ),
85 | prefixIcon: InkWell(
86 | onTap: () {
87 | _pickImage(ImageSource.gallery);
88 | },
89 | child: Padding(
90 | padding: const EdgeInsets.symmetric(horizontal: 15),
91 | child: Icon(
92 | Icons.photo,
93 | color: Colors.white,
94 | size: 25,
95 | ),
96 | ),
97 | ),
98 | filled: true,
99 | fillColor: Theme.of(context).primaryColor,
100 | suffixIcon: Container(
101 | margin: EdgeInsets.only(right: 10),
102 | width: 42.0,
103 | height: 42.0,
104 | child: new RawMaterialButton(
105 | fillColor: Theme.of(context).buttonColor,
106 | shape: new CircleBorder(),
107 | elevation: 0.0,
108 | child: Icon(
109 | Icons.send_rounded,
110 | color: Colors.white,
111 | ),
112 | onPressed: () {
113 | sendMessage();
114 | },
115 | ))),
116 | ),
117 | ),
118 | ],
119 | ),
120 | );
121 | }
122 |
123 | sendMessage() async {
124 | final userData = await FirebaseFirestore.instance
125 | .collection('user')
126 | .doc(auth.currentUser.uid)
127 | .get();
128 | if (message.isNotEmpty) {
129 | FirebaseFirestore.instance.collection('chat').add({
130 | 'text': _controller.text,
131 | 'time': Timestamp.now(),
132 | 'username': userData['username'],
133 | 'imageUrl': userData['imageUrl'],
134 | 'messageImageUrl': null,
135 | 'senderId': auth.currentUser.uid,
136 | 'receiverId': widget.receiverId
137 | });
138 | _controller.clear();
139 | }
140 | }
141 | }
142 |
--------------------------------------------------------------------------------
/lib/widgets/outline_button.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class OutlineBtn extends StatefulWidget {
4 | final String btnText;
5 | OutlineBtn({this.btnText});
6 |
7 | @override
8 | _OutlineBtnState createState() => _OutlineBtnState();
9 | }
10 |
11 | class _OutlineBtnState extends State {
12 | @override
13 | Widget build(BuildContext context) {
14 | return Container(
15 | decoration: BoxDecoration(
16 | border: Border.all(color: Theme.of(context).buttonColor, width: 2),
17 | borderRadius: BorderRadius.circular(50)),
18 | padding: EdgeInsets.all(20),
19 | child: Center(
20 | child: Text(
21 | widget.btnText,
22 | style: TextStyle(color: Theme.of(context).buttonColor, fontSize: 16),
23 | ),
24 | ),
25 | );
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/lib/widgets/primary_button.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class PrimaryButton extends StatefulWidget {
4 | final String btnText;
5 | final Function onTap;
6 | PrimaryButton({this.btnText, this.onTap});
7 |
8 | @override
9 | _PrimaryButtonState createState() => _PrimaryButtonState();
10 | }
11 |
12 | class _PrimaryButtonState extends State {
13 | @override
14 | Widget build(BuildContext context) {
15 | return GestureDetector(
16 | onTap: () {
17 | widget.onTap();
18 | },
19 | child: Container(
20 | decoration: BoxDecoration(
21 | color: Theme.of(context).buttonColor, borderRadius: BorderRadius.circular(50)),
22 | padding: EdgeInsets.all(20),
23 | child: Center(
24 | child: Text(
25 | widget.btnText,
26 | style: TextStyle(color: Colors.white, fontSize: 16),
27 | ),
28 | ),
29 | ),
30 | );
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/lib/widgets/text_field_with_icon.dart:
--------------------------------------------------------------------------------
1 | import 'dart:ui';
2 |
3 | import 'package:flutter/material.dart';
4 |
5 | class InputWithIcon extends StatefulWidget {
6 | final IconData icon;
7 | final String hint;
8 | final bool obscureText;
9 | final Function onSaved;
10 | final Function validator;
11 | final TextInputType keyboardType;
12 | InputWithIcon({this.icon, this.hint, this.onSaved, this.validator, this.obscureText, this.keyboardType});
13 |
14 | @override
15 | _InputWithIconState createState() => _InputWithIconState();
16 | }
17 |
18 | class _InputWithIconState extends State {
19 | @override
20 | Widget build(BuildContext context) {
21 | return Container(
22 | padding: EdgeInsets.only(left: 10,right: 10,bottom: 2),
23 | decoration: BoxDecoration(
24 | color: Theme.of(context).primaryColor,
25 | // border: Border.all(color: Color(0xFFBC7C7C7), width: 2),
26 | borderRadius: BorderRadius.circular(50)),
27 | child: Row(
28 | children: [
29 | Container(
30 | width: 60,
31 | child: Icon(
32 | widget.icon,
33 | size: 22,
34 | color: Color(0xFF90939C),
35 | )),
36 | Container(
37 | width: 250,
38 | child: TextFormField(
39 | style: TextStyle(color: Colors.white),
40 | keyboardType: widget.keyboardType,
41 | cursorColor: Theme.of(context).primaryColor,
42 | obscureText: widget.obscureText == null ? false : widget.obscureText ,
43 | decoration: InputDecoration(
44 | contentPadding: EdgeInsets.symmetric(vertical: 20),
45 | hintStyle: TextStyle(
46 | color: Theme.of(context).accentColor
47 | ),
48 | hintText: widget.hint,
49 |
50 | ),
51 | onSaved: (value) {
52 | widget.onSaved(value);
53 | },
54 | validator: (value) =>
55 | widget.validator(value)
56 | ,
57 | ),
58 | )
59 | ],
60 | ),
61 | );
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | animated_drawer:
5 | dependency: "direct main"
6 | description:
7 | name: animated_drawer
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "0.0.4"
11 | archive:
12 | dependency: transitive
13 | description:
14 | name: archive
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "2.0.13"
18 | args:
19 | dependency: transitive
20 | description:
21 | name: args
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "1.6.0"
25 | async:
26 | dependency: transitive
27 | description:
28 | name: async
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "2.5.0-nullsafety.1"
32 | boolean_selector:
33 | dependency: transitive
34 | description:
35 | name: boolean_selector
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "2.1.0-nullsafety.1"
39 | cached_network_image:
40 | dependency: "direct main"
41 | description:
42 | name: cached_network_image
43 | url: "https://pub.dartlang.org"
44 | source: hosted
45 | version: "2.5.0"
46 | characters:
47 | dependency: transitive
48 | description:
49 | name: characters
50 | url: "https://pub.dartlang.org"
51 | source: hosted
52 | version: "1.1.0-nullsafety.3"
53 | charcode:
54 | dependency: transitive
55 | description:
56 | name: charcode
57 | url: "https://pub.dartlang.org"
58 | source: hosted
59 | version: "1.2.0-nullsafety.1"
60 | clock:
61 | dependency: transitive
62 | description:
63 | name: clock
64 | url: "https://pub.dartlang.org"
65 | source: hosted
66 | version: "1.1.0-nullsafety.1"
67 | cloud_firestore:
68 | dependency: "direct main"
69 | description:
70 | name: cloud_firestore
71 | url: "https://pub.dartlang.org"
72 | source: hosted
73 | version: "0.16.0"
74 | cloud_firestore_platform_interface:
75 | dependency: transitive
76 | description:
77 | name: cloud_firestore_platform_interface
78 | url: "https://pub.dartlang.org"
79 | source: hosted
80 | version: "3.0.1"
81 | cloud_firestore_web:
82 | dependency: transitive
83 | description:
84 | name: cloud_firestore_web
85 | url: "https://pub.dartlang.org"
86 | source: hosted
87 | version: "0.3.0+1"
88 | collection:
89 | dependency: transitive
90 | description:
91 | name: collection
92 | url: "https://pub.dartlang.org"
93 | source: hosted
94 | version: "1.15.0-nullsafety.3"
95 | convert:
96 | dependency: transitive
97 | description:
98 | name: convert
99 | url: "https://pub.dartlang.org"
100 | source: hosted
101 | version: "2.1.1"
102 | crypto:
103 | dependency: transitive
104 | description:
105 | name: crypto
106 | url: "https://pub.dartlang.org"
107 | source: hosted
108 | version: "2.1.5"
109 | cupertino_icons:
110 | dependency: "direct main"
111 | description:
112 | name: cupertino_icons
113 | url: "https://pub.dartlang.org"
114 | source: hosted
115 | version: "1.0.0"
116 | fake_async:
117 | dependency: transitive
118 | description:
119 | name: fake_async
120 | url: "https://pub.dartlang.org"
121 | source: hosted
122 | version: "1.2.0-nullsafety.1"
123 | ffi:
124 | dependency: transitive
125 | description:
126 | name: ffi
127 | url: "https://pub.dartlang.org"
128 | source: hosted
129 | version: "0.1.3"
130 | file:
131 | dependency: transitive
132 | description:
133 | name: file
134 | url: "https://pub.dartlang.org"
135 | source: hosted
136 | version: "5.2.1"
137 | firebase_auth:
138 | dependency: "direct main"
139 | description:
140 | name: firebase_auth
141 | url: "https://pub.dartlang.org"
142 | source: hosted
143 | version: "0.20.0+1"
144 | firebase_auth_platform_interface:
145 | dependency: transitive
146 | description:
147 | name: firebase_auth_platform_interface
148 | url: "https://pub.dartlang.org"
149 | source: hosted
150 | version: "3.0.1"
151 | firebase_auth_web:
152 | dependency: transitive
153 | description:
154 | name: firebase_auth_web
155 | url: "https://pub.dartlang.org"
156 | source: hosted
157 | version: "0.3.2+6"
158 | firebase_core:
159 | dependency: "direct main"
160 | description:
161 | name: firebase_core
162 | url: "https://pub.dartlang.org"
163 | source: hosted
164 | version: "0.7.0"
165 | firebase_core_platform_interface:
166 | dependency: transitive
167 | description:
168 | name: firebase_core_platform_interface
169 | url: "https://pub.dartlang.org"
170 | source: hosted
171 | version: "3.0.1"
172 | firebase_core_web:
173 | dependency: transitive
174 | description:
175 | name: firebase_core_web
176 | url: "https://pub.dartlang.org"
177 | source: hosted
178 | version: "0.2.1+3"
179 | firebase_storage:
180 | dependency: "direct main"
181 | description:
182 | name: firebase_storage
183 | url: "https://pub.dartlang.org"
184 | source: hosted
185 | version: "7.0.0"
186 | firebase_storage_platform_interface:
187 | dependency: transitive
188 | description:
189 | name: firebase_storage_platform_interface
190 | url: "https://pub.dartlang.org"
191 | source: hosted
192 | version: "1.0.4"
193 | firebase_storage_web:
194 | dependency: transitive
195 | description:
196 | name: firebase_storage_web
197 | url: "https://pub.dartlang.org"
198 | source: hosted
199 | version: "0.1.1+3"
200 | flutter:
201 | dependency: "direct main"
202 | description: flutter
203 | source: sdk
204 | version: "0.0.0"
205 | flutter_blurhash:
206 | dependency: transitive
207 | description:
208 | name: flutter_blurhash
209 | url: "https://pub.dartlang.org"
210 | source: hosted
211 | version: "0.5.0"
212 | flutter_cache_manager:
213 | dependency: transitive
214 | description:
215 | name: flutter_cache_manager
216 | url: "https://pub.dartlang.org"
217 | source: hosted
218 | version: "2.1.1"
219 | flutter_chat_bubble:
220 | dependency: "direct main"
221 | description:
222 | name: flutter_chat_bubble
223 | url: "https://pub.dartlang.org"
224 | source: hosted
225 | version: "1.0.2"
226 | flutter_plugin_android_lifecycle:
227 | dependency: transitive
228 | description:
229 | name: flutter_plugin_android_lifecycle
230 | url: "https://pub.dartlang.org"
231 | source: hosted
232 | version: "1.0.11"
233 | flutter_test:
234 | dependency: "direct dev"
235 | description: flutter
236 | source: sdk
237 | version: "0.0.0"
238 | flutter_web_plugins:
239 | dependency: transitive
240 | description: flutter
241 | source: sdk
242 | version: "0.0.0"
243 | http:
244 | dependency: transitive
245 | description:
246 | name: http
247 | url: "https://pub.dartlang.org"
248 | source: hosted
249 | version: "0.12.2"
250 | http_parser:
251 | dependency: transitive
252 | description:
253 | name: http_parser
254 | url: "https://pub.dartlang.org"
255 | source: hosted
256 | version: "3.1.4"
257 | image:
258 | dependency: transitive
259 | description:
260 | name: image
261 | url: "https://pub.dartlang.org"
262 | source: hosted
263 | version: "2.1.19"
264 | image_picker:
265 | dependency: "direct main"
266 | description:
267 | name: image_picker
268 | url: "https://pub.dartlang.org"
269 | source: hosted
270 | version: "0.6.7+22"
271 | image_picker_platform_interface:
272 | dependency: transitive
273 | description:
274 | name: image_picker_platform_interface
275 | url: "https://pub.dartlang.org"
276 | source: hosted
277 | version: "1.1.6"
278 | intl:
279 | dependency: transitive
280 | description:
281 | name: intl
282 | url: "https://pub.dartlang.org"
283 | source: hosted
284 | version: "0.16.1"
285 | js:
286 | dependency: transitive
287 | description:
288 | name: js
289 | url: "https://pub.dartlang.org"
290 | source: hosted
291 | version: "0.6.2"
292 | matcher:
293 | dependency: transitive
294 | description:
295 | name: matcher
296 | url: "https://pub.dartlang.org"
297 | source: hosted
298 | version: "0.12.10-nullsafety.1"
299 | matrix4_transform:
300 | dependency: transitive
301 | description:
302 | name: matrix4_transform
303 | url: "https://pub.dartlang.org"
304 | source: hosted
305 | version: "1.1.7"
306 | meta:
307 | dependency: transitive
308 | description:
309 | name: meta
310 | url: "https://pub.dartlang.org"
311 | source: hosted
312 | version: "1.3.0-nullsafety.3"
313 | octo_image:
314 | dependency: transitive
315 | description:
316 | name: octo_image
317 | url: "https://pub.dartlang.org"
318 | source: hosted
319 | version: "0.3.0"
320 | path:
321 | dependency: transitive
322 | description:
323 | name: path
324 | url: "https://pub.dartlang.org"
325 | source: hosted
326 | version: "1.8.0-nullsafety.1"
327 | path_provider:
328 | dependency: transitive
329 | description:
330 | name: path_provider
331 | url: "https://pub.dartlang.org"
332 | source: hosted
333 | version: "1.6.27"
334 | path_provider_linux:
335 | dependency: transitive
336 | description:
337 | name: path_provider_linux
338 | url: "https://pub.dartlang.org"
339 | source: hosted
340 | version: "0.0.1+2"
341 | path_provider_macos:
342 | dependency: transitive
343 | description:
344 | name: path_provider_macos
345 | url: "https://pub.dartlang.org"
346 | source: hosted
347 | version: "0.0.4+8"
348 | path_provider_platform_interface:
349 | dependency: transitive
350 | description:
351 | name: path_provider_platform_interface
352 | url: "https://pub.dartlang.org"
353 | source: hosted
354 | version: "1.0.4"
355 | path_provider_windows:
356 | dependency: transitive
357 | description:
358 | name: path_provider_windows
359 | url: "https://pub.dartlang.org"
360 | source: hosted
361 | version: "0.0.4+3"
362 | pedantic:
363 | dependency: transitive
364 | description:
365 | name: pedantic
366 | url: "https://pub.dartlang.org"
367 | source: hosted
368 | version: "1.9.2"
369 | petitparser:
370 | dependency: transitive
371 | description:
372 | name: petitparser
373 | url: "https://pub.dartlang.org"
374 | source: hosted
375 | version: "3.1.0"
376 | photo_view:
377 | dependency: "direct main"
378 | description:
379 | name: photo_view
380 | url: "https://pub.dartlang.org"
381 | source: hosted
382 | version: "0.10.3"
383 | platform:
384 | dependency: transitive
385 | description:
386 | name: platform
387 | url: "https://pub.dartlang.org"
388 | source: hosted
389 | version: "2.2.1"
390 | plugin_platform_interface:
391 | dependency: transitive
392 | description:
393 | name: plugin_platform_interface
394 | url: "https://pub.dartlang.org"
395 | source: hosted
396 | version: "1.0.3"
397 | process:
398 | dependency: transitive
399 | description:
400 | name: process
401 | url: "https://pub.dartlang.org"
402 | source: hosted
403 | version: "3.0.13"
404 | quiver:
405 | dependency: transitive
406 | description:
407 | name: quiver
408 | url: "https://pub.dartlang.org"
409 | source: hosted
410 | version: "2.1.5"
411 | rxdart:
412 | dependency: transitive
413 | description:
414 | name: rxdart
415 | url: "https://pub.dartlang.org"
416 | source: hosted
417 | version: "0.25.0"
418 | sky_engine:
419 | dependency: transitive
420 | description: flutter
421 | source: sdk
422 | version: "0.0.99"
423 | source_span:
424 | dependency: transitive
425 | description:
426 | name: source_span
427 | url: "https://pub.dartlang.org"
428 | source: hosted
429 | version: "1.8.0-nullsafety.2"
430 | sqflite:
431 | dependency: transitive
432 | description:
433 | name: sqflite
434 | url: "https://pub.dartlang.org"
435 | source: hosted
436 | version: "1.3.2+3"
437 | sqflite_common:
438 | dependency: transitive
439 | description:
440 | name: sqflite_common
441 | url: "https://pub.dartlang.org"
442 | source: hosted
443 | version: "1.0.3+1"
444 | stack_trace:
445 | dependency: transitive
446 | description:
447 | name: stack_trace
448 | url: "https://pub.dartlang.org"
449 | source: hosted
450 | version: "1.10.0-nullsafety.1"
451 | stream_channel:
452 | dependency: transitive
453 | description:
454 | name: stream_channel
455 | url: "https://pub.dartlang.org"
456 | source: hosted
457 | version: "2.1.0-nullsafety.1"
458 | string_scanner:
459 | dependency: transitive
460 | description:
461 | name: string_scanner
462 | url: "https://pub.dartlang.org"
463 | source: hosted
464 | version: "1.1.0-nullsafety.1"
465 | synchronized:
466 | dependency: transitive
467 | description:
468 | name: synchronized
469 | url: "https://pub.dartlang.org"
470 | source: hosted
471 | version: "2.2.0+2"
472 | term_glyph:
473 | dependency: transitive
474 | description:
475 | name: term_glyph
476 | url: "https://pub.dartlang.org"
477 | source: hosted
478 | version: "1.2.0-nullsafety.1"
479 | test_api:
480 | dependency: transitive
481 | description:
482 | name: test_api
483 | url: "https://pub.dartlang.org"
484 | source: hosted
485 | version: "0.2.19-nullsafety.2"
486 | typed_data:
487 | dependency: transitive
488 | description:
489 | name: typed_data
490 | url: "https://pub.dartlang.org"
491 | source: hosted
492 | version: "1.3.0-nullsafety.3"
493 | uuid:
494 | dependency: transitive
495 | description:
496 | name: uuid
497 | url: "https://pub.dartlang.org"
498 | source: hosted
499 | version: "2.2.2"
500 | vector_math:
501 | dependency: transitive
502 | description:
503 | name: vector_math
504 | url: "https://pub.dartlang.org"
505 | source: hosted
506 | version: "2.1.0-nullsafety.3"
507 | win32:
508 | dependency: transitive
509 | description:
510 | name: win32
511 | url: "https://pub.dartlang.org"
512 | source: hosted
513 | version: "1.7.4+1"
514 | xdg_directories:
515 | dependency: transitive
516 | description:
517 | name: xdg_directories
518 | url: "https://pub.dartlang.org"
519 | source: hosted
520 | version: "0.1.2"
521 | xml:
522 | dependency: transitive
523 | description:
524 | name: xml
525 | url: "https://pub.dartlang.org"
526 | source: hosted
527 | version: "4.5.1"
528 | sdks:
529 | dart: ">=2.10.2 <2.11.0"
530 | flutter: ">=1.22.2 <2.0.0"
531 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: chatting
2 | description: A new Flutter application.
3 |
4 | # The following line prevents the package from being accidentally published to
5 | # pub.dev using `pub publish`. This is preferred for private packages.
6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev
7 |
8 | # The following defines the version and build number for your application.
9 | # A version number is three numbers separated by dots, like 1.2.43
10 | # followed by an optional build number separated by a +.
11 | # Both the version and the builder number may be overridden in flutter
12 | # build by specifying --build-name and --build-number, respectively.
13 | # In Android, build-name is used as versionName while build-number used as versionCode.
14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning
15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
16 | # Read more about iOS versioning at
17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
18 | version: 1.0.0+1
19 |
20 | environment:
21 | sdk: ">=2.7.0 <3.0.0"
22 |
23 | dependencies:
24 | flutter:
25 | sdk: flutter
26 |
27 |
28 | # The following adds the Cupertino Icons font to your application.
29 | # Use with the CupertinoIcons class for iOS style icons.
30 | cupertino_icons: ^1.0.0
31 | firebase_core:
32 | firebase_auth:
33 | cloud_firestore:
34 | firebase_storage: "^7.0.0"
35 | flutter_chat_bubble: ^1.0.2
36 | image_picker: ^0.6.7+22
37 | animated_drawer: ^0.0.4
38 | photo_view: ^0.10.3
39 | cached_network_image: ^2.5.0
40 |
41 | dev_dependencies:
42 | flutter_test:
43 | sdk: flutter
44 |
45 | # For information on the generic Dart part of this file, see the
46 | # following page: https://dart.dev/tools/pub/pubspec
47 |
48 | # The following section is specific to Flutter.
49 | flutter:
50 |
51 | # The following line ensures that the Material Icons font is
52 | # included with your application, so that you can use the icons in
53 | # the material Icons class.
54 | uses-material-design: true
55 |
56 | # To add assets to your application, add an assets section, like this:
57 | assets:
58 | - assets/images/
59 |
60 | # An image asset can refer to one or more resolution-specific "variants", see
61 | # https://flutter.dev/assets-and-images/#resolution-aware.
62 |
63 | # For details regarding adding assets from package dependencies, see
64 | # https://flutter.dev/assets-and-images/#from-packages
65 |
66 | # To add custom fonts to your application, add a fonts section here,
67 | # in this "flutter" section. Each entry in this list should have a
68 | # "family" key with the font family name, and a "fonts" key with a
69 | # list giving the asset and other descriptors for the font. For
70 | # example:
71 | # fonts:
72 | # - family: Schyler
73 | # fonts:
74 | # - asset: fonts/Schyler-Regular.ttf
75 | # - asset: fonts/Schyler-Italic.ttf
76 | # style: italic
77 | # - family: Trajan Pro
78 | # fonts:
79 | # - asset: fonts/TrajanPro.ttf
80 | # - asset: fonts/TrajanPro_Bold.ttf
81 | # weight: 700
82 | #
83 | # For details regarding fonts from package dependencies,
84 | # see https://flutter.dev/custom-fonts/#from-packages
85 |
--------------------------------------------------------------------------------
/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 | import 'package:chatting/main.dart';
11 |
12 | void main() {
13 | testWidgets('Counter increments smoke test', (WidgetTester tester) async {
14 | // Build our app and trigger a frame.
15 | await tester.pumpWidget(MyApp());
16 |
17 | // Verify that our counter starts at 0.
18 | expect(find.text('0'), findsOneWidget);
19 | expect(find.text('1'), findsNothing);
20 |
21 | // Tap the '+' icon and trigger a frame.
22 | await tester.tap(find.byIcon(Icons.add));
23 | await tester.pump();
24 |
25 | // Verify that our counter has incremented.
26 | expect(find.text('0'), findsNothing);
27 | expect(find.text('1'), findsOneWidget);
28 | });
29 | }
30 |
--------------------------------------------------------------------------------