diff --git a/.metadata b/.metadata index f0274b3..ce66da9 100644 --- a/.metadata +++ b/.metadata @@ -4,7 +4,27 @@ # This file should be version controlled and should not be manually edited. version: - revision: 1aafb3a8b9b0c36241c5f5b34ee914770f015818 - channel: stable + revision: "4cf269e36de2573851eaef3c763994f8f9be494d" + channel: "stable" project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 4cf269e36de2573851eaef3c763994f8f9be494d + base_revision: 4cf269e36de2573851eaef3c763994f8f9be494d + - platform: android + create_revision: 4cf269e36de2573851eaef3c763994f8f9be494d + base_revision: 4cf269e36de2573851eaef3c763994f8f9be494d + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 0000000..0d29021 --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1,28 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/android/.gitignore b/android/.gitignore index 0a741cb..55afd91 100644 --- a/android/.gitignore +++ b/android/.gitignore @@ -7,5 +7,7 @@ gradle-wrapper.jar GeneratedPluginRegistrant.java # Remember to never publicly share your keystore. -# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +# See https://flutter.dev/to/reference-keystore key.properties +**/*.keystore +**/*.jks diff --git a/android/app/build.gradle b/android/app/build.gradle index 3ef2edb..774f8fc 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -1,63 +1,44 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' +plugins { + id "com.android.application" + id "kotlin-android" + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. + id "dev.flutter.flutter-gradle-plugin" } -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - android { - compileSdkVersion 29 + namespace = "com.example.whatsapp_clone_flutter" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion - sourceSets { - main.java.srcDirs += 'src/main/kotlin' + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 } - lintOptions { - disable 'InvalidPackage' + kotlinOptions { + jvmTarget = JavaVersion.VERSION_1_8 } defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.chatapp" - minSdkVersion 21 - targetSdkVersion 29 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName + applicationId = "com.example.whatsapp_clone_flutter" + // You can update the following values to match your application needs. + // For more information, see: https://flutter.dev/to/review-gradle-config. + minSdk = flutter.minSdkVersion + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName } buildTypes { release { // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug + signingConfig = signingConfigs.debug } } } flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + source = "../.." } diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index 05e2050..399f698 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -1,6 +1,6 @@ - - diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 0cc6922..2bba82c 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,25 +1,17 @@ - - - + - + android:label="whatsapp_clone_flutter" + android:name="${applicationName}" + android:icon="@mipmap/ic_launcher"> - - @@ -48,4 +31,15 @@ android:name="flutterEmbedding" android:value="2" /> + + + + + + + diff --git a/android/app/src/main/kotlin/com/example/chatapp/MainActivity.kt b/android/app/src/main/kotlin/com/example/chatapp/MainActivity.kt deleted file mode 100644 index 37930f0..0000000 --- a/android/app/src/main/kotlin/com/example/chatapp/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.chatapp - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/android/app/src/main/kotlin/com/example/whatsapp_clone_flutter/MainActivity.kt b/android/app/src/main/kotlin/com/example/whatsapp_clone_flutter/MainActivity.kt new file mode 100644 index 0000000..a5ca837 --- /dev/null +++ b/android/app/src/main/kotlin/com/example/whatsapp_clone_flutter/MainActivity.kt @@ -0,0 +1,5 @@ +package com.example.whatsapp_clone_flutter + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml index 449a9f9..06952be 100644 --- a/android/app/src/main/res/values-night/styles.xml +++ b/android/app/src/main/res/values-night/styles.xml @@ -3,14 +3,14 @@ - diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml index 05e2050..399f698 100644 --- a/android/app/src/profile/AndroidManifest.xml +++ b/android/app/src/profile/AndroidManifest.xml @@ -1,6 +1,6 @@ - - diff --git a/android/build.gradle b/android/build.gradle index 3100ad2..d2ffbff 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,31 +1,18 @@ -buildscript { - ext.kotlin_version = '1.3.50' - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - allprojects { repositories { google() - jcenter() + mavenCentral() } } -rootProject.buildDir = '../build' +rootProject.buildDir = "../build" subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } subprojects { - project.evaluationDependsOn(':app') + project.evaluationDependsOn(":app") } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/android/gradle.properties b/android/gradle.properties index a673820..2597170 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,4 +1,3 @@ -org.gradle.jvmargs=-Xmx1536M +org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError android.useAndroidX=true android.enableJetifier=true -android.enableR8=true diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 296b146..7bb2df6 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Fri Jun 23 08:50:38 CEST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip diff --git a/android/settings.gradle b/android/settings.gradle index 44e62bc..b9e43bd 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -1,11 +1,25 @@ -include ':app' +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + }() -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "8.1.0" apply false + id "org.jetbrains.kotlin.android" version "1.8.22" apply false +} + +include ":app" diff --git a/android/settings_aar.gradle b/android/settings_aar.gradle deleted file mode 100644 index e7b4def..0000000 --- a/android/settings_aar.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':app' diff --git a/lib/CustomUI/AvtarCard.dart b/lib/CustomUI/AvtarCard.dart index 4a127cb..a2313ec 100644 --- a/lib/CustomUI/AvtarCard.dart +++ b/lib/CustomUI/AvtarCard.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; class AvatarCard extends StatelessWidget { - const AvatarCard({Key key, this.chatModel}) : super(key: key); + const AvatarCard({Key? key, required this.chatModel}) : super(key: key); final ChatModel chatModel; @override diff --git a/lib/CustomUI/ButtonCard.dart b/lib/CustomUI/ButtonCard.dart index eb8e806..f290490 100644 --- a/lib/CustomUI/ButtonCard.dart +++ b/lib/CustomUI/ButtonCard.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; class ButtonCard extends StatelessWidget { - const ButtonCard({Key key, this.name, this.icon}) : super(key: key); final String name; final IconData icon; + const ButtonCard({Key? key, required this.name, required this.icon}) : super(key: key); @override Widget build(BuildContext context) { diff --git a/lib/CustomUI/ContactCard.dart b/lib/CustomUI/ContactCard.dart index 578eda2..b234efc 100644 --- a/lib/CustomUI/ContactCard.dart +++ b/lib/CustomUI/ContactCard.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; class ContactCard extends StatelessWidget { - const ContactCard({Key key, this.contact}) : super(key: key); + const ContactCard({Key? key, required this.contact}) : super(key: key); final ChatModel contact; @override diff --git a/lib/CustomUI/CustomCard.dart b/lib/CustomUI/CustomCard.dart index 3dad360..741e55a 100644 --- a/lib/CustomUI/CustomCard.dart +++ b/lib/CustomUI/CustomCard.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; class CustomCard extends StatelessWidget { - const CustomCard({Key key, this.chatModel, this.sourchat}) : super(key: key); + const CustomCard({Key? key, required this.chatModel, required this.sourchat}) : super(key: key); final ChatModel chatModel; final ChatModel sourchat; diff --git a/lib/CustomUI/OwnMessgaeCrad.dart b/lib/CustomUI/OwnMessgaeCrad.dart index ded3609..5878032 100644 --- a/lib/CustomUI/OwnMessgaeCrad.dart +++ b/lib/CustomUI/OwnMessgaeCrad.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; class OwnMessageCard extends StatelessWidget { - const OwnMessageCard({Key key, this.message, this.time}) : super(key: key); + const OwnMessageCard({Key? key, required this.message, required this.time}) : super(key: key); final String message; final String time; diff --git a/lib/CustomUI/ReplyCard.dart b/lib/CustomUI/ReplyCard.dart index 91554a2..c28e6aa 100644 --- a/lib/CustomUI/ReplyCard.dart +++ b/lib/CustomUI/ReplyCard.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; class ReplyCard extends StatelessWidget { - const ReplyCard({Key key, this.message, this.time}) : super(key: key); + const ReplyCard({Key? key, required this.message, required this.time}) : super(key: key); final String message; final String time; diff --git a/lib/Model/ChatModel.dart b/lib/Model/ChatModel.dart index ae43021..371c0e3 100644 --- a/lib/Model/ChatModel.dart +++ b/lib/Model/ChatModel.dart @@ -1,6 +1,6 @@ class ChatModel { String name; - String icon; + String? icon; bool isGroup; String time; String currentMessage; @@ -8,13 +8,13 @@ class ChatModel { bool select = false; int id; ChatModel({ - this.name, - this.icon, - this.isGroup, - this.time, - this.currentMessage, - this.status, + this.name = "No Name", + this.icon, + this.isGroup = false, + this.time = "No Time", + this.currentMessage = "No Messages", + this.status = "No Status", this.select = false, - this.id, + this.id = 1, }); } diff --git a/lib/Model/MessageModel.dart b/lib/Model/MessageModel.dart index dc5c17a..e1ef2df 100644 --- a/lib/Model/MessageModel.dart +++ b/lib/Model/MessageModel.dart @@ -2,5 +2,5 @@ class MessageModel { String type; String message; String time; - MessageModel({this.message, this.type, this.time}); + MessageModel({required this.message, required this.type, required this.time}); } diff --git a/lib/Pages/CameraPage.dart b/lib/Pages/CameraPage.dart index 8661f05..5d81c0c 100644 --- a/lib/Pages/CameraPage.dart +++ b/lib/Pages/CameraPage.dart @@ -2,7 +2,7 @@ import 'package:chatapp/Screens/CameraScreen.dart'; import 'package:flutter/material.dart'; class CameraPage extends StatelessWidget { - const CameraPage({Key key}) : super(key: key); + const CameraPage({Key? key}) : super(key: key); @override Widget build(BuildContext context) { diff --git a/lib/Pages/ChatPage.dart b/lib/Pages/ChatPage.dart index cfc0959..3e47f8d 100644 --- a/lib/Pages/ChatPage.dart +++ b/lib/Pages/ChatPage.dart @@ -4,7 +4,7 @@ import 'package:chatapp/Screens/SelectContact.dart'; import 'package:flutter/material.dart'; class ChatPage extends StatefulWidget { - ChatPage({Key key, this.chatmodels, this.sourchat}) : super(key: key); + ChatPage({Key? key,required this.chatmodels, required this.sourchat}) : super(key: key); final List chatmodels; final ChatModel sourchat; diff --git a/lib/Screens/CameraScreen.dart b/lib/Screens/CameraScreen.dart index 851603b..19e1089 100644 --- a/lib/Screens/CameraScreen.dart +++ b/lib/Screens/CameraScreen.dart @@ -7,28 +7,34 @@ import 'package:flutter/material.dart'; import 'package:path/path.dart'; import 'package:path_provider/path_provider.dart'; -List cameras; +late List cameras; class CameraScreen extends StatefulWidget { - CameraScreen({Key key}) : super(key: key); + CameraScreen({Key? key}) : super(key: key); @override _CameraScreenState createState() => _CameraScreenState(); } class _CameraScreenState extends State { - CameraController _cameraController; - Future cameraValue; - bool isRecoring = false; + late CameraController _cameraController; + late Future cameraValue; + bool isRecording = false; bool flash = false; - bool iscamerafront = true; + bool isCameraFront = true; double transform = 0; @override void initState() { super.initState(); + _initializeCamera(); + } + + void _initializeCamera() async { + cameras = await availableCameras(); _cameraController = CameraController(cameras[0], ResolutionPreset.high); cameraValue = _cameraController.initialize(); + setState(() {}); } @override @@ -87,14 +93,14 @@ class _CameraScreenState extends State { onLongPress: () async { await _cameraController.startVideoRecording(); setState(() { - isRecoring = true; + isRecording = true; }); }, onLongPressUp: () async { XFile videopath = await _cameraController.stopVideoRecording(); setState(() { - isRecoring = false; + isRecording = false; }); Navigator.push( context, @@ -104,9 +110,9 @@ class _CameraScreenState extends State { ))); }, onTap: () { - if (!isRecoring) takePhoto(context); + if (!isRecording) takePhoto(context); }, - child: isRecoring + child: isRecording ? Icon( Icons.radio_button_on, color: Colors.red, @@ -119,24 +125,26 @@ class _CameraScreenState extends State { ), ), IconButton( - icon: Transform.rotate( - angle: transform, - child: Icon( - Icons.flip_camera_ios, - color: Colors.white, - size: 28, - ), + icon: Transform.rotate( + angle: transform, + child: Icon( + Icons.flip_camera_ios, + color: Colors.white, + size: 28, ), - onPressed: () async { - setState(() { - iscamerafront = !iscamerafront; - transform = transform + pi; - }); - int cameraPos = iscamerafront ? 0 : 1; - _cameraController = CameraController( - cameras[cameraPos], ResolutionPreset.high); - cameraValue = _cameraController.initialize(); - }), + ), + onPressed: () async { + setState(() { + isCameraFront = !isCameraFront; + transform = transform + pi; + }); + int cameraPos = isCameraFront ? 0 : 1; + _cameraController = CameraController( + cameras[cameraPos], ResolutionPreset.high); + cameraValue = _cameraController.initialize(); + setState(() {}); + }, + ), ], ), SizedBox( @@ -161,10 +169,12 @@ class _CameraScreenState extends State { void takePhoto(BuildContext context) async { XFile file = await _cameraController.takePicture(); Navigator.push( - context, - MaterialPageRoute( - builder: (builder) => CameraViewPage( - path: file.path, - ))); + context, + MaterialPageRoute( + builder: (builder) => CameraViewPage( + path: file.path, + ), + ), + ); } } diff --git a/lib/Screens/CameraView.dart b/lib/Screens/CameraView.dart index 6be278e..8f8d875 100644 --- a/lib/Screens/CameraView.dart +++ b/lib/Screens/CameraView.dart @@ -3,7 +3,7 @@ import 'dart:io'; import 'package:flutter/material.dart'; class CameraViewPage extends StatelessWidget { - const CameraViewPage({Key key, this.path}) : super(key: key); + const CameraViewPage({Key? key, required this.path}) : super(key: key); final String path; @override diff --git a/lib/Screens/CreateGroup.dart b/lib/Screens/CreateGroup.dart index bd956b9..88e65fd 100644 --- a/lib/Screens/CreateGroup.dart +++ b/lib/Screens/CreateGroup.dart @@ -5,7 +5,7 @@ import 'package:chatapp/Model/ChatModel.dart'; import 'package:flutter/material.dart'; class CreateGroup extends StatefulWidget { - CreateGroup({Key key}) : super(key: key); + CreateGroup({Key? key}) : super(key: key); @override _CreateGroupState createState() => _CreateGroupState(); @@ -13,7 +13,7 @@ class CreateGroup extends StatefulWidget { class _CreateGroupState extends State { List contacts = [ - ChatModel(name: "Dev Stack", status: "A full stack developer"), + ChatModel(name: "Dev Stack", status: "A full stack developer",), ChatModel(name: "Balram", status: "Flutter Developer..........."), ChatModel(name: "Saket", status: "Web developer..."), ChatModel(name: "Bhanu Dev", status: "App developer...."), diff --git a/lib/Screens/Homescreen.dart b/lib/Screens/Homescreen.dart index 24a5c14..c03b778 100644 --- a/lib/Screens/Homescreen.dart +++ b/lib/Screens/Homescreen.dart @@ -4,7 +4,7 @@ import 'package:chatapp/Pages/ChatPage.dart'; import 'package:flutter/material.dart'; class Homescreen extends StatefulWidget { - Homescreen({Key key, this.chatmodels, this.sourchat}) : super(key: key); + Homescreen({Key? key, required this.chatmodels, required this.sourchat}) : super(key: key); final List chatmodels; final ChatModel sourchat; @@ -14,7 +14,7 @@ class Homescreen extends StatefulWidget { class _HomescreenState extends State with SingleTickerProviderStateMixin { - TabController _controller; + late TabController _controller; @override void initState() { super.initState(); diff --git a/lib/Screens/IndividualPage.dart b/lib/Screens/IndividualPage.dart index e6dad9e..232e704 100644 --- a/lib/Screens/IndividualPage.dart +++ b/lib/Screens/IndividualPage.dart @@ -1,16 +1,14 @@ -// import 'package:camera/camera.dart'; -// import 'package:chatapp/CustomUI/CameraUI.dart'; import 'package:chatapp/CustomUI/OwnMessgaeCrad.dart'; import 'package:chatapp/CustomUI/ReplyCard.dart'; import 'package:chatapp/Model/ChatModel.dart'; import 'package:chatapp/Model/MessageModel.dart'; -import 'package:emoji_picker/emoji_picker.dart'; +import 'package:emoji_picker_flutter/emoji_picker_flutter.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; import 'package:socket_io_client/socket_io_client.dart' as IO; class IndividualPage extends StatefulWidget { - IndividualPage({Key key, this.chatModel, this.sourchat}) : super(key: key); + const IndividualPage({Key? key, required this.chatModel, required this.sourchat}) : super(key: key); final ChatModel chatModel; final ChatModel sourchat; @@ -25,24 +23,24 @@ class _IndividualPageState extends State { List messages = []; TextEditingController _controller = TextEditingController(); ScrollController _scrollController = ScrollController(); - IO.Socket socket; + late IO.Socket socket; + @override void initState() { super.initState(); - // connect(); - - focusNode.addListener(() { - if (focusNode.hasFocus) { - setState(() { - show = false; - }); - } - }); + focusNode.addListener(_onFocusChange); connect(); } + void _onFocusChange() { + if (focusNode.hasFocus) { + setState(() { + show = false; + }); + } + } + void connect() { - // MessageModel messageModel = MessageModel(sourceId: widget.sourceChat.id.toString(),targetId: ); socket = IO.io("http://192.168.0.106:5000", { "transports": ["websocket"], "autoConnect": false, @@ -54,8 +52,7 @@ class _IndividualPageState extends State { socket.on("message", (msg) { print(msg); setMessage("destination", msg["message"]); - _scrollController.animateTo(_scrollController.position.maxScrollExtent, - duration: Duration(milliseconds: 300), curve: Curves.easeOut); + _scrollToBottom(); }); }); print(socket.connected); @@ -63,22 +60,38 @@ class _IndividualPageState extends State { void sendMessage(String message, int sourceId, int targetId) { setMessage("source", message); - socket.emit("message", - {"message": message, "sourceId": sourceId, "targetId": targetId}); + socket.emit("message", {"message": message, "sourceId": sourceId, "targetId": targetId}); } void setMessage(String type, String message) { MessageModel messageModel = MessageModel( - type: type, - message: message, - time: DateTime.now().toString().substring(10, 16)); - print(messages); + type: type, + message: message, + time: DateTime.now().toString().substring(10, 16), + ); setState(() { messages.add(messageModel); }); } + void _scrollToBottom() { + _scrollController.animateTo( + _scrollController.position.maxScrollExtent, + duration: Duration(milliseconds: 300), + curve: Curves.easeOut, + ); + } + + @override + void dispose() { + focusNode.removeListener(_onFocusChange); + focusNode.dispose(); + _controller.dispose(); + socket.dispose(); + super.dispose(); + } + @override Widget build(BuildContext context) { return Stack( @@ -91,281 +104,244 @@ class _IndividualPageState extends State { ), Scaffold( backgroundColor: Colors.transparent, - appBar: PreferredSize( - preferredSize: Size.fromHeight(60), - child: AppBar( - leadingWidth: 70, - titleSpacing: 0, - leading: InkWell( - onTap: () { - Navigator.pop(context); - }, - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Icon( - Icons.arrow_back, - size: 24, - ), - CircleAvatar( - child: SvgPicture.asset( - widget.chatModel.isGroup - ? "assets/groups.svg" - : "assets/person.svg", - color: Colors.white, - height: 36, - width: 36, - ), - radius: 20, - backgroundColor: Colors.blueGrey, - ), - ], - ), - ), - title: InkWell( - onTap: () {}, - child: Container( - margin: EdgeInsets.all(6), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - widget.chatModel.name, - style: TextStyle( - fontSize: 18.5, - fontWeight: FontWeight.bold, - ), - ), - Text( - "last seen today at 12:05", - style: TextStyle( - fontSize: 13, - ), - ) - ], - ), - ), + appBar: _buildAppBar(), + body: _buildBody(), + ), + ], + ); + } + + PreferredSizeWidget _buildAppBar() { + return AppBar( + leadingWidth: 70, + titleSpacing: 0, + leading: InkWell( + onTap: () { + Navigator.pop(context); + }, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon(Icons.arrow_back, size: 24), + CircleAvatar( + child: SvgPicture.asset( + widget.chatModel.isGroup ? "assets/groups.svg" : "assets/person.svg", + color: Colors.white, + height: 36, + width: 36, ), - actions: [ - IconButton(icon: Icon(Icons.videocam), onPressed: () {}), - IconButton(icon: Icon(Icons.call), onPressed: () {}), - PopupMenuButton( - padding: EdgeInsets.all(0), - onSelected: (value) { - print(value); - }, - itemBuilder: (BuildContext contesxt) { - return [ - PopupMenuItem( - child: Text("View Contact"), - value: "View Contact", - ), - PopupMenuItem( - child: Text("Media, links, and docs"), - value: "Media, links, and docs", - ), - PopupMenuItem( - child: Text("Whatsapp Web"), - value: "Whatsapp Web", - ), - PopupMenuItem( - child: Text("Search"), - value: "Search", - ), - PopupMenuItem( - child: Text("Mute Notification"), - value: "Mute Notification", - ), - PopupMenuItem( - child: Text("Wallpaper"), - value: "Wallpaper", - ), - ]; - }, - ), - ], + radius: 20, + backgroundColor: Colors.blueGrey, ), - ), - body: Container( - height: MediaQuery.of(context).size.height, - width: MediaQuery.of(context).size.width, - child: WillPopScope( - child: Column( - children: [ - Expanded( - // height: MediaQuery.of(context).size.height - 150, - child: ListView.builder( - shrinkWrap: true, - controller: _scrollController, - itemCount: messages.length + 1, - itemBuilder: (context, index) { - if (index == messages.length) { - return Container( - height: 70, - ); - } - if (messages[index].type == "source") { - return OwnMessageCard( - message: messages[index].message, - time: messages[index].time, - ); - } else { - return ReplyCard( - message: messages[index].message, - time: messages[index].time, - ); - } - }, - ), - ), - Align( - alignment: Alignment.bottomCenter, - child: Container( - height: 70, - child: Column( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - Row( - children: [ - Container( - width: MediaQuery.of(context).size.width - 60, - child: Card( - margin: EdgeInsets.only( - left: 2, right: 2, bottom: 8), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(25), - ), - child: TextFormField( - controller: _controller, - focusNode: focusNode, - textAlignVertical: TextAlignVertical.center, - keyboardType: TextInputType.multiline, - maxLines: 5, - minLines: 1, - onChanged: (value) { - if (value.length > 0) { - setState(() { - sendButton = true; - }); - } else { - setState(() { - sendButton = false; - }); - } - }, - decoration: InputDecoration( - border: InputBorder.none, - hintText: "Type a message", - hintStyle: TextStyle(color: Colors.grey), - prefixIcon: IconButton( - icon: Icon( - show - ? Icons.keyboard - : Icons.emoji_emotions_outlined, - ), - onPressed: () { - if (!show) { - focusNode.unfocus(); - focusNode.canRequestFocus = false; - } - setState(() { - show = !show; - }); - }, - ), - suffixIcon: Row( - mainAxisSize: MainAxisSize.min, - children: [ - IconButton( - icon: Icon(Icons.attach_file), - onPressed: () { - showModalBottomSheet( - backgroundColor: - Colors.transparent, - context: context, - builder: (builder) => - bottomSheet()); - }, - ), - IconButton( - icon: Icon(Icons.camera_alt), - onPressed: () { - // Navigator.push( - // context, - // MaterialPageRoute( - // builder: (builder) => - // CameraApp())); - }, - ), - ], - ), - contentPadding: EdgeInsets.all(5), - ), - ), - ), - ), - Padding( - padding: const EdgeInsets.only( - bottom: 8, - right: 2, - left: 2, - ), - child: CircleAvatar( - radius: 25, - backgroundColor: Color(0xFF128C7E), - child: IconButton( - icon: Icon( - sendButton ? Icons.send : Icons.mic, - color: Colors.white, - ), - onPressed: () { - if (sendButton) { - _scrollController.animateTo( - _scrollController - .position.maxScrollExtent, - duration: - Duration(milliseconds: 300), - curve: Curves.easeOut); - sendMessage( - _controller.text, - widget.sourchat.id, - widget.chatModel.id); - _controller.clear(); - setState(() { - sendButton = false; - }); - } - }, - ), - ), - ), - ], - ), - show ? emojiSelect() : Container(), - ], - ), - ), - ), - ], + ], + ), + ), + title: InkWell( + onTap: () {}, + child: Container( + margin: EdgeInsets.all(6), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + widget.chatModel.name, + style: TextStyle(fontSize: 18.5, fontWeight: FontWeight.bold), ), - onWillPop: () { - if (show) { - setState(() { - show = false; - }); - } else { - Navigator.pop(context); - } - return Future.value(false); - }, - ), + Text("last seen today at 12:05", style: TextStyle(fontSize: 13)), + ], ), ), + ), + actions: [ + IconButton(icon: Icon(Icons.videocam), onPressed: () {}), + IconButton(icon: Icon(Icons.call), onPressed: () {}), + _buildPopupMenuButton(), ], ); } + Widget _buildPopupMenuButton() { + return PopupMenuButton( + padding: EdgeInsets.all(0), + onSelected: (value) { + print(value); + }, + itemBuilder: (BuildContext context) { + return [ + PopupMenuItem(child: Text("View Contact"), value: "View Contact"), + PopupMenuItem(child: Text("Media, links, and docs"), value: "Media, links, and docs"), + PopupMenuItem(child: Text("Whatsapp Web"), value: "Whatsapp Web"), + PopupMenuItem(child: Text("Search"), value: "Search"), + PopupMenuItem(child: Text("Mute Notification"), value: "Mute Notification"), + PopupMenuItem(child: Text("Wallpaper"), value: "Wallpaper"), + ]; + }, + ); + } + + Widget _buildBody() { + return WillPopScope( + onWillPop: _handleWillPop, + child: Column( + children: [ + Expanded(child: _buildMessageList()), + _buildMessageInput(), + ], + ), + ); + } + + Widget _buildMessageList() { + return ListView.builder( + shrinkWrap: true, + controller: _scrollController, + itemCount: messages.length + 1, + itemBuilder: (context, index) { + if (index == messages.length) { + return Container(height: 70); + } + if (messages[index].type == "source") { + return OwnMessageCard(message: messages[index].message, time: messages[index].time); + } else { + return ReplyCard(message: messages[index].message, time: messages[index].time); + } + }, + ); + } + + Widget _buildMessageInput() { + return Align( + alignment: Alignment.bottomCenter, + child: Container( + height: 70, + child: Column( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + _buildInputRow(), + if (show) emojiSelect(), + ], + ), + ), + ); + } + + Widget _buildInputRow() { + return Row( + children: [ + _buildTextField(), + _buildSendButton(), + ], + ); + } + + Widget _buildTextField() { + return Expanded( + child: Card( + margin: EdgeInsets.only(left: 2, right: 2, bottom: 8), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(25)), + child: TextFormField( + controller: _controller, + focusNode: focusNode, + textAlignVertical: TextAlignVertical.center, + keyboardType: TextInputType.multiline, + maxLines: 5, + minLines: 1, + onChanged: _onMessageChanged, + decoration: InputDecoration( + border: InputBorder.none, + hintText: "Type a message", + hintStyle: TextStyle(color: Colors.grey), + prefixIcon: _buildEmojiButton(), + suffixIcon: _buildAttachmentIcons(), + contentPadding: EdgeInsets.all(5), + ), + ), + ), + ); + } + + Widget _buildEmojiButton() { + return IconButton( + icon: Icon(show ? Icons.keyboard : Icons.emoji_emotions_outlined), + onPressed: () { + if (!show) { + focusNode.unfocus(); + focusNode.canRequestFocus = false; + } + setState(() { + show = !show; + }); + }, + ); + } + + Widget _buildAttachmentIcons() { + return Row( + mainAxisSize: MainAxisSize.min, + children: [ + IconButton( + icon: Icon(Icons.attach_file), + onPressed: _showAttachmentOptions, + ), + IconButton( + icon: Icon(Icons.camera_alt), + onPressed: () {}, + ), + ], + ); + } + + Widget _buildSendButton() { + return Padding( + padding: const EdgeInsets.only(bottom: 8, right: 2, left: 2), + child: CircleAvatar( + radius: 25, + backgroundColor: Color(0xFF128C7E), + child: IconButton( + icon: Icon(sendButton ? Icons.send : Icons.mic, color: Colors.white), + onPressed: _onSendButtonPressed, + ), + ), + ); + } + + void _onMessageChanged(String value) { + setState(() { + sendButton = value.isNotEmpty; + }); + } + + void _onSendButtonPressed() { + if (sendButton) { + _scrollToBottom(); + sendMessage(_controller.text, widget.sourchat.id, widget.chatModel.id); + _controller.clear(); + setState(() { + sendButton = false; + }); + } + } + + Future _handleWillPop() { + if (show) { + setState(() { + show = false; + }); + } else { + Navigator.pop(context); + } + return Future.value(false); + } + + void _showAttachmentOptions() { + showModalBottomSheet( + backgroundColor: Colors.transparent, + context: context, + builder: (builder) => bottomSheet(), + ); + } + Widget bottomSheet() { return Container( height: 278, @@ -380,32 +356,21 @@ class _IndividualPageState extends State { Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - iconCreation( - Icons.insert_drive_file, Colors.indigo, "Document"), - SizedBox( - width: 40, - ), + iconCreation(Icons.insert_drive_file, Colors.indigo, "Document"), + SizedBox(width: 40), iconCreation(Icons.camera_alt, Colors.pink, "Camera"), - SizedBox( - width: 40, - ), + SizedBox(width: 40), iconCreation(Icons.insert_photo, Colors.purple, "Gallery"), ], ), - SizedBox( - height: 30, - ), + SizedBox(height: 30), Row( mainAxisAlignment: MainAxisAlignment.center, children: [ iconCreation(Icons.headset, Colors.orange, "Audio"), - SizedBox( - width: 40, - ), + SizedBox(width: 40), iconCreation(Icons.location_pin, Colors.teal, "Location"), - SizedBox( - width: 40, - ), + SizedBox(width: 40), iconCreation(Icons.person, Colors.blue, "Contact"), ], ), @@ -424,23 +389,10 @@ class _IndividualPageState extends State { CircleAvatar( radius: 30, backgroundColor: color, - child: Icon( - icons, - // semanticLabel: "Help", - size: 29, - color: Colors.white, - ), + child: Icon(icons, size: 29, color: Colors.white), ), - SizedBox( - height: 5, - ), - Text( - text, - style: TextStyle( - fontSize: 12, - // fontWeight: FontWeight.w100, - ), - ) + SizedBox(height: 5), + Text(text, style: TextStyle(fontSize: 12)), ], ), ); @@ -448,13 +400,16 @@ class _IndividualPageState extends State { Widget emojiSelect() { return EmojiPicker( - rows: 4, - columns: 7, - onEmojiSelected: (emoji, category) { - print(emoji); - setState(() { - _controller.text = _controller.text + emoji.emoji; - }); + onEmojiSelected: (category, emoji) { + setState(() { + _controller.text += emoji.emoji; }); + + }, + config: Config( + height: 256, + checkPlatformCompatibility: true, + ), + ); } } diff --git a/lib/Screens/LoginScreen.dart b/lib/Screens/LoginScreen.dart index 81a77d3..1841fc9 100644 --- a/lib/Screens/LoginScreen.dart +++ b/lib/Screens/LoginScreen.dart @@ -4,14 +4,14 @@ import 'package:chatapp/Screens/Homescreen.dart'; import 'package:flutter/material.dart'; class LoginScreen extends StatefulWidget { - LoginScreen({Key key}) : super(key: key); + LoginScreen({Key? key}) : super(key: key); @override _LoginScreenState createState() => _LoginScreenState(); } class _LoginScreenState extends State { - ChatModel sourceChat; + late ChatModel sourceChat; List chatmodels = [ ChatModel( name: "Dev Stack", diff --git a/lib/Screens/SelectContact.dart b/lib/Screens/SelectContact.dart index 85a99d8..c66cab3 100644 --- a/lib/Screens/SelectContact.dart +++ b/lib/Screens/SelectContact.dart @@ -5,7 +5,7 @@ import 'package:chatapp/Screens/CreateGroup.dart'; import 'package:flutter/material.dart'; class SelectContact extends StatefulWidget { - SelectContact({Key key}) : super(key: key); + SelectContact({Key? key}) : super(key: key); @override _SelectContactState createState() => _SelectContactState(); diff --git a/lib/Screens/VideoView.dart b/lib/Screens/VideoView.dart index 9ee1795..c0da9a4 100644 --- a/lib/Screens/VideoView.dart +++ b/lib/Screens/VideoView.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.dart'; import 'package:video_player/video_player.dart'; class VideoViewPage extends StatefulWidget { - const VideoViewPage({Key key, this.path}) : super(key: key); + const VideoViewPage({Key? key, required this.path}) : super(key: key); final String path; @override @@ -12,7 +12,7 @@ class VideoViewPage extends StatefulWidget { } class _VideoViewPageState extends State { - VideoPlayerController _controller; + late VideoPlayerController _controller; @override void initState() { @@ -65,7 +65,7 @@ class _VideoViewPageState extends State { Container( width: MediaQuery.of(context).size.width, height: MediaQuery.of(context).size.height - 150, - child: _controller.value.initialized + child: _controller.value.isInitialized ? AspectRatio( aspectRatio: _controller.value.aspectRatio, child: VideoPlayer(_controller), diff --git a/lib/main.dart b/lib/main.dart index b7a7707..f7057ad 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -4,23 +4,33 @@ import 'package:chatapp/Screens/Homescreen.dart'; import 'package:chatapp/Screens/LoginScreen.dart'; import 'package:flutter/material.dart'; +List? cameras; + Future main() async { WidgetsFlutterBinding.ensureInitialized(); - cameras = await availableCameras(); + try { + cameras = await availableCameras(); + } catch (e) { + print("Kameralar başlatılırken bir hata oluştu: $e"); + // Gerekirse hatayı ele alın + } runApp(MyApp()); } class MyApp extends StatelessWidget { - // This widget is the root of your application. @override Widget build(BuildContext context) { return MaterialApp( theme: ThemeData( - fontFamily: "OpenSans", - primaryColor: Color(0xFF075E54), - accentColor: Color(0xFF128C7E)), + fontFamily: "OpenSans", + primaryColor: Color(0xFF075E54), + colorScheme: ColorScheme.fromSeed( + seedColor: Color(0xFF075E54), + secondary: Color(0xFF128C7E), + ), + ), home: LoginScreen(), ); } diff --git a/pubspec.lock b/pubspec.lock index 32e37cd..3d45a06 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,123 +1,171 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + args: + dependency: transitive + description: + name: args + sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" + url: "https://pub.dev" + source: hosted + version: "2.5.0" async: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" source: hosted - version: "2.5.0" + version: "2.11.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" camera: dependency: "direct main" description: name: camera - url: "https://pub.dartlang.org" + sha256: "26ff41045772153f222ffffecba711a206f670f5834d40ebf5eed3811692f167" + url: "https://pub.dev" source: hosted - version: "0.7.0+2" + version: "0.11.0+2" + camera_android_camerax: + dependency: transitive + description: + name: camera_android_camerax + sha256: "7cd93578ad201dcc6bb5810451fb00d76a86bab9b68dceb68b8cbd7038ac5846" + url: "https://pub.dev" + source: hosted + version: "0.6.8+3" + camera_avfoundation: + dependency: transitive + description: + name: camera_avfoundation + sha256: "7c28969a975a7eb2349bc2cb2dfe3ad218a33dba9968ecfb181ce08c87486655" + url: "https://pub.dev" + source: hosted + version: "0.9.17+3" camera_platform_interface: dependency: transitive description: name: camera_platform_interface - url: "https://pub.dartlang.org" + sha256: b3ede1f171532e0d83111fe0980b46d17f1aa9788a07a2fbed07366bbdbb9061 + url: "https://pub.dev" source: hosted - version: "1.5.0" - characters: + version: "2.8.0" + camera_web: dependency: transitive description: - name: characters - url: "https://pub.dartlang.org" + name: camera_web + sha256: "595f28c89d1fb62d77c73c633193755b781c6d2e0ebcd8dc25b763b514e6ba8f" + url: "https://pub.dev" source: hosted - version: "1.1.0" - charcode: + version: "0.3.5" + characters: dependency: transitive description: - name: charcode - url: "https://pub.dartlang.org" + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" source: hosted - version: "1.15.0" - convert: + version: "1.18.0" + cross_file: dependency: transitive description: - name: convert - url: "https://pub.dartlang.org" + name: cross_file + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" + url: "https://pub.dev" source: hosted - version: "2.1.1" - cross_file: + version: "0.3.4+2" + csslib: dependency: transitive description: - name: cross_file - url: "https://pub.dartlang.org" + name: csslib + sha256: "706b5707578e0c1b4b7550f64078f0a0f19dec3f50a178ffae7006b0a9ca58fb" + url: "https://pub.dev" source: hosted - version: "0.1.0" + version: "1.0.0" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - url: "https://pub.dartlang.org" + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + url: "https://pub.dev" source: hosted - version: "1.0.0" - emoji_picker: + version: "1.0.8" + emoji_picker_flutter: dependency: "direct main" description: - name: emoji_picker - url: "https://pub.dartlang.org" + name: emoji_picker_flutter + sha256: "3bf6d4cadc188215570a15c80fd7aeecec312b1cb3168ab08394e0faa4161fcb" + url: "https://pub.dev" source: hosted - version: "0.1.0" + version: "3.0.0" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.1" ffi: dependency: transitive description: name: ffi - url: "https://pub.dartlang.org" + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" + url: "https://pub.dev" source: hosted - version: "0.1.3" + version: "2.1.3" file: dependency: transitive description: name: file - url: "https://pub.dartlang.org" + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + url: "https://pub.dev" source: hosted - version: "5.2.1" + version: "7.0.0" flutter: dependency: "direct main" description: flutter source: sdk version: "0.0.0" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + sha256: "9ee02950848f61c4129af3d6ec84a1cfc0e47931abc746b03e7a3bc3e8ff6eda" + url: "https://pub.dev" + source: hosted + version: "2.0.22" flutter_svg: dependency: "direct main" description: name: flutter_svg - url: "https://pub.dartlang.org" + sha256: "7b4ca6cf3304575fe9c8ec64813c8d02ee41d2afe60bcfe0678bcb5375d596a2" + url: "https://pub.dev" source: hosted - version: "0.19.3" + version: "2.0.10+1" flutter_test: dependency: "direct dev" description: flutter @@ -128,195 +176,238 @@ packages: description: flutter source: sdk version: "0.0.0" + html: + dependency: transitive + description: + name: html + sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a" + url: "https://pub.dev" + source: hosted + version: "0.15.4" http: dependency: transitive description: name: http - url: "https://pub.dartlang.org" + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 + url: "https://pub.dev" source: hosted - version: "0.12.2" + version: "1.2.2" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.dartlang.org" + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + js: + dependency: transitive + description: + name: js + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + url: "https://pub.dev" source: hosted - version: "3.1.4" - intl: + version: "0.6.7" + leak_tracker: dependency: transitive description: - name: intl - url: "https://pub.dartlang.org" + name: leak_tracker + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + url: "https://pub.dev" source: hosted - version: "0.16.1" - js: + version: "10.0.5" + leak_tracker_flutter_testing: dependency: transitive description: - name: js - url: "https://pub.dartlang.org" + name: leak_tracker_flutter_testing + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + url: "https://pub.dev" source: hosted - version: "0.6.3" + version: "3.0.5" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" logging: dependency: transitive description: name: logging - url: "https://pub.dartlang.org" + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + url: "https://pub.dev" source: hosted - version: "0.11.4" + version: "1.2.0" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" source: hosted - version: "0.12.10" + version: "0.12.16+1" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.15.0" path: dependency: "direct main" description: name: path - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0" - path_drawing: - dependency: transitive - description: - name: path_drawing - url: "https://pub.dartlang.org" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" source: hosted - version: "0.4.1+1" + version: "1.9.0" path_parsing: dependency: transitive description: name: path_parsing - url: "https://pub.dartlang.org" + sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf + url: "https://pub.dev" source: hosted - version: "0.1.4" + version: "1.0.1" path_provider: dependency: "direct main" description: name: path_provider - url: "https://pub.dartlang.org" + sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 + url: "https://pub.dev" source: hosted - version: "1.6.27" - path_provider_linux: + version: "2.1.4" + path_provider_android: dependency: transitive description: - name: path_provider_linux - url: "https://pub.dartlang.org" + name: path_provider_android + sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" + url: "https://pub.dev" source: hosted - version: "0.0.1+2" - path_provider_macos: + version: "2.2.10" + path_provider_foundation: dependency: transitive description: - name: path_provider_macos - url: "https://pub.dartlang.org" + name: path_provider_foundation + sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16 + url: "https://pub.dev" source: hosted - version: "0.0.4+8" + version: "2.4.0" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 + url: "https://pub.dev" + source: hosted + version: "2.2.1" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - url: "https://pub.dartlang.org" + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" + url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "2.1.2" path_provider_windows: dependency: transitive description: name: path_provider_windows - url: "https://pub.dartlang.org" - source: hosted - version: "0.0.4+3" - pedantic: - dependency: transitive - description: - name: pedantic - url: "https://pub.dartlang.org" + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 + url: "https://pub.dev" source: hosted - version: "1.9.2" + version: "2.3.0" petitparser: dependency: transitive description: name: petitparser - url: "https://pub.dartlang.org" + sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 + url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "6.0.2" platform: dependency: transitive description: name: platform - url: "https://pub.dartlang.org" + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" + url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "3.1.5" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.dartlang.org" + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" source: hosted - version: "1.0.3" - process: - dependency: transitive + version: "2.1.8" + shared_preferences: + dependency: "direct main" description: - name: process - url: "https://pub.dartlang.org" + name: shared_preferences + sha256: "746e5369a43170c25816cc472ee016d3a66bc13fcf430c0bc41ad7b4b2922051" + url: "https://pub.dev" source: hosted - version: "3.0.13" - quiver: + version: "2.3.2" + shared_preferences_android: dependency: transitive description: - name: quiver - url: "https://pub.dartlang.org" + name: shared_preferences_android + sha256: "480ba4345773f56acda9abf5f50bd966f581dac5d514e5fc4a18c62976bbba7e" + url: "https://pub.dev" source: hosted - version: "2.1.5" - shared_preferences: - dependency: "direct main" + version: "2.3.2" + shared_preferences_foundation: + dependency: transitive description: - name: shared_preferences - url: "https://pub.dartlang.org" + name: shared_preferences_foundation + sha256: c4b35f6cb8f63c147312c054ce7c2254c8066745125264f0c88739c417fc9d9f + url: "https://pub.dev" source: hosted - version: "0.5.12+4" + version: "2.5.2" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux - url: "https://pub.dartlang.org" + sha256: "580abfd40f415611503cae30adf626e6656dfb2f0cee8f465ece7b6defb40f2f" + url: "https://pub.dev" source: hosted - version: "0.0.2+4" - shared_preferences_macos: - dependency: transitive - description: - name: shared_preferences_macos - url: "https://pub.dartlang.org" - source: hosted - version: "0.0.1+11" + version: "2.4.1" shared_preferences_platform_interface: dependency: transitive description: name: shared_preferences_platform_interface - url: "https://pub.dartlang.org" + sha256: "57cbf196c486bc2cf1f02b85784932c6094376284b3ad5779d1b1c6c6a816b80" + url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "2.4.1" shared_preferences_web: dependency: transitive description: name: shared_preferences_web - url: "https://pub.dartlang.org" + sha256: d2ca4132d3946fec2184261726b355836a82c33d7d5b67af32692aff18a4684e + url: "https://pub.dev" source: hosted - version: "0.1.2+7" + version: "2.4.2" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows - url: "https://pub.dartlang.org" + sha256: "94ef0f72b2d71bc3e700e025db3710911bd51a71cefb65cc609dd0d9a982e3c1" + url: "https://pub.dev" source: hosted - version: "0.0.1+3" + version: "2.4.1" sky_engine: dependency: transitive description: flutter @@ -326,121 +417,186 @@ packages: dependency: "direct main" description: name: socket_io_client - url: "https://pub.dartlang.org" + sha256: ede469f3e4c55e8528b4e023bdedbc20832e8811ab9b61679d1ba3ed5f01f23b + url: "https://pub.dev" source: hosted - version: "0.9.12" + version: "2.0.3+1" socket_io_common: dependency: transitive description: name: socket_io_common - url: "https://pub.dartlang.org" + sha256: "2ab92f8ff3ebbd4b353bf4a98bee45cc157e3255464b2f90f66e09c4472047eb" + url: "https://pub.dev" source: hosted - version: "0.9.2" + version: "2.0.3" source_span: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.10.0" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" stream_transform: dependency: transitive description: name: stream_transform - url: "https://pub.dartlang.org" + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + url: "https://pub.dev" source: hosted - version: "0.2.19" + version: "0.7.2" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.3.2" + vector_graphics: + dependency: transitive + description: + name: vector_graphics + sha256: "32c3c684e02f9bc0afb0ae0aa653337a2fe022e8ab064bcd7ffda27a74e288e3" + url: "https://pub.dev" + source: hosted + version: "1.1.11+1" + vector_graphics_codec: + dependency: transitive + description: + name: vector_graphics_codec + sha256: c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da + url: "https://pub.dev" + source: hosted + version: "1.1.11+1" + vector_graphics_compiler: + dependency: transitive + description: + name: vector_graphics_compiler + sha256: "12faff3f73b1741a36ca7e31b292ddeb629af819ca9efe9953b70bd63fc8cd81" + url: "https://pub.dev" + source: hosted + version: "1.1.11+1" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.4" video_player: dependency: "direct main" description: name: video_player - url: "https://pub.dartlang.org" + sha256: e30df0d226c4ef82e2c150ebf6834b3522cf3f654d8e2f9419d376cdc071425d + url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "2.9.1" + video_player_android: + dependency: transitive + description: + name: video_player_android + sha256: "38d8fe136c427abdce68b5e8c3c08ea29d7a794b453c7a51b12ecfad4aad9437" + url: "https://pub.dev" + source: hosted + version: "2.7.3" + video_player_avfoundation: + dependency: transitive + description: + name: video_player_avfoundation + sha256: d1e9a824f2b324000dc8fb2dcb2a3285b6c1c7c487521c63306cc5b394f68a7c + url: "https://pub.dev" + source: hosted + version: "2.6.1" video_player_platform_interface: dependency: transitive description: name: video_player_platform_interface - url: "https://pub.dartlang.org" + sha256: "236454725fafcacf98f0f39af0d7c7ab2ce84762e3b63f2cbb3ef9a7e0550bc6" + url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "6.2.2" video_player_web: dependency: transitive description: name: video_player_web - url: "https://pub.dartlang.org" + sha256: "6dcdd298136523eaf7dfc31abaf0dfba9aa8a8dbc96670e87e9d42b6f2caf774" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + url: "https://pub.dev" source: hosted - version: "0.1.4+1" - win32: + version: "14.2.5" + web: dependency: transitive description: - name: win32 - url: "https://pub.dartlang.org" + name: web + sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062 + url: "https://pub.dev" source: hosted - version: "1.7.4" + version: "1.0.0" xdg_directories: dependency: transitive description: name: xdg_directories - url: "https://pub.dartlang.org" + sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d + url: "https://pub.dev" source: hosted - version: "0.1.2" + version: "1.0.4" xml: dependency: transitive description: name: xml - url: "https://pub.dartlang.org" + sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 + url: "https://pub.dev" source: hosted - version: "4.5.1" + version: "6.5.0" sdks: - dart: ">=2.12.0-0.0 <3.0.0" - flutter: ">=1.24.0-10.1.pre" + dart: ">=3.5.0 <4.0.0" + flutter: ">=3.24.0" diff --git a/pubspec.yaml b/pubspec.yaml index c2138bd..8d0def5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -18,7 +18,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: ">=2.7.0 <3.0.0" + sdk: ">=2.12.0 <4.0.0" dependencies: flutter: @@ -27,14 +27,15 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.0 - flutter_svg: ^0.19.3 - emoji_picker: ^0.1.0 - shared_preferences: ^0.5.12+4 - camera: ^0.7.0+2 - path_provider: ^1.6.22 + flutter_svg: ^2.0.10+1 + emoji_picker_flutter: ^3.0.0 + + shared_preferences: ^2.3.2 + camera: ^0.11.0+2 + path_provider: ^2.1.4 path: - video_player: ^1.0.1 - socket_io_client: ^0.9.12 + video_player: ^2.9.1 + socket_io_client: ^2.0.3+1 dev_dependencies: flutter_test: sdk: flutter