├── android
├── .gradle
│ ├── 7.4
│ │ ├── gc.properties
│ │ ├── fileChanges
│ │ │ └── last-build.bin
│ │ ├── dependencies-accessors
│ │ │ ├── gc.properties
│ │ │ └── dependencies-accessors.lock
│ │ ├── checksums
│ │ │ ├── checksums.lock
│ │ │ ├── md5-checksums.bin
│ │ │ └── sha1-checksums.bin
│ │ ├── fileHashes
│ │ │ ├── fileHashes.bin
│ │ │ ├── fileHashes.lock
│ │ │ └── resourceHashesCache.bin
│ │ └── executionHistory
│ │ │ ├── executionHistory.bin
│ │ │ └── executionHistory.lock
│ ├── vcs-1
│ │ └── gc.properties
│ ├── buildOutputCleanup
│ │ ├── cache.properties
│ │ ├── outputFiles.bin
│ │ └── buildOutputCleanup.lock
│ └── file-system.probe
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── app
│ ├── src
│ │ ├── main
│ │ │ ├── res
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── drawable
│ │ │ │ │ └── launch_background.xml
│ │ │ │ ├── drawable-v21
│ │ │ │ │ └── launch_background.xml
│ │ │ │ ├── values
│ │ │ │ │ └── styles.xml
│ │ │ │ └── values-night
│ │ │ │ │ └── styles.xml
│ │ │ ├── kotlin
│ │ │ │ └── com
│ │ │ │ │ └── example
│ │ │ │ │ └── chat_app
│ │ │ │ │ └── MainActivity.kt
│ │ │ ├── AndroidManifest.xml
│ │ │ └── java
│ │ │ │ └── io
│ │ │ │ └── flutter
│ │ │ │ └── plugins
│ │ │ │ └── GeneratedPluginRegistrant.java
│ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ └── profile
│ │ │ └── AndroidManifest.xml
│ ├── google-services.json
│ └── build.gradle
├── local.properties
├── settings.gradle
├── build.gradle
├── gradlew.bat
└── gradlew
├── ios
├── Runner
│ ├── Runner-Bridging-Header.h
│ ├── Assets.xcassets
│ │ ├── LaunchImage.imageset
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ ├── README.md
│ │ │ └── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── Icon-App-83.5x83.5@2x.png
│ │ │ └── Contents.json
│ ├── AppDelegate.swift
│ ├── GoogleService-Info.plist
│ ├── Info.plist
│ └── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
├── Flutter
│ ├── Debug.xcconfig
│ ├── Release.xcconfig
│ └── AppFrameworkInfo.plist
├── Runner.xcodeproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── WorkspaceSettings.xcsettings
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── xcshareddata
│ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ └── project.pbxproj
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── WorkspaceSettings.xcsettings
│ │ └── IDEWorkspaceChecks.plist
├── .gitignore
├── Podfile
└── Podfile.lock
├── images
└── logo.png
├── README.md
├── lib
├── constants.dart
├── widgets
│ └── rounded_button.dart
├── main.dart
└── screens
│ ├── welcome_screen.dart
│ ├── login_screen.dart
│ ├── registration_screen.dart
│ └── chat_screen.dart
├── .gitignore
├── test
└── widget_test.dart
├── .metadata
├── analysis_options.yaml
├── pubspec.yaml
└── pubspec.lock
/android/.gradle/7.4/gc.properties:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/android/.gradle/vcs-1/gc.properties:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/android/.gradle/7.4/fileChanges/last-build.bin:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/android/.gradle/7.4/dependencies-accessors/gc.properties:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/images/logo.png
--------------------------------------------------------------------------------
/android/.gradle/buildOutputCleanup/cache.properties:
--------------------------------------------------------------------------------
1 | #Sat Sep 17 20:47:46 CEST 2022
2 | gradle.version=7.4
3 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/android/.gradle/file-system.probe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/android/.gradle/file-system.probe
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/android/.gradle/7.4/checksums/checksums.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/android/.gradle/7.4/checksums/checksums.lock
--------------------------------------------------------------------------------
/android/.gradle/7.4/fileHashes/fileHashes.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/android/.gradle/7.4/fileHashes/fileHashes.bin
--------------------------------------------------------------------------------
/android/.gradle/7.4/fileHashes/fileHashes.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/android/.gradle/7.4/fileHashes/fileHashes.lock
--------------------------------------------------------------------------------
/android/.gradle/7.4/checksums/md5-checksums.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/android/.gradle/7.4/checksums/md5-checksums.bin
--------------------------------------------------------------------------------
/android/.gradle/7.4/checksums/sha1-checksums.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/android/.gradle/7.4/checksums/sha1-checksums.bin
--------------------------------------------------------------------------------
/android/.gradle/buildOutputCleanup/outputFiles.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/android/.gradle/buildOutputCleanup/outputFiles.bin
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/.gradle/7.4/fileHashes/resourceHashesCache.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/android/.gradle/7.4/fileHashes/resourceHashesCache.bin
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/.gradle/7.4/executionHistory/executionHistory.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/android/.gradle/7.4/executionHistory/executionHistory.bin
--------------------------------------------------------------------------------
/android/.gradle/7.4/executionHistory/executionHistory.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/android/.gradle/7.4/executionHistory/executionHistory.lock
--------------------------------------------------------------------------------
/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/android/local.properties:
--------------------------------------------------------------------------------
1 | sdk.dir=/Users/lumberjack/Library/Android/sdk
2 | flutter.sdk=/Users/lumberjack/Flutter/flutter
3 | flutter.buildMode=debug
4 | flutter.versionName=1.0.0
5 | flutter.versionCode=1
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/android/.gradle/7.4/dependencies-accessors/dependencies-accessors.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/android/.gradle/7.4/dependencies-accessors/dependencies-accessors.lock
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lumberjack-programmer/chat_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/chat_app/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.chat_app
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/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-7.4-all.zip
7 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/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.
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
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 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4 | def properties = new Properties()
5 |
6 | assert localPropertiesFile.exists()
7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
8 |
9 | def flutterSdkPath = properties.getProperty("flutter.sdk")
10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # chat_app
2 |
3 | A new Flutter project.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
13 |
14 | For help getting started with Flutter development, view the
15 | [online documentation](https://docs.flutter.dev/), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/lib/constants.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | const kSendButtonTextStyle = TextStyle(
4 | color: Colors.lightBlueAccent,
5 | fontWeight: FontWeight.bold,
6 | fontSize: 18.0,
7 | );
8 |
9 | const kMessageTextFieldDecoration = InputDecoration(
10 | contentPadding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 20.0),
11 | hintText: 'Type your message here...',
12 | hintStyle: TextStyle(color: Colors.grey),
13 | border: InputBorder.none,
14 | );
15 |
16 | const kMessageContainerDecoration = BoxDecoration(
17 | border: Border(
18 | top: BorderSide(color: Colors.lightBlueAccent, width: 2.0),
19 | ),
20 | );
21 |
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | **/dgph
2 | *.mode1v3
3 | *.mode2v3
4 | *.moved-aside
5 | *.pbxuser
6 | *.perspectivev3
7 | **/*sync/
8 | .sconsign.dblite
9 | .tags*
10 | **/.vagrant/
11 | **/DerivedData/
12 | Icon?
13 | **/Pods/
14 | **/.symlinks/
15 | profile
16 | xcuserdata
17 | **/.generated/
18 | Flutter/App.framework
19 | Flutter/Flutter.framework
20 | Flutter/Flutter.podspec
21 | Flutter/Generated.xcconfig
22 | Flutter/ephemeral/
23 | Flutter/app.flx
24 | Flutter/app.zip
25 | Flutter/flutter_assets/
26 | Flutter/flutter_export_environment.sh
27 | ServiceDefinitions.json
28 | Runner/GeneratedPluginRegistrant.*
29 |
30 | # Exceptions to above rules.
31 | !default.mode1v3
32 | !default.mode2v3
33 | !default.pbxuser
34 | !default.perspectivev3
35 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.6.10'
3 | repositories {
4 | google()
5 | mavenCentral()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:7.1.2'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | classpath 'com.google.gms:google-services:4.3.13'
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | google()
18 | mavenCentral()
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 |
--------------------------------------------------------------------------------
/lib/widgets/rounded_button.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class RoundedButton extends StatelessWidget {
4 |
5 | const RoundedButton({Key? key,
6 | required this.color, required this.onPressed, required this.text
7 | }) : super(key: key);
8 |
9 | final Color color;
10 | final VoidCallback onPressed;
11 | final String text;
12 |
13 | @override
14 | Widget build(BuildContext context) {
15 | return Padding(
16 | padding: EdgeInsets.symmetric(vertical: 16.0),
17 | child: Material(
18 | elevation: 5.0,
19 | color: color,
20 | borderRadius: BorderRadius.circular(30.0),
21 | child: MaterialButton(
22 | onPressed: onPressed,
23 | minWidth: 200.0,
24 | height: 42.0,
25 | child: Text(
26 | text,
27 | ),
28 | ),
29 | ),
30 | );
31 | }
32 | }
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 9.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 | migrate_working_dir/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # The .vscode folder contains launch configuration and tasks you configure in
20 | # VS Code which you may wish to be included in version control, so this line
21 | # is commented out by default.
22 | #.vscode/
23 |
24 | # Flutter/Dart/Pub related
25 | **/doc/api/
26 | **/ios/Flutter/.last_build_id
27 | .dart_tool/
28 | .flutter-plugins
29 | .flutter-plugins-dependencies
30 | .packages
31 | .pub-cache/
32 | .pub/
33 | /build/
34 |
35 | # Web related
36 | lib/generated_plugin_registrant.dart
37 |
38 | # Symbolication related
39 | app.*.symbols
40 |
41 | # Obfuscation related
42 | app.*.map.json
43 |
44 | # Android Studio will place build artifacts here
45 | /android/app/debug
46 | /android/app/profile
47 | /android/app/release
48 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_core/firebase_core.dart';
2 | import 'package:flutter/material.dart';
3 | import '../screens/welcome_screen.dart';
4 | import '../screens/login_screen.dart';
5 | import '../screens/registration_screen.dart';
6 | import '../screens/chat_screen.dart';
7 |
8 | void main() async {
9 | WidgetsFlutterBinding.ensureInitialized();
10 | await Firebase.initializeApp();
11 | runApp(ChatApp());
12 | }
13 |
14 | class ChatApp extends StatelessWidget {
15 |
16 | @override
17 | Widget build(BuildContext context) {
18 | return MaterialApp(
19 | debugShowCheckedModeBanner: false,
20 | theme: ThemeData.dark().copyWith(
21 | textTheme: const TextTheme(
22 | bodyText1: TextStyle(color: Colors.black54),
23 | ),
24 | ),
25 | initialRoute: WelcomeScreen.id,
26 | routes: {
27 | WelcomeScreen.id : (context) => WelcomeScreen(),
28 | LoginScreen.id : (context) => LoginScreen(),
29 | RegistrationScreen.id : (context) => RegistrationScreen(),
30 | ChatScreen.id : (context) => ChatScreen(),
31 | },
32 | home: WelcomeScreen(),
33 | );
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/android/app/google-services.json:
--------------------------------------------------------------------------------
1 | {
2 | "project_info": {
3 | "project_number": "561645531498",
4 | "project_id": "flash-chat-c3710",
5 | "storage_bucket": "flash-chat-c3710.appspot.com"
6 | },
7 | "client": [
8 | {
9 | "client_info": {
10 | "mobilesdk_app_id": "1:561645531498:android:e718be3b8660683f643513",
11 | "android_client_info": {
12 | "package_name": "com.example.chat_app"
13 | }
14 | },
15 | "oauth_client": [
16 | {
17 | "client_id": "561645531498-cd6dghddri7bftvslcngmtjhpc3i820c.apps.googleusercontent.com",
18 | "client_type": 3
19 | }
20 | ],
21 | "api_key": [
22 | {
23 | "current_key": "AIzaSyDbF_dcBXnFpMfUk6aEtT9CfI1A51eI2g4"
24 | }
25 | ],
26 | "services": {
27 | "appinvite_service": {
28 | "other_platform_oauth_client": [
29 | {
30 | "client_id": "561645531498-cd6dghddri7bftvslcngmtjhpc3i820c.apps.googleusercontent.com",
31 | "client_type": 3
32 | }
33 | ]
34 | }
35 | }
36 | }
37 | ],
38 | "configuration_version": "1"
39 | }
--------------------------------------------------------------------------------
/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 in the flutter_test package. For example, you can send tap and scroll
5 | // gestures. You can also use WidgetTester to find child widgets in the widget
6 | // tree, read text, and verify that the values of widget properties are correct.
7 |
8 | import 'package:flutter/material.dart';
9 | import 'package:flutter_test/flutter_test.dart';
10 |
11 | import 'package:chat_app/main.dart';
12 |
13 | void main() {
14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async {
15 | // Build our app and trigger a frame.
16 | await tester.pumpWidget( ChatApp());
17 |
18 | // Verify that our counter starts at 0.
19 | expect(find.text('0'), findsOneWidget);
20 | expect(find.text('1'), findsNothing);
21 |
22 | // Tap the '+' icon and trigger a frame.
23 | await tester.tap(find.byIcon(Icons.add));
24 | await tester.pump();
25 |
26 | // Verify that our counter has incremented.
27 | expect(find.text('0'), findsNothing);
28 | expect(find.text('1'), findsOneWidget);
29 | });
30 | }
31 |
--------------------------------------------------------------------------------
/.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.
5 |
6 | version:
7 | revision: f1875d570e39de09040c8f79aa13cc56baab8db1
8 | channel: stable
9 |
10 | project_type: app
11 |
12 | # Tracks metadata for the flutter migrate command
13 | migration:
14 | platforms:
15 | - platform: root
16 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
17 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
18 | - platform: android
19 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
20 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
21 | - platform: ios
22 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
23 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
24 |
25 | # User provided section
26 |
27 | # List of Local paths (relative to this file) that should be
28 | # ignored by the migrate tool.
29 | #
30 | # Files that are not part of the templates will be ignored by default.
31 | unmanaged_files:
32 | - 'lib/main.dart'
33 | - 'ios/Runner.xcodeproj/project.pbxproj'
34 |
--------------------------------------------------------------------------------
/ios/Runner/GoogleService-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CLIENT_ID
6 | 561645531498-9im4cqcrtkun9777ufr01l64v5s0fjr7.apps.googleusercontent.com
7 | REVERSED_CLIENT_ID
8 | com.googleusercontent.apps.561645531498-9im4cqcrtkun9777ufr01l64v5s0fjr7
9 | API_KEY
10 | AIzaSyAWyVKiFYWBJ9YgDO8UM2ukvYQf5psear0
11 | GCM_SENDER_ID
12 | 561645531498
13 | PLIST_VERSION
14 | 1
15 | BUNDLE_ID
16 | com.goggle.chatApp
17 | PROJECT_ID
18 | flash-chat-c3710
19 | STORAGE_BUCKET
20 | flash-chat-c3710.appspot.com
21 | IS_ADS_ENABLED
22 |
23 | IS_ANALYTICS_ENABLED
24 |
25 | IS_APPINVITE_ENABLED
26 |
27 | IS_GCM_ENABLED
28 |
29 | IS_SIGNIN_ENABLED
30 |
31 | GOOGLE_APP_ID
32 | 1:561645531498:ios:09c88caa5fc2fd06643513
33 |
34 |
--------------------------------------------------------------------------------
/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | platform :ios, '10.0'
3 |
4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6 |
7 | project 'Runner', {
8 | 'Debug' => :debug,
9 | 'Profile' => :release,
10 | 'Release' => :release,
11 | }
12 |
13 | def flutter_root
14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
15 | unless File.exist?(generated_xcode_build_settings_path)
16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
17 | end
18 |
19 | File.foreach(generated_xcode_build_settings_path) do |line|
20 | matches = line.match(/FLUTTER_ROOT\=(.*)/)
21 | return matches[1].strip if matches
22 | end
23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
24 | end
25 |
26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27 |
28 | flutter_ios_podfile_setup
29 |
30 | target 'Runner' do
31 | use_frameworks!
32 | use_modular_headers!
33 |
34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
35 | end
36 |
37 | post_install do |installer|
38 | installer.pods_project.targets.each do |target|
39 | flutter_additional_ios_build_settings(target)
40 | end
41 | end
42 |
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | # This file configures the analyzer, which statically analyzes Dart code to
2 | # check for errors, warnings, and lints.
3 | #
4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6 | # invoked from the command line by running `flutter analyze`.
7 |
8 | # The following line activates a set of recommended lints for Flutter apps,
9 | # packages, and plugins designed to encourage good coding practices.
10 | include: package:flutter_lints/flutter.yaml
11 |
12 | linter:
13 | # The lint rules applied to this project can be customized in the
14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml`
15 | # included above or to enable additional rules. A list of all available lints
16 | # and their documentation is published at
17 | # https://dart-lang.github.io/linter/lints/index.html.
18 | #
19 | # Instead of disabling a lint rule for the entire project in the
20 | # section below, it can also be suppressed for a single line of code
21 | # or a specific dart file by using the `// ignore: name_of_lint` and
22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file
23 | # producing the lint.
24 | rules:
25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule
26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
27 |
28 | # Additional information about this file can be found at
29 | # https://dart.dev/guides/language/analysis-options
30 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
15 |
19 |
23 |
24 |
25 |
26 |
27 |
28 |
30 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java:
--------------------------------------------------------------------------------
1 | package io.flutter.plugins;
2 |
3 | import androidx.annotation.Keep;
4 | import androidx.annotation.NonNull;
5 | import io.flutter.Log;
6 |
7 | import io.flutter.embedding.engine.FlutterEngine;
8 |
9 | /**
10 | * Generated file. Do not edit.
11 | * This file is generated by the Flutter tool based on the
12 | * plugins that support the Android platform.
13 | */
14 | @Keep
15 | public final class GeneratedPluginRegistrant {
16 | private static final String TAG = "GeneratedPluginRegistrant";
17 | public static void registerWith(@NonNull FlutterEngine flutterEngine) {
18 | try {
19 | flutterEngine.getPlugins().add(new io.flutter.plugins.firebase.firestore.FlutterFirebaseFirestorePlugin());
20 | } catch(Exception e) {
21 | Log.e(TAG, "Error registering plugin cloud_firestore, io.flutter.plugins.firebase.firestore.FlutterFirebaseFirestorePlugin", e);
22 | }
23 | try {
24 | flutterEngine.getPlugins().add(new io.flutter.plugins.firebase.auth.FlutterFirebaseAuthPlugin());
25 | } catch(Exception e) {
26 | Log.e(TAG, "Error registering plugin firebase_auth, io.flutter.plugins.firebase.auth.FlutterFirebaseAuthPlugin", e);
27 | }
28 | try {
29 | flutterEngine.getPlugins().add(new io.flutter.plugins.firebase.core.FlutterFirebaseCorePlugin());
30 | } catch(Exception e) {
31 | Log.e(TAG, "Error registering plugin firebase_core, io.flutter.plugins.firebase.core.FlutterFirebaseCorePlugin", e);
32 | }
33 | try {
34 | flutterEngine.getPlugins().add(new com.walle.modal_progress_hud_nsn.ModalProgressHudNsnPlugin());
35 | } catch(Exception e) {
36 | Log.e(TAG, "Error registering plugin modal_progress_hud_nsn, com.walle.modal_progress_hud_nsn.ModalProgressHudNsnPlugin", e);
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CADisableMinimumFrameDurationOnPhone
6 |
7 | CFBundleDevelopmentRegion
8 | $(DEVELOPMENT_LANGUAGE)
9 | CFBundleDisplayName
10 | Chat App
11 | CFBundleExecutable
12 | $(EXECUTABLE_NAME)
13 | CFBundleIdentifier
14 | $(PRODUCT_BUNDLE_IDENTIFIER)
15 | CFBundleInfoDictionaryVersion
16 | 6.0
17 | CFBundleName
18 | chat_app
19 | CFBundlePackageType
20 | APPL
21 | CFBundleShortVersionString
22 | $(FLUTTER_BUILD_NAME)
23 | CFBundleSignature
24 | ????
25 | CFBundleVersion
26 | $(FLUTTER_BUILD_NUMBER)
27 | LSRequiresIPhoneOS
28 |
29 | UILaunchStoryboardName
30 | LaunchScreen
31 | UIMainStoryboardFile
32 | Main
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 | UIViewControllerBasedStatusBarAppearance
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/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 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'com.google.gms.google-services'
26 | apply plugin: 'kotlin-android'
27 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
28 |
29 |
30 |
31 | android {
32 | compileSdkVersion 32
33 | ndkVersion flutter.ndkVersion
34 |
35 | compileOptions {
36 | sourceCompatibility JavaVersion.VERSION_1_8
37 | targetCompatibility JavaVersion.VERSION_1_8
38 | }
39 |
40 | kotlinOptions {
41 | jvmTarget = '1.8'
42 | }
43 |
44 | sourceSets {
45 | main.java.srcDirs += 'src/main/kotlin'
46 | }
47 |
48 | defaultConfig {
49 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
50 | applicationId "com.example.chat_app"
51 | // You can update the following values to match your application needs.
52 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
53 | minSdkVersion 19
54 | multiDexEnabled true
55 | targetSdkVersion flutter.targetSdkVersion
56 | versionCode flutterVersionCode.toInteger()
57 | versionName flutterVersionName
58 | }
59 |
60 | buildTypes {
61 | release {
62 | // TODO: Add your own signing config for the release build.
63 | // Signing with the debug keys for now, so `flutter run --release` works.
64 | signingConfig signingConfigs.debug
65 | }
66 | }
67 | }
68 |
69 | flutter {
70 | source '../..'
71 | }
72 |
73 | dependencies {
74 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
75 | implementation platform('com.google.firebase:firebase-bom:30.4.1')
76 | implementation 'com.google.firebase:firebase-analytics'
77 | }
78 |
--------------------------------------------------------------------------------
/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/lib/screens/welcome_screen.dart:
--------------------------------------------------------------------------------
1 | import 'package:chat_app/screens/login_screen.dart';
2 | import 'package:chat_app/screens/registration_screen.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:animated_text_kit/animated_text_kit.dart';
5 | import '../widgets/rounded_button.dart';
6 |
7 | class WelcomeScreen extends StatefulWidget {
8 | static String id = 'welcome_screen';
9 |
10 | @override
11 | _WelcomeScreenState createState() => _WelcomeScreenState();
12 | }
13 |
14 | class _WelcomeScreenState extends State with SingleTickerProviderStateMixin {
15 |
16 | late AnimationController controller;
17 | late Animation animation;
18 |
19 | @override
20 | void initState() {
21 | super.initState();
22 | controller = AnimationController(
23 | duration: Duration(seconds: 1),
24 | vsync: this,
25 | upperBound: 1,
26 | );
27 |
28 | animation = ColorTween(begin: Colors.blueGrey, end: Color(0xff001c55)).animate(controller);
29 | controller.forward();
30 |
31 | controller.addListener(() {
32 | setState(() {
33 | });
34 |
35 | });
36 | }
37 |
38 | @override
39 | void dispose() {
40 | // TODO: implement dispose
41 | controller.dispose();
42 | super.dispose();
43 |
44 | }
45 |
46 | @override
47 | Widget build(BuildContext context) {
48 | return Scaffold(
49 | backgroundColor: animation.value,
50 | body: Padding(
51 | padding: EdgeInsets.symmetric(horizontal: 24.0),
52 | child: Column(
53 | mainAxisAlignment: MainAxisAlignment.center,
54 | crossAxisAlignment: CrossAxisAlignment.stretch,
55 | children: [
56 | Row(
57 | children: [
58 | Hero(
59 | tag: 'logo',
60 | child: Container(
61 | height: 60,
62 | child: Image.asset('images/logo.png'),
63 | ),
64 | ),
65 | TypewriterAnimatedTextKit(
66 | isRepeatingAnimation: false,
67 | text: ['Chat App'],
68 | textStyle: const TextStyle(
69 | fontSize: 30.0,
70 | fontWeight: FontWeight.w900,
71 | color: Colors.white,
72 | ),
73 | ),
74 | ],
75 | ),
76 | SizedBox(
77 | height: 48.0,
78 | ),
79 | RoundedButton(
80 | onPressed: () {
81 | //Go to login screen.
82 | Navigator.pushNamed(context, LoginScreen.id);
83 | },
84 | color: Colors.lightBlueAccent,
85 | text: 'Log In',
86 | ),
87 |
88 | RoundedButton(
89 | onPressed: () {
90 | //Go to login screen.
91 | Navigator.pushNamed(context, RegistrationScreen.id);
92 | },
93 | color: Colors.blueAccent,
94 | text: 'Register',
95 | ),
96 | ],
97 | ),
98 | ),
99 | );
100 | }
101 | }
102 |
103 |
104 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
37 |
38 |
39 |
40 |
41 |
42 |
52 |
54 |
60 |
61 |
62 |
63 |
69 |
71 |
77 |
78 |
79 |
80 |
82 |
83 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: chat_app
2 | description: A new Flutter project.
3 |
4 | # The following line prevents the package from being accidentally published to
5 | # pub.dev using `flutter 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.17.6 <3.0.0"
22 |
23 | # Dependencies specify other packages that your package needs in order to work.
24 | # To automatically upgrade your package dependencies to the latest versions
25 | # consider running `flutter pub upgrade --major-versions`. Alternatively,
26 | # dependencies can be manually updated by changing the version numbers below to
27 | # the latest version available on pub.dev. To see which dependencies have newer
28 | # versions available, run `flutter pub outdated`.
29 | dependencies:
30 | flutter:
31 | sdk: flutter
32 |
33 |
34 | # The following adds the Cupertino Icons font to your application.
35 | # Use with the CupertinoIcons class for iOS style icons.
36 | cupertino_icons: ^1.0.2
37 | animated_text_kit: ^4.2.2
38 | firebase_core: ^1.22.0
39 | firebase_auth: ^3.9.0
40 | cloud_firestore: ^3.4.8
41 | modal_progress_hud_nsn: ^0.3.0
42 |
43 | dev_dependencies:
44 | flutter_test:
45 | sdk: flutter
46 |
47 | # The "flutter_lints" package below contains a set of recommended lints to
48 | # encourage good coding practices. The lint set provided by the package is
49 | # activated in the `analysis_options.yaml` file located at the root of your
50 | # package. See that file for information about deactivating specific lint
51 | # rules and activating additional ones.
52 | flutter_lints: ^2.0.0
53 |
54 | # For information on the generic Dart part of this file, see the
55 | # following page: https://dart.dev/tools/pub/pubspec
56 |
57 | # The following section is specific to Flutter packages.
58 | flutter:
59 |
60 | # The following line ensures that the Material Icons font is
61 | # included with your application, so that you can use the icons in
62 | # the material Icons class.
63 | uses-material-design: true
64 |
65 | # To add assets to your application, add an assets section, like this:
66 | assets:
67 | - images/
68 | # - images/a_dot_ham.jpeg
69 |
70 | # An image asset can refer to one or more resolution-specific "variants", see
71 | # https://flutter.dev/assets-and-images/#resolution-aware
72 |
73 | # For details regarding adding assets from package dependencies, see
74 | # https://flutter.dev/assets-and-images/#from-packages
75 |
76 | # To add custom fonts to your application, add a fonts section here,
77 | # in this "flutter" section. Each entry in this list should have a
78 | # "family" key with the font family name, and a "fonts" key with a
79 | # list giving the asset and other descriptors for the font. For
80 | # example:
81 | # fonts:
82 | # - family: Schyler
83 | # fonts:
84 | # - asset: fonts/Schyler-Regular.ttf
85 | # - asset: fonts/Schyler-Italic.ttf
86 | # style: italic
87 | # - family: Trajan Pro
88 | # fonts:
89 | # - asset: fonts/TrajanPro.ttf
90 | # - asset: fonts/TrajanPro_Bold.ttf
91 | # weight: 700
92 | #
93 | # For details regarding fonts from package dependencies,
94 | # see https://flutter.dev/custom-fonts/#from-packages
95 |
--------------------------------------------------------------------------------
/lib/screens/login_screen.dart:
--------------------------------------------------------------------------------
1 | import 'package:chat_app/screens/chat_screen.dart';
2 | import 'package:firebase_auth/firebase_auth.dart';
3 | import 'package:firebase_core/firebase_core.dart';
4 | import 'package:flutter/material.dart';
5 | import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart';
6 | import '../widgets/rounded_button.dart';
7 |
8 | class LoginScreen extends StatefulWidget {
9 |
10 | static String id = 'login_screen';
11 |
12 | @override
13 | _LoginScreenState createState() => _LoginScreenState();
14 | }
15 |
16 | class _LoginScreenState extends State {
17 | final _auth = FirebaseAuth.instance;
18 | bool showSpinner = false;
19 | String email = '';
20 | String password = '';
21 |
22 |
23 |
24 | @override
25 | Widget build(BuildContext context) {
26 | return Scaffold(
27 | backgroundColor: Color(0xff001c55),
28 | body: ModalProgressHUD(
29 | inAsyncCall: showSpinner,
30 | child: Padding(
31 | padding: EdgeInsets.symmetric(horizontal: 24.0),
32 | child: Column(
33 | mainAxisAlignment: MainAxisAlignment.center,
34 | crossAxisAlignment: CrossAxisAlignment.stretch,
35 | children: [
36 | Flexible(
37 | child: Hero(
38 | tag: 'logo',
39 | child: Container(
40 | height: 200.0,
41 | child: Image.asset('images/logo.png'),
42 | ),
43 | ),
44 | ),
45 | SizedBox(
46 | height: 48.0,
47 | ),
48 | TextField(
49 | onChanged: (value) {
50 | //Do something with the user input.
51 | email = value;
52 | },
53 | style: TextStyle(color: Colors.white),
54 | keyboardType: TextInputType.emailAddress,
55 | decoration: InputDecoration(
56 | hintText: 'Enter your email',
57 | hintStyle: TextStyle(color: Colors.blueGrey),
58 | contentPadding:
59 | EdgeInsets.symmetric(vertical: 10.0, horizontal: 20.0),
60 | border: OutlineInputBorder(
61 | borderRadius: BorderRadius.all(Radius.circular(32.0)),
62 | ),
63 | enabledBorder: OutlineInputBorder(
64 | borderSide:
65 | BorderSide(color: Colors.lightBlueAccent, width: 1.0),
66 | borderRadius: BorderRadius.all(Radius.circular(32.0)),
67 | ),
68 | focusedBorder: OutlineInputBorder(
69 | borderSide:
70 | BorderSide(color: Colors.lightBlueAccent, width: 2.0),
71 | borderRadius: BorderRadius.all(Radius.circular(32.0)),
72 | ),
73 | ),
74 | ),
75 | SizedBox(
76 | height: 8.0,
77 | ),
78 | TextField(
79 | onChanged: (value) {
80 | //Do something with the user input.
81 | password = value;
82 | },
83 | style: TextStyle(color: Colors.white),
84 | obscureText: true,
85 | decoration: InputDecoration(
86 | hintStyle: TextStyle(color: Colors.blueGrey),
87 | hintText: 'Enter your password.',
88 | contentPadding:
89 | EdgeInsets.symmetric(vertical: 10.0, horizontal: 20.0),
90 | border: OutlineInputBorder(
91 | borderRadius: BorderRadius.all(Radius.circular(32.0)),
92 | ),
93 | enabledBorder: OutlineInputBorder(
94 | borderSide:
95 | BorderSide(color: Colors.lightBlueAccent, width: 1.0),
96 | borderRadius: BorderRadius.all(Radius.circular(32.0)),
97 | ),
98 | focusedBorder: OutlineInputBorder(
99 | borderSide:
100 | BorderSide(color: Colors.lightBlueAccent, width: 2.0),
101 | borderRadius: BorderRadius.all(Radius.circular(32.0)),
102 | ),
103 | ),
104 | ),
105 | SizedBox(
106 | height: 24.0,
107 | ),
108 | RoundedButton(
109 | onPressed: () async {
110 | try {
111 | setState(() {
112 | showSpinner = true;
113 | });
114 | final user = await _auth.signInWithEmailAndPassword(
115 | email: email, password: password);
116 | Navigator.pushNamed(context, ChatScreen.id);
117 | } catch (e) {
118 | print(e);
119 | }
120 | setState(() {
121 | showSpinner = false;
122 | });
123 | },
124 | color: Colors.lightBlueAccent,
125 | text: 'Log In',
126 | ),
127 | ],
128 | ),
129 | ),
130 | ),
131 | );
132 | }
133 | }
134 |
--------------------------------------------------------------------------------
/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/lib/screens/registration_screen.dart:
--------------------------------------------------------------------------------
1 | import 'package:chat_app/main.dart';
2 | import 'package:chat_app/screens/chat_screen.dart';
3 | import 'package:firebase_auth/firebase_auth.dart';
4 | import 'package:flutter/material.dart';
5 | import '../widgets/rounded_button.dart';
6 | import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart';
7 |
8 | class RegistrationScreen extends StatefulWidget {
9 |
10 | static String id = 'registration_screen';
11 |
12 | @override
13 | _RegistrationScreenState createState() => _RegistrationScreenState();
14 | }
15 |
16 | class _RegistrationScreenState extends State {
17 | final _auth = FirebaseAuth.instance;
18 | bool showSpinner = false;
19 | String name = '';
20 | String email = '';
21 | String password = '';
22 |
23 | @override
24 | Widget build(BuildContext context) {
25 | return Scaffold(
26 | backgroundColor: Color(0xff001c55),
27 | body: ModalProgressHUD(
28 | inAsyncCall: showSpinner,
29 | child: Padding(
30 | padding: EdgeInsets.symmetric(horizontal: 24.0),
31 | child: Column(
32 | mainAxisAlignment: MainAxisAlignment.center,
33 | crossAxisAlignment: CrossAxisAlignment.stretch,
34 | children: [
35 | Flexible(
36 | child: Hero(
37 | tag: 'logo',
38 | child: Container(
39 | height: 200.0,
40 | child: Image.asset('images/logo.png'),
41 | ),
42 | ),
43 | ),
44 | SizedBox(
45 | height: 48.0,
46 | ),
47 | TextField(
48 | style: TextStyle(color: Colors.white),
49 | onChanged: (value) {
50 | //Do something with the user input.
51 | name = value;
52 | },
53 | keyboardType: TextInputType.emailAddress,
54 | decoration: InputDecoration(
55 | hintText: 'Enter your name',
56 | hintStyle: TextStyle(color: Colors.blueGrey),
57 | contentPadding:
58 | EdgeInsets.symmetric(vertical: 10.0, horizontal: 20.0),
59 | border: OutlineInputBorder(
60 | borderRadius: BorderRadius.all(Radius.circular(32.0)),
61 | ),
62 | enabledBorder: OutlineInputBorder(
63 | borderSide: BorderSide(color: Colors.blueAccent, width: 1.0),
64 | borderRadius: BorderRadius.all(Radius.circular(32.0)),
65 | ),
66 | focusedBorder: OutlineInputBorder(
67 | borderSide: BorderSide(color: Colors.blueAccent, width: 3.0),
68 | borderRadius: BorderRadius.all(Radius.circular(32.0)),
69 | ),
70 | ),
71 | ),
72 | SizedBox(
73 | height: 8.0,
74 | ),
75 |
76 | TextField(
77 | style: TextStyle(color: Colors.white),
78 | onChanged: (value) {
79 | //Do something with the user input.
80 | email = value;
81 | },
82 | keyboardType: TextInputType.emailAddress,
83 | decoration: InputDecoration(
84 | hintText: 'Enter your email',
85 | hintStyle: TextStyle(color: Colors.blueGrey),
86 | contentPadding:
87 | EdgeInsets.symmetric(vertical: 10.0, horizontal: 20.0),
88 | border: OutlineInputBorder(
89 | borderRadius: BorderRadius.all(Radius.circular(32.0)),
90 | ),
91 | enabledBorder: OutlineInputBorder(
92 | borderSide: BorderSide(color: Colors.blueAccent, width: 3.0),
93 | borderRadius: BorderRadius.all(Radius.circular(32.0)),
94 | ),
95 | focusedBorder: OutlineInputBorder(
96 | borderSide: BorderSide(color: Colors.blueAccent, width: 2.0),
97 | borderRadius: BorderRadius.all(Radius.circular(32.0)),
98 | ),
99 | ),
100 | ),
101 | SizedBox(
102 | height: 8.0,
103 | ),
104 | TextField(
105 | style: TextStyle(color: Colors.white),
106 | onChanged: (value) {
107 | //Do something with the user input.
108 | password = value;
109 | },
110 | obscureText: true,
111 | decoration: InputDecoration(
112 | hintText: 'Enter your password',
113 | hintStyle: TextStyle(color: Colors.blueGrey),
114 | contentPadding:
115 | EdgeInsets.symmetric(vertical: 10.0, horizontal: 20.0),
116 | border: OutlineInputBorder(
117 | borderRadius: BorderRadius.all(Radius.circular(32.0)),
118 | ),
119 | enabledBorder: OutlineInputBorder(
120 | borderSide: BorderSide(color: Colors.blueAccent, width: 1.0),
121 | borderRadius: BorderRadius.all(Radius.circular(32.0)),
122 | ),
123 | focusedBorder: OutlineInputBorder(
124 | borderSide: BorderSide(color: Colors.blueAccent, width: 2.0),
125 | borderRadius: BorderRadius.all(Radius.circular(32.0)),
126 | ),
127 | ),
128 | ),
129 | SizedBox(
130 | height: 24.0,
131 | ),
132 | RoundedButton(
133 | onPressed: () async {
134 | setState(() {
135 | showSpinner = true;
136 | });
137 | try {
138 | final UserCredential newUser = await _auth.createUserWithEmailAndPassword(
139 | email: email, password: password);
140 | User? user = newUser.user;
141 | await user?.updateDisplayName(name);
142 | if (newUser != null) {
143 |
144 | Navigator.pushNamed(context, ChatScreen.id);
145 | }
146 | }
147 | catch (e){
148 | print(e);
149 | }
150 | setState(() {
151 | showSpinner = false;
152 | });
153 | },
154 | color: Colors.blueAccent,
155 | text: 'Register',
156 | ),
157 | ],
158 | ),
159 | ),
160 | ),
161 | );
162 | }
163 | }
164 |
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | animated_text_kit:
5 | dependency: "direct main"
6 | description:
7 | name: animated_text_kit
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "4.2.2"
11 | async:
12 | dependency: transitive
13 | description:
14 | name: async
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "2.8.2"
18 | boolean_selector:
19 | dependency: transitive
20 | description:
21 | name: boolean_selector
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "2.1.0"
25 | characters:
26 | dependency: transitive
27 | description:
28 | name: characters
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "1.2.0"
32 | charcode:
33 | dependency: transitive
34 | description:
35 | name: charcode
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "1.3.1"
39 | clock:
40 | dependency: transitive
41 | description:
42 | name: clock
43 | url: "https://pub.dartlang.org"
44 | source: hosted
45 | version: "1.1.0"
46 | cloud_firestore:
47 | dependency: "direct main"
48 | description:
49 | name: cloud_firestore
50 | url: "https://pub.dartlang.org"
51 | source: hosted
52 | version: "3.4.8"
53 | cloud_firestore_platform_interface:
54 | dependency: transitive
55 | description:
56 | name: cloud_firestore_platform_interface
57 | url: "https://pub.dartlang.org"
58 | source: hosted
59 | version: "5.7.4"
60 | cloud_firestore_web:
61 | dependency: transitive
62 | description:
63 | name: cloud_firestore_web
64 | url: "https://pub.dartlang.org"
65 | source: hosted
66 | version: "2.8.7"
67 | collection:
68 | dependency: transitive
69 | description:
70 | name: collection
71 | url: "https://pub.dartlang.org"
72 | source: hosted
73 | version: "1.16.0"
74 | cupertino_icons:
75 | dependency: "direct main"
76 | description:
77 | name: cupertino_icons
78 | url: "https://pub.dartlang.org"
79 | source: hosted
80 | version: "1.0.5"
81 | fake_async:
82 | dependency: transitive
83 | description:
84 | name: fake_async
85 | url: "https://pub.dartlang.org"
86 | source: hosted
87 | version: "1.3.0"
88 | firebase_auth:
89 | dependency: "direct main"
90 | description:
91 | name: firebase_auth
92 | url: "https://pub.dartlang.org"
93 | source: hosted
94 | version: "3.9.0"
95 | firebase_auth_platform_interface:
96 | dependency: transitive
97 | description:
98 | name: firebase_auth_platform_interface
99 | url: "https://pub.dartlang.org"
100 | source: hosted
101 | version: "6.8.0"
102 | firebase_auth_web:
103 | dependency: transitive
104 | description:
105 | name: firebase_auth_web
106 | url: "https://pub.dartlang.org"
107 | source: hosted
108 | version: "4.4.1"
109 | firebase_core:
110 | dependency: "direct main"
111 | description:
112 | name: firebase_core
113 | url: "https://pub.dartlang.org"
114 | source: hosted
115 | version: "1.22.0"
116 | firebase_core_platform_interface:
117 | dependency: transitive
118 | description:
119 | name: firebase_core_platform_interface
120 | url: "https://pub.dartlang.org"
121 | source: hosted
122 | version: "4.5.1"
123 | firebase_core_web:
124 | dependency: transitive
125 | description:
126 | name: firebase_core_web
127 | url: "https://pub.dartlang.org"
128 | source: hosted
129 | version: "1.7.2"
130 | flutter:
131 | dependency: "direct main"
132 | description: flutter
133 | source: sdk
134 | version: "0.0.0"
135 | flutter_lints:
136 | dependency: "direct dev"
137 | description:
138 | name: flutter_lints
139 | url: "https://pub.dartlang.org"
140 | source: hosted
141 | version: "2.0.1"
142 | flutter_test:
143 | dependency: "direct dev"
144 | description: flutter
145 | source: sdk
146 | version: "0.0.0"
147 | flutter_web_plugins:
148 | dependency: transitive
149 | description: flutter
150 | source: sdk
151 | version: "0.0.0"
152 | http_parser:
153 | dependency: transitive
154 | description:
155 | name: http_parser
156 | url: "https://pub.dartlang.org"
157 | source: hosted
158 | version: "4.0.1"
159 | intl:
160 | dependency: transitive
161 | description:
162 | name: intl
163 | url: "https://pub.dartlang.org"
164 | source: hosted
165 | version: "0.17.0"
166 | js:
167 | dependency: transitive
168 | description:
169 | name: js
170 | url: "https://pub.dartlang.org"
171 | source: hosted
172 | version: "0.6.4"
173 | lints:
174 | dependency: transitive
175 | description:
176 | name: lints
177 | url: "https://pub.dartlang.org"
178 | source: hosted
179 | version: "2.0.0"
180 | matcher:
181 | dependency: transitive
182 | description:
183 | name: matcher
184 | url: "https://pub.dartlang.org"
185 | source: hosted
186 | version: "0.12.11"
187 | material_color_utilities:
188 | dependency: transitive
189 | description:
190 | name: material_color_utilities
191 | url: "https://pub.dartlang.org"
192 | source: hosted
193 | version: "0.1.4"
194 | meta:
195 | dependency: transitive
196 | description:
197 | name: meta
198 | url: "https://pub.dartlang.org"
199 | source: hosted
200 | version: "1.7.0"
201 | modal_progress_hud_nsn:
202 | dependency: "direct main"
203 | description:
204 | name: modal_progress_hud_nsn
205 | url: "https://pub.dartlang.org"
206 | source: hosted
207 | version: "0.3.0"
208 | path:
209 | dependency: transitive
210 | description:
211 | name: path
212 | url: "https://pub.dartlang.org"
213 | source: hosted
214 | version: "1.8.1"
215 | plugin_platform_interface:
216 | dependency: transitive
217 | description:
218 | name: plugin_platform_interface
219 | url: "https://pub.dartlang.org"
220 | source: hosted
221 | version: "2.1.3"
222 | sky_engine:
223 | dependency: transitive
224 | description: flutter
225 | source: sdk
226 | version: "0.0.99"
227 | source_span:
228 | dependency: transitive
229 | description:
230 | name: source_span
231 | url: "https://pub.dartlang.org"
232 | source: hosted
233 | version: "1.8.2"
234 | stack_trace:
235 | dependency: transitive
236 | description:
237 | name: stack_trace
238 | url: "https://pub.dartlang.org"
239 | source: hosted
240 | version: "1.10.0"
241 | stream_channel:
242 | dependency: transitive
243 | description:
244 | name: stream_channel
245 | url: "https://pub.dartlang.org"
246 | source: hosted
247 | version: "2.1.0"
248 | string_scanner:
249 | dependency: transitive
250 | description:
251 | name: string_scanner
252 | url: "https://pub.dartlang.org"
253 | source: hosted
254 | version: "1.1.0"
255 | term_glyph:
256 | dependency: transitive
257 | description:
258 | name: term_glyph
259 | url: "https://pub.dartlang.org"
260 | source: hosted
261 | version: "1.2.0"
262 | test_api:
263 | dependency: transitive
264 | description:
265 | name: test_api
266 | url: "https://pub.dartlang.org"
267 | source: hosted
268 | version: "0.4.9"
269 | typed_data:
270 | dependency: transitive
271 | description:
272 | name: typed_data
273 | url: "https://pub.dartlang.org"
274 | source: hosted
275 | version: "1.3.1"
276 | vector_math:
277 | dependency: transitive
278 | description:
279 | name: vector_math
280 | url: "https://pub.dartlang.org"
281 | source: hosted
282 | version: "2.1.2"
283 | sdks:
284 | dart: ">=2.17.6 <3.0.0"
285 | flutter: ">=1.22.0"
286 |
--------------------------------------------------------------------------------
/lib/screens/chat_screen.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import '../constants.dart';
3 | import 'package:firebase_auth/firebase_auth.dart';
4 | import 'package:cloud_firestore/cloud_firestore.dart';
5 |
6 |
7 | final _fireStore = FirebaseFirestore.instance;
8 | User? loggedInUser;
9 | List