├── lib ├── provider │ ├── chat_provider.dart │ ├── user_profile_provider.dart │ ├── home_provider.dart │ ├── audio_provider.dart │ └── contact_provider.dart ├── widgets │ ├── custom_bottomsheet.dart │ ├── custom_loader.dart │ ├── custom_switcher.dart │ ├── gradient_text.dart │ ├── no_data_found.dart │ ├── custom_circular_image.dart │ └── gradient_icon_button.dart ├── managers │ ├── local_db_manager │ │ ├── local_db_routes.dart │ │ └── local_db.dart │ └── navigation_manager │ │ └── navigation_manager.dart ├── models │ ├── onboarding_page.dart │ ├── document.dart │ ├── size_config.dart │ ├── location.dart │ ├── upi_payment.dart │ ├── chat.dart │ └── user.dart ├── getit.dart ├── constants │ ├── enums.dart │ ├── colors.dart │ └── extensions.dart └── views │ ├── message_page │ ├── widgets │ │ ├── circular_icon_button.dart │ │ ├── profile_circular_widget.dart │ │ ├── messages │ │ │ ├── gif_message.dart │ │ │ ├── text_message.dart │ │ │ ├── url_message.dart │ │ │ └── audio_message.dart │ │ ├── message_list_view.dart │ │ └── map_screen.dart │ └── circular_text_field.dart │ ├── home_page │ └── widgets │ │ ├── selected_contact_widget.dart │ │ ├── story_widget.dart │ │ ├── search_bar.dart │ │ ├── contact_bar.dart │ │ └── status_bar.dart │ ├── status_page │ ├── status_page.dart │ └── status_views │ │ └── camera_view.dart │ ├── onboarding_page │ ├── onboarding_page.dart │ └── widgets │ │ ├── animated_onboarding_images.dart │ │ └── lottie_animation_stack_widget.dart │ ├── profile_page │ ├── widgets │ │ ├── setting_tile.dart │ │ └── profile_widget.dart │ └── settings_page.dart │ ├── splash_page │ └── splash_page.dart │ ├── root_page.dart │ └── call_page │ └── call_list_page.dart ├── linux ├── .gitignore ├── main.cc ├── flutter │ ├── generated_plugin_registrant.h │ ├── generated_plugins.cmake │ ├── generated_plugin_registrant.cc │ └── CMakeLists.txt ├── my_application.h └── my_application.cc ├── 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 │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist ├── RunnerTests │ └── RunnerTests.swift ├── .gitignore └── Podfile ├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ ├── Icon-maskable-192.png │ └── Icon-maskable-512.png ├── manifest.json └── index.html ├── assets ├── images │ └── logo.png └── fonts │ ├── SFProText-Bold.ttf │ ├── SFProText-Medium.ttf │ └── SFProText-Regular.ttf ├── android ├── gradle.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 │ │ │ │ │ └── whatsapp_redesign │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── build.gradle │ └── google-services.json ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── settings.gradle └── build.gradle ├── macos ├── Runner │ ├── Configs │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ ├── Warnings.xcconfig │ │ └── AppInfo.xcconfig │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ ├── app_icon_1024.png │ │ │ ├── app_icon_128.png │ │ │ ├── app_icon_16.png │ │ │ ├── app_icon_256.png │ │ │ ├── app_icon_32.png │ │ │ ├── app_icon_512.png │ │ │ ├── app_icon_64.png │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Release.entitlements │ ├── DebugProfile.entitlements │ ├── MainFlutterWindow.swift │ └── Info.plist ├── .gitignore ├── Flutter │ ├── Flutter-Debug.xcconfig │ ├── Flutter-Release.xcconfig │ └── GeneratedPluginRegistrant.swift ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── RunnerTests │ └── RunnerTests.swift └── Podfile ├── windows ├── runner │ ├── resources │ │ └── app_icon.ico │ ├── resource.h │ ├── utils.h │ ├── runner.exe.manifest │ ├── flutter_window.h │ ├── main.cpp │ ├── CMakeLists.txt │ ├── utils.cpp │ ├── flutter_window.cpp │ ├── Runner.rc │ └── win32_window.h ├── .gitignore ├── flutter │ ├── generated_plugin_registrant.h │ ├── generated_plugins.cmake │ ├── generated_plugin_registrant.cc │ └── CMakeLists.txt └── CMakeLists.txt ├── README.md ├── .gitignore ├── test └── widget_test.dart ├── analysis_options.yaml └── .metadata /lib/provider/chat_provider.dart: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /lib/provider/user_profile_provider.dart: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/widgets/custom_bottomsheet.dart: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YashMakan/Youtube-Whatsapp-Clone/HEAD/web/favicon.png -------------------------------------------------------------------------------- /assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YashMakan/Youtube-Whatsapp-Clone/HEAD/assets/images/logo.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YashMakan/Youtube-Whatsapp-Clone/HEAD/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YashMakan/Youtube-Whatsapp-Clone/HEAD/web/icons/Icon-512.png -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /assets/fonts/SFProText-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YashMakan/Youtube-Whatsapp-Clone/HEAD/assets/fonts/SFProText-Bold.ttf -------------------------------------------------------------------------------- /macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YashMakan/Youtube-Whatsapp-Clone/HEAD/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YashMakan/Youtube-Whatsapp-Clone/HEAD/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /assets/fonts/SFProText-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YashMakan/Youtube-Whatsapp-Clone/HEAD/assets/fonts/SFProText-Medium.ttf -------------------------------------------------------------------------------- /assets/fonts/SFProText-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YashMakan/Youtube-Whatsapp-Clone/HEAD/assets/fonts/SFProText-Regular.ttf -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YashMakan/Youtube-Whatsapp-Clone/HEAD/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YashMakan/Youtube-Whatsapp-Clone/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/YashMakan/Youtube-Whatsapp-Clone/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YashMakan/Youtube-Whatsapp-Clone/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YashMakan/Youtube-Whatsapp-Clone/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/YashMakan/Youtube-Whatsapp-Clone/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /lib/managers/local_db_manager/local_db_routes.dart: -------------------------------------------------------------------------------- 1 | class LocalDBRoutes { 2 | static const String userRoute = 'user'; 3 | static const List routes = [userRoute]; 4 | } -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YashMakan/Youtube-Whatsapp-Clone/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YashMakan/Youtube-Whatsapp-Clone/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YashMakan/Youtube-Whatsapp-Clone/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YashMakan/Youtube-Whatsapp-Clone/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YashMakan/Youtube-Whatsapp-Clone/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YashMakan/Youtube-Whatsapp-Clone/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YashMakan/Youtube-Whatsapp-Clone/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YashMakan/Youtube-Whatsapp-Clone/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YashMakan/Youtube-Whatsapp-Clone/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/YashMakan/Youtube-Whatsapp-Clone/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/YashMakan/Youtube-Whatsapp-Clone/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/YashMakan/Youtube-Whatsapp-Clone/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/YashMakan/Youtube-Whatsapp-Clone/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/YashMakan/Youtube-Whatsapp-Clone/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/YashMakan/Youtube-Whatsapp-Clone/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/YashMakan/Youtube-Whatsapp-Clone/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/YashMakan/Youtube-Whatsapp-Clone/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/YashMakan/Youtube-Whatsapp-Clone/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/YashMakan/Youtube-Whatsapp-Clone/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/YashMakan/Youtube-Whatsapp-Clone/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/YashMakan/Youtube-Whatsapp-Clone/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YashMakan/Youtube-Whatsapp-Clone/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YashMakan/Youtube-Whatsapp-Clone/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YashMakan/Youtube-Whatsapp-Clone/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/YashMakan/Youtube-Whatsapp-Clone/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /lib/models/onboarding_page.dart: -------------------------------------------------------------------------------- 1 | class OnBoardingPageModel { 2 | final String image; 3 | final String heading; 4 | final String text; 5 | 6 | OnBoardingPageModel(this.image, this.heading, this.text); 7 | } 8 | -------------------------------------------------------------------------------- /linux/main.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | int main(int argc, char** argv) { 4 | g_autoptr(MyApplication) app = my_application_new(); 5 | return g_application_run(G_APPLICATION(app), argc, argv); 6 | } 7 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/whatsapp_redesign/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.whatsapp_redesign 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/getit.dart: -------------------------------------------------------------------------------- 1 | import 'package:get_it/get_it.dart'; 2 | import 'package:whatsapp_redesign/provider/audio_provider.dart'; 3 | 4 | final getIt = GetIt.instance; 5 | 6 | void setup() { 7 | getIt.registerSingleton(AudioProvider()); 8 | } 9 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip 6 | -------------------------------------------------------------------------------- /macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @NSApplicationMain 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /macos/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 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /ios/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /macos/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import FlutterMacOS 2 | import Cocoa 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /windows/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral/ 2 | 3 | # Visual Studio user-specific files. 4 | *.suo 5 | *.user 6 | *.userosscache 7 | *.sln.docstates 8 | 9 | # Visual Studio build-related files. 10 | x64/ 11 | x86/ 12 | 13 | # Visual Studio cache files 14 | # files ending in .cache can be ignored 15 | *.[Cc]ache 16 | # but keep track of directories ending in .cache 17 | !*.[Cc]ache/ 18 | -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void fl_register_plugins(FlPluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void RegisterPlugins(flutter::PluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.network.server 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/widgets/custom_loader.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:lottie/lottie.dart'; 3 | import 'package:whatsapp_redesign/models/size_config.dart'; 4 | 5 | class CustomLoader extends StatelessWidget { 6 | const CustomLoader({Key? key}) : super(key: key); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return Lottie.asset('assets/loader.json', 11 | width: SizeConfig.screenWidth * 0.3); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/widgets/custom_switcher.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CustomSwitcher extends StatelessWidget { 4 | final bool cond; 5 | final Widget child; 6 | final Widget? child2; 7 | 8 | const CustomSwitcher( 9 | {super.key, required this.cond, required this.child, this.child2}); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return cond ? child : (child2 != null ? child2! : const SizedBox()); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /linux/my_application.h: -------------------------------------------------------------------------------- 1 | #ifndef FLUTTER_MY_APPLICATION_H_ 2 | #define FLUTTER_MY_APPLICATION_H_ 3 | 4 | #include 5 | 6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, 7 | GtkApplication) 8 | 9 | /** 10 | * my_application_new: 11 | * 12 | * Creates a new Flutter-based application. 13 | * 14 | * Returns: a new #MyApplication. 15 | */ 16 | MyApplication* my_application_new(); 17 | 18 | #endif // FLUTTER_MY_APPLICATION_H_ 19 | -------------------------------------------------------------------------------- /macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/constants/enums.dart: -------------------------------------------------------------------------------- 1 | enum CustomListTileType { message, group, call, contact } 2 | 3 | enum ChatType { message, group } 4 | 5 | enum CallStatus { missed, declined, accepted } 6 | 7 | enum DuringCallStatus { calling, accepted, ringing } 8 | 9 | enum ProfilePageStatus { view, personal } 10 | 11 | enum SettingTrailing { toggle, arrow } 12 | 13 | enum MessageType { 14 | text, 15 | audio, 16 | video, 17 | imageMedia, 18 | url, 19 | doc, 20 | upiPayment, 21 | contact, 22 | location 23 | } 24 | -------------------------------------------------------------------------------- /windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Runner.rc 4 | // 5 | #define IDI_APP_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/models/document.dart: -------------------------------------------------------------------------------- 1 | class Document { 2 | final String fileName; 3 | final int bytesSize; 4 | final String fileType; 5 | 6 | Document(this.fileName, this.bytesSize, this.fileType); 7 | 8 | factory Document.fromJson(Map data) => Document( 9 | data['fileName'], 10 | data['bytesSize'], 11 | data['fileType'], 12 | ); 13 | 14 | Map toJson() => { 15 | 'fileName': fileName, 16 | 'bytesSize': bytesSize, 17 | 'fileType': fileType, 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /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 | # whatsapp_redesign 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/widgets/gradient_text.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class GradientWidget extends StatelessWidget { 4 | const GradientWidget({ 5 | Key? key, 6 | required this.child, 7 | required this.gradient, 8 | }) : super(key: key); 9 | 10 | final Widget child; 11 | final Gradient gradient; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return ShaderMask( 16 | blendMode: BlendMode.srcIn, 17 | shaderCallback: (bounds) => gradient.createShader( 18 | Rect.fromLTWH(0, 0, bounds.width, bounds.height), 19 | ), 20 | child: child, 21 | ); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Warnings.xcconfig: -------------------------------------------------------------------------------- 1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings 2 | GCC_WARN_UNDECLARED_SELECTOR = YES 3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 6 | CLANG_WARN_PRAGMA_PACK = YES 7 | CLANG_WARN_STRICT_PROTOTYPES = YES 8 | CLANG_WARN_COMMA = YES 9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 12 | GCC_WARN_SHADOW = YES 13 | CLANG_WARN_UNREACHABLE_CODE = YES 14 | -------------------------------------------------------------------------------- /lib/models/size_config.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/widgets.dart'; 2 | 3 | class SizeConfig { 4 | static late MediaQueryData _mediaQueryData; 5 | static late double screenWidth; 6 | static late double screenHeight; 7 | static late double blockSizeHorizontal; 8 | static late double blockSizeVertical; 9 | static late double safeBlockHorizontal; 10 | static late double safeBlockVertical; 11 | static late BuildContext cntxt; 12 | 13 | void init(BuildContext context) { 14 | cntxt = context; 15 | _mediaQueryData = MediaQuery.of(context); 16 | screenWidth = _mediaQueryData.size.width; 17 | screenHeight = _mediaQueryData.size.height; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = whatsapp_redesign 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.whatsappRedesign 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2023 com.example. All rights reserved. 15 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /windows/runner/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_UTILS_H_ 2 | #define RUNNER_UTILS_H_ 3 | 4 | #include 5 | #include 6 | 7 | // Creates a console for the process, and redirects stdout and stderr to 8 | // it for both the runner and the Flutter library. 9 | void CreateAndAttachConsole(); 10 | 11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string 12 | // encoded in UTF-8. Returns an empty std::string on failure. 13 | std::string Utf8FromUtf16(const wchar_t* utf16_string); 14 | 15 | // Gets the command line arguments passed in as a std::vector, 16 | // encoded in UTF-8. Returns an empty std::vector on failure. 17 | std::vector GetCommandLineArguments(); 18 | 19 | #endif // RUNNER_UTILS_H_ 20 | -------------------------------------------------------------------------------- /lib/provider/home_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:whatsapp_redesign/managers/firestore_manager.dart'; 3 | import 'package:whatsapp_redesign/models/user.dart'; 4 | 5 | class HomeProvider extends ChangeNotifier { 6 | bool isSearch = false; 7 | TextEditingController controller = TextEditingController(); 8 | // List chats = []; 9 | List statusList = []; 10 | FirestoreManager manager = FirestoreManager(); 11 | 12 | double SLIDABLE_WIDGET_WIDTH_RATIO = 0.25; 13 | double SLIDABLE_ICON_SIZE = 30; 14 | 15 | // void removeChatAtIndex(int index) { 16 | // chats.removeAt(index); 17 | // notifyListeners(); 18 | // } 19 | 20 | void toggleIsSearch() { 21 | isSearch = !isSearch; 22 | notifyListeners(); 23 | } 24 | } -------------------------------------------------------------------------------- /lib/managers/local_db_manager/local_db.dart: -------------------------------------------------------------------------------- 1 | import 'package:hive_flutter/hive_flutter.dart'; 2 | import 'package:whatsapp_redesign/models/user.dart'; 3 | import 'local_db_routes.dart'; 4 | 5 | class LocalDB { 6 | static void initialize() async { 7 | await Hive.initFlutter(); 8 | await Future.wait(LocalDBRoutes.routes.map((e) => Hive.openBox(e))); 9 | } 10 | 11 | static bool get isUserLoggedIn => 12 | Hive.box(LocalDBRoutes.userRoute).get(User.uuidKey) != null; 13 | 14 | static User get user => 15 | User.fromJson(Hive.box(LocalDBRoutes.userRoute).toMap()); 16 | 17 | static Future setUser(User? user) async => user == null 18 | ? await Hive.box(LocalDBRoutes.userRoute).clear() 19 | : await Hive.box(LocalDBRoutes.userRoute).putAll(user.toJson()); 20 | } 21 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.7.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.3.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | classpath 'com.google.gms:google-services:4.3.5' 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | google() 18 | 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 | tasks.register("clean", Delete) { 31 | delete rootProject.buildDir 32 | } 33 | -------------------------------------------------------------------------------- /lib/models/location.dart: -------------------------------------------------------------------------------- 1 | class Location { 2 | static const String streetKey = "street"; 3 | static const String cityKey = "city"; 4 | static const String stateKey = "state"; 5 | static const String postcodeKey = "postcode"; 6 | 7 | final String? street; 8 | final String? city; 9 | final String? state; 10 | final String? postcode; 11 | 12 | Location( 13 | {this.street, 14 | this.city, 15 | this.state, 16 | this.postcode}); 17 | 18 | factory Location.fromJson(Map? json) => Location( 19 | street: json?[streetKey], 20 | city: json?[cityKey], 21 | state: json?[stateKey], 22 | postcode: json?[postcodeKey].toString()); 23 | 24 | toJson() => { 25 | streetKey: street, 26 | cityKey: city, 27 | stateKey: state, 28 | postcodeKey: postcode, 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /.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 | # Symbolication related 36 | app.*.symbols 37 | 38 | # Obfuscation related 39 | app.*.map.json 40 | 41 | # Android Studio will place build artifacts here 42 | /android/app/debug 43 | /android/app/profile 44 | /android/app/release 45 | -------------------------------------------------------------------------------- /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 | 11.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | awesome_notifications 7 | file_selector_linux 8 | flutter_webrtc 9 | url_launcher_linux 10 | ) 11 | 12 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 13 | ) 14 | 15 | set(PLUGIN_BUNDLED_LIBRARIES) 16 | 17 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 18 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 19 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 20 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 21 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 22 | endforeach(plugin) 23 | 24 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 25 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) 26 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 27 | endforeach(ffi_plugin) 28 | -------------------------------------------------------------------------------- /windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /lib/widgets/no_data_found.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:whatsapp_redesign/constants/colors.dart'; 3 | import 'package:whatsapp_redesign/models/size_config.dart'; 4 | 5 | import 'gradient_text.dart'; 6 | 7 | class NoDataFound extends StatelessWidget { 8 | const NoDataFound({super.key}); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return Column( 13 | mainAxisSize: MainAxisSize.min, 14 | children: [ 15 | GradientWidget( 16 | gradient: LinearGradient(colors: [ 17 | greenGradient.lightShade, 18 | greenGradient.darkShade, 19 | ]), 20 | child: Icon( 21 | Icons.info_outline, 22 | size: SizeConfig.screenWidth * 0.3, 23 | ), 24 | ), 25 | const SizedBox( 26 | height: 10, 27 | ), 28 | const Text( 29 | 'No Data Found at the moment', 30 | style: TextStyle(fontSize: 18), 31 | ) 32 | ], 33 | ); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | awesome_notifications 7 | file_selector_windows 8 | firebase_core 9 | flutter_webrtc 10 | geolocator_windows 11 | permission_handler_windows 12 | share_plus 13 | url_launcher_windows 14 | ) 15 | 16 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 17 | ) 18 | 19 | set(PLUGIN_BUNDLED_LIBRARIES) 20 | 21 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 22 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 23 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 24 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 25 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 26 | endforeach(plugin) 27 | 28 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 29 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 30 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 31 | endforeach(ffi_plugin) 32 | -------------------------------------------------------------------------------- /lib/widgets/custom_circular_image.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:whatsapp_redesign/constants/colors.dart'; 3 | import 'package:whatsapp_redesign/models/user.dart'; 4 | 5 | class CustomCircularImage extends StatelessWidget { 6 | final double size; 7 | final User user; 8 | 9 | const CustomCircularImage( 10 | {super.key, required this.size, required this.user}); 11 | 12 | bool get isImageProvided => user.picture != null; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return Container( 17 | width: size, 18 | height: size, 19 | decoration: BoxDecoration( 20 | shape: BoxShape.circle, 21 | color: isImageProvided ? null : greenColor, 22 | image: !isImageProvided 23 | ? null 24 | : DecorationImage(image: NetworkImage(user.picture!))), 25 | child: isImageProvided 26 | ? const SizedBox() 27 | : Center( 28 | child: Text(user.firstName[0].toUpperCase()), 29 | ), 30 | ); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "whatsapp_redesign", 3 | "short_name": "whatsapp_redesign", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_FLUTTER_WINDOW_H_ 2 | #define RUNNER_FLUTTER_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include "win32_window.h" 10 | 11 | // A window that does nothing but host a Flutter view. 12 | class FlutterWindow : public Win32Window { 13 | public: 14 | // Creates a new FlutterWindow hosting a Flutter view running |project|. 15 | explicit FlutterWindow(const flutter::DartProject& project); 16 | virtual ~FlutterWindow(); 17 | 18 | protected: 19 | // Win32Window: 20 | bool OnCreate() override; 21 | void OnDestroy() override; 22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, 23 | LPARAM const lparam) noexcept override; 24 | 25 | private: 26 | // The project to run. 27 | flutter::DartProject project_; 28 | 29 | // The Flutter instance hosted by this window. 30 | std::unique_ptr flutter_controller_; 31 | }; 32 | 33 | #endif // RUNNER_FLUTTER_WINDOW_H_ 34 | -------------------------------------------------------------------------------- /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/provider/audio_provider.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:typed_data'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:mic_stream/mic_stream.dart'; 5 | 6 | class AudioProvider extends ChangeNotifier { 7 | StreamController _streamController = StreamController(); 8 | List _samples = []; 9 | late StreamSubscription _streamSubscription; 10 | 11 | Stream get audioStream => _streamController.stream; 12 | 13 | List get samples => _samples; 14 | 15 | StreamSubscription get streamSubscription => _streamSubscription; 16 | 17 | void stopRecording() async { 18 | MicStream.microphone(); 19 | _streamSubscription.cancel(); 20 | _streamController = StreamController(); 21 | notifyListeners(); 22 | } 23 | 24 | void addStream(Stream stream) { 25 | _samples = []; 26 | _streamController.addStream(stream); 27 | } 28 | 29 | void addSample(Uint8List sample) { 30 | _samples.add(sample); 31 | } 32 | 33 | void setStreamSubscription(StreamSubscription subscription) { 34 | _streamSubscription = subscription; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /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:whatsapp_redesign/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(const MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /macos/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | $(PRODUCT_COPYRIGHT) 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /lib/managers/navigation_manager/navigation_manager.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:whatsapp_redesign/views/onboarding_page/onboarding_page.dart'; 3 | import 'package:whatsapp_redesign/views/root_page.dart'; 4 | import 'package:whatsapp_redesign/views/splash_page/splash_page.dart'; 5 | 6 | class Routes { 7 | static const String initial = '/'; 8 | static const String splashScreen = 'splash_screen'; 9 | static const String onboardingScreen = 'onboarding_screen'; 10 | static const String rootScreen = 'root_screen'; 11 | } 12 | 13 | class NavigationManager { 14 | static Map routes = { 15 | Routes.initial: (context) => const SplashScreen(), 16 | Routes.splashScreen: (context) => const SplashScreen(), 17 | Routes.onboardingScreen: (context) => const OnBoardingPage(), 18 | Routes.rootScreen: (context) => const RootPage() 19 | }; 20 | 21 | static Future navigate(BuildContext context, String route, 22 | {Object? argument, bool replace = false}) async { 23 | if (replace) { 24 | return await Navigator.of(context) 25 | .pushReplacementNamed(route, arguments: argument); 26 | } else { 27 | return await Navigator.of(context).pushNamed(route, arguments: argument); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | void fl_register_plugins(FlPluginRegistry* registry) { 15 | g_autoptr(FlPluginRegistrar) awesome_notifications_registrar = 16 | fl_plugin_registry_get_registrar_for_plugin(registry, "AwesomeNotificationsPlugin"); 17 | awesome_notifications_plugin_register_with_registrar(awesome_notifications_registrar); 18 | g_autoptr(FlPluginRegistrar) file_selector_linux_registrar = 19 | fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin"); 20 | file_selector_plugin_register_with_registrar(file_selector_linux_registrar); 21 | g_autoptr(FlPluginRegistrar) flutter_webrtc_registrar = 22 | fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterWebRTCPlugin"); 23 | flutter_web_r_t_c_plugin_register_with_registrar(flutter_webrtc_registrar); 24 | g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = 25 | fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); 26 | url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); 27 | } 28 | -------------------------------------------------------------------------------- /lib/constants/colors.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class DoubleShade { 4 | final Color lightShade; 5 | final Color darkShade; 6 | 7 | List toList({invert = false}) { 8 | return invert ? [darkShade, lightShade] : [lightShade, darkShade]; 9 | } 10 | 11 | DoubleShade(this.lightShade, this.darkShade); 12 | } 13 | 14 | extension DarkMode on BuildContext { 15 | bool isDarkMode() { 16 | final brightness = MediaQuery.of(this).platformBrightness; 17 | return brightness == Brightness.dark; 18 | } 19 | } 20 | 21 | Color backgroundColor(BuildContext context, {invert = false}) => 22 | (invert ? !context.isDarkMode() : context.isDarkMode()) 23 | ? Colors.black87 24 | : const Color(0xFFFFFFFF); 25 | 26 | DoubleShade blackColor(BuildContext context) => context.isDarkMode() 27 | ? DoubleShade(Colors.white60, Colors.white) 28 | : DoubleShade(const Color(0xFF313131), const Color(0xFF121212)); 29 | 30 | const Color greenColor = Color(0xFF5CE27F); 31 | const Color yellowColor = Color(0xFFFFE12D); 32 | const Color redColor = Color(0xFFE25C5C); 33 | 34 | DoubleShade greenGradient = 35 | DoubleShade(const Color(0xFF5CE27F), const Color(0xFF5CABE2)); 36 | 37 | DoubleShade grayColor(BuildContext context) => context.isDarkMode() 38 | ? DoubleShade(const Color(0xFFB1B1B1), const Color(0xFFEFEFEF)) 39 | : DoubleShade(const Color(0xff4e4e4e), const Color(0xff101010)); 40 | -------------------------------------------------------------------------------- /lib/models/upi_payment.dart: -------------------------------------------------------------------------------- 1 | import 'package:upi_india/upi_app.dart'; 2 | 3 | class UpiPayment { 4 | final String receiverUpiId; 5 | final String receiverName; 6 | final String transactionRefId; 7 | final String transactionNote; 8 | String? transactionId; 9 | bool isTransactionSuccessful; 10 | final UpiApp upiApp; 11 | final double amount; 12 | 13 | UpiPayment( 14 | {required this.receiverUpiId, 15 | required this.receiverName, 16 | required this.transactionRefId, 17 | required this.transactionNote, 18 | this.transactionId, 19 | required this.isTransactionSuccessful, 20 | required this.upiApp, 21 | required this.amount}); 22 | 23 | factory UpiPayment.fromJson(Map data) => UpiPayment( 24 | receiverUpiId: data['receiverUpiId'], 25 | receiverName: data['receiverName'], 26 | transactionRefId: data['transactionRefId'], 27 | transactionNote: data['transactionNote'], 28 | isTransactionSuccessful: data['isTransactionSuccessful'], 29 | upiApp: data['upiApp'], 30 | amount: data['amount']); 31 | 32 | Map toJson() => { 33 | 'receiverUpiId': receiverUpiId, 34 | 'receiverName': receiverName, 35 | 'transactionRefId': transactionRefId, 36 | 'transactionNote': transactionNote, 37 | 'isTransactionSuccessful': isTransactionSuccessful, 38 | 'upiApp': upiApp, 39 | }; 40 | } 41 | -------------------------------------------------------------------------------- /lib/views/message_page/widgets/circular_icon_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:whatsapp_redesign/constants/colors.dart'; 3 | import 'package:whatsapp_redesign/models/size_config.dart'; 4 | 5 | class CircularIconButton extends StatelessWidget { 6 | final IconData iconData; 7 | final GestureTapCallback? onTap; 8 | final ValueChanged? onLongPressStart; 9 | final ValueChanged? onLongPressEnd; 10 | 11 | const CircularIconButton({ 12 | Key? key, 13 | required this.iconData, 14 | this.onTap, 15 | this.onLongPressStart, 16 | this.onLongPressEnd, 17 | }) : super(key: key); 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return GestureDetector( 22 | onTap: onTap, 23 | onLongPressStart: onLongPressStart, 24 | onLongPressEnd: onLongPressEnd, 25 | child: Container( 26 | width: 40, 27 | height: 40, 28 | decoration: BoxDecoration( 29 | shape: BoxShape.circle, 30 | border: Border.all( 31 | color: blackColor(SizeConfig.cntxt).lightShade.withOpacity(0.5), 32 | ), 33 | ), 34 | child: Center( 35 | child: Icon( 36 | iconData, 37 | size: 25, 38 | color: blackColor(SizeConfig.cntxt).lightShade.withOpacity(0.5), 39 | ), 40 | ), 41 | ), 42 | ); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /windows/runner/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "flutter_window.h" 6 | #include "utils.h" 7 | 8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, 9 | _In_ wchar_t *command_line, _In_ int show_command) { 10 | // Attach to console when present (e.g., 'flutter run') or create a 11 | // new console when running with a debugger. 12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { 13 | CreateAndAttachConsole(); 14 | } 15 | 16 | // Initialize COM, so that it is available for use in the library and/or 17 | // plugins. 18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); 19 | 20 | flutter::DartProject project(L"data"); 21 | 22 | std::vector command_line_arguments = 23 | GetCommandLineArguments(); 24 | 25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); 26 | 27 | FlutterWindow window(project); 28 | Win32Window::Point origin(10, 10); 29 | Win32Window::Size size(1280, 720); 30 | if (!window.Create(L"whatsapp_redesign", origin, size)) { 31 | return EXIT_FAILURE; 32 | } 33 | window.SetQuitOnClose(true); 34 | 35 | ::MSG msg; 36 | while (::GetMessage(&msg, nullptr, 0, 0)) { 37 | ::TranslateMessage(&msg); 38 | ::DispatchMessage(&msg); 39 | } 40 | 41 | ::CoUninitialize(); 42 | return EXIT_SUCCESS; 43 | } 44 | -------------------------------------------------------------------------------- /lib/models/chat.dart: -------------------------------------------------------------------------------- 1 | import 'package:whatsapp_redesign/constants/enums.dart'; 2 | import 'package:whatsapp_redesign/models/user.dart'; 3 | 4 | import 'message.dart'; 5 | 6 | class Chat { 7 | final User user; 8 | final ChatType chatType; 9 | final Message lastMessage; 10 | final int unreadMessages; 11 | final DateTime dateTime; 12 | final String chatId; 13 | final String uuid; 14 | 15 | Chat(this.user, this.chatType, this.lastMessage, this.unreadMessages, 16 | this.dateTime, this.chatId, this.uuid); 17 | 18 | CustomListTileType fromChatType() { 19 | switch (chatType) { 20 | case ChatType.message: 21 | return CustomListTileType.message; 22 | case ChatType.group: 23 | return CustomListTileType.group; 24 | } 25 | } 26 | 27 | factory Chat.fromJson(Map data) => Chat( 28 | User.fromJson(data['user']), 29 | data['chatType'] == 'message' ? ChatType.message : ChatType.group, 30 | Message.fromJson(data['lastMessage']), 31 | data['unreadMessages'], 32 | DateTime.parse(data['dateTime']), 33 | data['chatId'], 34 | data['uuid']); 35 | 36 | Map toJson() => { 37 | 'user': user.toJson(), 38 | 'chatType': 'message', 39 | 'lastMessage': lastMessage.toJson(), 40 | 'unreadMessages': unreadMessages, 41 | 'dateTime': dateTime.toIso8601String(), 42 | 'chatId': chatId, 43 | 'uuid': uuid 44 | }; 45 | } 46 | -------------------------------------------------------------------------------- /lib/views/message_page/widgets/profile_circular_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:whatsapp_redesign/constants/colors.dart'; 3 | import 'package:whatsapp_redesign/models/user.dart'; 4 | import 'package:whatsapp_redesign/widgets/custom_circular_image.dart'; 5 | 6 | class ProfileCircularWidget extends StatefulWidget { 7 | final User user; 8 | 9 | const ProfileCircularWidget({Key? key, required this.user}) : super(key: key); 10 | 11 | @override 12 | State createState() => _ProfileCircularWidgetState(); 13 | } 14 | 15 | class _ProfileCircularWidgetState extends State { 16 | @override 17 | Widget build(BuildContext context) { 18 | return Stack( 19 | clipBehavior: Clip.none, 20 | children: [ 21 | CustomCircularImage(size: 50, user: widget.user), 22 | Positioned( 23 | bottom: -5, 24 | right: -5, 25 | child: Container( 26 | decoration: BoxDecoration( 27 | color: !context.isDarkMode() ? Colors.white : Colors.black, 28 | border: Border.all( 29 | width: 3, 30 | color: !context.isDarkMode() ? Colors.white : Colors.black), 31 | shape: BoxShape.circle), 32 | child: const Padding( 33 | padding: EdgeInsets.all(2.0), 34 | child: Icon(Icons.circle, size: 14, color: greenColor), 35 | ), 36 | ), 37 | ) 38 | ], 39 | ); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /macos/Podfile: -------------------------------------------------------------------------------- 1 | platform :osx, '10.14' 2 | 3 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 4 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 5 | 6 | project 'Runner', { 7 | 'Debug' => :debug, 8 | 'Profile' => :release, 9 | 'Release' => :release, 10 | } 11 | 12 | def flutter_root 13 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) 14 | unless File.exist?(generated_xcode_build_settings_path) 15 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" 16 | end 17 | 18 | File.foreach(generated_xcode_build_settings_path) do |line| 19 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 20 | return matches[1].strip if matches 21 | end 22 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" 23 | end 24 | 25 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 26 | 27 | flutter_macos_podfile_setup 28 | 29 | target 'Runner' do 30 | use_frameworks! 31 | use_modular_headers! 32 | 33 | flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) 34 | target 'RunnerTests' do 35 | inherit! :search_paths 36 | end 37 | end 38 | 39 | post_install do |installer| 40 | installer.pods_project.targets.each do |target| 41 | flutter_additional_macos_build_settings(target) 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/constants/extensions.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_messaging/firebase_messaging.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:intl/intl.dart'; 4 | import 'package:uuid/uuid.dart'; 5 | import 'package:whatsapp_redesign/constants/enums.dart'; 6 | 7 | extension Utils on BuildContext { 8 | String getUUid() { 9 | var uuid = const Uuid(); 10 | return uuid.v1(); 11 | } 12 | 13 | Future getFCMToken() async { 14 | String? token = await FirebaseMessaging.instance.getToken(); 15 | return token; 16 | } 17 | } 18 | 19 | extension CustomDateTime on DateTime { 20 | String formatToHHMM() { 21 | return DateFormat("HH:mm").format(this); 22 | } 23 | } 24 | 25 | extension MessageTypeExtension on MessageType { 26 | String format() { 27 | return name; 28 | } 29 | } 30 | 31 | extension MessageTypeParser on String { 32 | MessageType parse() { 33 | switch(this) { 34 | case "text": 35 | return MessageType.text; 36 | case "audio": 37 | return MessageType.audio; 38 | case "video": 39 | return MessageType.video; 40 | case "imageMedia": 41 | return MessageType.imageMedia; 42 | case "url": 43 | return MessageType.url; 44 | case "doc": 45 | return MessageType.doc; 46 | case "upiPayment": 47 | return MessageType.upiPayment; 48 | case "contact": 49 | return MessageType.contact; 50 | case "location": 51 | return MessageType.location; 52 | default: 53 | return MessageType.text; 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '11.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 | target 'RunnerTests' do 36 | inherit! :search_paths 37 | end 38 | end 39 | 40 | post_install do |installer| 41 | installer.pods_project.targets.each do |target| 42 | flutter_additional_ios_build_settings(target) 43 | end 44 | end 45 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "app_icon_16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "app_icon_32.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "app_icon_32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "app_icon_64.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "app_icon_128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "app_icon_256.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "app_icon_256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "app_icon_512.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "app_icon_512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "app_icon_1024.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /lib/provider/contact_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_contacts/flutter_contacts.dart'; 3 | import 'package:whatsapp_redesign/managers/firestore_manager.dart'; 4 | 5 | class ContactProvider extends ChangeNotifier { 6 | bool isSearch = false; 7 | bool isLoadingFinished = false; 8 | TextEditingController controller = TextEditingController(); 9 | List selectedContacts = []; 10 | List initialContacts = []; 11 | List contacts = []; 12 | FirestoreManager manager = FirestoreManager(); 13 | 14 | bool isContactSelected(Contact contact) => selectedContacts 15 | .any((_contact) => _contact.phones.contains(contact.phones.first.number)); 16 | 17 | Future?> getContacts() async { 18 | if (await FlutterContacts.requestPermission()) { 19 | List _contacts = await FlutterContacts.getContacts( 20 | withProperties: true, withPhoto: true, withThumbnail: true); 21 | print("_contacts: $_contacts"); 22 | initialContacts = _contacts; 23 | contacts = _contacts; 24 | isLoadingFinished = true; 25 | notifyListeners(); 26 | } else { 27 | print("Permission declined"); 28 | } 29 | return null; 30 | } 31 | 32 | void toggleSearch() { 33 | isSearch = !isSearch; 34 | if (!isSearch) { 35 | contacts = initialContacts; 36 | } 37 | notifyListeners(); 38 | } 39 | 40 | void onContactSearch(String value) { 41 | contacts = initialContacts 42 | .where((element) => element.displayName 43 | .toLowerCase() 44 | .contains(value)) 45 | .toList(); 46 | notifyListeners(); 47 | } 48 | } -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | void RegisterPlugins(flutter::PluginRegistry* registry) { 19 | AwesomeNotificationsPluginCApiRegisterWithRegistrar( 20 | registry->GetRegistrarForPlugin("AwesomeNotificationsPluginCApi")); 21 | FileSelectorWindowsRegisterWithRegistrar( 22 | registry->GetRegistrarForPlugin("FileSelectorWindows")); 23 | FirebaseCorePluginCApiRegisterWithRegistrar( 24 | registry->GetRegistrarForPlugin("FirebaseCorePluginCApi")); 25 | FlutterWebRTCPluginRegisterWithRegistrar( 26 | registry->GetRegistrarForPlugin("FlutterWebRTCPlugin")); 27 | GeolocatorWindowsRegisterWithRegistrar( 28 | registry->GetRegistrarForPlugin("GeolocatorWindows")); 29 | PermissionHandlerWindowsPluginRegisterWithRegistrar( 30 | registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin")); 31 | SharePlusWindowsPluginCApiRegisterWithRegistrar( 32 | registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi")); 33 | UrlLauncherWindowsRegisterWithRegistrar( 34 | registry->GetRegistrarForPlugin("UrlLauncherWindows")); 35 | } 36 | -------------------------------------------------------------------------------- /lib/views/home_page/widgets/selected_contact_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_contacts/flutter_contacts.dart'; 3 | import 'package:whatsapp_redesign/constants/colors.dart'; 4 | import 'package:whatsapp_redesign/models/size_config.dart'; 5 | import 'package:whatsapp_redesign/models/user.dart'; 6 | import 'package:whatsapp_redesign/widgets/custom_circular_image.dart'; 7 | 8 | class SelectedContactWidget extends StatelessWidget { 9 | final double size; 10 | final Contact user; 11 | 12 | const SelectedContactWidget({ 13 | Key? key, 14 | required this.size, 15 | required this.user, 16 | }) : super(key: key); 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | return Padding( 21 | padding: const EdgeInsets.symmetric(horizontal: 8.0), 22 | child: Column( 23 | children: [ 24 | Container( 25 | width: size, 26 | height: size, 27 | decoration: 28 | const BoxDecoration(shape: BoxShape.circle, color: greenColor), 29 | child: const Center( 30 | child: Icon( 31 | Icons.person_outline, 32 | color: Colors.white, 33 | ), 34 | ), 35 | ), 36 | const SizedBox( 37 | height: 10, 38 | ), 39 | SizedBox( 40 | width: size, 41 | child: Center( 42 | child: Text( 43 | user.displayName, 44 | overflow: TextOverflow.ellipsis, 45 | style: TextStyle( 46 | color: grayColor(SizeConfig.cntxt).lightShade, 47 | ), 48 | ), 49 | ), 50 | ), 51 | ], 52 | ), 53 | ); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /lib/views/status_page/status_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:story_view/story_view.dart'; 3 | 4 | class StatusPage extends StatefulWidget { 5 | const StatusPage({Key? key}) : super(key: key); 6 | 7 | @override 8 | _StatusPageState createState() => _StatusPageState(); 9 | } 10 | 11 | class _StatusPageState extends State { 12 | final controller = StoryController(); 13 | late List storyItems; 14 | 15 | @override 16 | void initState() { 17 | storyItems = [ 18 | StoryItem.pageImage( 19 | url: 20 | "https://images.unsplash.com/photo-1588938172737-f774f5476d2d?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=387&q=80", 21 | controller: controller), 22 | StoryItem.pageImage( 23 | url: 24 | "https://images.unsplash.com/photo-1588938172737-f774f5476d2d?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=387&q=80", 25 | controller: controller), 26 | ]; 27 | super.initState(); 28 | } 29 | 30 | @override 31 | Widget build(BuildContext context) { 32 | return StoryView( 33 | storyItems: storyItems, 34 | controller: controller, 35 | // pass controller here too 36 | repeat: false, 37 | // should the stories be slid forever 38 | onStoryShow: (s) {}, 39 | onComplete: () { 40 | Navigator.pop(context); 41 | }, 42 | onVerticalSwipeComplete: (direction) { 43 | if (direction == Direction.down) { 44 | Navigator.pop(context); 45 | } 46 | } // To disable vertical swipe gestures, ignore this parameter. 47 | // Preferrably for inline story view. 48 | ); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | import awesome_notifications 9 | import cloud_firestore 10 | import file_selector_macos 11 | import firebase_analytics 12 | import firebase_auth 13 | import firebase_core 14 | import firebase_messaging 15 | import flutter_webrtc 16 | import geolocator_apple 17 | import mic_stream 18 | import path_provider_foundation 19 | import share_plus 20 | import sqflite 21 | 22 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 23 | AwesomeNotificationsPlugin.register(with: registry.registrar(forPlugin: "AwesomeNotificationsPlugin")) 24 | FLTFirebaseFirestorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseFirestorePlugin")) 25 | FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin")) 26 | FLTFirebaseAnalyticsPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAnalyticsPlugin")) 27 | FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin")) 28 | FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) 29 | FLTFirebaseMessagingPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseMessagingPlugin")) 30 | FlutterWebRTCPlugin.register(with: registry.registrar(forPlugin: "FlutterWebRTCPlugin")) 31 | GeolocatorPlugin.register(with: registry.registrar(forPlugin: "GeolocatorPlugin")) 32 | MicStreamPlugin.register(with: registry.registrar(forPlugin: "MicStreamPlugin")) 33 | PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) 34 | SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin")) 35 | SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) 36 | } 37 | -------------------------------------------------------------------------------- /.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: f468f3366c26a5092eb964a230ce7892fda8f2f8 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: f468f3366c26a5092eb964a230ce7892fda8f2f8 17 | base_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8 18 | - platform: android 19 | create_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8 20 | base_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8 21 | - platform: ios 22 | create_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8 23 | base_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8 24 | - platform: linux 25 | create_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8 26 | base_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8 27 | - platform: macos 28 | create_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8 29 | base_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8 30 | - platform: web 31 | create_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8 32 | base_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8 33 | - platform: windows 34 | create_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8 35 | base_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8 36 | 37 | # User provided section 38 | 39 | # List of Local paths (relative to this file) that should be 40 | # ignored by the migrate tool. 41 | # 42 | # Files that are not part of the templates will be ignored by default. 43 | unmanaged_files: 44 | - 'lib/main.dart' 45 | - 'ios/Runner.xcodeproj/project.pbxproj' 46 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 16 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | 31 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Whatsapp Redesign 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | whatsapp_redesign 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | CADisableMinimumFrameDurationOnPhone 47 | 48 | UIApplicationSupportsIndirectInputEvents 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /windows/runner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | project(runner LANGUAGES CXX) 3 | 4 | # Define the application target. To change its name, change BINARY_NAME in the 5 | # top-level CMakeLists.txt, not the value here, or `flutter run` will no longer 6 | # work. 7 | # 8 | # Any new source files that you add to the application should be added here. 9 | add_executable(${BINARY_NAME} WIN32 10 | "flutter_window.cpp" 11 | "main.cpp" 12 | "utils.cpp" 13 | "win32_window.cpp" 14 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 15 | "Runner.rc" 16 | "runner.exe.manifest" 17 | ) 18 | 19 | # Apply the standard set of build settings. This can be removed for applications 20 | # that need different build settings. 21 | apply_standard_settings(${BINARY_NAME}) 22 | 23 | # Add preprocessor definitions for the build version. 24 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"") 25 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}") 26 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}") 27 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}") 28 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}") 29 | 30 | # Disable Windows macros that collide with C++ standard library functions. 31 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") 32 | 33 | # Add dependency libraries and include directories. Add any application-specific 34 | # dependencies here. 35 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) 36 | target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib") 37 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 38 | 39 | # Run the Flutter tool portions of the build. This must not be removed. 40 | add_dependencies(${BINARY_NAME} flutter_assemble) 41 | -------------------------------------------------------------------------------- /windows/runner/utils.cpp: -------------------------------------------------------------------------------- 1 | #include "utils.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | void CreateAndAttachConsole() { 11 | if (::AllocConsole()) { 12 | FILE *unused; 13 | if (freopen_s(&unused, "CONOUT$", "w", stdout)) { 14 | _dup2(_fileno(stdout), 1); 15 | } 16 | if (freopen_s(&unused, "CONOUT$", "w", stderr)) { 17 | _dup2(_fileno(stdout), 2); 18 | } 19 | std::ios::sync_with_stdio(); 20 | FlutterDesktopResyncOutputStreams(); 21 | } 22 | } 23 | 24 | std::vector GetCommandLineArguments() { 25 | // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. 26 | int argc; 27 | wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); 28 | if (argv == nullptr) { 29 | return std::vector(); 30 | } 31 | 32 | std::vector command_line_arguments; 33 | 34 | // Skip the first argument as it's the binary name. 35 | for (int i = 1; i < argc; i++) { 36 | command_line_arguments.push_back(Utf8FromUtf16(argv[i])); 37 | } 38 | 39 | ::LocalFree(argv); 40 | 41 | return command_line_arguments; 42 | } 43 | 44 | std::string Utf8FromUtf16(const wchar_t* utf16_string) { 45 | if (utf16_string == nullptr) { 46 | return std::string(); 47 | } 48 | int target_length = ::WideCharToMultiByte( 49 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 50 | -1, nullptr, 0, nullptr, nullptr) 51 | -1; // remove the trailing null character 52 | int input_length = (int)wcslen(utf16_string); 53 | std::string utf8_string; 54 | if (target_length <= 0 || target_length > utf8_string.max_size()) { 55 | return utf8_string; 56 | } 57 | utf8_string.resize(target_length); 58 | int converted_length = ::WideCharToMultiByte( 59 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 60 | input_length, utf8_string.data(), target_length, nullptr, nullptr); 61 | if (converted_length == 0) { 62 | return std::string(); 63 | } 64 | return utf8_string; 65 | } 66 | -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | whatsapp_redesign 33 | 34 | 35 | 39 | 40 | 41 | 42 | 43 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.cpp: -------------------------------------------------------------------------------- 1 | #include "flutter_window.h" 2 | 3 | #include 4 | 5 | #include "flutter/generated_plugin_registrant.h" 6 | 7 | FlutterWindow::FlutterWindow(const flutter::DartProject& project) 8 | : project_(project) {} 9 | 10 | FlutterWindow::~FlutterWindow() {} 11 | 12 | bool FlutterWindow::OnCreate() { 13 | if (!Win32Window::OnCreate()) { 14 | return false; 15 | } 16 | 17 | RECT frame = GetClientArea(); 18 | 19 | // The size here must match the window dimensions to avoid unnecessary surface 20 | // creation / destruction in the startup path. 21 | flutter_controller_ = std::make_unique( 22 | frame.right - frame.left, frame.bottom - frame.top, project_); 23 | // Ensure that basic setup of the controller was successful. 24 | if (!flutter_controller_->engine() || !flutter_controller_->view()) { 25 | return false; 26 | } 27 | RegisterPlugins(flutter_controller_->engine()); 28 | SetChildContent(flutter_controller_->view()->GetNativeWindow()); 29 | 30 | flutter_controller_->engine()->SetNextFrameCallback([&]() { 31 | this->Show(); 32 | }); 33 | 34 | return true; 35 | } 36 | 37 | void FlutterWindow::OnDestroy() { 38 | if (flutter_controller_) { 39 | flutter_controller_ = nullptr; 40 | } 41 | 42 | Win32Window::OnDestroy(); 43 | } 44 | 45 | LRESULT 46 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message, 47 | WPARAM const wparam, 48 | LPARAM const lparam) noexcept { 49 | // Give Flutter, including plugins, an opportunity to handle window messages. 50 | if (flutter_controller_) { 51 | std::optional result = 52 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, 53 | lparam); 54 | if (result) { 55 | return *result; 56 | } 57 | } 58 | 59 | switch (message) { 60 | case WM_FONTCHANGE: 61 | flutter_controller_->engine()->ReloadSystemFonts(); 62 | break; 63 | } 64 | 65 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam); 66 | } 67 | -------------------------------------------------------------------------------- /lib/views/message_page/circular_text_field.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:whatsapp_redesign/constants/colors.dart'; 3 | import 'package:whatsapp_redesign/models/size_config.dart'; 4 | 5 | class CircularTextField extends StatelessWidget { 6 | final TextEditingController controller; 7 | final String hintText; 8 | final ValueChanged onChanged; 9 | final ValueChanged? onFieldSubmitted; 10 | 11 | const CircularTextField({ 12 | Key? key, 13 | required this.controller, 14 | required this.hintText, 15 | required this.onChanged, 16 | this.onFieldSubmitted, 17 | }) : super(key: key); 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return Container( 22 | height: !controller.text.contains("\n") ? null : 40, 23 | decoration: BoxDecoration( 24 | borderRadius: const BorderRadius.all(Radius.circular(20)), 25 | border: Border.all( 26 | color: blackColor(SizeConfig.cntxt).lightShade.withOpacity(0.5), 27 | ), 28 | ), 29 | child: Center( 30 | child: TextFormField( 31 | cursorColor: Colors.white, 32 | style: TextStyle( 33 | color: context.isDarkMode() ? Colors.white : Colors.black), 34 | maxLines: 6, 35 | minLines: 1, 36 | controller: controller, 37 | onChanged: onChanged, 38 | onFieldSubmitted: onFieldSubmitted, 39 | decoration: InputDecoration( 40 | border: InputBorder.none, 41 | focusedBorder: InputBorder.none, 42 | enabledBorder: InputBorder.none, 43 | errorBorder: InputBorder.none, 44 | disabledBorder: InputBorder.none, 45 | contentPadding: const EdgeInsets.only( 46 | left: 15, 47 | bottom: 8, 48 | top: 8, 49 | right: 15, 50 | ), 51 | hintText: hintText, 52 | hintStyle: TextStyle( 53 | color: blackColor(SizeConfig.cntxt).darkShade.withOpacity(0.6), 54 | ), 55 | ), 56 | ), 57 | ), 58 | ); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /lib/views/message_page/widgets/messages/gif_message.dart: -------------------------------------------------------------------------------- 1 | import 'dart:typed_data'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:whatsapp_redesign/models/size_config.dart'; 4 | 5 | class GifMessage extends StatefulWidget { 6 | final String? gifUrl; 7 | final bool isIncomingMessage; 8 | final Uint8List? gifBytes; 9 | 10 | const GifMessage( 11 | {Key? key, this.gifUrl, required this.isIncomingMessage, this.gifBytes}) 12 | : super(key: key); 13 | 14 | @override 15 | State createState() => _GifMessageState(); 16 | } 17 | 18 | class _GifMessageState extends State { 19 | late bool fromFriend; 20 | late String? gifUrl; 21 | late Uint8List? gifBytes; 22 | 23 | @override 24 | void initState() { 25 | fromFriend = widget.isIncomingMessage; 26 | gifUrl = widget.gifUrl; 27 | gifBytes = widget.gifBytes; 28 | super.initState(); 29 | } 30 | 31 | @override 32 | Widget build(BuildContext context) { 33 | return Padding( 34 | padding: const EdgeInsets.only(bottom: 20), 35 | child: Row( 36 | mainAxisAlignment: 37 | fromFriend ? MainAxisAlignment.start : MainAxisAlignment.end, 38 | children: [ 39 | Container( 40 | width: SizeConfig.screenWidth * 0.45, 41 | height: SizeConfig.screenWidth * 0.5, 42 | decoration: BoxDecoration( 43 | border: Border.all(color: Colors.white24.withOpacity(0.18)), 44 | image: fromFriend || gifUrl != null 45 | ? DecorationImage( 46 | image: NetworkImage(gifUrl!), fit: BoxFit.cover) 47 | : DecorationImage( 48 | image: MemoryImage(gifBytes!), fit: BoxFit.cover), 49 | borderRadius: BorderRadius.only( 50 | bottomLeft: Radius.circular(fromFriend ? 0 : 40), 51 | topLeft: const Radius.circular(40), 52 | topRight: const Radius.circular(40), 53 | bottomRight: Radius.circular(fromFriend ? 40 : 0)), 54 | )), 55 | ], 56 | ), 57 | ); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /lib/views/home_page/widgets/story_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:whatsapp_redesign/constants/colors.dart'; 3 | import 'package:whatsapp_redesign/models/size_config.dart'; 4 | import 'package:whatsapp_redesign/models/user.dart'; 5 | import 'package:whatsapp_redesign/widgets/custom_circular_image.dart'; 6 | 7 | class StoryWidget extends StatelessWidget { 8 | final double size; 9 | final bool showGreenStrip; 10 | final User user; 11 | 12 | const StoryWidget({ 13 | Key? key, 14 | required this.size, 15 | this.showGreenStrip = false, 16 | required this.user, 17 | }) : super(key: key); 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return Padding( 22 | padding: const EdgeInsets.symmetric(horizontal: 8.0), 23 | child: Column( 24 | children: [ 25 | Container( 26 | width: size, 27 | height: size, 28 | decoration: BoxDecoration( 29 | shape: BoxShape.circle, 30 | image: showGreenStrip || user.picture == null 31 | ? null 32 | : DecorationImage( 33 | image: NetworkImage(user.picture!), 34 | fit: BoxFit.cover, 35 | ), 36 | border: showGreenStrip 37 | ? Border.all(color: greenColor, width: 2) 38 | : null, 39 | ), 40 | child: showGreenStrip 41 | ? Padding( 42 | padding: EdgeInsets.all(showGreenStrip ? 2.2 : 0), 43 | child: CustomCircularImage( 44 | size: size, 45 | user: user, 46 | )) 47 | : null, 48 | ), 49 | const SizedBox( 50 | height: 10, 51 | ), 52 | SizedBox( 53 | width: size, 54 | child: Center( 55 | child: Text( 56 | "${user.firstName} ${user.lastName ?? ""}", 57 | overflow: TextOverflow.ellipsis, 58 | style: TextStyle( 59 | color: grayColor(SizeConfig.cntxt).lightShade, 60 | ), 61 | ), 62 | ), 63 | ), 64 | ], 65 | ), 66 | ); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /lib/views/message_page/widgets/message_list_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:provider/provider.dart'; 3 | import 'package:scrollable_positioned_list/scrollable_positioned_list.dart'; 4 | import 'package:whatsapp_redesign/models/message.dart'; 5 | import 'package:whatsapp_redesign/provider/message_provider.dart'; 6 | 7 | class MessageListScreen extends StatefulWidget { 8 | const MessageListScreen({super.key}); 9 | 10 | @override 11 | State createState() => _MessageListScreenState(); 12 | } 13 | 14 | class _MessageListScreenState extends State { 15 | @override 16 | Widget build(BuildContext context) { 17 | return Expanded( 18 | child: Padding( 19 | padding: const EdgeInsets.only(left: 16, right: 16), 20 | child: Consumer(builder: (context, provider, child) { 21 | if (provider.chatId == null) { 22 | return const SizedBox(); 23 | } 24 | return StreamBuilder( 25 | stream: provider.manager.getChatMessages(provider.chatId!), 26 | builder: (context, data) { 27 | final docs = data.data?.docs; 28 | if (docs == null) { 29 | return const SizedBox(); 30 | } else { 31 | List messages = 32 | docs.map((e) => Message.fromJson(e.data())).toList(); 33 | Future.delayed(const Duration(milliseconds: 200), () { 34 | scrollToBottom(provider, messages.length); 35 | }); 36 | return ScrollablePositionedList.builder( 37 | itemScrollController: provider.scrollController, 38 | itemCount: messages.length, 39 | itemBuilder: (context, index) => messages[index] 40 | .render(provider.chatId, provider.user?.uuid), 41 | ); 42 | } 43 | }); 44 | }), 45 | )); 46 | } 47 | 48 | scrollToBottom(MessageProvider provider, int messagesLength, 49 | {bool jump = false}) { 50 | if (jump) { 51 | provider.scrollController.jumpTo(index: messagesLength); 52 | } else { 53 | provider.scrollController.scrollTo( 54 | index: messagesLength, duration: const Duration(milliseconds: 600)); 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /lib/views/message_page/widgets/messages/text_message.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:whatsapp_redesign/constants/colors.dart'; 3 | import 'package:whatsapp_redesign/models/size_config.dart'; 4 | 5 | class TextMessage extends StatefulWidget { 6 | final String message; 7 | final bool isIncomingMessage; 8 | 9 | const TextMessage({Key? key, required this.message, required this.isIncomingMessage}) 10 | : super(key: key); 11 | 12 | @override 13 | State createState() => _TextMessageState(); 14 | } 15 | 16 | class _TextMessageState extends State { 17 | late bool fromFriend; 18 | late String message; 19 | 20 | @override 21 | void initState() { 22 | fromFriend = widget.isIncomingMessage; 23 | message = widget.message; 24 | super.initState(); 25 | } 26 | 27 | @override 28 | Widget build(BuildContext context) { 29 | return Padding( 30 | padding: const EdgeInsets.only(bottom: 20), 31 | child: Row( 32 | mainAxisAlignment: 33 | fromFriend ? MainAxisAlignment.start : MainAxisAlignment.end, 34 | children: [ 35 | Container( 36 | constraints: 37 | BoxConstraints(maxWidth: SizeConfig.screenWidth * 0.8), 38 | decoration: BoxDecoration( 39 | borderRadius: BorderRadius.only( 40 | bottomLeft: Radius.circular(fromFriend ? 0 : 40), 41 | topLeft: const Radius.circular(40), 42 | topRight: const Radius.circular(40), 43 | bottomRight: Radius.circular(fromFriend ? 40 : 0)), 44 | color: fromFriend ? const Color(0xFF4C4C4C) : null, 45 | gradient: fromFriend 46 | ? null 47 | : LinearGradient(colors: [ 48 | greenGradient.lightShade, 49 | greenGradient.darkShade, 50 | ]), 51 | ), 52 | child: Padding( 53 | padding: 54 | const EdgeInsets.symmetric(vertical: 12.0, horizontal: 16), 55 | child: Text( 56 | message, 57 | style: const TextStyle(color: Colors.white), 58 | ), 59 | )), 60 | ], 61 | ), 62 | ); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/models/user.dart: -------------------------------------------------------------------------------- 1 | import 'package:whatsapp_redesign/models/location.dart'; 2 | 3 | class User { 4 | static const String nameKey = "name"; 5 | static const String genderKey = "gender"; 6 | static const String phoneNumberKey = "phone_number"; 7 | static const String birthDateKey = "birthdate"; 8 | static const String locationKey = "location"; 9 | static const String usernameKey = "username"; 10 | static const String passwordKey = "password"; 11 | static const String firstNameKey = "first_name"; 12 | static const String lastNameKey = "last_name"; 13 | static const String titleKey = "title"; 14 | static const String pictureKey = "picture"; 15 | static const String uuidKey = "uuid"; 16 | static const String firebaseTokenKey = "firebase_token"; 17 | 18 | final String name; 19 | final String? gender; 20 | final String phoneNumber; 21 | final int? birthDate; 22 | final Location? location; 23 | final String? username; 24 | final String firstName; 25 | final String? lastName; 26 | final String? title; 27 | final String? picture; 28 | final String uuid; 29 | final String? firebaseToken; 30 | 31 | User( 32 | {required this.name, 33 | this.gender, 34 | required this.phoneNumber, 35 | this.birthDate, 36 | this.location, 37 | this.username, 38 | required this.firstName, 39 | this.lastName, 40 | this.title, 41 | required this.uuid, 42 | this.firebaseToken, 43 | this.picture}); 44 | 45 | factory User.fromJson(Map json) => User( 46 | name: json[nameKey], 47 | gender: json[genderKey], 48 | phoneNumber: json[phoneNumberKey], 49 | birthDate: json[birthDateKey], 50 | location: Location.fromJson(json[locationKey]), 51 | username: json[usernameKey], 52 | firstName: json[firstNameKey], 53 | lastName: json[lastNameKey], 54 | title: json[titleKey], 55 | firebaseToken: json[firebaseTokenKey] ?? "", 56 | uuid: json[uuidKey] ?? "", 57 | picture: json[pictureKey], 58 | ); 59 | 60 | Map toJson() => { 61 | nameKey: name, 62 | genderKey: gender, 63 | phoneNumberKey: phoneNumber, 64 | birthDateKey: birthDate, 65 | locationKey: location?.toJson(), 66 | usernameKey: username, 67 | firstNameKey: firstName, 68 | lastNameKey: lastName, 69 | titleKey: title, 70 | uuidKey: uuid, 71 | firebaseTokenKey: firebaseToken, 72 | pictureKey: picture, 73 | }; 74 | } 75 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | apply plugin: 'com.google.gms.google-services' 28 | 29 | android { 30 | namespace "com.example.whatsapp_redesign" 31 | compileSdkVersion flutter.compileSdkVersion 32 | ndkVersion flutter.ndkVersion 33 | 34 | compileOptions { 35 | sourceCompatibility JavaVersion.VERSION_1_8 36 | targetCompatibility JavaVersion.VERSION_1_8 37 | } 38 | 39 | kotlinOptions { 40 | jvmTarget = '1.8' 41 | } 42 | 43 | sourceSets { 44 | main.java.srcDirs += 'src/main/kotlin' 45 | } 46 | 47 | defaultConfig { 48 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 49 | applicationId "com.example.whatsapp_redesign" 50 | // You can update the following values to match your application needs. 51 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. 52 | minSdkVersion 21 53 | targetSdkVersion flutter.targetSdkVersion 54 | versionCode flutterVersionCode.toInteger() 55 | versionName flutterVersionName 56 | } 57 | 58 | buildTypes { 59 | release { 60 | // TODO: Add your own signing config for the release build. 61 | // Signing with the debug keys for now, so `flutter run --release` works. 62 | signingConfig signingConfigs.debug 63 | } 64 | } 65 | } 66 | 67 | flutter { 68 | source '../..' 69 | } 70 | 71 | dependencies { 72 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 73 | } 74 | -------------------------------------------------------------------------------- /lib/views/home_page/widgets/search_bar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:whatsapp_redesign/constants/colors.dart'; 3 | import 'package:whatsapp_redesign/models/size_config.dart'; 4 | 5 | class SearchBarWidget extends StatelessWidget { 6 | final TextEditingController controller; 7 | final ValueChanged? onChanged; 8 | 9 | const SearchBarWidget({ 10 | Key? key, 11 | required this.controller, 12 | this.onChanged, 13 | }) : super(key: key); 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return Column( 18 | key: const ValueKey(0), 19 | children: [ 20 | Padding( 21 | padding: const EdgeInsets.symmetric(horizontal: 16), 22 | child: AnimatedContainer( 23 | duration: const Duration(milliseconds: 200), 24 | width: SizeConfig.screenWidth, 25 | decoration: const BoxDecoration( 26 | borderRadius: BorderRadius.all(Radius.circular(5.0)), 27 | color: Color.fromRGBO(142, 142, 147, .15), 28 | ), 29 | child: Padding( 30 | padding: const EdgeInsets.all(5.0), 31 | child: Theme( 32 | child: TextField( 33 | controller: controller, 34 | onSubmitted: (v) {}, 35 | onChanged: onChanged, 36 | style: TextStyle( 37 | color: backgroundColor(SizeConfig.cntxt, invert: true), 38 | ), 39 | decoration: InputDecoration( 40 | icon: Padding( 41 | padding: const EdgeInsets.only(left: 8.0), 42 | child: Icon( 43 | Icons.search, 44 | size: 22, 45 | color: backgroundColor(SizeConfig.cntxt, invert: true), 46 | ), 47 | ), 48 | border: InputBorder.none, 49 | hintText: "Search here...", 50 | hintStyle: TextStyle( 51 | color: !SizeConfig.cntxt.isDarkMode() 52 | ? const Color.fromRGBO(142, 142, 147, 1) 53 | : Colors.white60, 54 | ), 55 | ), 56 | ), 57 | data: Theme.of(SizeConfig.cntxt).copyWith( 58 | primaryColor: backgroundColor(SizeConfig.cntxt, invert: true), 59 | ), 60 | ), 61 | ), 62 | ), 63 | ), 64 | const SizedBox( 65 | height: 13, 66 | ), 67 | ], 68 | ); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /lib/views/message_page/widgets/map_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_map/flutter_map.dart'; 3 | import 'package:geolocator/geolocator.dart'; 4 | import 'package:latlong2/latlong.dart'; 5 | import 'package:whatsapp_redesign/constants/colors.dart'; 6 | import 'package:whatsapp_redesign/widgets/custom_loader.dart'; 7 | import 'package:whatsapp_redesign/widgets/gradient_icon_button.dart'; 8 | 9 | class MapScreen extends StatefulWidget { 10 | const MapScreen({Key? key}) : super(key: key); 11 | 12 | @override 13 | State createState() => _MapScreenState(); 14 | } 15 | 16 | class _MapScreenState extends State { 17 | LatLng? currentLocation; 18 | 19 | @override 20 | void initState() { 21 | getCurrentLocation(); 22 | super.initState(); 23 | } 24 | 25 | @override 26 | Widget build(BuildContext context) { 27 | return Scaffold( 28 | floatingActionButton: FloatingActionButton( 29 | onPressed: () { 30 | Navigator.pop(context, currentLocation); 31 | }, 32 | backgroundColor: Colors.transparent, 33 | child: const GradientIconButton(size: 55, iconData: Icons.send), 34 | ), 35 | body: currentLocation != null 36 | ? FlutterMap( 37 | options: MapOptions( 38 | center: currentLocation, 39 | zoom: 13.0, 40 | onTap: (tp, latLong) { 41 | setState(() { 42 | currentLocation = latLong; 43 | }); 44 | }), 45 | // layers: [ 46 | // TileLayerOptions( 47 | // urlTemplate: "https://tile.openstreetmap.org/{z}/{x}/{y}.png", 48 | // ), 49 | // MarkerLayerOptions( 50 | // markers: [ 51 | // Marker( 52 | // width: 20.0, 53 | // height: 20.0, 54 | // point: currentLocation!, 55 | // builder: (ctx) => const Icon( 56 | // Icons.location_pin, 57 | // color: greenColor, 58 | // ), 59 | // ), 60 | // ], 61 | // ), 62 | // ], 63 | ) 64 | : const Center( 65 | child: CustomLoader(), 66 | ), 67 | ); 68 | } 69 | 70 | getCurrentLocation() async { 71 | var position = await Geolocator.getCurrentPosition( 72 | desiredAccuracy: LocationAccuracy.best); 73 | setState(() { 74 | currentLocation = LatLng(position.latitude, position.longitude); 75 | }); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /lib/views/onboarding_page/onboarding_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:provider/provider.dart'; 3 | import 'package:whatsapp_redesign/getit.dart'; 4 | import 'package:whatsapp_redesign/models/size_config.dart'; 5 | import 'package:whatsapp_redesign/provider/auth_provider.dart'; 6 | import 'package:whatsapp_redesign/views/onboarding_page/widgets/animated_bottom_container.dart'; 7 | import 'package:whatsapp_redesign/views/onboarding_page/widgets/animated_onboarding_images.dart'; 8 | import 'package:whatsapp_redesign/views/onboarding_page/widgets/lottie_animation_stack_widget.dart'; 9 | import '../../constants/colors.dart'; 10 | 11 | class OnBoardingPage extends StatefulWidget { 12 | const OnBoardingPage({Key? key}) : super(key: key); 13 | 14 | @override 15 | State createState() => _OnBoardingPageState(); 16 | } 17 | 18 | class _OnBoardingPageState extends State { 19 | AuthProvider? provider; 20 | 21 | @override 22 | void dispose() { 23 | provider?.timerDispose(); 24 | super.dispose(); 25 | } 26 | 27 | @override 28 | void initState() { 29 | WidgetsBinding.instance.addPostFrameCallback((_) { 30 | provider = Provider.of(context, listen: false); 31 | provider?.initialize(); 32 | }); 33 | super.initState(); 34 | } 35 | 36 | @override 37 | Widget build(BuildContext context) { 38 | SizeConfig().init(context); 39 | bool isKeyboardOpened = MediaQuery.of(context).viewInsets.bottom != 0; 40 | return Scaffold( 41 | backgroundColor: backgroundColor(context), 42 | body: Consumer(builder: (context, provider, child) { 43 | return Stack( 44 | children: [ 45 | LottieAnimationStackWidget( 46 | showForm: provider.showForm, 47 | onOTPage: provider.onOTPage, 48 | isKeyboardOpened: isKeyboardOpened, 49 | ), 50 | AnimatedOnboardingImages( 51 | pages: provider.pages, 52 | showForm: provider.showForm, 53 | pageController: provider.pageController, 54 | top: provider.top, 55 | left: provider.left), 56 | AnimatedBottomContainer( 57 | showForm: provider.showForm, 58 | onOTPage: provider.onOTPage, 59 | page: provider.page, 60 | selectedPageIndex: provider.selectedPageIndex, 61 | onLeftArrowClicked: provider.onLeftArrowClicked, 62 | onRightArrowClicked: provider.onRightArrowClicked, 63 | onLeftArrowReset: () => provider.onLeftArrowReset(isKeyboardOpened), 64 | onSendOtpClicked: provider.onSendOtpClicked, 65 | onOtpSubmit: (phoneNumber, otp) => provider.onOtpSubmit(phoneNumber, otp, context)) 66 | ], 67 | ); 68 | }), 69 | ); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /lib/widgets/gradient_icon_button.dart: -------------------------------------------------------------------------------- 1 | import 'dart:typed_data'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:whatsapp_redesign/constants/colors.dart'; 5 | import 'package:whatsapp_redesign/models/size_config.dart'; 6 | 7 | class GradientIconButton extends StatelessWidget { 8 | final double size; 9 | final double? iconSize; 10 | final IconData? iconData; 11 | final Uint8List? imageBytes; 12 | final int? counterText; 13 | final bool isEnabled; 14 | final GestureTapCallback? onTap; 15 | final String? text; 16 | 17 | const GradientIconButton( 18 | {Key? key, 19 | required this.size, 20 | this.iconSize, 21 | this.iconData, 22 | this.imageBytes, 23 | this.counterText, 24 | this.isEnabled = true, 25 | this.onTap, 26 | this.text}) 27 | : super(key: key); 28 | 29 | @override 30 | Widget build(BuildContext context) { 31 | return InkWell( 32 | onTap: onTap, 33 | child: SizedBox( 34 | child: Column( 35 | children: [ 36 | Container( 37 | width: size, 38 | height: size, 39 | decoration: BoxDecoration( 40 | shape: BoxShape.circle, 41 | gradient: isEnabled 42 | ? LinearGradient(colors: [ 43 | greenGradient.lightShade, 44 | greenGradient.darkShade, 45 | ]) 46 | : LinearGradient(colors: [ 47 | Colors.grey, 48 | Colors.grey.shade600, 49 | ])), 50 | child: iconData != null 51 | ? Center( 52 | child: Icon( 53 | iconData, 54 | size: iconSize, 55 | color: Colors.white, 56 | ), 57 | ) 58 | : counterText != null 59 | ? Center( 60 | child: Text( 61 | counterText.toString(), 62 | style: const TextStyle(color: Colors.white), 63 | )) 64 | : imageBytes != null 65 | ? Image.memory( 66 | imageBytes!, 67 | width: 24, 68 | ) 69 | : const SizedBox(), 70 | ), 71 | text != null 72 | ? const SizedBox( 73 | height: 10, 74 | ) 75 | : const SizedBox(), 76 | text != null 77 | ? Text( 78 | text!, 79 | style: TextStyle( 80 | color: grayColor(SizeConfig.cntxt).lightShade), 81 | ) 82 | : const SizedBox() 83 | ], 84 | ), 85 | ), 86 | ); 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /lib/views/onboarding_page/widgets/animated_onboarding_images.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:whatsapp_redesign/constants/colors.dart'; 3 | import 'package:whatsapp_redesign/models/onboarding_page.dart'; 4 | import 'package:whatsapp_redesign/models/size_config.dart'; 5 | 6 | class AnimatedOnboardingImages extends StatefulWidget { 7 | final List pages; 8 | final bool showForm; 9 | final PageController? pageController; 10 | final double top; 11 | final double left; 12 | 13 | const AnimatedOnboardingImages( 14 | {super.key, 15 | required this.pages, 16 | required this.showForm, 17 | required this.pageController, 18 | required this.top, 19 | required this.left}); 20 | 21 | @override 22 | State createState() => 23 | _AnimatedOnboardingImagesState(); 24 | } 25 | 26 | class _AnimatedOnboardingImagesState extends State { 27 | List get pages => widget.pages; 28 | 29 | bool get showForm => widget.showForm; 30 | 31 | PageController? get pageController => widget.pageController; 32 | 33 | double get top => widget.top; 34 | 35 | double get left => widget.left; 36 | 37 | @override 38 | Widget build(BuildContext context) { 39 | return Column( 40 | children: [ 41 | !showForm 42 | ? Expanded( 43 | child: PageView.builder( 44 | scrollDirection: Axis.horizontal, 45 | onPageChanged: (value) {}, 46 | itemCount: pages.length, 47 | controller: pageController, 48 | physics: const NeverScrollableScrollPhysics(), 49 | itemBuilder: (context, index) { 50 | OnBoardingPageModel page = pages[index]; 51 | return Column( 52 | children: [ 53 | SizedBox(height: SizeConfig.screenHeight * 0.3), 54 | AnimatedPadding( 55 | padding: EdgeInsets.only(top: top, left: left), 56 | duration: const Duration(seconds: 1), 57 | child: ShaderMask( 58 | blendMode: BlendMode.srcATop, 59 | shaderCallback: (Rect bounds) { 60 | return LinearGradient(colors: [ 61 | greenGradient.lightShade, 62 | greenGradient.darkShade, 63 | ]).createShader(bounds); 64 | }, 65 | child: Image.network( 66 | page.image, 67 | width: 100, 68 | ), 69 | )) 70 | ], 71 | ); 72 | }, 73 | ), 74 | ) 75 | : const SizedBox(), 76 | ], 77 | ); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /lib/views/profile_page/widgets/setting_tile.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_switch/flutter_switch.dart'; 3 | import 'package:line_icons/line_icons.dart'; 4 | import 'package:whatsapp_redesign/constants/colors.dart'; 5 | import 'package:whatsapp_redesign/models/size_config.dart'; 6 | 7 | enum SettingTrailing { 8 | toggle, 9 | arrow, 10 | } 11 | 12 | class SettingTile extends StatelessWidget { 13 | final IconData iconData; 14 | final SettingTrailing? settingTrailing; 15 | final GestureTapCallback? onTap; 16 | final bool shouldRedGlow; 17 | final bool shouldGreenGlow; 18 | final String title; 19 | final bool? toggle; 20 | final ValueSetter? onToggle; 21 | 22 | const SettingTile({ 23 | Key? key, 24 | required this.iconData, 25 | this.settingTrailing, 26 | this.onTap, 27 | this.shouldRedGlow = false, 28 | this.shouldGreenGlow = false, 29 | required this.title, 30 | this.toggle, 31 | this.onToggle, 32 | }) : super(key: key); 33 | 34 | @override 35 | Widget build(BuildContext context) { 36 | return InkWell( 37 | onTap: onTap, 38 | child: SizedBox( 39 | width: SizeConfig.screenWidth, 40 | height: 55, 41 | child: Padding( 42 | padding: const EdgeInsets.symmetric(horizontal: 16.0), 43 | child: Row( 44 | children: [ 45 | SizedBox( 46 | child: Row( 47 | children: [ 48 | Icon( 49 | iconData, 50 | color: shouldRedGlow 51 | ? Colors.redAccent 52 | : shouldGreenGlow 53 | ? greenColor 54 | : blackColor(SizeConfig.cntxt).lightShade, 55 | size: 26, 56 | ), 57 | const SizedBox( 58 | width: 20, 59 | ), 60 | Text( 61 | title, 62 | style: TextStyle( 63 | color: shouldRedGlow 64 | ? Colors.redAccent 65 | : blackColor(SizeConfig.cntxt).darkShade, 66 | fontSize: 17, 67 | ), 68 | ), 69 | ], 70 | ), 71 | ), 72 | const Spacer(), 73 | if (settingTrailing == SettingTrailing.toggle) 74 | FlutterSwitch( 75 | width: 50, 76 | padding: 1, 77 | activeColor: Colors.redAccent, 78 | height: 25, 79 | value: toggle!, 80 | onToggle: onToggle!, 81 | ), 82 | if (settingTrailing == SettingTrailing.arrow) 83 | Icon( 84 | LineIcons.angleRight, 85 | color: blackColor(SizeConfig.cntxt).lightShade, 86 | ), 87 | ], 88 | ), 89 | ), 90 | ), 91 | ); 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /linux/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file controls Flutter-level build steps. It should not be edited. 2 | cmake_minimum_required(VERSION 3.10) 3 | 4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 5 | 6 | # Configuration provided via flutter tool. 7 | include(${EPHEMERAL_DIR}/generated_config.cmake) 8 | 9 | # TODO: Move the rest of this into files in ephemeral. See 10 | # https://github.com/flutter/flutter/issues/57146. 11 | 12 | # Serves the same purpose as list(TRANSFORM ... PREPEND ...), 13 | # which isn't available in 3.10. 14 | function(list_prepend LIST_NAME PREFIX) 15 | set(NEW_LIST "") 16 | foreach(element ${${LIST_NAME}}) 17 | list(APPEND NEW_LIST "${PREFIX}${element}") 18 | endforeach(element) 19 | set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) 20 | endfunction() 21 | 22 | # === Flutter Library === 23 | # System-level dependencies. 24 | find_package(PkgConfig REQUIRED) 25 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) 26 | pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) 27 | pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) 28 | 29 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") 30 | 31 | # Published to parent scope for install step. 32 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 33 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 34 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 35 | set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) 36 | 37 | list(APPEND FLUTTER_LIBRARY_HEADERS 38 | "fl_basic_message_channel.h" 39 | "fl_binary_codec.h" 40 | "fl_binary_messenger.h" 41 | "fl_dart_project.h" 42 | "fl_engine.h" 43 | "fl_json_message_codec.h" 44 | "fl_json_method_codec.h" 45 | "fl_message_codec.h" 46 | "fl_method_call.h" 47 | "fl_method_channel.h" 48 | "fl_method_codec.h" 49 | "fl_method_response.h" 50 | "fl_plugin_registrar.h" 51 | "fl_plugin_registry.h" 52 | "fl_standard_message_codec.h" 53 | "fl_standard_method_codec.h" 54 | "fl_string_codec.h" 55 | "fl_value.h" 56 | "fl_view.h" 57 | "flutter_linux.h" 58 | ) 59 | list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") 60 | add_library(flutter INTERFACE) 61 | target_include_directories(flutter INTERFACE 62 | "${EPHEMERAL_DIR}" 63 | ) 64 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") 65 | target_link_libraries(flutter INTERFACE 66 | PkgConfig::GTK 67 | PkgConfig::GLIB 68 | PkgConfig::GIO 69 | ) 70 | add_dependencies(flutter flutter_assemble) 71 | 72 | # === Flutter tool backend === 73 | # _phony_ is a non-existent file to force this command to run every time, 74 | # since currently there's no way to get a full input/output list from the 75 | # flutter tool. 76 | add_custom_command( 77 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 78 | ${CMAKE_CURRENT_BINARY_DIR}/_phony_ 79 | COMMAND ${CMAKE_COMMAND} -E env 80 | ${FLUTTER_TOOL_ENVIRONMENT} 81 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" 82 | ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} 83 | VERBATIM 84 | ) 85 | add_custom_target(flutter_assemble DEPENDS 86 | "${FLUTTER_LIBRARY}" 87 | ${FLUTTER_LIBRARY_HEADERS} 88 | ) 89 | -------------------------------------------------------------------------------- /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/views/status_page/status_views/camera_view.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:flutter/material.dart'; 4 | 5 | class CameraView extends StatelessWidget { 6 | const CameraView({Key? key, required this.path}) : super(key: key); 7 | final String path; 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return Scaffold( 12 | backgroundColor: Colors.black, 13 | appBar: AppBar( 14 | backgroundColor: Colors.black, 15 | actions: [ 16 | IconButton( 17 | icon: const Icon( 18 | Icons.crop_rotate, 19 | size: 27, 20 | ), 21 | onPressed: () {}), 22 | IconButton( 23 | icon: const Icon( 24 | Icons.emoji_emotions_outlined, 25 | size: 27, 26 | ), 27 | onPressed: () {}), 28 | IconButton( 29 | icon: const Icon( 30 | Icons.title, 31 | size: 27, 32 | ), 33 | onPressed: () {}), 34 | IconButton( 35 | icon: const Icon( 36 | Icons.edit, 37 | size: 27, 38 | ), 39 | onPressed: () {}), 40 | ], 41 | ), 42 | body: SizedBox( 43 | width: MediaQuery.of(context).size.width, 44 | height: MediaQuery.of(context).size.height, 45 | child: Stack( 46 | children: [ 47 | SizedBox( 48 | width: MediaQuery.of(context).size.width, 49 | height: MediaQuery.of(context).size.height - 150, 50 | child: Image.file( 51 | File(path), 52 | fit: BoxFit.cover, 53 | ), 54 | ), 55 | Positioned( 56 | bottom: 0, 57 | child: Container( 58 | color: Colors.black38, 59 | width: MediaQuery.of(context).size.width, 60 | padding: const EdgeInsets.symmetric(vertical: 5, horizontal: 8), 61 | child: TextFormField( 62 | style: const TextStyle( 63 | color: Colors.white, 64 | fontSize: 17, 65 | ), 66 | maxLines: 6, 67 | minLines: 1, 68 | decoration: InputDecoration( 69 | border: InputBorder.none, 70 | hintText: "Add Caption....", 71 | prefixIcon: const Icon( 72 | Icons.add_photo_alternate, 73 | color: Colors.white, 74 | size: 27, 75 | ), 76 | hintStyle: const TextStyle( 77 | color: Colors.white, 78 | fontSize: 17, 79 | ), 80 | suffixIcon: CircleAvatar( 81 | radius: 27, 82 | backgroundColor: Colors.tealAccent[700], 83 | child: const Icon( 84 | Icons.check, 85 | color: Colors.white, 86 | size: 27, 87 | ), 88 | )), 89 | ), 90 | ), 91 | ), 92 | ], 93 | ), 94 | ), 95 | ); 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /lib/views/onboarding_page/widgets/lottie_animation_stack_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:lottie/lottie.dart'; 3 | import 'package:whatsapp_redesign/constants/colors.dart'; 4 | import 'package:whatsapp_redesign/models/size_config.dart'; 5 | import 'package:whatsapp_redesign/widgets/gradient_text.dart'; 6 | 7 | class LottieAnimationStackWidget extends StatelessWidget { 8 | final bool showForm; 9 | final bool onOTPage; 10 | final bool isKeyboardOpened; 11 | 12 | const LottieAnimationStackWidget( 13 | {super.key, 14 | required this.showForm, 15 | required this.onOTPage, 16 | required this.isKeyboardOpened}); 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | return Stack( 21 | children: [ 22 | showForm && !isKeyboardOpened 23 | ? Row( 24 | mainAxisAlignment: MainAxisAlignment.center, 25 | children: [ 26 | Column( 27 | children: [ 28 | SizedBox( 29 | height: onOTPage 30 | ? SizeConfig.screenHeight * 0.15 31 | : SizeConfig.screenHeight * 0.05, 32 | ), 33 | onOTPage 34 | ? Lottie.asset("assets/lock.json", 35 | height: 150.0, width: 150, repeat: false) 36 | : ShaderMask( 37 | blendMode: BlendMode.srcIn, 38 | shaderCallback: (bounds) => LinearGradient( 39 | colors: [ 40 | greenGradient.darkShade, 41 | greenGradient.lightShade 42 | ]).createShader( 43 | Rect.fromLTWH( 44 | 0, 0, bounds.width, bounds.height), 45 | ), 46 | child: ClipRRect( 47 | borderRadius: BorderRadius.circular(8.0), 48 | child: Lottie.asset("assets/wave.json", 49 | height: 300.0, repeat: false), 50 | ), 51 | ), 52 | ], 53 | ), 54 | ], 55 | ) 56 | : const SizedBox(), 57 | showForm && !isKeyboardOpened 58 | ? SizedBox( 59 | width: SizeConfig.screenWidth, 60 | child: Column( 61 | children: [ 62 | SizedBox( 63 | height: SizeConfig.screenHeight * 0.35, 64 | ), 65 | Row( 66 | mainAxisAlignment: MainAxisAlignment.center, 67 | children: [ 68 | GradientWidget( 69 | gradient: LinearGradient(colors: [ 70 | greenGradient.lightShade, 71 | greenGradient.darkShade, 72 | ]), 73 | child: Text( 74 | onOTPage ? "Enter the OTP" : "Welcome!", 75 | style: const TextStyle( 76 | fontSize: 36, fontWeight: FontWeight.bold), 77 | ), 78 | ), 79 | ], 80 | ) 81 | ], 82 | ), 83 | ) 84 | : const SizedBox(), 85 | ], 86 | ); 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /windows/runner/Runner.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | #pragma code_page(65001) 4 | #include "resource.h" 5 | 6 | #define APSTUDIO_READONLY_SYMBOLS 7 | ///////////////////////////////////////////////////////////////////////////// 8 | // 9 | // Generated from the TEXTINCLUDE 2 resource. 10 | // 11 | #include "winres.h" 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | #undef APSTUDIO_READONLY_SYMBOLS 15 | 16 | ///////////////////////////////////////////////////////////////////////////// 17 | // English (United States) resources 18 | 19 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 21 | 22 | #ifdef APSTUDIO_INVOKED 23 | ///////////////////////////////////////////////////////////////////////////// 24 | // 25 | // TEXTINCLUDE 26 | // 27 | 28 | 1 TEXTINCLUDE 29 | BEGIN 30 | "resource.h\0" 31 | END 32 | 33 | 2 TEXTINCLUDE 34 | BEGIN 35 | "#include ""winres.h""\r\n" 36 | "\0" 37 | END 38 | 39 | 3 TEXTINCLUDE 40 | BEGIN 41 | "\r\n" 42 | "\0" 43 | END 44 | 45 | #endif // APSTUDIO_INVOKED 46 | 47 | 48 | ///////////////////////////////////////////////////////////////////////////// 49 | // 50 | // Icon 51 | // 52 | 53 | // Icon with lowest ID value placed first to ensure application icon 54 | // remains consistent on all systems. 55 | IDI_APP_ICON ICON "resources\\app_icon.ico" 56 | 57 | 58 | ///////////////////////////////////////////////////////////////////////////// 59 | // 60 | // Version 61 | // 62 | 63 | #if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD) 64 | #define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD 65 | #else 66 | #define VERSION_AS_NUMBER 1,0,0,0 67 | #endif 68 | 69 | #if defined(FLUTTER_VERSION) 70 | #define VERSION_AS_STRING FLUTTER_VERSION 71 | #else 72 | #define VERSION_AS_STRING "1.0.0" 73 | #endif 74 | 75 | VS_VERSION_INFO VERSIONINFO 76 | FILEVERSION VERSION_AS_NUMBER 77 | PRODUCTVERSION VERSION_AS_NUMBER 78 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 79 | #ifdef _DEBUG 80 | FILEFLAGS VS_FF_DEBUG 81 | #else 82 | FILEFLAGS 0x0L 83 | #endif 84 | FILEOS VOS__WINDOWS32 85 | FILETYPE VFT_APP 86 | FILESUBTYPE 0x0L 87 | BEGIN 88 | BLOCK "StringFileInfo" 89 | BEGIN 90 | BLOCK "040904e4" 91 | BEGIN 92 | VALUE "CompanyName", "com.example" "\0" 93 | VALUE "FileDescription", "whatsapp_redesign" "\0" 94 | VALUE "FileVersion", VERSION_AS_STRING "\0" 95 | VALUE "InternalName", "whatsapp_redesign" "\0" 96 | VALUE "LegalCopyright", "Copyright (C) 2023 com.example. All rights reserved." "\0" 97 | VALUE "OriginalFilename", "whatsapp_redesign.exe" "\0" 98 | VALUE "ProductName", "whatsapp_redesign" "\0" 99 | VALUE "ProductVersion", VERSION_AS_STRING "\0" 100 | END 101 | END 102 | BLOCK "VarFileInfo" 103 | BEGIN 104 | VALUE "Translation", 0x409, 1252 105 | END 106 | END 107 | 108 | #endif // English (United States) resources 109 | ///////////////////////////////////////////////////////////////////////////// 110 | 111 | 112 | 113 | #ifndef APSTUDIO_INVOKED 114 | ///////////////////////////////////////////////////////////////////////////// 115 | // 116 | // Generated from the TEXTINCLUDE 3 resource. 117 | // 118 | 119 | 120 | ///////////////////////////////////////////////////////////////////////////// 121 | #endif // not APSTUDIO_INVOKED 122 | -------------------------------------------------------------------------------- /lib/views/splash_page/splash_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:line_icons/line_icons.dart'; 3 | import 'package:whatsapp_redesign/constants/colors.dart'; 4 | import 'package:whatsapp_redesign/managers/local_db_manager/local_db.dart'; 5 | import 'package:whatsapp_redesign/managers/navigation_manager/navigation_manager.dart'; 6 | import 'package:whatsapp_redesign/models/size_config.dart'; 7 | import 'package:whatsapp_redesign/widgets/gradient_text.dart'; 8 | 9 | class SplashScreen extends StatefulWidget { 10 | const SplashScreen({Key? key}) : super(key: key); 11 | 12 | @override 13 | State createState() => _SplashScreenState(); 14 | } 15 | 16 | class _SplashScreenState extends State { 17 | @override 18 | void initState() { 19 | Future.delayed(const Duration(seconds: 4), () { 20 | if (LocalDB.isUserLoggedIn) { 21 | NavigationManager.navigate(context, Routes.rootScreen); 22 | } else { 23 | NavigationManager.navigate(context, Routes.onboardingScreen); 24 | } 25 | }); 26 | super.initState(); 27 | } 28 | 29 | @override 30 | Widget build(BuildContext context) { 31 | SizeConfig().init(context); 32 | return Scaffold( 33 | backgroundColor: backgroundColor(context), 34 | body: Stack( 35 | children: [ 36 | Center( 37 | child: Column( 38 | mainAxisAlignment: MainAxisAlignment.center, 39 | children: [ 40 | ClipRRect( 41 | borderRadius: BorderRadius.circular(8.0), 42 | child: Image.asset( 43 | "assets/images/logo.png", 44 | height: 100.0, 45 | width: 100.0, 46 | fit: BoxFit.cover, 47 | ), 48 | ), 49 | const SizedBox( 50 | height: 20, 51 | ), 52 | GradientWidget( 53 | gradient: LinearGradient(colors: [ 54 | greenGradient.lightShade, 55 | greenGradient.darkShade, 56 | ]), 57 | child: Text( 58 | "WhatsApp", 59 | style: const TextStyle( 60 | fontSize: 28, 61 | ), 62 | ), 63 | ), 64 | ], 65 | ), 66 | ), 67 | Column( 68 | mainAxisAlignment: MainAxisAlignment.end, 69 | children: [ 70 | Text( 71 | 'from', 72 | style: TextStyle( 73 | color: grayColor(context).lightShade.withOpacity(0.4), 74 | fontSize: 16), 75 | ), 76 | Row( 77 | mainAxisAlignment: MainAxisAlignment.center, 78 | children: [ 79 | const Icon( 80 | LineIcons.infinity, 81 | size: 32, 82 | color: greenColor, 83 | ), 84 | const SizedBox( 85 | width: 5, 86 | ), 87 | Text( 88 | "Meta", 89 | style: TextStyle( 90 | fontSize: 21, 91 | fontWeight: FontWeight.w800, 92 | color: grayColor(context).lightShade), 93 | ) 94 | ], 95 | ), 96 | SizedBox( 97 | height: SizeConfig.screenHeight * 0.12, 98 | ) 99 | ], 100 | ) 101 | ], 102 | ), 103 | ); 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /lib/views/home_page/widgets/contact_bar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_contacts/flutter_contacts.dart'; 4 | import 'package:line_icons/line_icons.dart'; 5 | import 'package:whatsapp_redesign/constants/colors.dart'; 6 | import 'package:whatsapp_redesign/views/home_page/widgets/selected_contact_widget.dart'; 7 | import 'package:whatsapp_redesign/views/status_page/status_page.dart'; 8 | import 'package:whatsapp_redesign/widgets/gradient_icon_button.dart'; 9 | 10 | class ContactBar extends StatelessWidget { 11 | final List contactList; 12 | final GestureTapCallback? onNewStatusClicked; 13 | final bool addWidget; 14 | final bool seeAllWidget; 15 | 16 | const ContactBar({ 17 | Key? key, 18 | required this.contactList, 19 | this.onNewStatusClicked, 20 | this.addWidget = true, 21 | this.seeAllWidget = true, 22 | }) : super(key: key); 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | return Column( 27 | key: const ValueKey(1), 28 | children: [ 29 | Padding( 30 | padding: const EdgeInsets.only(top: 10.0), 31 | child: SizedBox( 32 | height: 100, 33 | child: ListView( 34 | scrollDirection: Axis.horizontal, 35 | padding: const EdgeInsets.only(left: 16), 36 | children: [ 37 | addWidget 38 | ? GestureDetector( 39 | onTap: onNewStatusClicked, 40 | child: const GradientIconButton( 41 | size: 60, 42 | iconData: Icons.add, 43 | text: "New Status", 44 | ), 45 | ) 46 | : const SizedBox(), 47 | addWidget 48 | ? const SizedBox( 49 | width: 8, 50 | ) 51 | : const SizedBox(), 52 | SizedBox( 53 | height: 100, 54 | child: ListView.builder( 55 | shrinkWrap: true, 56 | itemCount: contactList.length, 57 | scrollDirection: Axis.horizontal, 58 | itemBuilder: (context, index) { 59 | return GestureDetector( 60 | onTap: () { 61 | Navigator.of(context).push(CupertinoPageRoute( 62 | builder: (context) => const StatusPage(), 63 | )); 64 | }, 65 | child: SelectedContactWidget( 66 | size: 60, 67 | user: contactList[index], 68 | ), 69 | ); 70 | }, 71 | ), 72 | ), 73 | seeAllWidget 74 | ? const SizedBox( 75 | width: 10, 76 | ) 77 | : const SizedBox(), 78 | seeAllWidget 79 | ? const Icon( 80 | LineIcons.arrowRight, 81 | color: greenColor, 82 | ) 83 | : const SizedBox(), 84 | seeAllWidget 85 | ? const SizedBox( 86 | width: 10, 87 | ) 88 | : const SizedBox(), 89 | ], 90 | ), 91 | ), 92 | ), 93 | const SizedBox( 94 | height: 10, 95 | ), 96 | const Divider( 97 | height: 0, 98 | thickness: 0.6, 99 | ), 100 | ], 101 | ); 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /android/app/google-services.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_info": { 3 | "project_number": "178433718435", 4 | "project_id": "whatsapp-redesign-a4790", 5 | "storage_bucket": "whatsapp-redesign-a4790.appspot.com" 6 | }, 7 | "client": [ 8 | { 9 | "client_info": { 10 | "mobilesdk_app_id": "1:178433718435:android:1e23915b2b6cce32d46716", 11 | "android_client_info": { 12 | "package_name": "com.example.whatsapp_redesign" 13 | } 14 | }, 15 | "oauth_client": [ 16 | { 17 | "client_id": "178433718435-ssm1cu409651a1beomviepvi3npgepr2.apps.googleusercontent.com", 18 | "client_type": 1, 19 | "android_info": { 20 | "package_name": "com.example.whatsapp_redesign", 21 | "certificate_hash": "479729cd430b3134fb8eda075cff48a7d8e36a4b" 22 | } 23 | }, 24 | { 25 | "client_id": "178433718435-fgpbr46r5j5jhfspat7js79ofv20lkaa.apps.googleusercontent.com", 26 | "client_type": 3 27 | } 28 | ], 29 | "api_key": [ 30 | { 31 | "current_key": "AIzaSyB2cu6UNuLlg1TalmA6Rpq_Br0FqWH1CNE" 32 | } 33 | ], 34 | "services": { 35 | "appinvite_service": { 36 | "other_platform_oauth_client": [ 37 | { 38 | "client_id": "178433718435-fgpbr46r5j5jhfspat7js79ofv20lkaa.apps.googleusercontent.com", 39 | "client_type": 3 40 | } 41 | ] 42 | } 43 | } 44 | }, 45 | { 46 | "client_info": { 47 | "mobilesdk_app_id": "1:178433718435:android:e80dbc72ddd18b01d46716", 48 | "android_client_info": { 49 | "package_name": "com.makan.conversa.conversa" 50 | } 51 | }, 52 | "oauth_client": [ 53 | { 54 | "client_id": "178433718435-rbonicfiqvjngqp83q483qa6kjhb4k38.apps.googleusercontent.com", 55 | "client_type": 1, 56 | "android_info": { 57 | "package_name": "com.makan.conversa.conversa", 58 | "certificate_hash": "e28542112a4606fd3082b358bf178492c6cad20d" 59 | } 60 | }, 61 | { 62 | "client_id": "178433718435-fgpbr46r5j5jhfspat7js79ofv20lkaa.apps.googleusercontent.com", 63 | "client_type": 3 64 | } 65 | ], 66 | "api_key": [ 67 | { 68 | "current_key": "AIzaSyB2cu6UNuLlg1TalmA6Rpq_Br0FqWH1CNE" 69 | } 70 | ], 71 | "services": { 72 | "appinvite_service": { 73 | "other_platform_oauth_client": [ 74 | { 75 | "client_id": "178433718435-fgpbr46r5j5jhfspat7js79ofv20lkaa.apps.googleusercontent.com", 76 | "client_type": 3 77 | } 78 | ] 79 | } 80 | } 81 | }, 82 | { 83 | "client_info": { 84 | "mobilesdk_app_id": "1:178433718435:android:18eb5d5843a07ee5d46716", 85 | "android_client_info": { 86 | "package_name": "com.makan.whatsapp_application" 87 | } 88 | }, 89 | "oauth_client": [ 90 | { 91 | "client_id": "178433718435-fgpbr46r5j5jhfspat7js79ofv20lkaa.apps.googleusercontent.com", 92 | "client_type": 3 93 | } 94 | ], 95 | "api_key": [ 96 | { 97 | "current_key": "AIzaSyB2cu6UNuLlg1TalmA6Rpq_Br0FqWH1CNE" 98 | } 99 | ], 100 | "services": { 101 | "appinvite_service": { 102 | "other_platform_oauth_client": [ 103 | { 104 | "client_id": "178433718435-fgpbr46r5j5jhfspat7js79ofv20lkaa.apps.googleusercontent.com", 105 | "client_type": 3 106 | } 107 | ] 108 | } 109 | } 110 | } 111 | ], 112 | "configuration_version": "1" 113 | } -------------------------------------------------------------------------------- /lib/views/home_page/widgets/status_bar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:line_icons/line_icons.dart'; 4 | import 'package:whatsapp_redesign/constants/colors.dart'; 5 | import 'package:whatsapp_redesign/models/user.dart'; 6 | import 'package:whatsapp_redesign/views/home_page/widgets/story_widget.dart'; 7 | import 'package:whatsapp_redesign/views/status_page/status_page.dart'; 8 | import 'package:whatsapp_redesign/widgets/gradient_icon_button.dart'; 9 | 10 | class StatusBar extends StatelessWidget { 11 | final List statusList; 12 | final GestureTapCallback? onNewStatusClicked; 13 | final bool addWidget; 14 | final bool seeAllWidget; 15 | 16 | const StatusBar({ 17 | Key? key, 18 | required this.statusList, 19 | this.onNewStatusClicked, 20 | this.addWidget = true, 21 | this.seeAllWidget = true, 22 | }) : super(key: key); 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | return Column( 27 | key: const ValueKey(1), 28 | children: [ 29 | Padding( 30 | padding: const EdgeInsets.only(top: 10.0), 31 | child: SizedBox( 32 | height: 100, 33 | child: ListView( 34 | scrollDirection: Axis.horizontal, 35 | padding: const EdgeInsets.only(left: 16), 36 | children: [ 37 | addWidget 38 | ? GestureDetector( 39 | onTap: onNewStatusClicked, 40 | child: const GradientIconButton( 41 | size: 60, 42 | iconData: Icons.add, 43 | text: "New Status", 44 | ), 45 | ) 46 | : const SizedBox(), 47 | addWidget 48 | ? const SizedBox( 49 | width: 8, 50 | ) 51 | : const SizedBox(), 52 | SizedBox( 53 | height: 100, 54 | child: ListView.builder( 55 | shrinkWrap: true, 56 | itemCount: statusList.length, 57 | scrollDirection: Axis.horizontal, 58 | itemBuilder: (context, index) { 59 | return GestureDetector( 60 | onTap: () { 61 | Navigator.of(context).push(CupertinoPageRoute( 62 | builder: (context) => const StatusPage(), 63 | )); 64 | }, 65 | child: StoryWidget( 66 | size: 60, 67 | showGreenStrip: 68 | addWidget && (index == 2 || index == 3), 69 | user: statusList[index], 70 | ), 71 | ); 72 | }, 73 | ), 74 | ), 75 | seeAllWidget 76 | ? const SizedBox( 77 | width: 10, 78 | ) 79 | : const SizedBox(), 80 | seeAllWidget 81 | ? const Icon( 82 | LineIcons.arrowRight, 83 | color: greenColor, 84 | ) 85 | : const SizedBox(), 86 | seeAllWidget 87 | ? const SizedBox( 88 | width: 10, 89 | ) 90 | : const SizedBox(), 91 | ], 92 | ), 93 | ), 94 | ), 95 | const SizedBox( 96 | height: 10, 97 | ), 98 | const Divider( 99 | height: 0, 100 | thickness: 0.6, 101 | ), 102 | ], 103 | ); 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /windows/runner/win32_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_WIN32_WINDOW_H_ 2 | #define RUNNER_WIN32_WINDOW_H_ 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | // A class abstraction for a high DPI-aware Win32 Window. Intended to be 11 | // inherited from by classes that wish to specialize with custom 12 | // rendering and input handling 13 | class Win32Window { 14 | public: 15 | struct Point { 16 | unsigned int x; 17 | unsigned int y; 18 | Point(unsigned int x, unsigned int y) : x(x), y(y) {} 19 | }; 20 | 21 | struct Size { 22 | unsigned int width; 23 | unsigned int height; 24 | Size(unsigned int width, unsigned int height) 25 | : width(width), height(height) {} 26 | }; 27 | 28 | Win32Window(); 29 | virtual ~Win32Window(); 30 | 31 | // Creates a win32 window with |title| that is positioned and sized using 32 | // |origin| and |size|. New windows are created on the default monitor. Window 33 | // sizes are specified to the OS in physical pixels, hence to ensure a 34 | // consistent size this function will scale the inputted width and height as 35 | // as appropriate for the default monitor. The window is invisible until 36 | // |Show| is called. Returns true if the window was created successfully. 37 | bool Create(const std::wstring& title, const Point& origin, const Size& size); 38 | 39 | // Show the current window. Returns true if the window was successfully shown. 40 | bool Show(); 41 | 42 | // Release OS resources associated with window. 43 | void Destroy(); 44 | 45 | // Inserts |content| into the window tree. 46 | void SetChildContent(HWND content); 47 | 48 | // Returns the backing Window handle to enable clients to set icon and other 49 | // window properties. Returns nullptr if the window has been destroyed. 50 | HWND GetHandle(); 51 | 52 | // If true, closing this window will quit the application. 53 | void SetQuitOnClose(bool quit_on_close); 54 | 55 | // Return a RECT representing the bounds of the current client area. 56 | RECT GetClientArea(); 57 | 58 | protected: 59 | // Processes and route salient window messages for mouse handling, 60 | // size change and DPI. Delegates handling of these to member overloads that 61 | // inheriting classes can handle. 62 | virtual LRESULT MessageHandler(HWND window, 63 | UINT const message, 64 | WPARAM const wparam, 65 | LPARAM const lparam) noexcept; 66 | 67 | // Called when CreateAndShow is called, allowing subclass window-related 68 | // setup. Subclasses should return false if setup fails. 69 | virtual bool OnCreate(); 70 | 71 | // Called when Destroy is called. 72 | virtual void OnDestroy(); 73 | 74 | private: 75 | friend class WindowClassRegistrar; 76 | 77 | // OS callback called by message pump. Handles the WM_NCCREATE message which 78 | // is passed when the non-client area is being created and enables automatic 79 | // non-client DPI scaling so that the non-client area automatically 80 | // responds to changes in DPI. All other messages are handled by 81 | // MessageHandler. 82 | static LRESULT CALLBACK WndProc(HWND const window, 83 | UINT const message, 84 | WPARAM const wparam, 85 | LPARAM const lparam) noexcept; 86 | 87 | // Retrieves a class instance pointer for |window| 88 | static Win32Window* GetThisFromHandle(HWND const window) noexcept; 89 | 90 | // Update the window frame's theme to match the system theme. 91 | static void UpdateTheme(HWND const window); 92 | 93 | bool quit_on_close_ = false; 94 | 95 | // window handle for top level window. 96 | HWND window_handle_ = nullptr; 97 | 98 | // window handle for hosted content. 99 | HWND child_content_ = nullptr; 100 | }; 101 | 102 | #endif // RUNNER_WIN32_WINDOW_H_ 103 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 43 | 49 | 50 | 51 | 52 | 53 | 63 | 65 | 71 | 72 | 73 | 74 | 80 | 82 | 88 | 89 | 90 | 91 | 93 | 94 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /windows/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file controls Flutter-level build steps. It should not be edited. 2 | cmake_minimum_required(VERSION 3.14) 3 | 4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 5 | 6 | # Configuration provided via flutter tool. 7 | include(${EPHEMERAL_DIR}/generated_config.cmake) 8 | 9 | # TODO: Move the rest of this into files in ephemeral. See 10 | # https://github.com/flutter/flutter/issues/57146. 11 | set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") 12 | 13 | # === Flutter Library === 14 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") 15 | 16 | # Published to parent scope for install step. 17 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 18 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 19 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 20 | set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) 21 | 22 | list(APPEND FLUTTER_LIBRARY_HEADERS 23 | "flutter_export.h" 24 | "flutter_windows.h" 25 | "flutter_messenger.h" 26 | "flutter_plugin_registrar.h" 27 | "flutter_texture_registrar.h" 28 | ) 29 | list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") 30 | add_library(flutter INTERFACE) 31 | target_include_directories(flutter INTERFACE 32 | "${EPHEMERAL_DIR}" 33 | ) 34 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") 35 | add_dependencies(flutter flutter_assemble) 36 | 37 | # === Wrapper === 38 | list(APPEND CPP_WRAPPER_SOURCES_CORE 39 | "core_implementations.cc" 40 | "standard_codec.cc" 41 | ) 42 | list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") 43 | list(APPEND CPP_WRAPPER_SOURCES_PLUGIN 44 | "plugin_registrar.cc" 45 | ) 46 | list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") 47 | list(APPEND CPP_WRAPPER_SOURCES_APP 48 | "flutter_engine.cc" 49 | "flutter_view_controller.cc" 50 | ) 51 | list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") 52 | 53 | # Wrapper sources needed for a plugin. 54 | add_library(flutter_wrapper_plugin STATIC 55 | ${CPP_WRAPPER_SOURCES_CORE} 56 | ${CPP_WRAPPER_SOURCES_PLUGIN} 57 | ) 58 | apply_standard_settings(flutter_wrapper_plugin) 59 | set_target_properties(flutter_wrapper_plugin PROPERTIES 60 | POSITION_INDEPENDENT_CODE ON) 61 | set_target_properties(flutter_wrapper_plugin PROPERTIES 62 | CXX_VISIBILITY_PRESET hidden) 63 | target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) 64 | target_include_directories(flutter_wrapper_plugin PUBLIC 65 | "${WRAPPER_ROOT}/include" 66 | ) 67 | add_dependencies(flutter_wrapper_plugin flutter_assemble) 68 | 69 | # Wrapper sources needed for the runner. 70 | add_library(flutter_wrapper_app STATIC 71 | ${CPP_WRAPPER_SOURCES_CORE} 72 | ${CPP_WRAPPER_SOURCES_APP} 73 | ) 74 | apply_standard_settings(flutter_wrapper_app) 75 | target_link_libraries(flutter_wrapper_app PUBLIC flutter) 76 | target_include_directories(flutter_wrapper_app PUBLIC 77 | "${WRAPPER_ROOT}/include" 78 | ) 79 | add_dependencies(flutter_wrapper_app flutter_assemble) 80 | 81 | # === Flutter tool backend === 82 | # _phony_ is a non-existent file to force this command to run every time, 83 | # since currently there's no way to get a full input/output list from the 84 | # flutter tool. 85 | set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") 86 | set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) 87 | add_custom_command( 88 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 89 | ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} 90 | ${CPP_WRAPPER_SOURCES_APP} 91 | ${PHONY_OUTPUT} 92 | COMMAND ${CMAKE_COMMAND} -E env 93 | ${FLUTTER_TOOL_ENVIRONMENT} 94 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" 95 | windows-x64 $ 96 | VERBATIM 97 | ) 98 | add_custom_target(flutter_assemble DEPENDS 99 | "${FLUTTER_LIBRARY}" 100 | ${FLUTTER_LIBRARY_HEADERS} 101 | ${CPP_WRAPPER_SOURCES_CORE} 102 | ${CPP_WRAPPER_SOURCES_PLUGIN} 103 | ${CPP_WRAPPER_SOURCES_APP} 104 | ) 105 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 43 | 49 | 50 | 51 | 52 | 53 | 63 | 65 | 71 | 72 | 73 | 74 | 80 | 82 | 88 | 89 | 90 | 91 | 93 | 94 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /lib/views/profile_page/widgets/profile_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:line_icons/line_icons.dart'; 3 | import 'package:whatsapp_redesign/constants/colors.dart'; 4 | import 'package:whatsapp_redesign/models/size_config.dart'; 5 | 6 | class ProfileWidget extends StatelessWidget { 7 | final String name; 8 | final String image; 9 | final GestureTapCallback onLogoutClick; 10 | final GestureTapCallback onTap; 11 | 12 | const ProfileWidget({ 13 | Key? key, 14 | required this.name, 15 | required this.image, 16 | required this.onLogoutClick, 17 | required this.onTap, 18 | }) : super(key: key); 19 | 20 | @override 21 | Widget build(BuildContext context) { 22 | return Padding( 23 | padding: const EdgeInsets.symmetric(horizontal: 16), 24 | child: GestureDetector( 25 | onTap: onTap, 26 | child: SizedBox( 27 | height: 70, 28 | child: Row( 29 | children: [ 30 | Stack( 31 | clipBehavior: Clip.none, 32 | children: [ 33 | Container( 34 | width: 70, 35 | height: 70, 36 | decoration: BoxDecoration( 37 | borderRadius: const BorderRadius.all(Radius.circular(10)), 38 | image: DecorationImage( 39 | image: NetworkImage(image), 40 | fit: BoxFit.cover, 41 | ), 42 | ), 43 | ), 44 | Positioned( 45 | top: -5, 46 | right: -5, 47 | child: Container( 48 | decoration: BoxDecoration( 49 | color: Colors.black, 50 | border: Border.all( 51 | width: 3, 52 | color: backgroundColor(SizeConfig.cntxt), 53 | ), 54 | shape: BoxShape.circle, 55 | ), 56 | child: const Padding( 57 | padding: EdgeInsets.all(4.0), 58 | child: Icon( 59 | LineIcons.pen, 60 | size: 14, 61 | color: greenColor, 62 | ), 63 | ), 64 | ), 65 | ), 66 | ], 67 | ), 68 | const SizedBox( 69 | width: 20, 70 | ), 71 | Column( 72 | mainAxisAlignment: MainAxisAlignment.center, 73 | crossAxisAlignment: CrossAxisAlignment.start, 74 | children: [ 75 | Text( 76 | name, 77 | style: TextStyle( 78 | color: blackColor(SizeConfig.cntxt).darkShade, 79 | fontSize: 22, 80 | fontWeight: FontWeight.w700, 81 | ), 82 | ), 83 | const SizedBox( 84 | height: 3, 85 | ), 86 | Text( 87 | "View profile", 88 | style: TextStyle( 89 | color: blackColor(SizeConfig.cntxt).lightShade, 90 | ), 91 | ), 92 | ], 93 | ), 94 | const Spacer(), 95 | Padding( 96 | padding: const EdgeInsets.only(right: 2.0), 97 | child: GestureDetector( 98 | onTap: onLogoutClick, 99 | child: const Icon( 100 | LineIcons.alternateSignOut, 101 | size: 30, 102 | color: Colors.redAccent, 103 | ), 104 | ), 105 | ), 106 | ], 107 | ), 108 | ), 109 | ), 110 | ); 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /lib/views/message_page/widgets/messages/url_message.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:simple_link_preview/simple_link_preview.dart'; 3 | import 'package:whatsapp_redesign/constants/colors.dart'; 4 | import 'package:whatsapp_redesign/models/size_config.dart'; 5 | 6 | class UrlMessage extends StatefulWidget { 7 | final String url; 8 | final bool isIncomingMessage; 9 | 10 | const UrlMessage({Key? key, required this.url, required this.isIncomingMessage}) 11 | : super(key: key); 12 | 13 | @override 14 | State createState() => _UrlMessageState(); 15 | } 16 | 17 | class _UrlMessageState extends State { 18 | late bool fromFriend; 19 | late String url; 20 | 21 | @override 22 | void initState() { 23 | fromFriend = widget.isIncomingMessage; 24 | url = widget.url; 25 | super.initState(); 26 | } 27 | 28 | @override 29 | Widget build(BuildContext context) { 30 | return Padding( 31 | padding: const EdgeInsets.only(bottom: 20), 32 | child: Row( 33 | mainAxisAlignment: 34 | fromFriend ? MainAxisAlignment.start : MainAxisAlignment.end, 35 | children: [ 36 | Container( 37 | width: SizeConfig.screenWidth * 0.5, 38 | height: SizeConfig.screenWidth * 0.6, 39 | child: FutureBuilder( 40 | future: SimpleLinkPreview.getPreview(url), 41 | builder: (context, AsyncSnapshot data) { 42 | if (data.hasData) { 43 | return Column( 44 | children: [ 45 | Container( 46 | width: SizeConfig.screenWidth * 0.5, 47 | height: SizeConfig.screenWidth * 0.25, 48 | decoration: BoxDecoration( 49 | image: DecorationImage( 50 | image: NetworkImage(data.data!.image!), 51 | fit: BoxFit.cover), 52 | borderRadius: const BorderRadius.only( 53 | topLeft: Radius.circular(40), 54 | topRight: Radius.circular(40), 55 | )), 56 | ), 57 | Padding( 58 | padding: const EdgeInsets.all(4.0), 59 | child: Text( 60 | data.data!.title!, 61 | style: TextStyle( 62 | color: blackColor(context).darkShade, 63 | fontSize: 12, 64 | fontWeight: FontWeight.w600), 65 | ), 66 | ), 67 | Padding( 68 | padding: const EdgeInsets.symmetric(horizontal: 5.0), 69 | child: Text(data.data!.description!, 70 | style: TextStyle( 71 | color: blackColor(context).lightShade, 72 | fontSize: 12), 73 | maxLines: 4, 74 | overflow: TextOverflow.ellipsis), 75 | ) 76 | ], 77 | ); 78 | } else { 79 | return const SizedBox(); 80 | } 81 | }, 82 | ), 83 | decoration: BoxDecoration( 84 | border: Border.all( 85 | color: blackColor(SizeConfig.cntxt) 86 | .lightShade 87 | .withOpacity(0.18)), 88 | borderRadius: BorderRadius.only( 89 | bottomLeft: Radius.circular(fromFriend ? 0 : 40), 90 | topLeft: const Radius.circular(40), 91 | topRight: const Radius.circular(40), 92 | bottomRight: Radius.circular(fromFriend ? 40 : 0)), 93 | )), 94 | ], 95 | ), 96 | ); 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /linux/my_application.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | #include 4 | #ifdef GDK_WINDOWING_X11 5 | #include 6 | #endif 7 | 8 | #include "flutter/generated_plugin_registrant.h" 9 | 10 | struct _MyApplication { 11 | GtkApplication parent_instance; 12 | char** dart_entrypoint_arguments; 13 | }; 14 | 15 | G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) 16 | 17 | // Implements GApplication::activate. 18 | static void my_application_activate(GApplication* application) { 19 | MyApplication* self = MY_APPLICATION(application); 20 | GtkWindow* window = 21 | GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); 22 | 23 | // Use a header bar when running in GNOME as this is the common style used 24 | // by applications and is the setup most users will be using (e.g. Ubuntu 25 | // desktop). 26 | // If running on X and not using GNOME then just use a traditional title bar 27 | // in case the window manager does more exotic layout, e.g. tiling. 28 | // If running on Wayland assume the header bar will work (may need changing 29 | // if future cases occur). 30 | gboolean use_header_bar = TRUE; 31 | #ifdef GDK_WINDOWING_X11 32 | GdkScreen* screen = gtk_window_get_screen(window); 33 | if (GDK_IS_X11_SCREEN(screen)) { 34 | const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); 35 | if (g_strcmp0(wm_name, "GNOME Shell") != 0) { 36 | use_header_bar = FALSE; 37 | } 38 | } 39 | #endif 40 | if (use_header_bar) { 41 | GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); 42 | gtk_widget_show(GTK_WIDGET(header_bar)); 43 | gtk_header_bar_set_title(header_bar, "whatsapp_redesign"); 44 | gtk_header_bar_set_show_close_button(header_bar, TRUE); 45 | gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); 46 | } else { 47 | gtk_window_set_title(window, "whatsapp_redesign"); 48 | } 49 | 50 | gtk_window_set_default_size(window, 1280, 720); 51 | gtk_widget_show(GTK_WIDGET(window)); 52 | 53 | g_autoptr(FlDartProject) project = fl_dart_project_new(); 54 | fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); 55 | 56 | FlView* view = fl_view_new(project); 57 | gtk_widget_show(GTK_WIDGET(view)); 58 | gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); 59 | 60 | fl_register_plugins(FL_PLUGIN_REGISTRY(view)); 61 | 62 | gtk_widget_grab_focus(GTK_WIDGET(view)); 63 | } 64 | 65 | // Implements GApplication::local_command_line. 66 | static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) { 67 | MyApplication* self = MY_APPLICATION(application); 68 | // Strip out the first argument as it is the binary name. 69 | self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); 70 | 71 | g_autoptr(GError) error = nullptr; 72 | if (!g_application_register(application, nullptr, &error)) { 73 | g_warning("Failed to register: %s", error->message); 74 | *exit_status = 1; 75 | return TRUE; 76 | } 77 | 78 | g_application_activate(application); 79 | *exit_status = 0; 80 | 81 | return TRUE; 82 | } 83 | 84 | // Implements GObject::dispose. 85 | static void my_application_dispose(GObject* object) { 86 | MyApplication* self = MY_APPLICATION(object); 87 | g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); 88 | G_OBJECT_CLASS(my_application_parent_class)->dispose(object); 89 | } 90 | 91 | static void my_application_class_init(MyApplicationClass* klass) { 92 | G_APPLICATION_CLASS(klass)->activate = my_application_activate; 93 | G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; 94 | G_OBJECT_CLASS(klass)->dispose = my_application_dispose; 95 | } 96 | 97 | static void my_application_init(MyApplication* self) {} 98 | 99 | MyApplication* my_application_new() { 100 | return MY_APPLICATION(g_object_new(my_application_get_type(), 101 | "application-id", APPLICATION_ID, 102 | "flags", G_APPLICATION_NON_UNIQUE, 103 | nullptr)); 104 | } 105 | -------------------------------------------------------------------------------- /lib/views/root_page.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'package:awesome_notifications/awesome_notifications.dart'; 3 | import 'package:firebase_messaging/firebase_messaging.dart'; 4 | import 'package:flutter/cupertino.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:custom_navigation_bar/custom_navigation_bar.dart'; 7 | import 'package:hidable/hidable.dart'; 8 | import 'package:line_icons/line_icons.dart'; 9 | import 'package:whatsapp_redesign/constants/colors.dart'; 10 | import 'package:whatsapp_redesign/constants/enums.dart'; 11 | import 'package:whatsapp_redesign/models/size_config.dart'; 12 | import 'package:whatsapp_redesign/main.dart'; 13 | import 'package:whatsapp_redesign/views/profile_page/main_profile_page.dart'; 14 | import 'call_page/call_list_page.dart'; 15 | import 'call_page/calling_page.dart'; 16 | import 'home_page/home_page.dart'; 17 | 18 | class RootPage extends StatefulWidget { 19 | const RootPage({Key? key}) : super(key: key); 20 | 21 | @override 22 | _RootPageState createState() => _RootPageState(); 23 | } 24 | 25 | class _RootPageState extends State { 26 | int selectedIndex = 1; 27 | final ScrollController scrollController = ScrollController(); 28 | StreamSubscription? _actionStreamSubscription; 29 | 30 | void listen() async { 31 | await _actionStreamSubscription?.cancel(); 32 | 33 | // _actionStreamSubscription = 34 | // AwesomeNotifications().actionStream.listen((message) { 35 | // if (message.buttonKeyPressed.startsWith("accept")) { 36 | // Navigator.of(context).push(CupertinoPageRoute( 37 | // builder: (context) => CallAcceptDeclinePage( 38 | // user: user, 39 | // callStatus: DuringCallStatus.accepted, 40 | // roomId: message.buttonKeyPressed.replaceAll("accept-", ""), 41 | // ))); 42 | // } else if (message.buttonKeyPressed == "decline") { 43 | // // decline call 44 | // } 45 | // }); 46 | } 47 | 48 | @override 49 | void initState() { 50 | listen(); 51 | FirebaseMessaging.instance.getToken().then((token) { 52 | debugPrint('[FCM] token => ' + token!); 53 | }); 54 | FirebaseMessaging.onMessage.listen((RemoteMessage message) { 55 | myBackgroundMessageHandler(message); 56 | }); 57 | super.initState(); 58 | } 59 | 60 | @override 61 | Widget build(BuildContext context) { 62 | SizeConfig().init(context); 63 | return Scaffold( 64 | backgroundColor: backgroundColor(context), 65 | body: getBody(), 66 | bottomNavigationBar: Hidable( 67 | child: bottomNavigationBar(), 68 | controller: scrollController, 69 | )); 70 | } 71 | 72 | Widget getBody() { 73 | switch (selectedIndex) { 74 | case 0: 75 | return CallListPage( 76 | scrollController: scrollController, 77 | ); 78 | case 1: 79 | return HomePage( 80 | scrollController: scrollController, 81 | ); 82 | case 2: 83 | return MainProfilePage( 84 | scrollController: scrollController, 85 | ); 86 | default: 87 | return HomePage( 88 | scrollController: scrollController, 89 | ); 90 | } 91 | } 92 | 93 | Widget bottomNavigationBar() { 94 | return CustomNavigationBar( 95 | iconSize: 24.0, 96 | selectedColor: greenColor, 97 | strokeColor: greenGradient.lightShade.withOpacity(0.6), 98 | unSelectedColor: const Color(0xff6c788a), 99 | backgroundColor: backgroundColor(context), 100 | items: [ 101 | CustomNavigationBarItem( 102 | icon: const Icon( 103 | LineIcons.phone, 104 | size: 24, 105 | ), 106 | ), 107 | CustomNavigationBarItem( 108 | icon: const Icon( 109 | LineIcons.sms, 110 | size: 24, 111 | ), 112 | ), 113 | CustomNavigationBarItem( 114 | icon: const Icon( 115 | LineIcons.user, 116 | size: 24, 117 | ), 118 | ), 119 | ], 120 | currentIndex: selectedIndex, 121 | onTap: (index) { 122 | setState(() { 123 | selectedIndex = index; 124 | }); 125 | }, 126 | ); 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /windows/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Project-level configuration. 2 | cmake_minimum_required(VERSION 3.14) 3 | project(whatsapp_redesign LANGUAGES CXX) 4 | 5 | # The name of the executable created for the application. Change this to change 6 | # the on-disk name of your application. 7 | set(BINARY_NAME "whatsapp_redesign") 8 | 9 | # Explicitly opt in to modern CMake behaviors to avoid warnings with recent 10 | # versions of CMake. 11 | cmake_policy(SET CMP0063 NEW) 12 | 13 | # Define build configuration option. 14 | get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) 15 | if(IS_MULTICONFIG) 16 | set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" 17 | CACHE STRING "" FORCE) 18 | else() 19 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 20 | set(CMAKE_BUILD_TYPE "Debug" CACHE 21 | STRING "Flutter build mode" FORCE) 22 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS 23 | "Debug" "Profile" "Release") 24 | endif() 25 | endif() 26 | # Define settings for the Profile build mode. 27 | set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") 28 | set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") 29 | set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") 30 | set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") 31 | 32 | # Use Unicode for all projects. 33 | add_definitions(-DUNICODE -D_UNICODE) 34 | 35 | # Compilation settings that should be applied to most targets. 36 | # 37 | # Be cautious about adding new options here, as plugins use this function by 38 | # default. In most cases, you should add new options to specific targets instead 39 | # of modifying this function. 40 | function(APPLY_STANDARD_SETTINGS TARGET) 41 | target_compile_features(${TARGET} PUBLIC cxx_std_17) 42 | target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") 43 | target_compile_options(${TARGET} PRIVATE /EHsc) 44 | target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") 45 | target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") 46 | endfunction() 47 | 48 | # Flutter library and tool build rules. 49 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") 50 | add_subdirectory(${FLUTTER_MANAGED_DIR}) 51 | 52 | # Application build; see runner/CMakeLists.txt. 53 | add_subdirectory("runner") 54 | 55 | 56 | # Generated plugin build rules, which manage building the plugins and adding 57 | # them to the application. 58 | include(flutter/generated_plugins.cmake) 59 | 60 | 61 | # === Installation === 62 | # Support files are copied into place next to the executable, so that it can 63 | # run in place. This is done instead of making a separate bundle (as on Linux) 64 | # so that building and running from within Visual Studio will work. 65 | set(BUILD_BUNDLE_DIR "$") 66 | # Make the "install" step default, as it's required to run. 67 | set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) 68 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 69 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) 70 | endif() 71 | 72 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") 73 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") 74 | 75 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" 76 | COMPONENT Runtime) 77 | 78 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 79 | COMPONENT Runtime) 80 | 81 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 82 | COMPONENT Runtime) 83 | 84 | if(PLUGIN_BUNDLED_LIBRARIES) 85 | install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" 86 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 87 | COMPONENT Runtime) 88 | endif() 89 | 90 | # Fully re-copy the assets directory on each build to avoid having stale files 91 | # from a previous install. 92 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets") 93 | install(CODE " 94 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") 95 | " COMPONENT Runtime) 96 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" 97 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) 98 | 99 | # Install the AOT library on non-Debug builds only. 100 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 101 | CONFIGURATIONS Profile;Release 102 | COMPONENT Runtime) 103 | -------------------------------------------------------------------------------- /lib/views/profile_page/settings_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:settings_ui/settings_ui.dart'; 3 | 4 | class SettingsPage extends StatelessWidget { 5 | const SettingsPage({ 6 | Key? key, 7 | }) : super(key: key); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return Scaffold( 12 | appBar: AppBar(title: const Text('Settings')), 13 | body: SettingsList( 14 | platform: DevicePlatform.android, 15 | sections: [ 16 | SettingsSection( 17 | tiles: [ 18 | SettingsTile( 19 | onPressed: (context) => toNotificationsScreen(context), 20 | title: Text('Network & internet'), 21 | description: Text('Mobile, Wi-Fi, hotspot'), 22 | leading: Icon(Icons.wifi), 23 | ), 24 | SettingsTile( 25 | onPressed: (context) => toNotificationsScreen(context), 26 | title: Text('Connected devices'), 27 | description: Text('Bluetooth, pairing'), 28 | leading: Icon(Icons.devices_other), 29 | ), 30 | SettingsTile( 31 | onPressed: (context) => toNotificationsScreen(context), 32 | title: Text('Apps'), 33 | description: Text('Assistant, recent apps, default apps'), 34 | leading: Icon(Icons.apps), 35 | ), 36 | SettingsTile( 37 | onPressed: (context) => toNotificationsScreen(context), 38 | title: Text('Notifications'), 39 | description: Text('Notification history, conversations'), 40 | leading: Icon(Icons.notifications_none), 41 | ), 42 | SettingsTile( 43 | onPressed: (context) => toNotificationsScreen(context), 44 | title: Text('Battery'), 45 | description: Text('100%'), 46 | leading: Icon(Icons.battery_full), 47 | ), 48 | SettingsTile( 49 | onPressed: (context) => toNotificationsScreen(context), 50 | title: Text('Storage'), 51 | description: Text('30% used - 5.60 GB free'), 52 | leading: Icon(Icons.storage), 53 | ), 54 | SettingsTile( 55 | onPressed: (context) => toNotificationsScreen(context), 56 | title: Text('Sound & vibration'), 57 | description: Text('Volume, haptics, Do Not Disturb'), 58 | leading: Icon(Icons.volume_up_outlined), 59 | ), 60 | SettingsTile( 61 | onPressed: (context) => toNotificationsScreen(context), 62 | title: Text('Display'), 63 | enabled: false, 64 | description: Text('Dark theme, font size, brightness'), 65 | leading: Icon(Icons.brightness_6_outlined), 66 | ), 67 | SettingsTile( 68 | onPressed: (context) => toNotificationsScreen(context), 69 | title: Text('Wallpaper & style'), 70 | description: Text('Colors, themed icons, app grid'), 71 | leading: Icon(Icons.palette_outlined), 72 | ), 73 | SettingsTile( 74 | onPressed: (context) => toNotificationsScreen(context), 75 | title: Text('Accessibility'), 76 | description: Text('Display, interaction, audio'), 77 | leading: Icon(Icons.accessibility), 78 | ), 79 | SettingsTile( 80 | onPressed: (context) => toNotificationsScreen(context), 81 | title: Text('Security'), 82 | description: Text('Screen lock, Find My Device, app security'), 83 | leading: Icon(Icons.lock_outline), 84 | ), 85 | SettingsTile( 86 | onPressed: (context) => toNotificationsScreen(context), 87 | title: Text('Location'), 88 | description: Text('On - 3 apps have access to location'), 89 | leading: Icon(Icons.location_on_outlined), 90 | ), 91 | ], 92 | ), 93 | ], 94 | ), 95 | ); 96 | } 97 | 98 | void toNotificationsScreen(BuildContext context) {} 99 | } 100 | -------------------------------------------------------------------------------- /lib/views/message_page/widgets/messages/audio_message.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | import 'dart:typed_data'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_audio_waveforms/flutter_audio_waveforms.dart'; 5 | import 'package:mic_stream/mic_stream.dart'; 6 | import 'package:whatsapp_redesign/constants/colors.dart'; 7 | import 'package:whatsapp_redesign/getit.dart'; 8 | import 'package:whatsapp_redesign/models/size_config.dart'; 9 | import 'package:whatsapp_redesign/provider/audio_provider.dart'; 10 | import 'package:whatsapp_redesign/models/audio_wave_form_data.dart'; 11 | 12 | class AudioMessage extends StatefulWidget { 13 | final Uint8List? samples; 14 | final bool isIncomingMessage; 15 | 16 | const AudioMessage({Key? key, this.samples, required this.isIncomingMessage}) 17 | : super(key: key); 18 | 19 | @override 20 | State createState() => _AudioMessageState(); 21 | } 22 | 23 | class _AudioMessageState extends State { 24 | AudioProvider provider = getIt(); 25 | int? bits; 26 | Random rng = Random(); 27 | AudioFormat audioFormat = AudioFormat.ENCODING_PCM_8BIT; 28 | late bool fromFriend; 29 | 30 | @override 31 | void initState() { 32 | getStream(); 33 | fromFriend = widget.isIncomingMessage; 34 | super.initState(); 35 | } 36 | 37 | getStream() async { 38 | Stream? stream = await MicStream.microphone( 39 | audioSource: AudioSource.DEFAULT, 40 | sampleRate: 1000 * (rng.nextInt(50) + 30), 41 | channelConfig: ChannelConfig.CHANNEL_IN_MONO, 42 | audioFormat: audioFormat); 43 | provider.addStream(stream!); 44 | var subscription = stream.listen((event) { 45 | provider.addSample(event); 46 | }); 47 | provider.setStreamSubscription(subscription); 48 | 49 | bits = await MicStream.bitDepth; 50 | setState(() {}); 51 | } 52 | 53 | @override 54 | Widget build(context) { 55 | return Padding( 56 | padding: const EdgeInsets.only(bottom: 20), 57 | child: Row( 58 | mainAxisAlignment: 59 | fromFriend ? MainAxisAlignment.start : MainAxisAlignment.end, 60 | children: [ 61 | Container( 62 | constraints: 63 | BoxConstraints(maxWidth: SizeConfig.screenWidth * 0.8), 64 | height: 100, 65 | decoration: BoxDecoration( 66 | borderRadius: BorderRadius.only( 67 | bottomLeft: Radius.circular(fromFriend ? 0 : 40), 68 | topLeft: const Radius.circular(40), 69 | topRight: const Radius.circular(40), 70 | bottomRight: Radius.circular(fromFriend ? 40 : 0)), 71 | color: fromFriend ? const Color(0xFF313131) : null, 72 | gradient: fromFriend 73 | ? null 74 | : LinearGradient(colors: [ 75 | greenGradient.lightShade, 76 | greenGradient.darkShade, 77 | ]), 78 | ), 79 | child: Center( 80 | child: StreamBuilder( 81 | stream: provider.audioStream, 82 | builder: (context, AsyncSnapshot snapshot) { 83 | if (snapshot.hasData) { 84 | AudioWaveFormData waveFormData; 85 | waveFormData = AudioWaveFormData( 86 | bits: bits ?? 16, 87 | data: snapshot.data?.map((e) => e).toList() ?? 88 | Uint8List(0)); 89 | return RectangleWaveform( 90 | samples: 91 | waveFormData.data.map((e) => e.toDouble()).toList(), 92 | height: 50, 93 | absolute: true, 94 | width: MediaQuery.of(context).size.width, 95 | ); 96 | } else if (snapshot.hasError) { 97 | return Text("Error ${snapshot.error}", 98 | style: const TextStyle(color: Colors.red)); 99 | } 100 | return const CircularProgressIndicator(); 101 | }, 102 | ), 103 | )), 104 | ], 105 | ), 106 | ); 107 | } 108 | } 109 | 110 | /// todo: 111 | /// 1. AudioWaveFormWork(2), Contact Picker(1), Location Picker(1), Payment Picker(1) and Sending 112 | /// 2. Contacts(10min) 113 | /// 3. Share(10min), Settings(10min), Passcode(10min) 114 | -------------------------------------------------------------------------------- /lib/views/call_page/call_list_page.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:whatsapp_redesign/constants/colors.dart'; 4 | import 'package:whatsapp_redesign/constants/enums.dart'; 5 | import 'package:whatsapp_redesign/constants/persons.dart'; 6 | import 'package:whatsapp_redesign/models/user.dart'; 7 | import 'package:whatsapp_redesign/views/home_page/widgets/search_bar.dart'; 8 | import 'package:whatsapp_redesign/views/home_page/widgets/status_bar.dart'; 9 | import 'package:whatsapp_redesign/widgets/custom_listtile.dart'; 10 | import 'package:whatsapp_redesign/widgets/gradient_icon_button.dart'; 11 | 12 | class CallListPage extends StatefulWidget { 13 | const CallListPage({Key? key, required this.scrollController}) 14 | : super(key: key); 15 | 16 | final ScrollController scrollController; 17 | 18 | @override 19 | _CallListPageState createState() => _CallListPageState(); 20 | } 21 | 22 | class _CallListPageState extends State { 23 | bool isSearch = false; 24 | TextEditingController controller = TextEditingController(); 25 | List users = []; 26 | 27 | @override 28 | void initState() { 29 | users = persons.map((e) => User.fromJson(e)).toList(); 30 | super.initState(); 31 | } 32 | 33 | @override 34 | Widget build(BuildContext context) { 35 | return Scaffold( 36 | backgroundColor: backgroundColor(context), 37 | floatingActionButton: FloatingActionButton( 38 | onPressed: () {}, 39 | backgroundColor: Colors.transparent, 40 | child: 41 | const GradientIconButton(size: 55, iconData: Icons.phone_forwarded), 42 | ), 43 | body: SafeArea( 44 | child: Column( 45 | children: [ 46 | Column( 47 | mainAxisAlignment: MainAxisAlignment.start, 48 | children: [ 49 | const SizedBox( 50 | height: 26, 51 | ), 52 | Row( 53 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 54 | children: [ 55 | Padding( 56 | padding: const EdgeInsets.only(left: 16.0), 57 | child: Text( 58 | "Calls", 59 | style: TextStyle( 60 | fontSize: 26, 61 | fontWeight: FontWeight.w800, 62 | color: blackColor(context).darkShade), 63 | ), 64 | ), 65 | Padding( 66 | padding: const EdgeInsets.only(right: 16.0), 67 | child: Transform.rotate( 68 | angle: isSearch ? pi * (90 / 360) : 0, 69 | child: IconButton( 70 | icon: 71 | Icon(isSearch ? Icons.add : Icons.search, size: 32), 72 | splashRadius: 20, 73 | onPressed: () { 74 | setState(() { 75 | isSearch = !isSearch; 76 | }); 77 | }, 78 | color: greenColor, 79 | ), 80 | ), 81 | ), 82 | ], 83 | ), 84 | const SizedBox( 85 | height: 10, 86 | ), 87 | isSearch 88 | ? SearchBarWidget(controller: controller) 89 | : StatusBar( 90 | addWidget: false, seeAllWidget: false, statusList: users) 91 | ], 92 | ), 93 | Expanded( 94 | child: ListView.separated( 95 | padding: const EdgeInsets.only(top: 10), 96 | controller: widget.scrollController, 97 | itemCount: users.length, 98 | separatorBuilder: (context, index) { 99 | return const Divider( 100 | thickness: 0.3, 101 | ); 102 | }, 103 | itemBuilder: (context, index) => CustomListTile( 104 | imageUrl: users[index].picture, 105 | participants: [], 106 | title: "${users[index].firstName} ${users[index].lastName}", 107 | subTitle: "May 7, 6:29 PM", 108 | onTap: () {}, 109 | numberOfCalls: 2, 110 | customListTileType: CustomListTileType.call, 111 | callStatus: CallStatus.accepted), 112 | ), 113 | ) 114 | ], 115 | )), 116 | ); 117 | } 118 | } 119 | --------------------------------------------------------------------------------