diff --git a/.gitignore b/.gitignore index 8e0ff9e..173923f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .DS_Store .atom/ .idea/ +.fvm/ .vscode/ **/.fvm/ diff --git a/imessage/.gitignore b/imessage/.gitignore new file mode 100644 index 0000000..0fa6b67 --- /dev/null +++ b/imessage/.gitignore @@ -0,0 +1,46 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +.pub-cache/ +.pub/ +/build/ + +# Web related +lib/generated_plugin_registrant.dart + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/imessage/.metadata b/imessage/.metadata new file mode 100644 index 0000000..5eb35f5 --- /dev/null +++ b/imessage/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: 2a188eeca3653254d6796a7e3e059d40acaca0b7 + channel: master + +project_type: app diff --git a/imessage/README.md b/imessage/README.md new file mode 100644 index 0000000..a480ef0 --- /dev/null +++ b/imessage/README.md @@ -0,0 +1,16 @@ +# imessage + +A new Flutter project. + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) + +For help getting started with Flutter, view our +[online documentation](https://flutter.dev/docs), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/imessage/analysis_options.yaml b/imessage/analysis_options.yaml new file mode 100644 index 0000000..87c1242 --- /dev/null +++ b/imessage/analysis_options.yaml @@ -0,0 +1,62 @@ +include: package:pedantic/analysis_options.yaml + +analyzer: + exclude: + - lib/**/*.g.dart + - example/* + - test/* + +linter: + rules: + # these rules are documented on and in the same order as + # the Dart Lint rules page to make maintenance easier + # https://github.com/dart-lang/linter/blob/master/example/all.yaml + # - always_declare_return_types + # - always_specify_types + # - annotate_overrides + # - avoid_as + - avoid_empty_else + - avoid_init_to_null + - avoid_return_types_on_setters + - avoid_web_libraries_in_flutter + - await_only_futures + - camel_case_types + - cancel_subscriptions + - close_sinks + # - comment_references # we do not presume as to what people want to reference in their dartdocs + # - constant_identifier_names # https://github.com/dart-lang/linter/issues/204 + - control_flow_in_finally + - empty_constructor_bodies + - empty_statements + - hash_and_equals + - implementation_imports + # - invariant_booleans + # - iterable_contains_unrelated_type + - library_names + # - library_prefixes + # - list_remove_unrelated_type + # - literal_only_boolean_expressions + - non_constant_identifier_names + # - one_member_abstracts + # - only_throw_errors + # - overridden_fields + - package_api_docs + - package_names + - package_prefixed_library_names + - prefer_is_not_empty + # - prefer_mixin # https://github.com/dart-lang/language/issues/32 + - public_member_api_docs + - slash_for_doc_comments + # - sort_constructors_first + # - sort_unnamed_constructors_first + # - super_goes_last # no longer needed w/ Dart 2 + - test_types_in_equals + - throw_in_finally + # - type_annotate_public_apis # subset of always_specify_types + - type_init_formals + # - unawaited_futures + - unnecessary_brace_in_string_interps + - unnecessary_getters_setters + - unnecessary_statements + - unrelated_type_equality_checks + - valid_regexps \ No newline at end of file diff --git a/imessage/android/.gitignore b/imessage/android/.gitignore new file mode 100644 index 0000000..0a741cb --- /dev/null +++ b/imessage/android/.gitignore @@ -0,0 +1,11 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties diff --git a/imessage/android/app/build.gradle b/imessage/android/app/build.gradle new file mode 100644 index 0000000..dbbb4d7 --- /dev/null +++ b/imessage/android/app/build.gradle @@ -0,0 +1,59 @@ +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterRoot = localProperties.getProperty('flutter.sdk') +if (flutterRoot == null) { + throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +apply plugin: 'com.android.application' +apply plugin: 'kotlin-android' +apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" + +android { + compileSdkVersion 30 + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "com.example.imessage" + minSdkVersion 16 + targetSdkVersion 30 + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} + +dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" +} diff --git a/imessage/android/app/src/debug/AndroidManifest.xml b/imessage/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..a0ad68e --- /dev/null +++ b/imessage/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/imessage/android/app/src/main/AndroidManifest.xml b/imessage/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..b06bbaf --- /dev/null +++ b/imessage/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + diff --git a/imessage/android/app/src/main/kotlin/com/example/imessage/MainActivity.kt b/imessage/android/app/src/main/kotlin/com/example/imessage/MainActivity.kt new file mode 100644 index 0000000..814cc25 --- /dev/null +++ b/imessage/android/app/src/main/kotlin/com/example/imessage/MainActivity.kt @@ -0,0 +1,6 @@ +package com.example.imessage + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/imessage/android/app/src/main/res/drawable-v21/launch_background.xml b/imessage/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000..f74085f --- /dev/null +++ b/imessage/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/imessage/android/app/src/main/res/drawable/launch_background.xml b/imessage/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000..304732f --- /dev/null +++ b/imessage/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/imessage/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/imessage/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..db77bb4 Binary files /dev/null and b/imessage/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/imessage/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/imessage/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..17987b7 Binary files /dev/null and b/imessage/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/imessage/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/imessage/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..09d4391 Binary files /dev/null and b/imessage/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/imessage/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/imessage/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..d5f1c8d Binary files /dev/null and b/imessage/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/imessage/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/imessage/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..4d6372e Binary files /dev/null and b/imessage/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/imessage/android/app/src/main/res/values-night/styles.xml b/imessage/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000..449a9f9 --- /dev/null +++ b/imessage/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/imessage/android/app/src/main/res/values/styles.xml b/imessage/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..d74aa35 --- /dev/null +++ b/imessage/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/imessage/android/app/src/profile/AndroidManifest.xml b/imessage/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000..a0ad68e --- /dev/null +++ b/imessage/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/imessage/android/build.gradle b/imessage/android/build.gradle new file mode 100644 index 0000000..c505a86 --- /dev/null +++ b/imessage/android/build.gradle @@ -0,0 +1,31 @@ +buildscript { + ext.kotlin_version = '1.3.50' + repositories { + google() + jcenter() + } + + dependencies { + classpath 'com.android.tools.build:gradle:4.1.0' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + jcenter() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/imessage/android/gradle.properties b/imessage/android/gradle.properties new file mode 100644 index 0000000..94adc3a --- /dev/null +++ b/imessage/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx1536M +android.useAndroidX=true +android.enableJetifier=true diff --git a/imessage/android/gradle/wrapper/gradle-wrapper.properties b/imessage/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..bc6a58a --- /dev/null +++ b/imessage/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#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-6.7-all.zip diff --git a/imessage/android/settings.gradle b/imessage/android/settings.gradle new file mode 100644 index 0000000..44e62bc --- /dev/null +++ b/imessage/android/settings.gradle @@ -0,0 +1,11 @@ +include ':app' + +def localPropertiesFile = new File(rootProject.projectDir, "local.properties") +def properties = new Properties() + +assert localPropertiesFile.exists() +localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } + +def flutterSdkPath = properties.getProperty("flutter.sdk") +assert flutterSdkPath != null, "flutter.sdk not set in local.properties" +apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/imessage/ios/.gitignore b/imessage/ios/.gitignore new file mode 100644 index 0000000..e96ef60 --- /dev/null +++ b/imessage/ios/.gitignore @@ -0,0 +1,32 @@ +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/imessage/ios/Flutter/AppFrameworkInfo.plist b/imessage/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 0000000..9367d48 --- /dev/null +++ b/imessage/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 8.0 + + diff --git a/imessage/ios/Flutter/Debug.xcconfig b/imessage/ios/Flutter/Debug.xcconfig new file mode 100644 index 0000000..96e9085 --- /dev/null +++ b/imessage/ios/Flutter/Debug.xcconfig @@ -0,0 +1,3 @@ +#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "Generated.xcconfig" diff --git a/imessage/ios/Flutter/Release.xcconfig b/imessage/ios/Flutter/Release.xcconfig new file mode 100644 index 0000000..388e6ff --- /dev/null +++ b/imessage/ios/Flutter/Release.xcconfig @@ -0,0 +1,3 @@ +#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "Generated.xcconfig" diff --git a/imessage/ios/Runner.xcodeproj/project.pbxproj b/imessage/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000..b1cf8af --- /dev/null +++ b/imessage/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,580 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 54127ED34F2B67975767881F /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F124A271054C4FEB7BA298EA /* Pods_Runner.framework */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 1DFBF673D502906C56E28E7F /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7851D9CF8A0104A48AF22BF4 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + F124A271054C4FEB7BA298EA /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + F6E360FB0F19A8EE63C4281A /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 54127ED34F2B67975767881F /* Pods_Runner.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 053DC9E602F5F5F21DC144A5 /* Frameworks */ = { + isa = PBXGroup; + children = ( + F124A271054C4FEB7BA298EA /* Pods_Runner.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 15FB9768D11A361EAB687B81 /* Pods */ = { + isa = PBXGroup; + children = ( + 1DFBF673D502906C56E28E7F /* Pods-Runner.debug.xcconfig */, + 7851D9CF8A0104A48AF22BF4 /* Pods-Runner.release.xcconfig */, + F6E360FB0F19A8EE63C4281A /* Pods-Runner.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 15FB9768D11A361EAB687B81 /* Pods */, + 053DC9E602F5F5F21DC144A5 /* Frameworks */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + F8BE585E4B71465AB994DDE3 /* [CP] Check Pods Manifest.lock */, + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + FF3AE7DF11C51CD94F69B7CD /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1020; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; + F8BE585E4B71465AB994DDE3 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + FF3AE7DF11C51CD94F69B7CD /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/DKImagePickerController/DKImagePickerController.framework", + "${BUILT_PRODUCTS_DIR}/DKPhotoGallery/DKPhotoGallery.framework", + "${BUILT_PRODUCTS_DIR}/FMDB/FMDB.framework", + "${PODS_ROOT}/../Flutter/Flutter.framework", + "${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyGif/SwiftyGif.framework", + "${BUILT_PRODUCTS_DIR}/esys_flutter_share/esys_flutter_share.framework", + "${BUILT_PRODUCTS_DIR}/file_picker/file_picker.framework", + "${BUILT_PRODUCTS_DIR}/flutter_app_badger/flutter_app_badger.framework", + "${BUILT_PRODUCTS_DIR}/flutter_keyboard_visibility/flutter_keyboard_visibility.framework", + "${BUILT_PRODUCTS_DIR}/image_gallery_saver/image_gallery_saver.framework", + "${BUILT_PRODUCTS_DIR}/image_picker/image_picker.framework", + "${BUILT_PRODUCTS_DIR}/libwebp/libwebp.framework", + "${BUILT_PRODUCTS_DIR}/path_provider/path_provider.framework", + "${BUILT_PRODUCTS_DIR}/photo_manager/photo_manager.framework", + "${BUILT_PRODUCTS_DIR}/sqflite/sqflite.framework", + "${BUILT_PRODUCTS_DIR}/url_launcher/url_launcher.framework", + "${BUILT_PRODUCTS_DIR}/video_compress/video_compress.framework", + "${BUILT_PRODUCTS_DIR}/video_player/video_player.framework", + "${BUILT_PRODUCTS_DIR}/video_thumbnail/video_thumbnail.framework", + "${BUILT_PRODUCTS_DIR}/wakelock/wakelock.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DKImagePickerController.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DKPhotoGallery.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FMDB.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyGif.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/esys_flutter_share.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/file_picker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_app_badger.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_keyboard_visibility.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/image_gallery_saver.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/image_picker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libwebp.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/photo_manager.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/sqflite.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/video_compress.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/video_player.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/video_thumbnail.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/wakelock.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.example.imessage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.example.imessage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.example.imessage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/imessage/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/imessage/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/imessage/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/imessage/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/imessage/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/imessage/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/imessage/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/imessage/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/imessage/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/imessage/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/imessage/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000..a28140c --- /dev/null +++ b/imessage/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/imessage/ios/Runner.xcworkspace/contents.xcworkspacedata b/imessage/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..21a3cc1 --- /dev/null +++ b/imessage/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/imessage/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/imessage/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/imessage/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/imessage/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/imessage/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/imessage/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/imessage/ios/Runner/AppDelegate.swift b/imessage/ios/Runner/AppDelegate.swift new file mode 100644 index 0000000..70693e4 --- /dev/null +++ b/imessage/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d36b1fa --- /dev/null +++ b/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000..dc9ada4 Binary files /dev/null and b/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 0000000..28c6bf0 Binary files /dev/null and b/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000..2ccbfd9 Binary files /dev/null and b/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000..f091b6b Binary files /dev/null and b/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000..4cde121 Binary files /dev/null and b/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000..d0ef06e Binary files /dev/null and b/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 0000000..dcdc230 Binary files /dev/null and b/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 0000000..2ccbfd9 Binary files /dev/null and b/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000..c8f9ed8 Binary files /dev/null and b/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000..a6d6b86 Binary files /dev/null and b/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000..a6d6b86 Binary files /dev/null and b/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000..75b2d16 Binary files /dev/null and b/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000..c4df70d Binary files /dev/null and b/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 0000000..6a84f41 Binary files /dev/null and b/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000..d0e1f58 Binary files /dev/null and b/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/imessage/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/imessage/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 0000000..0bedcf2 --- /dev/null +++ b/imessage/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/imessage/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/imessage/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/imessage/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/imessage/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/imessage/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/imessage/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/imessage/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/imessage/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/imessage/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/imessage/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/imessage/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 0000000..89c2725 --- /dev/null +++ b/imessage/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/imessage/ios/Runner/Base.lproj/LaunchScreen.storyboard b/imessage/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..f2e259c --- /dev/null +++ b/imessage/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/imessage/ios/Runner/Base.lproj/Main.storyboard b/imessage/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 0000000..f3c2851 --- /dev/null +++ b/imessage/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/imessage/ios/Runner/Info.plist b/imessage/ios/Runner/Info.plist new file mode 100644 index 0000000..1686983 --- /dev/null +++ b/imessage/ios/Runner/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + imessage + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + + diff --git a/imessage/ios/Runner/Runner-Bridging-Header.h b/imessage/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 0000000..308a2a5 --- /dev/null +++ b/imessage/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/imessage/lib/channel_image.dart b/imessage/lib/channel_image.dart new file mode 100644 index 0000000..65b23ff --- /dev/null +++ b/imessage/lib/channel_image.dart @@ -0,0 +1,25 @@ +import 'package:flutter/cupertino.dart'; +import 'package:stream_chat_flutter/stream_chat_flutter.dart' show Channel; + +import 'package:imessage/utils.dart'; + +class ChannelImage extends StatelessWidget { + const ChannelImage({Key key, @required this.channel, @required this.size}) + : super(key: key); + + final Channel channel; + final double size; + + @override + Widget build(BuildContext context) { + final avatarUrl = channel.extraData.containsKey('image') && + (channel.extraData['image'] as String).isNotEmpty + ? channel.extraData['image'] as String + : 'https://4.bp.blogspot.com/-Jx21kNqFSTU/UXemtqPhZCI/AAAAAAAAh74/BMGSzpU6F48/s1600/funny-cat-pictures-047-001.jpg'; + + return CupertinoCircleAvatar( + size: size, + url: avatarUrl, + ); + } +} diff --git a/imessage/lib/channel_list_view.dart b/imessage/lib/channel_list_view.dart new file mode 100644 index 0000000..1ae04a4 --- /dev/null +++ b/imessage/lib/channel_list_view.dart @@ -0,0 +1,51 @@ +import 'package:flutter/cupertino.dart'; +import 'package:imessage/channel_preview.dart'; +import 'package:imessage/message_page.dart'; +import 'package:animations/animations.dart'; +import 'package:stream_chat_flutter/stream_chat_flutter.dart' + show Channel, StreamChannel; + +class ChannelListView extends StatelessWidget { + const ChannelListView({Key key, @required this.channels}) : super(key: key); + final List channels; + @override + Widget build(BuildContext context) { + channels.removeWhere((channel) => channel.lastMessageAt == null); + return SliverList( + delegate: SliverChildBuilderDelegate( + (BuildContext context, int index) { + //TODO: separators + return Column( + children: [ + ChannelPreview( + channel: channels[index], + onTap: () { + Navigator.push( + context, + PageRouteBuilder( + pageBuilder: (_, __, ___) => StreamChannel( + channel: channels[index], + child: MessagePage(), + ), + transitionsBuilder: ( + _, + animation, + secondaryAnimation, + child, + ) => + SharedAxisTransition( + child: child, + animation: animation, + secondaryAnimation: secondaryAnimation, + transitionType: SharedAxisTransitionType.horizontal, + ), + )); + }) + ], + ); + }, + childCount: channels.length, + ), + ); + } +} diff --git a/imessage/lib/channel_name_text.dart b/imessage/lib/channel_name_text.dart new file mode 100644 index 0000000..a733f85 --- /dev/null +++ b/imessage/lib/channel_name_text.dart @@ -0,0 +1,21 @@ +import 'package:flutter/cupertino.dart'; +import 'package:stream_chat_flutter/stream_chat_flutter.dart' show Channel; + +class ChannelNameText extends StatelessWidget { + const ChannelNameText({Key key, @required this.channel, this.size = 12}) + : super(key: key); + + final Channel channel; + final double size; + + @override + Widget build(BuildContext context) { + return Text( + channel.extraData['name'] as String ?? channel.config.name, + style: TextStyle( + fontSize: size, + fontWeight: FontWeight.bold, + color: CupertinoColors.black), + ); + } +} diff --git a/imessage/lib/channel_page_appbar.dart b/imessage/lib/channel_page_appbar.dart new file mode 100644 index 0000000..f991829 --- /dev/null +++ b/imessage/lib/channel_page_appbar.dart @@ -0,0 +1,14 @@ +import 'package:flutter/cupertino.dart'; + +class ChannelPageAppBar extends StatelessWidget { + const ChannelPageAppBar({ + Key key, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return CupertinoSliverNavigationBar( + largeTitle: Text('Messages'), + ); + } +} diff --git a/imessage/lib/channel_preview.dart b/imessage/lib/channel_preview.dart new file mode 100644 index 0000000..bc61db3 --- /dev/null +++ b/imessage/lib/channel_preview.dart @@ -0,0 +1,97 @@ +import 'package:flutter/cupertino.dart'; +import 'package:imessage/channel_image.dart'; +import 'package:imessage/channel_name_text.dart'; +import 'package:imessage/utils.dart'; +import 'package:stream_chat_flutter/stream_chat_flutter.dart' show Channel; + +import 'utils.dart'; + +class ChannelPreview extends StatelessWidget { + final VoidCallback onTap; + final Channel channel; + const ChannelPreview({ + Key key, + @required this.onTap, + @required this.channel, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + final lastMessage = + channel.state.messages.isNotEmpty ? channel.state.messages.last : null; + + final prefix = lastMessage?.attachments != null + ? lastMessage?.attachments //TODO: ugly + ?.map((e) { + if (e.type == 'image') { + return '📷'; + } else if (e.type == 'video') { + return '🎬'; + } + return null; + }) + ?.where((e) => e != null) + ?.join(' ') + : ''; + return GestureDetector( + onTap: onTap, + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 16.0, horizontal: 8.0), + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(5), + color: CupertinoColors.white), + child: Row( + children: [ + ChannelImage(channel: channel, size: 50), + Expanded( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Padding( + padding: + const EdgeInsets.symmetric(horizontal: 8.0), + child: ChannelNameText( + channel: channel, + ), + ), + Padding( + padding: + const EdgeInsets.symmetric(horizontal: 8.0), + child: Text( + isSameWeek(channel.lastMessageAt) + ? formatDateSameWeek(channel.lastMessageAt) + : formatDate(channel.lastMessageAt), + style: TextStyle( + fontWeight: FontWeight.bold, + color: CupertinoColors.systemGrey), + ), + ) + ], + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + '$prefix ${lastMessage?.text ?? ''}', + style: TextStyle( + fontWeight: FontWeight.normal, + color: CupertinoColors.systemGrey), + overflow: TextOverflow.ellipsis, + ), + ), + ], + ), + ), + ) + ], + ), + ), + ), + ); + } +} diff --git a/imessage/lib/cutom_painter.dart b/imessage/lib/cutom_painter.dart new file mode 100644 index 0000000..4437fc3 --- /dev/null +++ b/imessage/lib/cutom_painter.dart @@ -0,0 +1,84 @@ +import 'package:flutter/cupertino.dart'; + +class ChatBubble extends CustomPainter { + final Color color; + final Alignment alignment; + + ChatBubble({ + @required this.color, + this.alignment, + }); + + final _radius = 10.0; + final _x = 10.0; + + @override + void paint(Canvas canvas, Size size) { + if (alignment == Alignment.topRight) { + canvas.drawRRect( + RRect.fromLTRBAndCorners( + 0, + 0, + size.width - 8, + size.height, + bottomLeft: Radius.circular(_radius), + topRight: Radius.circular(_radius), + topLeft: Radius.circular(_radius), + ), + Paint() + ..color = color + ..style = PaintingStyle.fill); + var path = Path(); + path.moveTo(size.width - _x, size.height - 20); + path.lineTo(size.width - _x, size.height); + path.lineTo(size.width, size.height); + canvas.clipPath(path); + canvas.drawRRect( + RRect.fromLTRBAndCorners( + size.width - _x, + 0.0, + size.width, + size.height, + topRight: Radius.circular(_radius), + ), + Paint() + ..color = color + ..style = PaintingStyle.fill); + } else { + canvas.drawRRect( + RRect.fromLTRBAndCorners( + _x, + 0, + size.width, + size.height, + bottomRight: Radius.circular(_radius), + topRight: Radius.circular(_radius), + topLeft: Radius.circular(_radius), + ), + Paint() + ..color = color + ..style = PaintingStyle.fill); + var path = Path(); + path.moveTo(0, size.height); + path.lineTo(_x, size.height); + path.lineTo(_x, size.height - 20); + canvas.clipPath(path); + canvas.drawRRect( + RRect.fromLTRBAndCorners( + 0, + 0.0, + _x, + size.height, + topRight: Radius.circular(_radius), + ), + Paint() + ..color = color + ..style = PaintingStyle.fill); + } + } + + @override + bool shouldRepaint(CustomPainter oldDelegate) { + return true; + } +} diff --git a/imessage/lib/main.dart b/imessage/lib/main.dart new file mode 100644 index 0000000..b74c149 --- /dev/null +++ b/imessage/lib/main.dart @@ -0,0 +1,120 @@ +import 'package:flutter/cupertino.dart'; +import 'package:intl/date_symbol_data_local.dart'; +import 'package:stream_chat_flutter/stream_chat_flutter.dart' + show + Channel, + ChannelListController, + ChannelListCore, + ChannelsBloc, + LazyLoadScrollView, + Level, + PaginationParams, + SortOption, + StreamChatClient, + StreamChatCore, + User; + +import 'package:imessage/channel_list_view.dart'; + +import 'package:imessage/channel_page_appbar.dart'; + +Future main() async { + WidgetsFlutterBinding.ensureInitialized(); + final client = StreamChatClient('b67pax5b2wdq', logLevel: Level.INFO); // + await client.connectUser( + User( + id: 'cool-shadow-7', + extraData: { + 'image': + 'https://getstream.io/random_png/?id=cool-shadow-7&name=Cool+shadow', + }, + ), + 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiY29vbC1zaGFkb3ctNyJ9.gkOlCRb1qgy4joHPaxFwPOdXcGvSPvp6QY0S4mpRkVo', + ); + + runApp(IMessage(client: client)); +} + +class IMessage extends StatelessWidget { + final StreamChatClient client; + IMessage({@required this.client}); + @override + Widget build(BuildContext context) { + initializeDateFormatting('en_US', null); + return CupertinoApp( + title: 'Flutter Demo', + theme: CupertinoThemeData(brightness: Brightness.light), + home: StreamChatCore(client: client, child: ChatLoader()), + ); + } +} + +class ChatLoader extends StatelessWidget { + const ChatLoader({ + Key key, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + final user = StreamChatCore.of(context).user; + var channelListController = ChannelListController(); + return CupertinoPageScaffold( + child: ChannelsBloc( + child: ChannelListCore( + channelListController: channelListController, + filter: { + r'$and': [ + { + 'members': { + r'$in': [user.id], + } + }, + { + 'type': { + r'$eq': 'messaging', + } + } + ] + }, + sort: [SortOption('last_message_at')], + pagination: PaginationParams( + limit: 20, + ), + emptyBuilder: (BuildContext context) { + return Center( + child: Text('Looks like you are not in any channels'), + ); + }, + loadingBuilder: (BuildContext context) { + return Center( + child: SizedBox( + height: 100.0, + width: 100.0, + child: CupertinoActivityIndicator(), + ), + ); + }, + errorBuilder: (BuildContext context, dynamic error) { + return Center( + child: Text( + 'Oh no, something went wrong. Please check your config.'), + ); + }, + listBuilder: ( + BuildContext context, + List channels, + ) => + LazyLoadScrollView( + onEndOfPage: () async { + channelListController.paginateData(); + }, + child: CustomScrollView(slivers: [ + CupertinoSliverRefreshControl(onRefresh: () async { + channelListController.loadData(); + }), + ChannelPageAppBar(), + ChannelListView(channels: channels) + ]), + )))); + } +} diff --git a/imessage/lib/message_header.dart b/imessage/lib/message_header.dart new file mode 100644 index 0000000..4ad170f --- /dev/null +++ b/imessage/lib/message_header.dart @@ -0,0 +1,24 @@ +import 'package:flutter/cupertino.dart'; + +import 'package:imessage/utils.dart'; + +class MessageHeader extends StatelessWidget { + final String rawTimeStamp; + const MessageHeader({Key key, @required this.rawTimeStamp}) : super(key: key); + + @override + Widget build(BuildContext context) { + final receivedAt = DateTime.parse(rawTimeStamp); + var textStyle = TextStyle( + fontWeight: FontWeight.bold, color: CupertinoColors.systemGrey); + return isSameWeek(receivedAt) + ? Text( + formatDateSameWeek(receivedAt), + style: textStyle, + ) + : Text( + formatDate(receivedAt), + style: textStyle, + ); + } +} diff --git a/imessage/lib/message_input.dart b/imessage/lib/message_input.dart new file mode 100644 index 0000000..284db8e --- /dev/null +++ b/imessage/lib/message_input.dart @@ -0,0 +1,96 @@ +import 'dart:io'; + +import 'package:flutter/cupertino.dart'; +import 'package:image_picker/image_picker.dart'; +import 'package:stream_chat_flutter/stream_chat_flutter.dart' + show Attachment, AttachmentFile, Message, MultipartFile, StreamChannel; + +class MessageInput extends StatefulWidget { + const MessageInput({ + Key key, + }) : super(key: key); + + @override + _MessageInputState createState() => _MessageInputState(); +} + +class _MessageInputState extends State { + final textController = TextEditingController(); + File _image; + final picker = ImagePicker(); + + @override + Widget build(BuildContext context) { + return Align( + alignment: FractionalOffset.bottomCenter, + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 8.0, vertical: 32.0), + child: Row( + children: [ + GestureDetector( + onTap: () async { + final pickedFile = + await picker.getImage(source: ImageSource.gallery); + final bytes = await File(pickedFile.path).readAsBytes(); + final channel = StreamChannel.of(context).channel; + final message = + Message(text: textController.value.text, attachments: [ + Attachment( + type: 'image', + file: AttachmentFile(bytes: bytes, path: pickedFile.path), + ), + ]); + await channel.sendMessage(message); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Icon( + CupertinoIcons.camera_fill, + color: CupertinoColors.systemGrey, + size: 35, + ), + ), + ), + Expanded( + child: CupertinoTextField( + controller: textController, + onSubmitted: (input) async { + await sendMessage(context, input); + }, + placeholder: 'Text Message', + prefix: Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + "") //trick to add padding around placeholder iMessage text + ), + suffix: GestureDetector( + onTap: () async { + if (textController.value.text.isNotEmpty) { + await sendMessage(context, textController.value.text); + textController.clear(); + } + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Icon(CupertinoIcons.arrow_up_circle_fill, + color: CupertinoColors.activeGreen, size: 35), + ), + ), + decoration: BoxDecoration( + border: Border.all( + color: CupertinoColors.systemGrey, + ), + borderRadius: BorderRadius.all(Radius.circular(35))), + ), + ), + ], + ), + ), + ); + } + + Future sendMessage(BuildContext context, String input) async { + final streamChannel = StreamChannel.of(context); + await streamChannel.channel.sendMessage(Message(text: input)); + } +} diff --git a/imessage/lib/message_list_view.dart b/imessage/lib/message_list_view.dart new file mode 100644 index 0000000..6e73a7a --- /dev/null +++ b/imessage/lib/message_list_view.dart @@ -0,0 +1,69 @@ +import 'package:collection/collection.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:imessage/message_header.dart'; +import 'package:imessage/message_input.dart'; +import 'package:imessage/message_widget.dart'; +import 'package:stream_chat_flutter/stream_chat_flutter.dart' + show Message, StreamChatCore; + +class MessageListView extends StatelessWidget { + const MessageListView({Key key, this.messages}) : super(key: key); + final List messages; + + @override + Widget build(BuildContext context) { + final entries = groupBy(messages.reversed, + (Message message) => message.createdAt.toString().substring(0, 10)) + .entries + .toList(); + return Stack( + children: [ + SizedBox( + height: MediaQuery.of(context).size.height * 0.9, + child: Align( + alignment: FractionalOffset.topCenter, + child: ListView.builder( + shrinkWrap: true, + itemCount: entries.length, + itemBuilder: (context, index) { + + return Column( + children: [ + Padding( + padding: + const EdgeInsets.fromLTRB(8.0, 24.0, 8.0, 8.0), + child: MessageHeader( + rawTimeStamp: entries[index].key), //date + ), + ...entries[index].value //messages + .map((message) { + return MessageWidget( + alignment: isReceived(message, context) + ? Alignment.centerLeft + : Alignment.topRight, + color: isReceived(message, context) + ? CupertinoColors.systemGrey5 + : CupertinoColors.systemBlue, + messageColor: isReceived(message, context) + ? CupertinoColors.black + : CupertinoColors.white, + message: message, + ); + }).toList() + ], + ); + }), + )), + MessageInput() + ], + ); + } + + bool isReceived(Message message, BuildContext context) { + final currentUserId = StreamChatCore.of(context).user.id; + return message.user.id == currentUserId; + } + + bool isSameDay(Message message) => + message.createdAt.day == DateTime.now().day; +} diff --git a/imessage/lib/message_page.dart b/imessage/lib/message_page.dart new file mode 100644 index 0000000..800710e --- /dev/null +++ b/imessage/lib/message_page.dart @@ -0,0 +1,58 @@ +import 'package:flutter/cupertino.dart'; +import 'package:imessage/message_list_view.dart'; +import 'package:stream_chat_flutter/stream_chat_flutter.dart' + show + LazyLoadScrollView, + MessageListController, + MessageListCore, + StreamChannel, + StreamChatCore; + +import 'package:imessage/channel_image.dart'; +import 'package:imessage/channel_name_text.dart'; + +class MessagePage extends StatelessWidget { + @override + Widget build(BuildContext context) { + final streamChannel = StreamChannel.of(context); + + var messageListController = MessageListController(); + return CupertinoPageScaffold( + navigationBar: CupertinoNavigationBar( + middle: Column( + children: [ + ChannelImage(size: 25, channel: streamChannel.channel), + ChannelNameText(channel: streamChannel.channel) + ], + ), + ), //ChannelHeader + child: StreamChatCore( + client: streamChannel.channel.client, + child: MessageListCore( + messageListController: messageListController, + loadingBuilder: (context) { + return Center( + child: CupertinoActivityIndicator(), + ); + }, + errorWidgetBuilder: (context, err) { + return Center( + child: Text('Error'), + ); + }, + emptyBuilder: (context) { + return Center( + child: Text('Nothing here...'), + ); + }, + messageListBuilder: (context, messages) => LazyLoadScrollView( + onStartOfPage: () async { + messageListController.paginateData(); + }, + child: MessageListView( + messages: messages, + ), + ))), + ); + } +} diff --git a/imessage/lib/message_widget.dart b/imessage/lib/message_widget.dart new file mode 100644 index 0000000..f2c594c --- /dev/null +++ b/imessage/lib/message_widget.dart @@ -0,0 +1,151 @@ +import 'package:cached_network_image/cached_network_image.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:imessage/cutom_painter.dart'; +import 'package:stream_chat_flutter/stream_chat_flutter.dart' show Message, AttachmentUploadStateBuilder; + +class MessageWidget extends StatelessWidget { + final Alignment alignment; + final Message message; + final Color color; + final Color messageColor; + + const MessageWidget( + {Key key, + @required this.alignment, + @required this.message, + @required this.color, + @required this.messageColor}) + : super(key: key); + + @override + Widget build(BuildContext context) { + if (message.attachments.isNotEmpty && + message.attachments.first.type == "image") { + return MessageImage( + color: color, message: message, messageColor: messageColor); + } else { + return MessageText( + alignment: alignment, + color: color, + message: message, + messageColor: messageColor); + } + } +} + +class MessageImage extends StatelessWidget { + const MessageImage({ + Key key, + @required this.color, + @required this.message, + @required this.messageColor, + }) : super(key: key); + + final Color color; + final Message message; + final Color messageColor; + + @override + Widget build(BuildContext context) { + if (message.text != null) { + return Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + children: [ + ClipRRect( + borderRadius: BorderRadius.circular(20), + child: Container( + color: color, + child: Column( + children: [ + + FutureBuilder( //hack: //AttachmentUploadStateBuilder once https://github.com/GetStream/stream-chat-flutter/pull/276 is merged + future: Future.delayed( + const Duration(seconds: 5), + () => + message.attachments.first.thumbUrl ?? + message.attachments.first.imageUrl ?? + message.attachments.first.assetUrl), + builder: (context, snapshot) { + return snapshot.hasData + ? CachedNetworkImage( + imageUrl: snapshot.data, + ) + : CupertinoActivityIndicator(); + }), + if (message.attachments.first?.title != null) + Padding( + padding: const EdgeInsets.all(8.0), + child: Text(message.attachments.first.title, + style: TextStyle(color: messageColor)), + ), + message.attachments.first.pretext != null + ? Text(message.attachments.first.pretext) + : Container() + ], + ), + ), + ) + ], + ), + ); + } else { + return ClipRRect( + borderRadius: BorderRadius.circular(20), + child: Container( + color: color, + child: CachedNetworkImage( + imageUrl: message.attachments.first.thumbUrl, + )), + ); + } + } +} + +class MessageText extends StatelessWidget { + const MessageText({ + Key key, + @required this.alignment, + @required this.color, + @required this.message, + @required this.messageColor, + }) : super(key: key); + + final Alignment alignment; + final Color color; + final Message message; + final Color messageColor; + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(8.0), + child: Align( + alignment: + alignment, //Change this to Alignment.topRight or Alignment.topLeft + child: CustomPaint( + painter: ChatBubble(color: color, alignment: alignment), + child: Container( + margin: const EdgeInsets.fromLTRB(16.0, 8.0, 16.0, 8.0), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + constraints: BoxConstraints( + maxWidth: MediaQuery.of(context).size.width * 0.65), + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Text( + message.text, + style: TextStyle(color: messageColor), + ), + ), + ), + ], + ), + ), + ), + ), + ); + } +} diff --git a/imessage/lib/utils.dart b/imessage/lib/utils.dart new file mode 100644 index 0000000..e290597 --- /dev/null +++ b/imessage/lib/utils.dart @@ -0,0 +1,45 @@ +import 'package:cached_network_image/cached_network_image.dart'; +import 'package:intl/intl.dart'; +import 'package:flutter/cupertino.dart'; + +String formatDate(DateTime date) { + final dateFormat = DateFormat.yMd().add_jm(); + return dateFormat.format(date); +} + +String formatDateSameWeek(DateTime date) { + final dateFormat = DateFormat('EEEE, hh:mm a'); + return dateFormat.format(date); +} + +String formatDateMessage(DateTime date) { + final dateFormat = + DateFormat('EEE. MMM. d ' 'yy' ' hh:mm a'); + return dateFormat.format(date); +} + +bool isSameWeek(DateTime timestamp) => + DateTime.now().difference(timestamp).inDays < 7; + +class CupertinoCircleAvatar extends StatelessWidget { + final String url; + final double size; + const CupertinoCircleAvatar({Key key, this.url, this.size}) : super(key: key); + + @override + Widget build(BuildContext context) { + return ClipRRect( + borderRadius: BorderRadius.circular(size / 2), + child: CachedNetworkImage( + imageUrl: url, + height: size, + width: size, + fit: BoxFit.cover, + errorWidget: (context, url, error) { //TODO: this crash the app when getting 404 and in debug mode, see :https://github.com/Baseflow/flutter_cached_network_image/issues/504 + return CachedNetworkImage( + imageUrl: + "https://4.bp.blogspot.com/-Jx21kNqFSTU/UXemtqPhZCI/AAAAAAAAh74/BMGSzpU6F48/s1600/funny-cat-pictures-047-001.jpg"); + }), + ); + } +} diff --git a/imessage/pubspec.yaml b/imessage/pubspec.yaml new file mode 100644 index 0000000..fd78b13 --- /dev/null +++ b/imessage/pubspec.yaml @@ -0,0 +1,81 @@ +name: imessage +description: A new Flutter project. + +# The following line prevents the package from being accidentally published to +# pub.dev using `pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +# The following defines the version and build number for your application. +# A version number is three numbers separated by dots, like 1.2.43 +# followed by an optional build number separated by a +. +# Both the version and the builder number may be overridden in flutter +# build by specifying --build-name and --build-number, respectively. +# In Android, build-name is used as versionName while build-number used as versionCode. +# Read more about Android versioning at https://developer.android.com/studio/publish/versioning +# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. +# Read more about iOS versioning at +# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html +version: 1.0.0+1 + +environment: + sdk: ">=2.7.0 <3.0.0" + +dependencies: + flutter: + sdk: flutter + intl: ^0.16.1 + stream_chat_flutter: ^1.2.0-beta + animations: ^1.0.0+5 + collection: ^1.14.13 + cached_network_image: ^2.0.0-rc + + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.0 + +dev_dependencies: + flutter_test: + sdk: flutter + pedantic: ^1.9.0 +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware. + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/assets-and-images/#from-packages + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/custom-fonts/#from-packages diff --git a/imessage/test/widget_test.dart b/imessage/test/widget_test.dart new file mode 100644 index 0000000..af87e7c --- /dev/null +++ b/imessage/test/widget_test.dart @@ -0,0 +1,30 @@ +// This is a basic Flutter widget test. +// +// To perform an interaction with a widget in your test, use the WidgetTester +// utility that Flutter provides. For example, you can send tap and scroll +// gestures. You can also use WidgetTester to find child widgets in the widget +// tree, read text, and verify that the values of widget properties are correct. + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'package:imessage/main.dart'; + +void main() { + testWidgets('Counter increments smoke test', (WidgetTester tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(IMessage()); + + // Verify that our counter starts at 0. + expect(find.text('0'), findsOneWidget); + expect(find.text('1'), findsNothing); + + // Tap the '+' icon and trigger a frame. + await tester.tap(find.byIcon(Icons.add)); + await tester.pump(); + + // Verify that our counter has incremented. + expect(find.text('0'), findsNothing); + expect(find.text('1'), findsOneWidget); + }); +}