Repository: DevStack06/Whatsapp-Clone-Flutter
Branch: master
Commit: e8dc7c03055e
Files: 62
Total size: 111.6 KB
Directory structure:
gitextract_f8s2r3br/
├── .gitignore
├── .metadata
├── LICENSE
├── README.md
├── android/
│ ├── .gitignore
│ ├── app/
│ │ ├── build.gradle
│ │ └── src/
│ │ ├── debug/
│ │ │ └── AndroidManifest.xml
│ │ ├── main/
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── kotlin/
│ │ │ │ └── com/
│ │ │ │ └── example/
│ │ │ │ └── chatapp/
│ │ │ │ └── MainActivity.kt
│ │ │ └── res/
│ │ │ ├── drawable/
│ │ │ │ └── launch_background.xml
│ │ │ ├── drawable-v21/
│ │ │ │ └── launch_background.xml
│ │ │ ├── values/
│ │ │ │ └── styles.xml
│ │ │ └── values-night/
│ │ │ └── styles.xml
│ │ └── profile/
│ │ └── AndroidManifest.xml
│ ├── build.gradle
│ ├── gradle/
│ │ └── wrapper/
│ │ └── gradle-wrapper.properties
│ ├── gradle.properties
│ ├── settings.gradle
│ └── settings_aar.gradle
├── ios/
│ ├── .gitignore
│ ├── Flutter/
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ └── Release.xcconfig
│ ├── Runner/
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets/
│ │ │ ├── AppIcon.appiconset/
│ │ │ │ └── Contents.json
│ │ │ └── LaunchImage.imageset/
│ │ │ ├── Contents.json
│ │ │ └── README.md
│ │ ├── Base.lproj/
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── Runner-Bridging-Header.h
│ ├── 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
├── lib/
│ ├── CustomUI/
│ │ ├── AvtarCard.dart
│ │ ├── ButtonCard.dart
│ │ ├── ContactCard.dart
│ │ ├── CustomCard.dart
│ │ ├── OwnMessgaeCrad.dart
│ │ └── ReplyCard.dart
│ ├── Model/
│ │ ├── ChatModel.dart
│ │ └── MessageModel.dart
│ ├── Pages/
│ │ ├── CameraPage.dart
│ │ └── ChatPage.dart
│ ├── Screens/
│ │ ├── CameraScreen.dart
│ │ ├── CameraView.dart
│ │ ├── CreateGroup.dart
│ │ ├── Homescreen.dart
│ │ ├── IndividualPage.dart
│ │ ├── LoginScreen.dart
│ │ ├── SelectContact.dart
│ │ └── VideoView.dart
│ └── main.dart
├── pubspec.yaml
├── test/
│ └── widget_test.dart
└── web/
├── index.html
└── manifest.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/
# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/
# Web related
lib/generated_plugin_registrant.dart
# Symbolication related
app.*.symbols
# Obfuscation related
app.*.map.json
================================================
FILE: .metadata
================================================
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.
version:
revision: 1aafb3a8b9b0c36241c5f5b34ee914770f015818
channel: stable
project_type: app
================================================
FILE: LICENSE
================================================
BSD 3-Clause License
Copyright (c) 2021, Balram Rathore
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
================================================
FILE: README.md
================================================
### Chat App Development Front-End and Back-End using Flutter, SocketIo, and NodeJS. (Limited code)
( You can buy the full source code of tutorial in $30 (mail me):
devstackin@gmail.com
)
In this full tutrial source code you will get:
- One to one chatting
- One to one file sharing
- All the basic UI of whatsapp
- Camera and Video integration
- Socket Integration
Things are not there yet:
- Database integration
- Group chat functionality
- Calling and Voice features
**Please note in $30 you will going to get the full tutorial code, which I have covered in youtube, It is just a tutorial code not real whatsapp code**
### Playlist for Chat App Development series -:
| Playlist Name | | YouTube Playlist Link |
| ----------------------------------------------------------- | --- | ---------------------------------------------------------------------------- |
| Chat App Development (Main Playlist) | | [Link](https://youtube.com/playlist?list=PLtIU0BH0pkKovuEaNsrGE_Xd5Tz3m1zeC) |
| Chat App Development (Only Front-End using Flutter) | | [Link](https://youtube.com/playlist?list=PLtIU0BH0pkKrgqaT-9JSrRRyetkVEkDn6) |
| Chat Server Development (Only Back-End using Node/SocketIo) | | [Link](https://youtube.com/playlist?list=PLtIU0BH0pkKqKm88PUSRWiKsZ50ztsITv) |
### Some Screenshots of this series
1. Landing Page
2. Login Page
3. Login Page with Alert
4. OTP Screen
5. Country Page
6. Home page
7. Chat page
8. Camera Page
9. Status Page
10. PopUp Menu Item
11. Emoji Picker
12. Create Group Page
13. Select Contact Page
14.View Image/Video Page
### Some Other playlist
| Playlist Name | | YouTube Playlist Link |
| -------------------------------------------------------------------- | --- | ------------------------------------------------------------------------------------------- |
| Flutter model class series, for Rest API connection and JSON parsing | | [Link](https://www.youtube.com/playlist?list=PLtIU0BH0pkKpXE-1vC7NswofFPby1OYh-) |
| Flutter Basic series | | [link](https://www.youtube.com/playlist?list=PLtIU0BH0pkKrk8C7KToFeRSVTi2CLpFTG) |
| Blog App Development (Main Playlist) | | [Link](https://youtube.com/playlist?list=PLtIU0BH0pkKoE2PBvgbHEBPAP-sd670VI) |
| Blog App Development (Only Front-End using Flutter) | | [Link](https://www.youtube.com/watch?v=6VCLeHRnixg&list=PLtIU0BH0pkKpitsp5jzt-yDAoXAFBkcPb) |
| Blog App Development (Only Back-End using Node/ExpressJs) | | [Link](https://www.youtube.com/watch?v=T35T8nzyRDI&list=PLtIU0BH0pkKqypuOtDhcXZ4oATJfji49r) |
### **_If this tutorial helped you please give a star and also fork the repo, Thank you happy coding :)_**
### To use this app follow below instructions-:
1. Clone this app using below syntax -:
> git clone https://github.com/DevStack06/Whatsapp-Clone-Flutter.git
2. After cloning install packages using below syntax -:
> flutter pub get
Above command will install all the neccery packges.
3. Run the app on your mobile using below command -:
> flutter run
================================================
FILE: android/.gitignore
================================================
gradle-wrapper.jar
/.gradle
/captures/
/gradlew
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java
# Remember to never publicly share your keystore.
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
key.properties
================================================
FILE: android/app/build.gradle
================================================
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 29
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.chatapp"
minSdkVersion 21
targetSdkVersion 29
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
================================================
FILE: android/app/src/debug/AndroidManifest.xml
================================================
================================================
FILE: android/app/src/main/AndroidManifest.xml
================================================
================================================
FILE: android/app/src/main/kotlin/com/example/chatapp/MainActivity.kt
================================================
package com.example.chatapp
import io.flutter.embedding.android.FlutterActivity
class MainActivity: FlutterActivity() {
}
================================================
FILE: android/app/src/main/res/drawable/launch_background.xml
================================================
================================================
FILE: android/app/src/main/res/drawable-v21/launch_background.xml
================================================
================================================
FILE: android/app/src/main/res/values/styles.xml
================================================
================================================
FILE: android/app/src/main/res/values-night/styles.xml
================================================
================================================
FILE: android/app/src/profile/AndroidManifest.xml
================================================
================================================
FILE: android/build.gradle
================================================
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
================================================
FILE: android/gradle/wrapper/gradle-wrapper.properties
================================================
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
================================================
FILE: android/gradle.properties
================================================
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
android.enableR8=true
================================================
FILE: android/settings.gradle
================================================
include ':app'
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
================================================
FILE: android/settings_aar.gradle
================================================
include ':app'
================================================
FILE: ios/.gitignore
================================================
*.mode1v3
*.mode2v3
*.moved-aside
*.pbxuser
*.perspectivev3
**/*sync/
.sconsign.dblite
.tags*
**/.vagrant/
**/DerivedData/
Icon?
**/Pods/
**/.symlinks/
profile
xcuserdata
**/.generated/
Flutter/App.framework
Flutter/Flutter.framework
Flutter/Flutter.podspec
Flutter/Generated.xcconfig
Flutter/app.flx
Flutter/app.zip
Flutter/flutter_assets/
Flutter/flutter_export_environment.sh
ServiceDefinitions.json
Runner/GeneratedPluginRegistrant.*
# Exceptions to above rules.
!default.mode1v3
!default.mode2v3
!default.pbxuser
!default.perspectivev3
================================================
FILE: ios/Flutter/AppFrameworkInfo.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
App
CFBundleIdentifier
io.flutter.flutter.app
CFBundleInfoDictionaryVersion
6.0
CFBundleName
App
CFBundlePackageType
FMWK
CFBundleShortVersionString
1.0
CFBundleSignature
????
CFBundleVersion
1.0
MinimumOSVersion
8.0
================================================
FILE: ios/Flutter/Debug.xcconfig
================================================
#include "Generated.xcconfig"
================================================
FILE: ios/Flutter/Release.xcconfig
================================================
#include "Generated.xcconfig"
================================================
FILE: ios/Runner/AppDelegate.swift
================================================
import UIKit
import Flutter
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
================================================
FILE: ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@3x.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@1x.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@1x.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@1x.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Icon-App-83.5x83.5@2x.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "Icon-App-1024x1024@1x.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
================================================
{
"images" : [
{
"idiom" : "universal",
"filename" : "LaunchImage.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
================================================
# Launch Screen Assets
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
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.
================================================
FILE: ios/Runner/Base.lproj/LaunchScreen.storyboard
================================================
================================================
FILE: ios/Runner/Base.lproj/Main.storyboard
================================================
================================================
FILE: ios/Runner/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
chatapp
CFBundlePackageType
APPL
CFBundleShortVersionString
$(FLUTTER_BUILD_NAME)
CFBundleSignature
????
CFBundleVersion
$(FLUTTER_BUILD_NUMBER)
LSRequiresIPhoneOS
UILaunchStoryboardName
LaunchScreen
UIMainStoryboardFile
Main
UISupportedInterfaceOrientations
UIInterfaceOrientationPortrait
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
UISupportedInterfaceOrientations~ipad
UIInterfaceOrientationPortrait
UIInterfaceOrientationPortraitUpsideDown
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
UIViewControllerBasedStatusBarAppearance
================================================
FILE: ios/Runner/Runner-Bridging-Header.h
================================================
#import "GeneratedPluginRegistrant.h"
================================================
FILE: ios/Runner.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
97C146EB1CF9000F007C117D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
9740EEB21CF90195004384FC /* Debug.xcconfig */,
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
9740EEB31CF90195004384FC /* Generated.xcconfig */,
);
name = Flutter;
sourceTree = "";
};
97C146E51CF9000F007C117D = {
isa = PBXGroup;
children = (
9740EEB11CF90186004384FC /* Flutter */,
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
);
sourceTree = "";
};
97C146EF1CF9000F007C117D /* Products */ = {
isa = PBXGroup;
children = (
97C146EE1CF9000F007C117D /* Runner.app */,
);
name = Products;
sourceTree = "";
};
97C146F01CF9000F007C117D /* Runner */ = {
isa = PBXGroup;
children = (
97C146FA1CF9000F007C117D /* Main.storyboard */,
97C146FD1CF9000F007C117D /* Assets.xcassets */,
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
97C147021CF9000F007C117D /* Info.plist */,
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
);
path = Runner;
sourceTree = "";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
97C146ED1CF9000F007C117D /* Runner */ = {
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
);
buildRules = (
);
dependencies = (
);
name = Runner;
productName = Runner;
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
CreatedOnToolsVersion = 7.3.1;
LastSwiftMigration = 1100;
};
};
};
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 97C146E51CF9000F007C117D;
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
97C146ED1CF9000F007C117D /* Runner */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
97C146EC1CF9000F007C117D /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Thin Binary";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Run Script";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
97C146EA1CF9000F007C117D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
97C146FB1CF9000F007C117D /* Base */,
);
name = Main.storyboard;
sourceTree = "";
};
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
97C147001CF9000F007C117D /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
249021D3217E4FDB00AE95B9 /* Profile */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Profile;
};
249021D4217E4FDB00AE95B9 /* Profile */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.chatapp;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Profile;
};
97C147031CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
97C147041CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
97C147061CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.chatapp;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
};
97C147071CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.chatapp;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
isa = XCConfigurationList;
buildConfigurations = (
97C147031CF9000F007C117D /* Debug */,
97C147041CF9000F007C117D /* Release */,
249021D3217E4FDB00AE95B9 /* Profile */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
isa = XCConfigurationList;
buildConfigurations = (
97C147061CF9000F007C117D /* Debug */,
97C147071CF9000F007C117D /* Release */,
249021D4217E4FDB00AE95B9 /* Profile */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 97C146E61CF9000F007C117D /* Project object */;
}
================================================
FILE: ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
================================================
FILE: ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
IDEDidComputeMac32BitWarning
================================================
FILE: ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
================================================
PreviewsEnabled
================================================
FILE: ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
================================================
================================================
FILE: ios/Runner.xcworkspace/contents.xcworkspacedata
================================================
================================================
FILE: ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
IDEDidComputeMac32BitWarning
================================================
FILE: ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
================================================
PreviewsEnabled
================================================
FILE: lib/CustomUI/AvtarCard.dart
================================================
import 'package:chatapp/Model/ChatModel.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
class AvatarCard extends StatelessWidget {
const AvatarCard({Key key, this.chatModel}) : super(key: key);
final ChatModel chatModel;
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 2, horizontal: 8),
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Stack(
children: [
CircleAvatar(
radius: 23,
child: SvgPicture.asset(
"assets/person.svg",
color: Colors.white,
height: 30,
width: 30,
),
backgroundColor: Colors.blueGrey[200],
),
Positioned(
bottom: 0,
right: 0,
child: CircleAvatar(
backgroundColor: Colors.grey,
radius: 11,
child: Icon(
Icons.clear,
color: Colors.white,
size: 13,
),
),
)
],
),
SizedBox(
height: 2,
),
Text(
chatModel.name,
style: TextStyle(
fontSize: 12,
),
),
],
),
);
}
}
================================================
FILE: lib/CustomUI/ButtonCard.dart
================================================
import 'package:flutter/material.dart';
class ButtonCard extends StatelessWidget {
const ButtonCard({Key key, this.name, this.icon}) : super(key: key);
final String name;
final IconData icon;
@override
Widget build(BuildContext context) {
return ListTile(
leading: CircleAvatar(
radius: 23,
child: Icon(
icon,
size: 26,
color: Colors.white,
),
backgroundColor: Color(0xFF25D366),
),
title: Text(
name,
style: TextStyle(
fontSize: 15,
fontWeight: FontWeight.bold,
),
),
);
}
}
================================================
FILE: lib/CustomUI/ContactCard.dart
================================================
import 'package:chatapp/Model/ChatModel.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
class ContactCard extends StatelessWidget {
const ContactCard({Key key, this.contact}) : super(key: key);
final ChatModel contact;
@override
Widget build(BuildContext context) {
return ListTile(
leading: Container(
width: 50,
height: 53,
child: Stack(
children: [
CircleAvatar(
radius: 23,
child: SvgPicture.asset(
"assets/person.svg",
color: Colors.white,
height: 30,
width: 30,
),
backgroundColor: Colors.blueGrey[200],
),
contact.select
? Positioned(
bottom: 4,
right: 5,
child: CircleAvatar(
backgroundColor: Colors.teal,
radius: 11,
child: Icon(
Icons.check,
color: Colors.white,
size: 18,
),
),
)
: Container(),
],
),
),
title: Text(
contact.name,
style: TextStyle(
fontSize: 15,
fontWeight: FontWeight.bold,
),
),
subtitle: Text(
contact.status,
style: TextStyle(
fontSize: 13,
),
),
);
}
}
================================================
FILE: lib/CustomUI/CustomCard.dart
================================================
import 'package:chatapp/Model/ChatModel.dart';
import 'package:chatapp/Screens/IndividualPage.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
class CustomCard extends StatelessWidget {
const CustomCard({Key key, this.chatModel, this.sourchat}) : super(key: key);
final ChatModel chatModel;
final ChatModel sourchat;
@override
Widget build(BuildContext context) {
return InkWell(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (contex) => IndividualPage(
chatModel: chatModel,
sourchat: sourchat,
)));
},
child: Column(
children: [
ListTile(
leading: CircleAvatar(
radius: 30,
child: SvgPicture.asset(
chatModel.isGroup ? "assets/groups.svg" : "assets/person.svg",
color: Colors.white,
height: 36,
width: 36,
),
backgroundColor: Colors.blueGrey,
),
title: Text(
chatModel.name,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
),
),
subtitle: Row(
children: [
Icon(Icons.done_all),
SizedBox(
width: 3,
),
Text(
chatModel.currentMessage,
style: TextStyle(
fontSize: 13,
),
),
],
),
trailing: Text(chatModel.time),
),
Padding(
padding: const EdgeInsets.only(right: 20, left: 80),
child: Divider(
thickness: 1,
),
),
],
),
);
}
}
================================================
FILE: lib/CustomUI/OwnMessgaeCrad.dart
================================================
import 'package:flutter/material.dart';
class OwnMessageCard extends StatelessWidget {
const OwnMessageCard({Key key, this.message, this.time}) : super(key: key);
final String message;
final String time;
@override
Widget build(BuildContext context) {
return Align(
alignment: Alignment.centerRight,
child: ConstrainedBox(
constraints: BoxConstraints(
maxWidth: MediaQuery.of(context).size.width - 45,
),
child: Card(
elevation: 1,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
color: Color(0xffdcf8c6),
margin: EdgeInsets.symmetric(horizontal: 15, vertical: 5),
child: Stack(
children: [
Padding(
padding: const EdgeInsets.only(
left: 10,
right: 30,
top: 5,
bottom: 20,
),
child: Text(
message,
style: TextStyle(
fontSize: 16,
),
),
),
Positioned(
bottom: 4,
right: 10,
child: Row(
children: [
Text(
time,
style: TextStyle(
fontSize: 13,
color: Colors.grey[600],
),
),
SizedBox(
width: 5,
),
Icon(
Icons.done_all,
size: 20,
),
],
),
),
],
),
),
),
);
}
}
================================================
FILE: lib/CustomUI/ReplyCard.dart
================================================
import 'package:flutter/material.dart';
class ReplyCard extends StatelessWidget {
const ReplyCard({Key key, this.message, this.time}) : super(key: key);
final String message;
final String time;
@override
Widget build(BuildContext context) {
return Align(
alignment: Alignment.centerLeft,
child: ConstrainedBox(
constraints: BoxConstraints(
maxWidth: MediaQuery.of(context).size.width - 45,
),
child: Card(
elevation: 1,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
// color: Color(0xffdcf8c6),
margin: EdgeInsets.symmetric(horizontal: 15, vertical: 5),
child: Stack(
children: [
Padding(
padding: const EdgeInsets.only(
left: 8,
right: 50,
top: 5,
bottom: 10,
),
child: Text(
message,
style: TextStyle(
fontSize: 16,
),
),
),
Positioned(
bottom: 4,
right: 10,
child: Text(
time,
style: TextStyle(
fontSize: 13,
color: Colors.grey[600],
),
),
),
],
),
),
),
);
}
}
================================================
FILE: lib/Model/ChatModel.dart
================================================
class ChatModel {
String name;
String icon;
bool isGroup;
String time;
String currentMessage;
String status;
bool select = false;
int id;
ChatModel({
this.name,
this.icon,
this.isGroup,
this.time,
this.currentMessage,
this.status,
this.select = false,
this.id,
});
}
================================================
FILE: lib/Model/MessageModel.dart
================================================
class MessageModel {
String type;
String message;
String time;
MessageModel({this.message, this.type, this.time});
}
================================================
FILE: lib/Pages/CameraPage.dart
================================================
import 'package:chatapp/Screens/CameraScreen.dart';
import 'package:flutter/material.dart';
class CameraPage extends StatelessWidget {
const CameraPage({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
return CameraScreen();
}
}
================================================
FILE: lib/Pages/ChatPage.dart
================================================
import 'package:chatapp/CustomUI/CustomCard.dart';
import 'package:chatapp/Model/ChatModel.dart';
import 'package:chatapp/Screens/SelectContact.dart';
import 'package:flutter/material.dart';
class ChatPage extends StatefulWidget {
ChatPage({Key key, this.chatmodels, this.sourchat}) : super(key: key);
final List chatmodels;
final ChatModel sourchat;
@override
_ChatPageState createState() => _ChatPageState();
}
class _ChatPageState extends State {
@override
Widget build(BuildContext context) {
return Scaffold(
floatingActionButton: FloatingActionButton(
onPressed: () {
Navigator.push(context,
MaterialPageRoute(builder: (builder) => SelectContact()));
},
child: Icon(
Icons.chat,
color: Colors.white,
),
),
body: ListView.builder(
itemCount: widget.chatmodels.length,
itemBuilder: (contex, index) => CustomCard(
chatModel: widget.chatmodels[index],
sourchat: widget.sourchat,
),
),
);
}
}
================================================
FILE: lib/Screens/CameraScreen.dart
================================================
import 'dart:math';
import 'package:camera/camera.dart';
import 'package:chatapp/Screens/CameraView.dart';
import 'package:chatapp/Screens/VideoView.dart';
import 'package:flutter/material.dart';
import 'package:path/path.dart';
import 'package:path_provider/path_provider.dart';
List cameras;
class CameraScreen extends StatefulWidget {
CameraScreen({Key key}) : super(key: key);
@override
_CameraScreenState createState() => _CameraScreenState();
}
class _CameraScreenState extends State {
CameraController _cameraController;
Future cameraValue;
bool isRecoring = false;
bool flash = false;
bool iscamerafront = true;
double transform = 0;
@override
void initState() {
super.initState();
_cameraController = CameraController(cameras[0], ResolutionPreset.high);
cameraValue = _cameraController.initialize();
}
@override
void dispose() {
super.dispose();
_cameraController.dispose();
}
@override
Widget build(BuildContext context) {
return Scaffold(
body: Stack(
children: [
FutureBuilder(
future: cameraValue,
builder: (context, snapshot) {
if (snapshot.connectionState == ConnectionState.done) {
return Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
child: CameraPreview(_cameraController));
} else {
return Center(
child: CircularProgressIndicator(),
);
}
}),
Positioned(
bottom: 0.0,
child: Container(
color: Colors.black,
padding: EdgeInsets.only(top: 5, bottom: 5),
width: MediaQuery.of(context).size.width,
child: Column(
children: [
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
IconButton(
icon: Icon(
flash ? Icons.flash_on : Icons.flash_off,
color: Colors.white,
size: 28,
),
onPressed: () {
setState(() {
flash = !flash;
});
flash
? _cameraController
.setFlashMode(FlashMode.torch)
: _cameraController.setFlashMode(FlashMode.off);
}),
GestureDetector(
onLongPress: () async {
await _cameraController.startVideoRecording();
setState(() {
isRecoring = true;
});
},
onLongPressUp: () async {
XFile videopath =
await _cameraController.stopVideoRecording();
setState(() {
isRecoring = false;
});
Navigator.push(
context,
MaterialPageRoute(
builder: (builder) => VideoViewPage(
path: videopath.path,
)));
},
onTap: () {
if (!isRecoring) takePhoto(context);
},
child: isRecoring
? Icon(
Icons.radio_button_on,
color: Colors.red,
size: 80,
)
: Icon(
Icons.panorama_fish_eye,
color: Colors.white,
size: 70,
),
),
IconButton(
icon: Transform.rotate(
angle: transform,
child: Icon(
Icons.flip_camera_ios,
color: Colors.white,
size: 28,
),
),
onPressed: () async {
setState(() {
iscamerafront = !iscamerafront;
transform = transform + pi;
});
int cameraPos = iscamerafront ? 0 : 1;
_cameraController = CameraController(
cameras[cameraPos], ResolutionPreset.high);
cameraValue = _cameraController.initialize();
}),
],
),
SizedBox(
height: 4,
),
Text(
"Hold for Video, tap for photo",
style: TextStyle(
color: Colors.white,
),
textAlign: TextAlign.center,
)
],
),
),
),
],
),
);
}
void takePhoto(BuildContext context) async {
XFile file = await _cameraController.takePicture();
Navigator.push(
context,
MaterialPageRoute(
builder: (builder) => CameraViewPage(
path: file.path,
)));
}
}
================================================
FILE: lib/Screens/CameraView.dart
================================================
import 'dart:io';
import 'package:flutter/material.dart';
class CameraViewPage extends StatelessWidget {
const CameraViewPage({Key key, this.path}) : super(key: key);
final String path;
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.black,
appBar: AppBar(
backgroundColor: Colors.black,
actions: [
IconButton(
icon: Icon(
Icons.crop_rotate,
size: 27,
),
onPressed: () {}),
IconButton(
icon: Icon(
Icons.emoji_emotions_outlined,
size: 27,
),
onPressed: () {}),
IconButton(
icon: Icon(
Icons.title,
size: 27,
),
onPressed: () {}),
IconButton(
icon: Icon(
Icons.edit,
size: 27,
),
onPressed: () {}),
],
),
body: Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
child: Stack(
children: [
Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height - 150,
child: Image.file(
File(path),
fit: BoxFit.cover,
),
),
Positioned(
bottom: 0,
child: Container(
color: Colors.black38,
width: MediaQuery.of(context).size.width,
padding: EdgeInsets.symmetric(vertical: 5, horizontal: 8),
child: TextFormField(
style: TextStyle(
color: Colors.white,
fontSize: 17,
),
maxLines: 6,
minLines: 1,
decoration: InputDecoration(
border: InputBorder.none,
hintText: "Add Caption....",
prefixIcon: Icon(
Icons.add_photo_alternate,
color: Colors.white,
size: 27,
),
hintStyle: TextStyle(
color: Colors.white,
fontSize: 17,
),
suffixIcon: CircleAvatar(
radius: 27,
backgroundColor: Colors.tealAccent[700],
child: Icon(
Icons.check,
color: Colors.white,
size: 27,
),
)),
),
),
),
],
),
),
);
}
}
================================================
FILE: lib/Screens/CreateGroup.dart
================================================
import 'package:chatapp/CustomUI/AvtarCard.dart';
import 'package:chatapp/CustomUI/ButtonCard.dart';
import 'package:chatapp/CustomUI/ContactCard.dart';
import 'package:chatapp/Model/ChatModel.dart';
import 'package:flutter/material.dart';
class CreateGroup extends StatefulWidget {
CreateGroup({Key key}) : super(key: key);
@override
_CreateGroupState createState() => _CreateGroupState();
}
class _CreateGroupState extends State {
List contacts = [
ChatModel(name: "Dev Stack", status: "A full stack developer"),
ChatModel(name: "Balram", status: "Flutter Developer..........."),
ChatModel(name: "Saket", status: "Web developer..."),
ChatModel(name: "Bhanu Dev", status: "App developer...."),
ChatModel(name: "Collins", status: "Raect developer.."),
ChatModel(name: "Kishor", status: "Full Stack Web"),
ChatModel(name: "Testing1", status: "Example work"),
ChatModel(name: "Testing2", status: "Sharing is caring"),
ChatModel(name: "Divyanshu", status: "....."),
ChatModel(name: "Helper", status: "Love you Mom Dad"),
ChatModel(name: "Tester", status: "I find the bugs"),
];
List groupmember = [];
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"New Group",
style: TextStyle(
fontSize: 19,
fontWeight: FontWeight.bold,
),
),
Text(
"Add participants",
style: TextStyle(
fontSize: 13,
),
)
],
),
actions: [
IconButton(
icon: Icon(
Icons.search,
size: 26,
),
onPressed: () {}),
],
),
floatingActionButton: FloatingActionButton(
backgroundColor: Color(0xFF128C7E),
onPressed: () {},
child: Icon(Icons.arrow_forward)),
body: Stack(
children: [
ListView.builder(
itemCount: contacts.length + 1,
itemBuilder: (context, index) {
if (index == 0) {
return Container(
height: groupmember.length > 0 ? 90 : 10,
);
}
return InkWell(
onTap: () {
setState(() {
if (contacts[index - 1].select == true) {
groupmember.remove(contacts[index - 1]);
contacts[index - 1].select = false;
} else {
groupmember.add(contacts[index - 1]);
contacts[index - 1].select = true;
}
});
},
child: ContactCard(
contact: contacts[index - 1],
),
);
}),
groupmember.length > 0
? Align(
child: Column(
children: [
Container(
height: 75,
color: Colors.white,
child: ListView.builder(
scrollDirection: Axis.horizontal,
itemCount: contacts.length,
itemBuilder: (context, index) {
if (contacts[index].select == true)
return InkWell(
onTap: () {
setState(() {
groupmember.remove(contacts[index]);
contacts[index].select = false;
});
},
child: AvatarCard(
chatModel: contacts[index],
),
);
return Container();
}),
),
Divider(
thickness: 1,
),
],
),
alignment: Alignment.topCenter,
)
: Container(),
],
));
}
}
================================================
FILE: lib/Screens/Homescreen.dart
================================================
import 'package:chatapp/Model/ChatModel.dart';
import 'package:chatapp/Pages/CameraPage.dart';
import 'package:chatapp/Pages/ChatPage.dart';
import 'package:flutter/material.dart';
class Homescreen extends StatefulWidget {
Homescreen({Key key, this.chatmodels, this.sourchat}) : super(key: key);
final List chatmodels;
final ChatModel sourchat;
@override
_HomescreenState createState() => _HomescreenState();
}
class _HomescreenState extends State
with SingleTickerProviderStateMixin {
TabController _controller;
@override
void initState() {
super.initState();
_controller = TabController(length: 4, vsync: this, initialIndex: 1);
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Whatsapp Clone"),
actions: [
IconButton(icon: Icon(Icons.search), onPressed: () {}),
PopupMenuButton(
onSelected: (value) {
print(value);
},
itemBuilder: (BuildContext contesxt) {
return [
PopupMenuItem(
child: Text("New group"),
value: "New group",
),
PopupMenuItem(
child: Text("New broadcast"),
value: "New broadcast",
),
PopupMenuItem(
child: Text("Whatsapp Web"),
value: "Whatsapp Web",
),
PopupMenuItem(
child: Text("Starred messages"),
value: "Starred messages",
),
PopupMenuItem(
child: Text("Settings"),
value: "Settings",
),
];
},
)
],
bottom: TabBar(
controller: _controller,
indicatorColor: Colors.white,
tabs: [
Tab(
icon: Icon(Icons.camera_alt),
),
Tab(
text: "CHATS",
),
Tab(
text: "STATUS",
),
Tab(
text: "CALLS",
)
],
),
),
body: TabBarView(
controller: _controller,
children: [
CameraPage(),
ChatPage(
chatmodels: widget.chatmodels,
sourchat: widget.sourchat,
),
Text("STATUS"),
Text("Calls"),
],
),
);
}
}
================================================
FILE: lib/Screens/IndividualPage.dart
================================================
// import 'package:camera/camera.dart';
// import 'package:chatapp/CustomUI/CameraUI.dart';
import 'package:chatapp/CustomUI/OwnMessgaeCrad.dart';
import 'package:chatapp/CustomUI/ReplyCard.dart';
import 'package:chatapp/Model/ChatModel.dart';
import 'package:chatapp/Model/MessageModel.dart';
import 'package:emoji_picker/emoji_picker.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:socket_io_client/socket_io_client.dart' as IO;
class IndividualPage extends StatefulWidget {
IndividualPage({Key key, this.chatModel, this.sourchat}) : super(key: key);
final ChatModel chatModel;
final ChatModel sourchat;
@override
_IndividualPageState createState() => _IndividualPageState();
}
class _IndividualPageState extends State {
bool show = false;
FocusNode focusNode = FocusNode();
bool sendButton = false;
List messages = [];
TextEditingController _controller = TextEditingController();
ScrollController _scrollController = ScrollController();
IO.Socket socket;
@override
void initState() {
super.initState();
// connect();
focusNode.addListener(() {
if (focusNode.hasFocus) {
setState(() {
show = false;
});
}
});
connect();
}
void connect() {
// MessageModel messageModel = MessageModel(sourceId: widget.sourceChat.id.toString(),targetId: );
socket = IO.io("http://192.168.0.106:5000", {
"transports": ["websocket"],
"autoConnect": false,
});
socket.connect();
socket.emit("signin", widget.sourchat.id);
socket.onConnect((data) {
print("Connected");
socket.on("message", (msg) {
print(msg);
setMessage("destination", msg["message"]);
_scrollController.animateTo(_scrollController.position.maxScrollExtent,
duration: Duration(milliseconds: 300), curve: Curves.easeOut);
});
});
print(socket.connected);
}
void sendMessage(String message, int sourceId, int targetId) {
setMessage("source", message);
socket.emit("message",
{"message": message, "sourceId": sourceId, "targetId": targetId});
}
void setMessage(String type, String message) {
MessageModel messageModel = MessageModel(
type: type,
message: message,
time: DateTime.now().toString().substring(10, 16));
print(messages);
setState(() {
messages.add(messageModel);
});
}
@override
Widget build(BuildContext context) {
return Stack(
children: [
Image.asset(
"assets/whatsapp_Back.png",
height: MediaQuery.of(context).size.height,
width: MediaQuery.of(context).size.width,
fit: BoxFit.cover,
),
Scaffold(
backgroundColor: Colors.transparent,
appBar: PreferredSize(
preferredSize: Size.fromHeight(60),
child: AppBar(
leadingWidth: 70,
titleSpacing: 0,
leading: InkWell(
onTap: () {
Navigator.pop(context);
},
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
Icons.arrow_back,
size: 24,
),
CircleAvatar(
child: SvgPicture.asset(
widget.chatModel.isGroup
? "assets/groups.svg"
: "assets/person.svg",
color: Colors.white,
height: 36,
width: 36,
),
radius: 20,
backgroundColor: Colors.blueGrey,
),
],
),
),
title: InkWell(
onTap: () {},
child: Container(
margin: EdgeInsets.all(6),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
widget.chatModel.name,
style: TextStyle(
fontSize: 18.5,
fontWeight: FontWeight.bold,
),
),
Text(
"last seen today at 12:05",
style: TextStyle(
fontSize: 13,
),
)
],
),
),
),
actions: [
IconButton(icon: Icon(Icons.videocam), onPressed: () {}),
IconButton(icon: Icon(Icons.call), onPressed: () {}),
PopupMenuButton(
padding: EdgeInsets.all(0),
onSelected: (value) {
print(value);
},
itemBuilder: (BuildContext contesxt) {
return [
PopupMenuItem(
child: Text("View Contact"),
value: "View Contact",
),
PopupMenuItem(
child: Text("Media, links, and docs"),
value: "Media, links, and docs",
),
PopupMenuItem(
child: Text("Whatsapp Web"),
value: "Whatsapp Web",
),
PopupMenuItem(
child: Text("Search"),
value: "Search",
),
PopupMenuItem(
child: Text("Mute Notification"),
value: "Mute Notification",
),
PopupMenuItem(
child: Text("Wallpaper"),
value: "Wallpaper",
),
];
},
),
],
),
),
body: Container(
height: MediaQuery.of(context).size.height,
width: MediaQuery.of(context).size.width,
child: WillPopScope(
child: Column(
children: [
Expanded(
// height: MediaQuery.of(context).size.height - 150,
child: ListView.builder(
shrinkWrap: true,
controller: _scrollController,
itemCount: messages.length + 1,
itemBuilder: (context, index) {
if (index == messages.length) {
return Container(
height: 70,
);
}
if (messages[index].type == "source") {
return OwnMessageCard(
message: messages[index].message,
time: messages[index].time,
);
} else {
return ReplyCard(
message: messages[index].message,
time: messages[index].time,
);
}
},
),
),
Align(
alignment: Alignment.bottomCenter,
child: Container(
height: 70,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Row(
children: [
Container(
width: MediaQuery.of(context).size.width - 60,
child: Card(
margin: EdgeInsets.only(
left: 2, right: 2, bottom: 8),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(25),
),
child: TextFormField(
controller: _controller,
focusNode: focusNode,
textAlignVertical: TextAlignVertical.center,
keyboardType: TextInputType.multiline,
maxLines: 5,
minLines: 1,
onChanged: (value) {
if (value.length > 0) {
setState(() {
sendButton = true;
});
} else {
setState(() {
sendButton = false;
});
}
},
decoration: InputDecoration(
border: InputBorder.none,
hintText: "Type a message",
hintStyle: TextStyle(color: Colors.grey),
prefixIcon: IconButton(
icon: Icon(
show
? Icons.keyboard
: Icons.emoji_emotions_outlined,
),
onPressed: () {
if (!show) {
focusNode.unfocus();
focusNode.canRequestFocus = false;
}
setState(() {
show = !show;
});
},
),
suffixIcon: Row(
mainAxisSize: MainAxisSize.min,
children: [
IconButton(
icon: Icon(Icons.attach_file),
onPressed: () {
showModalBottomSheet(
backgroundColor:
Colors.transparent,
context: context,
builder: (builder) =>
bottomSheet());
},
),
IconButton(
icon: Icon(Icons.camera_alt),
onPressed: () {
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (builder) =>
// CameraApp()));
},
),
],
),
contentPadding: EdgeInsets.all(5),
),
),
),
),
Padding(
padding: const EdgeInsets.only(
bottom: 8,
right: 2,
left: 2,
),
child: CircleAvatar(
radius: 25,
backgroundColor: Color(0xFF128C7E),
child: IconButton(
icon: Icon(
sendButton ? Icons.send : Icons.mic,
color: Colors.white,
),
onPressed: () {
if (sendButton) {
_scrollController.animateTo(
_scrollController
.position.maxScrollExtent,
duration:
Duration(milliseconds: 300),
curve: Curves.easeOut);
sendMessage(
_controller.text,
widget.sourchat.id,
widget.chatModel.id);
_controller.clear();
setState(() {
sendButton = false;
});
}
},
),
),
),
],
),
show ? emojiSelect() : Container(),
],
),
),
),
],
),
onWillPop: () {
if (show) {
setState(() {
show = false;
});
} else {
Navigator.pop(context);
}
return Future.value(false);
},
),
),
),
],
);
}
Widget bottomSheet() {
return Container(
height: 278,
width: MediaQuery.of(context).size.width,
child: Card(
margin: const EdgeInsets.all(18.0),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(15)),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 20),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
iconCreation(
Icons.insert_drive_file, Colors.indigo, "Document"),
SizedBox(
width: 40,
),
iconCreation(Icons.camera_alt, Colors.pink, "Camera"),
SizedBox(
width: 40,
),
iconCreation(Icons.insert_photo, Colors.purple, "Gallery"),
],
),
SizedBox(
height: 30,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
iconCreation(Icons.headset, Colors.orange, "Audio"),
SizedBox(
width: 40,
),
iconCreation(Icons.location_pin, Colors.teal, "Location"),
SizedBox(
width: 40,
),
iconCreation(Icons.person, Colors.blue, "Contact"),
],
),
],
),
),
),
);
}
Widget iconCreation(IconData icons, Color color, String text) {
return InkWell(
onTap: () {},
child: Column(
children: [
CircleAvatar(
radius: 30,
backgroundColor: color,
child: Icon(
icons,
// semanticLabel: "Help",
size: 29,
color: Colors.white,
),
),
SizedBox(
height: 5,
),
Text(
text,
style: TextStyle(
fontSize: 12,
// fontWeight: FontWeight.w100,
),
)
],
),
);
}
Widget emojiSelect() {
return EmojiPicker(
rows: 4,
columns: 7,
onEmojiSelected: (emoji, category) {
print(emoji);
setState(() {
_controller.text = _controller.text + emoji.emoji;
});
});
}
}
================================================
FILE: lib/Screens/LoginScreen.dart
================================================
import 'package:chatapp/CustomUI/ButtonCard.dart';
import 'package:chatapp/Model/ChatModel.dart';
import 'package:chatapp/Screens/Homescreen.dart';
import 'package:flutter/material.dart';
class LoginScreen extends StatefulWidget {
LoginScreen({Key key}) : super(key: key);
@override
_LoginScreenState createState() => _LoginScreenState();
}
class _LoginScreenState extends State {
ChatModel sourceChat;
List chatmodels = [
ChatModel(
name: "Dev Stack",
isGroup: false,
currentMessage: "Hi Everyone",
time: "4:00",
icon: "person.svg",
id: 1,
),
ChatModel(
name: "Kishor",
isGroup: false,
currentMessage: "Hi Kishor",
time: "13:00",
icon: "person.svg",
id: 2,
),
ChatModel(
name: "Collins",
isGroup: false,
currentMessage: "Hi Dev Stack",
time: "8:00",
icon: "person.svg",
id: 3,
),
ChatModel(
name: "Balram Rathore",
isGroup: false,
currentMessage: "Hi Dev Stack",
time: "2:00",
icon: "person.svg",
id: 4,
),
// ChatModel(
// name: "NodeJs Group",
// isGroup: true,
// currentMessage: "New NodejS Post",
// time: "2:00",
// icon: "group.svg",
// ),
];
@override
Widget build(BuildContext context) {
return Scaffold(
body: ListView.builder(
itemCount: chatmodels.length,
itemBuilder: (contex, index) => InkWell(
onTap: () {
sourceChat = chatmodels.removeAt(index);
Navigator.pushReplacement(
context,
MaterialPageRoute(
builder: (builder) => Homescreen(
chatmodels: chatmodels,
sourchat: sourceChat,
)));
},
child: ButtonCard(
name: chatmodels[index].name,
icon: Icons.person,
),
)),
);
}
}
================================================
FILE: lib/Screens/SelectContact.dart
================================================
import 'package:chatapp/CustomUI/ButtonCard.dart';
import 'package:chatapp/CustomUI/ContactCard.dart';
import 'package:chatapp/Model/ChatModel.dart';
import 'package:chatapp/Screens/CreateGroup.dart';
import 'package:flutter/material.dart';
class SelectContact extends StatefulWidget {
SelectContact({Key key}) : super(key: key);
@override
_SelectContactState createState() => _SelectContactState();
}
class _SelectContactState extends State {
@override
Widget build(BuildContext context) {
List contacts = [
ChatModel(name: "Dev Stack", status: "A full stack developer"),
ChatModel(name: "Balram", status: "Flutter Developer..........."),
ChatModel(name: "Saket", status: "Web developer..."),
ChatModel(name: "Bhanu Dev", status: "App developer...."),
ChatModel(name: "Collins", status: "Raect developer.."),
ChatModel(name: "Kishor", status: "Full Stack Web"),
ChatModel(name: "Testing1", status: "Example work"),
ChatModel(name: "Testing2", status: "Sharing is caring"),
ChatModel(name: "Divyanshu", status: "....."),
ChatModel(name: "Helper", status: "Love you Mom Dad"),
ChatModel(name: "Tester", status: "I find the bugs"),
];
return Scaffold(
appBar: AppBar(
title: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Select Contact",
style: TextStyle(
fontSize: 19,
fontWeight: FontWeight.bold,
),
),
Text(
"256 contacts",
style: TextStyle(
fontSize: 13,
),
)
],
),
actions: [
IconButton(
icon: Icon(
Icons.search,
size: 26,
),
onPressed: () {}),
PopupMenuButton(
padding: EdgeInsets.all(0),
onSelected: (value) {
print(value);
},
itemBuilder: (BuildContext contesxt) {
return [
PopupMenuItem(
child: Text("Invite a friend"),
value: "Invite a friend",
),
PopupMenuItem(
child: Text("Contacts"),
value: "Contacts",
),
PopupMenuItem(
child: Text("Refresh"),
value: "Refresh",
),
PopupMenuItem(
child: Text("Help"),
value: "Help",
),
];
},
),
],
),
body: ListView.builder(
itemCount: contacts.length + 2,
itemBuilder: (context, index) {
if (index == 0) {
return InkWell(
onTap: () {
Navigator.push(context,
MaterialPageRoute(builder: (builder) => CreateGroup()));
},
child: ButtonCard(
icon: Icons.group,
name: "New group",
),
);
} else if (index == 1) {
return ButtonCard(
icon: Icons.person_add,
name: "New contact",
);
}
return ContactCard(
contact: contacts[index - 2],
);
}));
}
}
================================================
FILE: lib/Screens/VideoView.dart
================================================
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:video_player/video_player.dart';
class VideoViewPage extends StatefulWidget {
const VideoViewPage({Key key, this.path}) : super(key: key);
final String path;
@override
_VideoViewPageState createState() => _VideoViewPageState();
}
class _VideoViewPageState extends State {
VideoPlayerController _controller;
@override
void initState() {
super.initState();
_controller = VideoPlayerController.file(File(widget.path))
..initialize().then((_) {
// Ensure the first frame is shown after the video is initialized, even before the play button has been pressed.
setState(() {});
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.black,
appBar: AppBar(
backgroundColor: Colors.black,
actions: [
IconButton(
icon: Icon(
Icons.crop_rotate,
size: 27,
),
onPressed: () {}),
IconButton(
icon: Icon(
Icons.emoji_emotions_outlined,
size: 27,
),
onPressed: () {}),
IconButton(
icon: Icon(
Icons.title,
size: 27,
),
onPressed: () {}),
IconButton(
icon: Icon(
Icons.edit,
size: 27,
),
onPressed: () {}),
],
),
body: Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
child: Stack(
children: [
Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height - 150,
child: _controller.value.initialized
? AspectRatio(
aspectRatio: _controller.value.aspectRatio,
child: VideoPlayer(_controller),
)
: Container(),
),
Positioned(
bottom: 0,
child: Container(
color: Colors.black38,
width: MediaQuery.of(context).size.width,
padding: EdgeInsets.symmetric(vertical: 5, horizontal: 8),
child: TextFormField(
style: TextStyle(
color: Colors.white,
fontSize: 17,
),
maxLines: 6,
minLines: 1,
decoration: InputDecoration(
border: InputBorder.none,
hintText: "Add Caption....",
prefixIcon: Icon(
Icons.add_photo_alternate,
color: Colors.white,
size: 27,
),
hintStyle: TextStyle(
color: Colors.white,
fontSize: 17,
),
suffixIcon: CircleAvatar(
radius: 27,
backgroundColor: Colors.tealAccent[700],
child: Icon(
Icons.check,
color: Colors.white,
size: 27,
),
)),
),
),
),
Align(
alignment: Alignment.center,
child: InkWell(
onTap: () {
setState(() {
_controller.value.isPlaying
? _controller.pause()
: _controller.play();
});
},
child: CircleAvatar(
radius: 33,
backgroundColor: Colors.black38,
child: Icon(
_controller.value.isPlaying
? Icons.pause
: Icons.play_arrow,
color: Colors.white,
size: 50,
),
),
),
),
],
),
),
);
}
}
================================================
FILE: lib/main.dart
================================================
import 'package:camera/camera.dart';
import 'package:chatapp/Screens/CameraScreen.dart';
import 'package:chatapp/Screens/Homescreen.dart';
import 'package:chatapp/Screens/LoginScreen.dart';
import 'package:flutter/material.dart';
Future main() async {
WidgetsFlutterBinding.ensureInitialized();
cameras = await availableCameras();
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData(
fontFamily: "OpenSans",
primaryColor: Color(0xFF075E54),
accentColor: Color(0xFF128C7E)),
home: LoginScreen(),
);
}
}
================================================
FILE: pubspec.yaml
================================================
name: chatapp
description: A new Flutter project.
# The following line prevents the package from being accidentally published to
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: "none" # Remove this line if you wish to publish to pub.dev
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+1
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.0
flutter_svg: ^0.19.3
emoji_picker: ^0.1.0
shared_preferences: ^0.5.12+4
camera: ^0.7.0+2
path_provider: ^1.6.22
path:
video_player: ^1.0.1
socket_io_client: ^0.9.12
dev_dependencies:
flutter_test:
sdk: flutter
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
# To add assets to your application, add an assets section, like this:
assets:
- assets/
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware.
# For details regarding adding assets from package dependencies, see
# https://flutter.dev/assets-and-images/#from-packages
# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
fonts:
- family: OpenSans
fonts:
- asset: fonts/OpenSans-Bold.ttf
- asset: fonts/OpenSans-Regular.ttf
- asset: fonts/OpenSans-SemiBold.ttf
- asset: fonts/OpenSans-Italic.ttf
style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages
================================================
FILE: test/widget_test.dart
================================================
// This is a basic Flutter widget test.
//
// To perform an interaction with a widget in your test, use the WidgetTester
// utility that Flutter provides. For example, you can send tap and scroll
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct.
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:chatapp/main.dart';
void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(MyApp());
// Verify that our counter starts at 0.
expect(find.text('0'), findsOneWidget);
expect(find.text('1'), findsNothing);
// Tap the '+' icon and trigger a frame.
await tester.tap(find.byIcon(Icons.add));
await tester.pump();
// Verify that our counter has incremented.
expect(find.text('0'), findsNothing);
expect(find.text('1'), findsOneWidget);
});
}
================================================
FILE: web/index.html
================================================
chatapp
================================================
FILE: web/manifest.json
================================================
{
"name": "chatapp",
"short_name": "chatapp",
"start_url": ".",
"display": "standalone",
"background_color": "#0175C2",
"theme_color": "#0175C2",
"description": "A new Flutter project.",
"orientation": "portrait-primary",
"prefer_related_applications": false,
"icons": [
{
"src": "icons/Icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "icons/Icon-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}