├── .github ├── no-response.yml └── workflows │ ├── build.yml │ └── build_nightly.yml ├── .gitignore ├── LICENSE ├── README.md ├── images ├── imessage_clone_hero_v1.png └── sdk_hero_v4.png └── packages ├── chatty ├── .gitignore ├── .metadata ├── LICENSE ├── README.md ├── android │ ├── .gitignore │ ├── app │ │ ├── build.gradle │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── diegoveloper │ │ │ │ │ └── fluchat │ │ │ │ │ └── MainActivity.kt │ │ │ └── res │ │ │ │ ├── drawable │ │ │ │ └── launch_background.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ └── values │ │ │ │ └── styles.xml │ │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ ├── settings.gradle │ └── settings_aar.gradle ├── art │ └── fluchat.png ├── assets │ ├── icon-bottom-right.png │ ├── icon-google.png │ ├── icon-top-right.png │ └── logo.png ├── ios │ ├── .gitignore │ ├── Flutter │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ └── Release.xcconfig │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── Runner │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ └── LaunchImage.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ └── README.md │ │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ │ ├── Info.plist │ │ └── Runner-Bridging-Header.h ├── lib │ ├── data │ │ ├── auth_repository.dart │ │ ├── image_picker_repository.dart │ │ ├── local │ │ │ ├── auth_local_impl.dart │ │ │ ├── image_picker_impl.dart │ │ │ ├── persistent_storage_local_impl.dart │ │ │ ├── stream_api_local_impl.dart │ │ │ └── upload_storage_local_impl.dart │ │ ├── persistent_storage_repository.dart │ │ ├── prod │ │ │ ├── auth_impl.dart │ │ │ ├── persistent_storage_impl.dart │ │ │ ├── stream_api_impl.dart │ │ │ └── upload_storage_impl.dart │ │ ├── stream_api_repository.dart │ │ └── upload_storage_repository.dart │ ├── dependencies.dart │ ├── domain │ │ ├── exceptions │ │ │ └── auth_exception.dart │ │ ├── models │ │ │ ├── auth_user.dart │ │ │ └── chat_user.dart │ │ └── usecases │ │ │ ├── create_group_usecase.dart │ │ │ ├── login_usecase.dart │ │ │ ├── logout_usecase.dart │ │ │ └── profile_sign_in_usecase.dart │ ├── main.dart │ ├── navigator_utils.dart │ └── ui │ │ ├── app_theme_cubit.dart │ │ ├── common │ │ ├── avatar_image_view.dart │ │ ├── initial_background_view.dart │ │ ├── loading_view.dart │ │ └── my_channel_preview.dart │ │ ├── home │ │ ├── chat │ │ │ ├── chat_view.dart │ │ │ └── selection │ │ │ │ ├── friends_selection_cubit.dart │ │ │ │ ├── friends_selection_view.dart │ │ │ │ ├── group_selection_cubit.dart │ │ │ │ └── group_selection_view.dart │ │ ├── home_cubit.dart │ │ ├── home_view.dart │ │ └── settings │ │ │ ├── settings_cubit.dart │ │ │ └── settings_view.dart │ │ ├── profile_verify │ │ ├── profile_verify_cubit.dart │ │ └── profile_verify_view.dart │ │ ├── sign_in │ │ ├── sign_in_cubit.dart │ │ └── sign_in_view.dart │ │ ├── splash │ │ ├── splash_cubit.dart │ │ └── splash_view.dart │ │ └── themes.dart └── pubspec.yaml ├── imessage ├── .gitignore ├── .metadata ├── README.md ├── analysis_options.yaml ├── android │ ├── .gitignore │ ├── app │ │ ├── build.gradle │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── imessage │ │ │ │ │ └── MainActivity.kt │ │ │ └── res │ │ │ │ ├── drawable-v21 │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable │ │ │ │ └── launch_background.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── values-night │ │ │ │ └── styles.xml │ │ │ │ └── values │ │ │ │ └── styles.xml │ │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ └── settings.gradle ├── ios │ ├── .gitignore │ ├── Flutter │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ └── Release.xcconfig │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── Runner │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ └── LaunchImage.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ └── README.md │ │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ │ ├── Info.plist │ │ └── Runner-Bridging-Header.h ├── lib │ ├── channel_image.dart │ ├── channel_list_view.dart │ ├── channel_name_text.dart │ ├── channel_page_appbar.dart │ ├── channel_preview.dart │ ├── cutom_painter.dart │ ├── main.dart │ ├── message_header.dart │ ├── message_input.dart │ ├── message_list_view.dart │ ├── message_page.dart │ ├── message_widget.dart │ └── utils.dart └── pubspec.yaml └── stream_chat_v1 ├── .gitignore ├── .metadata ├── README.md ├── analysis_options.yaml ├── android ├── .gitignore ├── app │ ├── build.gradle │ ├── debug.keystore │ ├── google-services.json │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── example │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable-anydpi-v24 │ │ │ ├── ic_notification.xml │ │ │ └── ic_notification_in_app.xml │ │ │ ├── drawable-hdpi │ │ │ ├── ic_launcher_background.png │ │ │ ├── ic_launcher_foreground.png │ │ │ ├── ic_notification.png │ │ │ └── ic_notification_in_app.png │ │ │ ├── drawable-mdpi │ │ │ ├── ic_launcher_background.png │ │ │ ├── ic_launcher_foreground.png │ │ │ ├── ic_notification.png │ │ │ └── ic_notification_in_app.png │ │ │ ├── drawable-v21 │ │ │ └── launch_background.xml │ │ │ ├── drawable-xhdpi │ │ │ ├── ic_launcher_background.png │ │ │ ├── ic_launcher_foreground.png │ │ │ ├── ic_notification.png │ │ │ └── ic_notification_in_app.png │ │ │ ├── drawable-xxhdpi │ │ │ ├── ic_launcher_background.png │ │ │ ├── ic_launcher_foreground.png │ │ │ ├── ic_notification.png │ │ │ └── ic_notification_in_app.png │ │ │ ├── drawable-xxxhdpi │ │ │ ├── ic_launcher_background.png │ │ │ └── ic_launcher_foreground.png │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ └── ic_launcher.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── values-night │ │ │ └── styles.xml │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── settings.gradle └── settings_aar.gradle ├── assets ├── floating_boat.json ├── ic_launcher.png ├── ic_launcher_background.png ├── ic_launcher_foreground.png ├── icon_arrow_right.svg └── logo.svg ├── ios ├── .gitignore ├── .ruby-version ├── Flutter │ ├── .last_build_id │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Gemfile ├── Gemfile.lock ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── xcschemes │ │ ├── Notifications.xcscheme │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings ├── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-50x50@1x.png │ │ │ ├── Icon-App-50x50@2x.png │ │ │ ├── Icon-App-57x57@1x.png │ │ │ ├── Icon-App-57x57@2x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-72x72@1x.png │ │ │ ├── Icon-App-72x72@2x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ ├── LaunchBackground.imageset │ │ │ ├── Contents.json │ │ │ └── background.png │ │ └── LaunchImage.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ └── README.md │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── GoogleService-Info.plist │ ├── Info.plist │ ├── Runner-Bridging-Header.h │ └── Runner.entitlements ├── fastlane │ ├── Appfile │ ├── Fastfile │ ├── Matchfile │ ├── Pluginfile │ ├── README.md │ ├── beta_gym_export_options.plist │ ├── report.xml │ └── testflight_gym_export_options.plist └── firebase_app_id_file.json ├── lib ├── app.dart ├── firebase_options.dart ├── main.dart ├── pages │ ├── advanced_options_page.dart │ ├── channel_file_display_screen.dart │ ├── channel_list_page.dart │ ├── channel_media_display_screen.dart │ ├── channel_page.dart │ ├── chat_info_screen.dart │ ├── choose_user_page.dart │ ├── group_chat_details_screen.dart │ ├── group_info_screen.dart │ ├── new_chat_screen.dart │ ├── new_group_chat_screen.dart │ ├── pinned_messages_screen.dart │ ├── splash_screen.dart │ ├── thread_list_page.dart │ ├── thread_page.dart │ └── user_mentions_page.dart ├── routes │ ├── app_routes.dart │ └── routes.dart ├── state │ ├── init_data.dart │ └── new_group_chat_state.dart ├── utils │ ├── app_config.dart │ ├── local_notification_observer.dart │ ├── localizations.dart │ └── notifications_service.dart └── widgets │ ├── channel_list.dart │ ├── chips_input_text_field.dart │ ├── search_text_field.dart │ └── stream_version.dart ├── macos ├── .gitignore ├── Flutter │ ├── Flutter-Debug.xcconfig │ └── Flutter-Release.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── app_icon_1024.png │ │ │ ├── app_icon_128.png │ │ │ ├── app_icon_16.png │ │ │ ├── app_icon_256.png │ │ │ ├── app_icon_32.png │ │ │ ├── app_icon_512.png │ │ │ └── app_icon_64.png │ ├── Base.lproj │ │ └── MainMenu.xib │ ├── Configs │ │ ├── AppInfo.xcconfig │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ └── Warnings.xcconfig │ ├── DebugProfile.entitlements │ ├── GoogleService-Info.plist │ ├── Info.plist │ ├── MainFlutterWindow.swift │ ├── Release.entitlements │ └── RunnerDebug.entitlements └── firebase_app_id_file.json ├── pubspec.yaml ├── pubspec_overrides.yaml └── web ├── favicon.png ├── icons ├── Icon-192.png ├── Icon-512.png ├── Icon-maskable-192.png └── Icon-maskable-512.png ├── index.html ├── manifest.json ├── sql-wasm.js └── sql-wasm.wasm /.github/no-response.yml: -------------------------------------------------------------------------------- 1 | # Configuration for probot-no-response - https://github.com/probot/no-response 2 | 3 | # Number of days of inactivity before an issue is closed for lack of response. 4 | daysUntilClose: 7 5 | 6 | # Label requiring a response. 7 | responseRequiredLabel: "waiting for customer response" 8 | 9 | # Comment to post when closing an Issue for lack of response. Set to `false` to disable 10 | closeComment: > 11 | Without additional information, we are unfortunately not sure how to 12 | resolve this issue. We are therefore reluctantly going to close this 13 | bug for now. Please don't hesitate to comment on the bug if you have 14 | any more information for us; we will reopen it right away! 15 | Thanks for your contribution. -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .atom/ 3 | .idea/ 4 | .fvm/ 5 | .vscode/ 6 | **/.fvm/ 7 | 8 | .packages 9 | .pub/ 10 | .dart_tool/ 11 | pubspec.lock 12 | flutter_export_environment.sh 13 | 14 | examples/all_plugins/pubspec.yaml 15 | 16 | Podfile 17 | Podfile.lock 18 | Pods/ 19 | .symlinks/ 20 | **/Flutter/App.framework/ 21 | **/Flutter/ephemeral/ 22 | **/Flutter/Flutter.framework/ 23 | **/Flutter/Generated.xcconfig 24 | **/Flutter/flutter_assets/ 25 | 26 | ServiceDefinitions.json 27 | xcuserdata/ 28 | **/DerivedData/ 29 | 30 | local.properties 31 | keystore.properties 32 | .gradle/ 33 | gradlew 34 | gradlew.bat 35 | gradle-wrapper.jar 36 | .flutter-plugins-dependencies 37 | *.iml 38 | **/android/app/.cxx/ 39 | 40 | generated_plugin_registrant.dart 41 | GeneratedPluginRegistrant.h 42 | GeneratedPluginRegistrant.m 43 | GeneratedPluginRegistrant.java 44 | GeneratedPluginRegistrant.swift 45 | build/ 46 | .flutter-plugins 47 | 48 | .project 49 | .classpath 50 | .settings 51 | /.fvm 52 | 53 | .melos_tool/ 54 | /packages/flutter_widgets/example/ios/Flutter/.last_build_id 55 | /packages/dart_client/example/ios/Flutter/.last_build_id 56 | /packages/dart_client/example/ios/Runner.xcodeproj/project.pbxproj 57 | 58 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Stream 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /images/imessage_clone_hero_v1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/images/imessage_clone_hero_v1.png -------------------------------------------------------------------------------- /images/sdk_hero_v4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/images/sdk_hero_v4.png -------------------------------------------------------------------------------- /packages/chatty/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | ios/Runner/GoogleService-Info.plist 43 | android/app/google-services.json 44 | -------------------------------------------------------------------------------- /packages/chatty/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 9b2d32b605630f28625709ebd9d78ab3016b2bf6 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /packages/chatty/LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2021, Diego Velásquez López 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | 3. Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /packages/chatty/README.md: -------------------------------------------------------------------------------- 1 | # Stream Chatty 2 | 3 | ⚠️ **Attention**: This example is no longer maintained. It uses older versions of our packages and was tested on an older version of Flutter. 4 | 5 | --- 6 | 7 | Stream Chatty is a sample chat app made in Flutter using [Stream Chat](https://getstream.io/chat/sdk/flutter/), [Firebase](https://firebase.google.com/), and [flutter_bloc](https://bloclibrary.dev/#/). It has full light and dark mode support, real-time chat, and full authentication using Firebase auth. 8 | 9 | Stream Chatty was created by [Diego Velasquez](http://www.twitter.com/diegoveloper) as part of a Youtube series. A step by step guide to building Stream Chatty from scratch can be found here: 10 | 11 | - Part 1 - https://www.youtube.com/watch?v=H7FjCWHmP9Y => Project Structure, StreamChat, flutter_bloc 12 | - Part 2 - https://www.youtube.com/watch?v=xGXvgrA_vNY => Clean Architecture, dependency injection, auth, storage, chat 13 | - Part 3 - https://www.youtube.com/watch?v=EVvGdFc4SvQ => UI/UX, customizing StreamChat and demo 14 | 15 | > Activate English subtitles 16 | 17 | # Image 18 | 19 | ![design](art/fluchat.png?raw=true "Stream Chatty") 20 | 21 | 22 | # Design 23 | 24 | - https://dribbble.com/shots/15263978-Fluchat 25 | - https://projects.invisionapp.com/prototype/Chat-App-cklk8tiia002tqz01u0q1u3cl/play/9ef3ca44 26 | 27 | # Diego's Networks 28 | 29 | - www.twitter.com/diegoveloper 30 | - www.youtube.com/diegoveloper 31 | 32 | ## Features 33 | 34 | - Login using Firebase Auth and Google Sign In 35 | - Upload pictures using Firebase Storage 36 | - Realtime chat using StreamChat package 37 | - Dark mode/Light mode 38 | - State Management using flutter_bloc and cubits 39 | 40 | ## Installation 41 | 42 | - Clone project 43 | - Configure Firebase (google-services.json and Google-Service.info.plist files) 44 | - Configure Google Sign In 45 | - Configure your Stream project 46 | -------------------------------------------------------------------------------- /packages/chatty/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | -------------------------------------------------------------------------------- /packages/chatty/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion 29 30 | 31 | sourceSets { 32 | main.java.srcDirs += 'src/main/kotlin' 33 | } 34 | 35 | lintOptions { 36 | disable 'InvalidPackage' 37 | checkReleaseBuilds false 38 | } 39 | 40 | defaultConfig { 41 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 42 | applicationId "com.diegoveloper.fluchat" 43 | minSdkVersion 26 44 | targetSdkVersion 29 45 | versionCode flutterVersionCode.toInteger() 46 | versionName flutterVersionName 47 | } 48 | 49 | buildTypes { 50 | release { 51 | // TODO: Add your own signing config for the release build. 52 | // Signing with the debug keys for now, so `flutter run --release` works. 53 | signingConfig signingConfigs.debug 54 | minifyEnabled false 55 | useProguard false 56 | shrinkResources false 57 | } 58 | } 59 | } 60 | 61 | flutter { 62 | source '../..' 63 | } 64 | 65 | dependencies { 66 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 67 | } 68 | 69 | apply plugin: 'com.google.gms.google-services' -------------------------------------------------------------------------------- /packages/chatty/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/chatty/android/app/src/main/kotlin/com/diegoveloper/fluchat/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.diegoveloper.fluchat 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /packages/chatty/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /packages/chatty/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/chatty/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/chatty/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/chatty/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/chatty/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/chatty/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/chatty/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/chatty/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/chatty/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/chatty/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/chatty/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /packages/chatty/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/chatty/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.0.1' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | classpath 'com.google.gms:google-services:4.3.3' 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | google() 18 | jcenter() 19 | } 20 | } 21 | 22 | rootProject.buildDir = '../build' 23 | subprojects { 24 | project.buildDir = "${rootProject.buildDir}/${project.name}" 25 | } 26 | subprojects { 27 | project.evaluationDependsOn(':app') 28 | } 29 | 30 | task clean(type: Delete) { 31 | delete rootProject.buildDir 32 | } 33 | -------------------------------------------------------------------------------- /packages/chatty/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | android.enableR8=true 5 | -------------------------------------------------------------------------------- /packages/chatty/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip 7 | -------------------------------------------------------------------------------- /packages/chatty/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /packages/chatty/android/settings_aar.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /packages/chatty/art/fluchat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/chatty/art/fluchat.png -------------------------------------------------------------------------------- /packages/chatty/assets/icon-bottom-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/chatty/assets/icon-bottom-right.png -------------------------------------------------------------------------------- /packages/chatty/assets/icon-google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/chatty/assets/icon-google.png -------------------------------------------------------------------------------- /packages/chatty/assets/icon-top-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/chatty/assets/icon-top-right.png -------------------------------------------------------------------------------- /packages/chatty/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/chatty/assets/logo.png -------------------------------------------------------------------------------- /packages/chatty/ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /packages/chatty/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 12.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /packages/chatty/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /packages/chatty/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /packages/chatty/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/chatty/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/chatty/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/chatty/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /packages/chatty/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/chatty/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/chatty/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/chatty/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/chatty/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /packages/chatty/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/chatty/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /packages/chatty/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/chatty/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /packages/chatty/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/chatty/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /packages/chatty/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/chatty/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /packages/chatty/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/chatty/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /packages/chatty/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/chatty/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /packages/chatty/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/chatty/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /packages/chatty/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/chatty/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /packages/chatty/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/chatty/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /packages/chatty/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/chatty/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /packages/chatty/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/chatty/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /packages/chatty/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/chatty/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /packages/chatty/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/chatty/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /packages/chatty/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/chatty/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /packages/chatty/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /packages/chatty/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/chatty/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /packages/chatty/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/chatty/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /packages/chatty/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/chatty/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /packages/chatty/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /packages/chatty/ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /packages/chatty/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /packages/chatty/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | Chatty 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleURLTypes 22 | 23 | 24 | CFBundleTypeRole 25 | Editor 26 | CFBundleURLSchemes 27 | 28 | com.googleusercontent.apps.880353337418-6ogtdb83ub9sjfovcv2k98dte87fmpnv 29 | 30 | 31 | 32 | CFBundleVersion 33 | $(FLUTTER_BUILD_NUMBER) 34 | LSRequiresIPhoneOS 35 | 36 | NSCameraUsageDescription 37 | Used to demonstrate image picker plugin 38 | NSMicrophoneUsageDescription 39 | Used to capture audio for image picker plugin 40 | NSPhotoLibraryUsageDescription 41 | Used to demonstrate image picker plugin 42 | UILaunchStoryboardName 43 | LaunchScreen 44 | UIMainStoryboardFile 45 | Main 46 | UISupportedInterfaceOrientations 47 | 48 | UIInterfaceOrientationPortrait 49 | UIInterfaceOrientationLandscapeLeft 50 | UIInterfaceOrientationLandscapeRight 51 | 52 | UISupportedInterfaceOrientations~ipad 53 | 54 | UIInterfaceOrientationPortrait 55 | UIInterfaceOrientationPortraitUpsideDown 56 | UIInterfaceOrientationLandscapeLeft 57 | UIInterfaceOrientationLandscapeRight 58 | 59 | UIViewControllerBasedStatusBarAppearance 60 | 61 | CADisableMinimumFrameDurationOnPhone 62 | 63 | UIApplicationSupportsIndirectInputEvents 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /packages/chatty/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /packages/chatty/lib/data/auth_repository.dart: -------------------------------------------------------------------------------- 1 | import 'package:stream_chatter/domain/models/auth_user.dart'; 2 | 3 | abstract class AuthRepository { 4 | Future getAuthUser(); 5 | Future signIn(); 6 | Future logout(); 7 | } 8 | -------------------------------------------------------------------------------- /packages/chatty/lib/data/image_picker_repository.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | abstract class ImagePickerRepository { 4 | Future pickImage(); 5 | } 6 | -------------------------------------------------------------------------------- /packages/chatty/lib/data/local/auth_local_impl.dart: -------------------------------------------------------------------------------- 1 | import 'package:stream_chatter/data/auth_repository.dart'; 2 | import 'package:stream_chatter/domain/models/auth_user.dart'; 3 | 4 | class AuthLocalImpl extends AuthRepository { 5 | @override 6 | Future getAuthUser() async { 7 | await Future.delayed(const Duration(seconds: 2)); 8 | return AuthUser('diego'); 9 | } 10 | 11 | @override 12 | Future signIn() async { 13 | await Future.delayed(const Duration(seconds: 2)); 14 | return AuthUser('diego'); 15 | } 16 | 17 | @override 18 | Future logout() async { 19 | return; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /packages/chatty/lib/data/local/image_picker_impl.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | import 'package:image_picker/image_picker.dart'; 3 | import 'package:stream_chatter/data/image_picker_repository.dart'; 4 | 5 | class ImagePickerImpl extends ImagePickerRepository { 6 | @override 7 | Future pickImage() async { 8 | final picker = ImagePicker(); 9 | final pickedFile = await picker.pickImage( 10 | source: ImageSource.gallery, 11 | maxWidth: 400, 12 | ); 13 | 14 | if (pickedFile == null) { 15 | return null; 16 | } 17 | 18 | return File(pickedFile.path); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /packages/chatty/lib/data/local/persistent_storage_local_impl.dart: -------------------------------------------------------------------------------- 1 | import 'package:stream_chatter/data/persistent_storage_repository.dart'; 2 | 3 | class PersistentStorageLocalImpl extends PersistentStorageRepository { 4 | @override 5 | Future isDarkMode() async { 6 | await Future.delayed(const Duration(milliseconds: 50)); 7 | return false; 8 | } 9 | 10 | @override 11 | Future updateDarkMode(bool isDarkMode) async { 12 | await Future.delayed(const Duration(milliseconds: 50)); 13 | return; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/chatty/lib/data/local/upload_storage_local_impl.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:stream_chatter/data/upload_storage_repository.dart'; 4 | 5 | class UploadStorageLocalImpl extends UploadStorageRepository { 6 | @override 7 | Future uploadPhoto(File? file, String path) async { 8 | return 'https://lh3.googleusercontent.com/a-/AOh14GjhqGZ-V7tNXS1pOIp9vbBij4OS9JbzxXgxgy1t=s600-k-no-rp-mo'; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/chatty/lib/data/persistent_storage_repository.dart: -------------------------------------------------------------------------------- 1 | abstract class PersistentStorageRepository { 2 | Future isDarkMode(); 3 | Future updateDarkMode(bool isDarkMode); 4 | } 5 | -------------------------------------------------------------------------------- /packages/chatty/lib/data/prod/auth_impl.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_auth/firebase_auth.dart'; 2 | import 'package:stream_chatter/data/auth_repository.dart'; 3 | import 'package:stream_chatter/domain/models/auth_user.dart'; 4 | import 'package:google_sign_in/google_sign_in.dart'; 5 | 6 | class AuthImpl extends AuthRepository { 7 | FirebaseAuth _auth = FirebaseAuth.instance; 8 | 9 | @override 10 | Future getAuthUser() async { 11 | final user = _auth.currentUser; 12 | if (user != null) { 13 | return AuthUser(user.uid); 14 | } 15 | return null; 16 | } 17 | 18 | @override 19 | Future signIn() async { 20 | try { 21 | UserCredential userCredential; 22 | final GoogleSignInAccount? googleUser = await GoogleSignIn().signIn(); 23 | 24 | if (googleUser == null) { 25 | throw Exception('login error'); 26 | } 27 | 28 | final GoogleSignInAuthentication googleAuth = 29 | await googleUser.authentication; 30 | final GoogleAuthCredential googleAuthCredential = 31 | GoogleAuthProvider.credential( 32 | accessToken: googleAuth.accessToken, 33 | idToken: googleAuth.idToken, 34 | ) as GoogleAuthCredential; 35 | userCredential = await _auth.signInWithCredential(googleAuthCredential); 36 | final user = userCredential.user!; 37 | return AuthUser(user.uid); 38 | } catch (e) { 39 | print(e); 40 | throw Exception('login error'); 41 | } 42 | } 43 | 44 | @override 45 | Future logout() async { 46 | return _auth.signOut(); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /packages/chatty/lib/data/prod/persistent_storage_impl.dart: -------------------------------------------------------------------------------- 1 | import 'package:stream_chatter/data/persistent_storage_repository.dart'; 2 | import 'package:shared_preferences/shared_preferences.dart'; 3 | 4 | const _isDarkMode = 'isDarkMode'; 5 | 6 | class PersistentStorageImpl extends PersistentStorageRepository { 7 | @override 8 | Future isDarkMode() async { 9 | final preference = await SharedPreferences.getInstance(); 10 | return preference.getBool(_isDarkMode) ?? false; 11 | } 12 | 13 | @override 14 | Future updateDarkMode(bool isDarkMode) async { 15 | final preference = await SharedPreferences.getInstance(); 16 | await preference.setBool(_isDarkMode, isDarkMode); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /packages/chatty/lib/data/prod/upload_storage_impl.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | import 'package:firebase_storage/firebase_storage.dart' as firebase_storage; 3 | import 'package:stream_chatter/data/upload_storage_repository.dart'; 4 | 5 | class UploadStorageImpl extends UploadStorageRepository { 6 | @override 7 | Future uploadPhoto(File? file, String path) async { 8 | final ref = firebase_storage.FirebaseStorage.instance.ref(path); 9 | final uploadTask = ref.putFile(file!); 10 | await uploadTask; 11 | return await ref.getDownloadURL(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/chatty/lib/data/stream_api_repository.dart: -------------------------------------------------------------------------------- 1 | import 'package:stream_chatter/domain/models/chat_user.dart'; 2 | import 'package:stream_chat_flutter/stream_chat_flutter.dart'; 3 | 4 | abstract class StreamApiRepository { 5 | Future> getChatUsers(); 6 | 7 | Future getToken(String userId); 8 | 9 | Future connectIfExist(String userId); 10 | 11 | Future connectUser(ChatUser user, String token); 12 | 13 | Future createGroupChat( 14 | String channelId, 15 | String? name, 16 | List? members, { 17 | String? image, 18 | }); 19 | 20 | Future createSimpleChat(String? friendId); 21 | 22 | Future logout(); 23 | } 24 | -------------------------------------------------------------------------------- /packages/chatty/lib/data/upload_storage_repository.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | abstract class UploadStorageRepository { 4 | Future uploadPhoto(File? file, String path); 5 | } 6 | -------------------------------------------------------------------------------- /packages/chatty/lib/dependencies.dart: -------------------------------------------------------------------------------- 1 | import 'package:stream_chatter/data/auth_repository.dart'; 2 | import 'package:stream_chatter/data/image_picker_repository.dart'; 3 | import 'package:stream_chatter/data/local/image_picker_impl.dart'; 4 | import 'package:stream_chatter/data/persistent_storage_repository.dart'; 5 | import 'package:stream_chatter/data/prod/auth_impl.dart'; 6 | import 'package:stream_chatter/data/prod/persistent_storage_impl.dart'; 7 | import 'package:stream_chatter/data/prod/stream_api_impl.dart'; 8 | import 'package:stream_chatter/data/prod/upload_storage_impl.dart'; 9 | import 'package:stream_chatter/data/stream_api_repository.dart'; 10 | import 'package:stream_chatter/data/upload_storage_repository.dart'; 11 | import 'package:stream_chatter/domain/usecases/create_group_usecase.dart'; 12 | import 'package:stream_chatter/domain/usecases/login_usecase.dart'; 13 | import 'package:stream_chatter/domain/usecases/logout_usecase.dart'; 14 | import 'package:stream_chatter/domain/usecases/profile_sign_in_usecase.dart'; 15 | import 'package:flutter_bloc/flutter_bloc.dart'; 16 | import 'package:stream_chat_flutter/stream_chat_flutter.dart'; 17 | 18 | List buildRepositories(StreamChatClient client) { 19 | //TODO: Here you can use your local implementations of your repositories 20 | return [ 21 | RepositoryProvider( 22 | create: (_) => StreamApiImpl(client)), 23 | RepositoryProvider( 24 | create: (_) => PersistentStorageImpl()), 25 | RepositoryProvider(create: (_) => AuthImpl()), 26 | RepositoryProvider( 27 | create: (_) => UploadStorageImpl()), 28 | RepositoryProvider(create: (_) => ImagePickerImpl()), 29 | RepositoryProvider( 30 | create: (context) => ProfileSignInUseCase( 31 | context.read(), 32 | context.read(), 33 | context.read(), 34 | ), 35 | ), 36 | RepositoryProvider( 37 | create: (context) => CreateGroupUseCase( 38 | context.read(), 39 | context.read(), 40 | ), 41 | ), 42 | RepositoryProvider( 43 | create: (context) => LogoutUseCase( 44 | context.read(), 45 | context.read(), 46 | ), 47 | ), 48 | RepositoryProvider( 49 | create: (context) => LoginUseCase( 50 | context.read(), 51 | context.read(), 52 | ), 53 | ), 54 | ]; 55 | } 56 | -------------------------------------------------------------------------------- /packages/chatty/lib/domain/exceptions/auth_exception.dart: -------------------------------------------------------------------------------- 1 | enum AuthErrorCode { 2 | not_auth, 3 | not_chat_user, 4 | } 5 | 6 | class AuthException implements Exception { 7 | AuthException(this.error); 8 | 9 | final AuthErrorCode error; 10 | } 11 | -------------------------------------------------------------------------------- /packages/chatty/lib/domain/models/auth_user.dart: -------------------------------------------------------------------------------- 1 | class AuthUser { 2 | AuthUser(this.id); 3 | final String id; 4 | } 5 | -------------------------------------------------------------------------------- /packages/chatty/lib/domain/models/chat_user.dart: -------------------------------------------------------------------------------- 1 | class ChatUser { 2 | const ChatUser({this.name, this.image, this.id}); 3 | final String? name; 4 | final String? image; 5 | final String? id; 6 | } 7 | -------------------------------------------------------------------------------- /packages/chatty/lib/domain/usecases/create_group_usecase.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:stream_chatter/data/stream_api_repository.dart'; 4 | import 'package:stream_chatter/data/upload_storage_repository.dart'; 5 | import 'package:stream_chat_flutter/stream_chat_flutter.dart'; 6 | import 'package:uuid/uuid.dart'; 7 | 8 | class CreateGroupInput { 9 | CreateGroupInput({this.imageFile, this.name, this.members}); 10 | final File? imageFile; 11 | final String? name; 12 | final List? members; 13 | } 14 | 15 | class CreateGroupUseCase { 16 | CreateGroupUseCase( 17 | this._streamApiRepository, 18 | this._uploadStorageRepository, 19 | ); 20 | 21 | final UploadStorageRepository _uploadStorageRepository; 22 | final StreamApiRepository _streamApiRepository; 23 | 24 | Future createGroup(CreateGroupInput input) async { 25 | final channelId = Uuid().v4(); 26 | String? image; 27 | if (input.imageFile != null) { 28 | image = await _uploadStorageRepository.uploadPhoto( 29 | input.imageFile, 'channels/$channelId'); 30 | } 31 | final channel = await _streamApiRepository.createGroupChat( 32 | channelId, 33 | input.name, 34 | input.members, 35 | image: image, 36 | ); 37 | return channel; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /packages/chatty/lib/domain/usecases/login_usecase.dart: -------------------------------------------------------------------------------- 1 | import 'package:stream_chatter/data/auth_repository.dart'; 2 | import 'package:stream_chatter/data/stream_api_repository.dart'; 3 | import 'package:stream_chatter/domain/exceptions/auth_exception.dart'; 4 | import 'package:stream_chatter/domain/models/auth_user.dart'; 5 | 6 | class LoginUseCase { 7 | LoginUseCase(this.authRepository, this.streamApiRepository); 8 | 9 | final AuthRepository authRepository; 10 | final StreamApiRepository streamApiRepository; 11 | 12 | Future validateLogin() async { 13 | print('validateLogin'); 14 | final user = await authRepository.getAuthUser(); 15 | print('user: ${user?.id}'); 16 | if (user != null) { 17 | final result = await streamApiRepository.connectIfExist(user.id); 18 | if (result) { 19 | return true; 20 | } else { 21 | throw AuthException(AuthErrorCode.not_chat_user); 22 | } 23 | } 24 | throw AuthException(AuthErrorCode.not_auth); 25 | } 26 | 27 | Future signIn() async { 28 | return await authRepository.signIn(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /packages/chatty/lib/domain/usecases/logout_usecase.dart: -------------------------------------------------------------------------------- 1 | import 'package:stream_chatter/data/auth_repository.dart'; 2 | import 'package:stream_chatter/data/stream_api_repository.dart'; 3 | 4 | class LogoutUseCase { 5 | LogoutUseCase(this.streamApiRepository, this.authRepository); 6 | final StreamApiRepository streamApiRepository; 7 | final AuthRepository authRepository; 8 | 9 | Future logout() async { 10 | await streamApiRepository.logout(); 11 | await authRepository.logout(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/chatty/lib/domain/usecases/profile_sign_in_usecase.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:stream_chatter/data/auth_repository.dart'; 4 | import 'package:stream_chatter/data/stream_api_repository.dart'; 5 | import 'package:stream_chatter/data/upload_storage_repository.dart'; 6 | import 'package:stream_chatter/domain/models/chat_user.dart'; 7 | 8 | import '../exceptions/auth_exception.dart'; 9 | 10 | class ProfileInput { 11 | ProfileInput({this.imageFile, this.name}); 12 | 13 | final File? imageFile; 14 | final String? name; 15 | } 16 | 17 | class ProfileSignInUseCase { 18 | ProfileSignInUseCase( 19 | this._authRepository, 20 | this._streamApiRepository, 21 | this._uploadStorageRepository, 22 | ); 23 | 24 | final AuthRepository _authRepository; 25 | final UploadStorageRepository _uploadStorageRepository; 26 | final StreamApiRepository _streamApiRepository; 27 | 28 | Future verify(ProfileInput input) async { 29 | final auth = await _authRepository.getAuthUser(); 30 | if (auth == null) { 31 | throw AuthException(AuthErrorCode.not_auth); 32 | } 33 | final token = await _streamApiRepository.getToken(auth.id); 34 | String? image; 35 | if (input.imageFile != null) { 36 | image = await _uploadStorageRepository.uploadPhoto( 37 | input.imageFile, 'users/${auth.id}'); 38 | } 39 | await _streamApiRepository.connectUser( 40 | ChatUser( 41 | name: input.name, 42 | id: auth.id, 43 | image: image, 44 | ), 45 | token, 46 | ); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /packages/chatty/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_core/firebase_core.dart'; 2 | import 'package:stream_chatter/dependencies.dart'; 3 | import 'package:stream_chatter/ui/app_theme_cubit.dart'; 4 | import 'package:stream_chatter/ui/splash/splash_view.dart'; 5 | import 'package:stream_chatter/ui/themes.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:flutter/services.dart'; 8 | import 'package:stream_chat_flutter/stream_chat_flutter.dart'; 9 | import 'package:flutter_bloc/flutter_bloc.dart'; 10 | 11 | Future main() async { 12 | WidgetsFlutterBinding.ensureInitialized(); 13 | await Firebase.initializeApp(); 14 | runApp(MyApp()); 15 | } 16 | 17 | class MyApp extends StatelessWidget { 18 | final _streamChatClient = StreamChatClient('c2rynysx9x6b'); 19 | 20 | @override 21 | Widget build(BuildContext context) { 22 | SystemChrome.setEnabledSystemUIMode( 23 | SystemUiMode.manual, 24 | overlays: [SystemUiOverlay.bottom], 25 | ); 26 | 27 | return MultiRepositoryProvider( 28 | providers: buildRepositories(_streamChatClient), 29 | child: BlocProvider( 30 | create: (context) => AppThemeCubit(context.read())..init(), 31 | child: BlocBuilder(builder: (context, snapshot) { 32 | return MaterialApp( 33 | title: 'Stream Chatty', 34 | home: SplashView(), 35 | theme: snapshot ? Themes.themeDark : Themes.themeLight, 36 | builder: (context, child) { 37 | return StreamChat( 38 | child: child, 39 | client: _streamChatClient, 40 | streamChatThemeData: 41 | StreamChatThemeData.fromTheme(Theme.of(context)).copyWith( 42 | ownMessageTheme: MessageThemeData( 43 | messageBackgroundColor: 44 | Theme.of(context).colorScheme.secondary, 45 | messageTextStyle: TextStyle(color: Colors.white), 46 | ), 47 | ), 48 | ); 49 | }, 50 | ); 51 | }), 52 | ), 53 | ); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /packages/chatty/lib/navigator_utils.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | Future pushToPage(BuildContext context, Widget widget) async { 4 | await Navigator.of(context).push( 5 | MaterialPageRoute( 6 | builder: (_) => widget, 7 | ), 8 | ); 9 | } 10 | 11 | Future pushAndReplaceToPage(BuildContext context, Widget widget) async { 12 | await Navigator.of(context).pushReplacement( 13 | MaterialPageRoute( 14 | builder: (_) => widget, 15 | ), 16 | ); 17 | } 18 | 19 | Future popAllAndPush(BuildContext context, Widget widget) async { 20 | await Navigator.pushAndRemoveUntil( 21 | context, 22 | MaterialPageRoute(builder: (BuildContext context) => widget), 23 | ModalRoute.withName('/')); 24 | } 25 | -------------------------------------------------------------------------------- /packages/chatty/lib/ui/app_theme_cubit.dart: -------------------------------------------------------------------------------- 1 | import 'package:stream_chatter/data/persistent_storage_repository.dart'; 2 | import 'package:flutter_bloc/flutter_bloc.dart'; 3 | 4 | class AppThemeCubit extends Cubit { 5 | AppThemeCubit(this._persistentStorageRepository) : super(false); 6 | final PersistentStorageRepository _persistentStorageRepository; 7 | 8 | bool _isDark = false; 9 | bool get isDark => _isDark; 10 | 11 | Future init() async { 12 | _isDark = await _persistentStorageRepository.isDarkMode(); 13 | emit(_isDark); 14 | } 15 | 16 | Future updateTheme(bool isDarkMode) async { 17 | _isDark = isDarkMode; 18 | await _persistentStorageRepository.updateDarkMode(isDarkMode); 19 | emit(_isDark); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /packages/chatty/lib/ui/common/avatar_image_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class AvatarImageView extends StatelessWidget { 4 | const AvatarImageView({Key? key, this.onTap, this.child}) : super(key: key); 5 | final Widget? child; 6 | final VoidCallback? onTap; 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return Padding( 11 | padding: const EdgeInsets.all(20.0), 12 | child: Stack( 13 | clipBehavior: Clip.none, 14 | children: [ 15 | ClipOval( 16 | child: Container( 17 | decoration: BoxDecoration( 18 | shape: BoxShape.circle, 19 | color: Colors.grey[100], 20 | ), 21 | height: 180, 22 | width: 180, 23 | child: child, 24 | ), 25 | ), 26 | Positioned( 27 | bottom: -15, 28 | right: 0, 29 | child: GestureDetector( 30 | onTap: onTap, 31 | child: CircleAvatar( 32 | backgroundColor: Colors.white, 33 | radius: 30, 34 | child: Icon( 35 | Icons.camera_alt_outlined, 36 | color: Colors.black, 37 | ), 38 | ), 39 | ), 40 | ), 41 | ], 42 | ), 43 | ); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages/chatty/lib/ui/common/initial_background_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class InitialBackgroundView extends StatelessWidget { 4 | @override 5 | Widget build(BuildContext context) { 6 | return Stack( 7 | children: [ 8 | Positioned( 9 | top: 20, 10 | right: -75, 11 | child: Image.asset( 12 | 'assets/icon-top-right.png', 13 | height: 150, 14 | ), 15 | ), 16 | Positioned( 17 | bottom: -50, 18 | right: -50, 19 | child: Image.asset( 20 | 'assets/icon-bottom-right.png', 21 | height: 200, 22 | ), 23 | ), 24 | ], 25 | ); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /packages/chatty/lib/ui/common/loading_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class LoadingView extends StatelessWidget { 4 | final bool isLoading; 5 | final Widget child; 6 | 7 | const LoadingView({ 8 | Key? key, 9 | required this.child, 10 | this.isLoading = false, 11 | }) : super(key: key); 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Scaffold( 16 | body: Stack( 17 | children: [ 18 | child, 19 | if (isLoading) 20 | Container( 21 | color: Colors.black26, 22 | child: Center( 23 | child: CircularProgressIndicator(), 24 | ), 25 | ), 26 | ], 27 | ), 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /packages/chatty/lib/ui/home/chat/selection/friends_selection_cubit.dart: -------------------------------------------------------------------------------- 1 | import 'package:stream_chatter/data/stream_api_repository.dart'; 2 | import 'package:stream_chatter/domain/models/chat_user.dart'; 3 | import 'package:flutter_bloc/flutter_bloc.dart'; 4 | import 'package:stream_chat_flutter/stream_chat_flutter.dart'; 5 | 6 | class ChatUserState { 7 | const ChatUserState(this.chatUser, {this.selected = false}); 8 | final ChatUser chatUser; 9 | final bool selected; 10 | } 11 | 12 | class FriendsSelectionCubit extends Cubit> { 13 | FriendsSelectionCubit(this._streamApiRepository) : super([]); 14 | final StreamApiRepository _streamApiRepository; 15 | 16 | List get selectedUsers => 17 | state.where((element) => element.selected).toList(); 18 | 19 | Future init() async { 20 | final chatUsers = (await _streamApiRepository.getChatUsers()) 21 | .map((e) => ChatUserState(e)) 22 | .toList(); 23 | emit(chatUsers); 24 | } 25 | 26 | void selectUser(ChatUserState chatUser) { 27 | final index = state 28 | .indexWhere((element) => element.chatUser.id == chatUser.chatUser.id); 29 | state[index] = 30 | ChatUserState(state[index].chatUser, selected: !chatUser.selected); 31 | emit(List.from(state)); 32 | } 33 | 34 | Future createFriendChannel(ChatUserState chatUserState) async { 35 | return await _streamApiRepository 36 | .createSimpleChat(chatUserState.chatUser.id); 37 | } 38 | } 39 | 40 | class FriendsGroupCubit extends Cubit { 41 | FriendsGroupCubit() : super(false); 42 | 43 | void changeToGroup() => emit(!state); 44 | } 45 | -------------------------------------------------------------------------------- /packages/chatty/lib/ui/home/chat/selection/group_selection_cubit.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:stream_chatter/data/image_picker_repository.dart'; 4 | import 'package:stream_chatter/domain/usecases/create_group_usecase.dart'; 5 | import 'package:stream_chatter/ui/home/chat/selection/friends_selection_cubit.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:flutter_bloc/flutter_bloc.dart'; 8 | import 'package:stream_chat_flutter/stream_chat_flutter.dart'; 9 | 10 | class GroupSelectionState { 11 | const GroupSelectionState( 12 | this.file, { 13 | this.channel, 14 | this.isLoading = false, 15 | }); 16 | final File? file; 17 | final Channel? channel; 18 | final bool isLoading; 19 | } 20 | 21 | class GroupSelectionCubit extends Cubit { 22 | GroupSelectionCubit( 23 | this.members, 24 | this._createGroupUseCase, 25 | this._imagePickerRepository, 26 | ) : super(GroupSelectionState(null)); 27 | 28 | final nameTextController = TextEditingController(); 29 | final List members; 30 | final CreateGroupUseCase _createGroupUseCase; 31 | final ImagePickerRepository _imagePickerRepository; 32 | 33 | void createGroup() async { 34 | emit(GroupSelectionState(state.file, isLoading: true)); 35 | final channel = await _createGroupUseCase.createGroup(CreateGroupInput( 36 | imageFile: state.file, 37 | members: members.map((e) => e.chatUser.id).toList(), 38 | name: nameTextController.text, 39 | )); 40 | emit(GroupSelectionState(state.file, channel: channel, isLoading: false)); 41 | } 42 | 43 | void pickImage() async { 44 | final image = await _imagePickerRepository.pickImage(); 45 | emit(GroupSelectionState(image)); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /packages/chatty/lib/ui/home/home_cubit.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_bloc/flutter_bloc.dart'; 2 | 3 | class HomeCubit extends Cubit { 4 | HomeCubit() : super(0); 5 | 6 | void onChangeTab(int index) => emit(index); 7 | } 8 | -------------------------------------------------------------------------------- /packages/chatty/lib/ui/home/settings/settings_cubit.dart: -------------------------------------------------------------------------------- 1 | import 'package:stream_chatter/domain/usecases/logout_usecase.dart'; 2 | import 'package:flutter_bloc/flutter_bloc.dart'; 3 | 4 | class SettingsSwitchCubit extends Cubit { 5 | SettingsSwitchCubit(bool state) : super(state); 6 | 7 | void onChangeDarkMode(bool isDark) => emit(isDark); 8 | } 9 | 10 | class SettingsLogoutCubit extends Cubit { 11 | SettingsLogoutCubit(this._logoutUseCase) : super(null); 12 | 13 | final LogoutUseCase _logoutUseCase; 14 | 15 | void logOut() async { 16 | await _logoutUseCase.logout(); 17 | emit(null); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/chatty/lib/ui/profile_verify/profile_verify_cubit.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:stream_chatter/data/image_picker_repository.dart'; 4 | import 'package:stream_chatter/domain/usecases/profile_sign_in_usecase.dart'; 5 | import 'package:flutter/widgets.dart'; 6 | import 'package:flutter_bloc/flutter_bloc.dart'; 7 | 8 | class ProfileState { 9 | const ProfileState( 10 | this.file, { 11 | this.success = false, 12 | this.loading = false, 13 | }); 14 | final File? file; 15 | final bool success; 16 | final bool loading; 17 | } 18 | 19 | class ProfileVerifyCubit extends Cubit { 20 | ProfileVerifyCubit( 21 | this._imagePickerRepository, 22 | this._profileSignInUseCase, 23 | ) : super(ProfileState(null)); 24 | 25 | final nameController = TextEditingController(); 26 | final ImagePickerRepository _imagePickerRepository; 27 | final ProfileSignInUseCase _profileSignInUseCase; 28 | 29 | void startChatting() async { 30 | final file = state.file; 31 | emit(ProfileState(file, loading: true)); 32 | final name = nameController.text; 33 | await _profileSignInUseCase.verify(ProfileInput( 34 | imageFile: file, 35 | name: name, 36 | )); 37 | emit(ProfileState(file, success: true, loading: false)); 38 | } 39 | 40 | void pickImage() async { 41 | final file = await _imagePickerRepository.pickImage(); 42 | emit(ProfileState(file)); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /packages/chatty/lib/ui/sign_in/sign_in_cubit.dart: -------------------------------------------------------------------------------- 1 | import 'package:stream_chatter/domain/usecases/login_usecase.dart'; 2 | import 'package:flutter_bloc/flutter_bloc.dart'; 3 | 4 | enum SignInState { 5 | none, 6 | existing_user, 7 | } 8 | 9 | class SignInCubit extends Cubit { 10 | SignInCubit( 11 | this._loginUseCase, 12 | ) : super(SignInState.none); 13 | 14 | final LoginUseCase _loginUseCase; 15 | 16 | void signIn() async { 17 | try { 18 | final result = await _loginUseCase.validateLogin(); 19 | if (result) { 20 | emit(SignInState.existing_user); 21 | } 22 | } catch (ex) { 23 | _loginUseCase.signIn(); 24 | emit(SignInState.none); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /packages/chatty/lib/ui/splash/splash_cubit.dart: -------------------------------------------------------------------------------- 1 | import 'package:stream_chatter/domain/exceptions/auth_exception.dart'; 2 | import 'package:stream_chatter/domain/usecases/login_usecase.dart'; 3 | import 'package:flutter_bloc/flutter_bloc.dart'; 4 | 5 | enum SplashState { 6 | none, 7 | existing_user, 8 | new_user, 9 | } 10 | 11 | class SplashCubit extends Cubit { 12 | SplashCubit( 13 | this._loginUseCase, 14 | ) : super(SplashState.none); 15 | 16 | final LoginUseCase _loginUseCase; 17 | 18 | void init() async { 19 | try { 20 | final result = await _loginUseCase.validateLogin(); 21 | if (result) { 22 | emit(SplashState.existing_user); 23 | } 24 | } on AuthException catch (ex) { 25 | if (ex.error == AuthErrorCode.not_auth) { 26 | emit(SplashState.none); 27 | } else { 28 | emit(SplashState.new_user); 29 | } 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /packages/chatty/lib/ui/splash/splash_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:stream_chatter/navigator_utils.dart'; 2 | import 'package:stream_chatter/ui/home/home_view.dart'; 3 | import 'package:stream_chatter/ui/profile_verify/profile_verify_view.dart'; 4 | import 'package:stream_chatter/ui/sign_in/sign_in_view.dart'; 5 | import 'package:stream_chatter/ui/common/initial_background_view.dart'; 6 | import 'package:stream_chatter/ui/splash/splash_cubit.dart'; 7 | import 'package:flutter/material.dart'; 8 | import 'package:flutter_bloc/flutter_bloc.dart'; 9 | 10 | class SplashView extends StatelessWidget { 11 | @override 12 | Widget build(BuildContext context) { 13 | return BlocProvider( 14 | create: (context) => SplashCubit(context.read())..init(), 15 | child: BlocListener( 16 | listener: (context, snapshot) { 17 | if (snapshot == SplashState.none) { 18 | pushAndReplaceToPage(context, SignInView()); 19 | } else if (snapshot == SplashState.existing_user) { 20 | pushAndReplaceToPage(context, HomeView()); 21 | } else { 22 | pushAndReplaceToPage(context, ProfileVerifyView()); 23 | } 24 | }, 25 | child: Scaffold( 26 | body: Stack( 27 | children: [ 28 | InitialBackgroundView(), 29 | Center( 30 | child: Hero( 31 | tag: 'logo_hero', 32 | child: Image.asset( 33 | 'assets/logo.png', 34 | height: 100, 35 | ), 36 | ), 37 | ), 38 | ], 39 | ), 40 | ), 41 | ), 42 | ); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /packages/chatty/lib/ui/themes.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | const primaryColor = Color(0xFF3883FB); 4 | const backgroundLightColor = Color(0xFFFCFCFC); 5 | const backgroundDarkColor = Color(0xFF1F2026); 6 | const navigationBarLightColor = Colors.white; 7 | const navigationBarDarkColor = Color(0xFF30313C); 8 | 9 | class Themes { 10 | static final themeLight = ThemeData.light().copyWith( 11 | backgroundColor: backgroundLightColor, 12 | // selected color 13 | colorScheme: 14 | ThemeData.light().colorScheme.copyWith(secondary: primaryColor), 15 | // floating action button 16 | floatingActionButtonTheme: FloatingActionButtonThemeData( 17 | backgroundColor: primaryColor, 18 | foregroundColor: Colors.white, 19 | ), 20 | // bottom bar 21 | bottomNavigationBarTheme: BottomNavigationBarThemeData( 22 | backgroundColor: navigationBarLightColor, 23 | selectedItemColor: primaryColor, 24 | unselectedItemColor: Colors.grey[200], 25 | ), 26 | // switch active color 27 | toggleableActiveColor: primaryColor, 28 | canvasColor: backgroundLightColor, 29 | appBarTheme: AppBarTheme( 30 | color: Colors.black, 31 | )); 32 | 33 | static final themeDark = ThemeData.dark().copyWith( 34 | backgroundColor: backgroundDarkColor, 35 | // selected color 36 | colorScheme: 37 | ThemeData.dark().colorScheme.copyWith(secondary: primaryColor), 38 | // floating action button 39 | floatingActionButtonTheme: FloatingActionButtonThemeData( 40 | backgroundColor: primaryColor, 41 | foregroundColor: Colors.white, 42 | ), 43 | // bottom bar 44 | bottomNavigationBarTheme: BottomNavigationBarThemeData( 45 | backgroundColor: navigationBarDarkColor, 46 | selectedItemColor: primaryColor, 47 | unselectedItemColor: Colors.grey[300], 48 | ), 49 | textSelectionTheme: TextSelectionThemeData(selectionColor: Colors.white), 50 | // switch active color 51 | toggleableActiveColor: primaryColor, 52 | canvasColor: backgroundDarkColor, 53 | appBarTheme: AppBarTheme( 54 | color: Colors.white, 55 | )); 56 | } 57 | -------------------------------------------------------------------------------- /packages/chatty/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: stream_chatter 2 | description: Chat App implemented using Clean Architecture. 3 | publish_to: 'none' 4 | version: 1.0.0+1 5 | 6 | environment: 7 | sdk: '>=2.12.0 <3.0.0' 8 | 9 | dependencies: 10 | flutter: 11 | sdk: flutter 12 | 13 | flutter_bloc: ^7.1.0 14 | stream_chat_flutter: ^2.0.0 15 | uuid: ^3.0.5 16 | 17 | firebase_core: ^1.2.0 18 | google_sign_in: ^5.0.3 19 | firebase_auth: ^1.2.0 20 | firebase_storage: ^8.1.0 21 | shared_preferences: ^2.0.5 22 | http: any 23 | collection: ^1.15.0 24 | 25 | dev_dependencies: 26 | flutter_test: 27 | sdk: flutter 28 | 29 | # For information on the generic Dart part of this file, see the 30 | # following page: https://dart.dev/tools/pub/pubspec 31 | 32 | # The following section is specific to Flutter. 33 | flutter: 34 | 35 | # The following line ensures that the Material Icons font is 36 | # included with your application, so that you can use the icons in 37 | # the material Icons class. 38 | uses-material-design: true 39 | 40 | assets: 41 | - assets/ -------------------------------------------------------------------------------- /packages/imessage/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Android Studio will place build artifacts here 44 | /android/app/debug 45 | /android/app/profile 46 | /android/app/release 47 | -------------------------------------------------------------------------------- /packages/imessage/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 2a188eeca3653254d6796a7e3e059d40acaca0b7 8 | channel: master 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /packages/imessage/README.md: -------------------------------------------------------------------------------- 1 | # iMessage Clone 2 | 3 | ![](https://raw.githubusercontent.com/GetStream/flutter-samples/master/images/imessage_clone_hero_v1.png) 4 | 5 | iMessage Clone is a sample app implemented using Stream Chat and Flutter. It's a fully fledged messaging app built using the core Stream packages. 6 | 7 | See our [blog post](https://getstream.io/blog/build-an-imessage-clone-with-streams-flutter-chat-sdk/) for a step-by-step guide on how to build this application. 8 | 9 | ## Getting Started 10 | 11 | Before running this project please ensure Flutter is installed and configured on your machine. If you're new to Flutter, please checkout the [official guide](https://flutter.dev/docs/get-started/install) with installation instructions for your OS. 12 | 13 | This project is only configured to support the following platforms: 14 | 15 | - Android 16 | - iOS 17 | 18 | Web and Desktop are not supported at this time. 19 | 20 | After installing Flutter and the necessary toolchain for your device (Android or iOS), connect your device or open your emulator before running the following: 21 | 22 | **Clone the repo** 23 | 24 | ```bash 25 | git clone https://github.com/GetStream/flutter-samples 26 | ``` 27 | 28 | **Open the app folder** 29 | 30 | ```bash 31 | cd flutter-samples/imessage 32 | ``` 33 | 34 | **Install package dependencies:** 35 | 36 | ```bash 37 | flutter packages get 38 | ``` 39 | 40 | **Open or create an emulator** 41 | 42 | ```bash 43 | # To run an emulator, run 'flutter emulators --launch '. 44 | # To create a new emulator, run 'flutter emulators --create [--name xyz]'. 45 | # You can find more information on managing emulators at the links below: 46 | # [https://developer.android.com/studio/run/managing-avds](https://developer.android.com/studio/run/managing-avds)[https://developer.android.com/studio/command-line/avdmanager](https://developer.android.com/studio/command-line/avdmanager) 47 | ``` 48 | 49 | **Run the project on your device or emulator:** 50 | 51 | ```bash 52 | flutter run 53 | ``` 54 | -------------------------------------------------------------------------------- /packages/imessage/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /packages/imessage/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | -------------------------------------------------------------------------------- /packages/imessage/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id "com.android.application" 3 | id "kotlin-android" 4 | id "dev.flutter.flutter-gradle-plugin" 5 | } 6 | 7 | def localProperties = new Properties() 8 | def localPropertiesFile = rootProject.file('local.properties') 9 | if (localPropertiesFile.exists()) { 10 | localPropertiesFile.withReader('UTF-8') { reader -> 11 | localProperties.load(reader) 12 | } 13 | } 14 | 15 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 16 | if (flutterVersionCode == null) { 17 | flutterVersionCode = '1' 18 | } 19 | 20 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 21 | if (flutterVersionName == null) { 22 | flutterVersionName = '1.0' 23 | } 24 | 25 | android { 26 | namespace "com.example.imessage" 27 | compileSdkVersion 35 28 | 29 | compileOptions { 30 | sourceCompatibility JavaVersion.VERSION_17 31 | targetCompatibility JavaVersion.VERSION_17 32 | } 33 | kotlinOptions { 34 | jvmTarget = '17' 35 | } 36 | 37 | sourceSets { 38 | main.java.srcDirs += 'src/main/kotlin' 39 | } 40 | 41 | defaultConfig { 42 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 43 | applicationId "com.example.imessage" 44 | minSdkVersion 21 45 | targetSdkVersion 35 46 | versionCode flutterVersionCode.toInteger() 47 | versionName flutterVersionName 48 | } 49 | 50 | buildTypes { 51 | release { 52 | // TODO: Add your own signing config for the release build. 53 | // Signing with the debug keys for now, so `flutter run --release` works. 54 | signingConfig signingConfigs.debug 55 | } 56 | } 57 | } 58 | 59 | flutter { 60 | source '../..' 61 | } -------------------------------------------------------------------------------- /packages/imessage/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/imessage/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 13 | 17 | 21 | 26 | 30 | 31 | 32 | 33 | 34 | 35 | 37 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /packages/imessage/android/app/src/main/kotlin/com/example/imessage/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.imessage 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /packages/imessage/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /packages/imessage/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /packages/imessage/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/imessage/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/imessage/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/imessage/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/imessage/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/imessage/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/imessage/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/imessage/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/imessage/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/imessage/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/imessage/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /packages/imessage/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /packages/imessage/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/imessage/android/build.gradle: -------------------------------------------------------------------------------- 1 | allprojects { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | } 7 | 8 | rootProject.buildDir = '../build' 9 | subprojects { 10 | project.buildDir = "${rootProject.buildDir}/${project.name}" 11 | } 12 | subprojects { 13 | project.evaluationDependsOn(':app') 14 | } 15 | 16 | tasks.register("clean", Delete) { 17 | delete rootProject.layout.buildDirectory 18 | } 19 | -------------------------------------------------------------------------------- /packages/imessage/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /packages/imessage/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Feb 21 14:17:43 CET 2025 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | -------------------------------------------------------------------------------- /packages/imessage/android/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | def flutterSdkPath = { 3 | def properties = new Properties() 4 | file("local.properties").withInputStream { properties.load(it) } 5 | def flutterSdkPath = properties.getProperty("flutter.sdk") 6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 7 | return flutterSdkPath 8 | }() 9 | 10 | includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") 11 | 12 | repositories { 13 | google() 14 | mavenCentral() 15 | gradlePluginPortal() 16 | } 17 | } 18 | 19 | plugins { 20 | id "dev.flutter.flutter-plugin-loader" version "1.0.0" 21 | id "com.android.application" version "8.8.1" apply false 22 | id "org.jetbrains.kotlin.android" version "1.9.10" apply false 23 | } 24 | 25 | include ":app" -------------------------------------------------------------------------------- /packages/imessage/ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /packages/imessage/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 10.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /packages/imessage/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /packages/imessage/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /packages/imessage/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /packages/imessage/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/imessage/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/imessage/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @main 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /packages/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /packages/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /packages/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /packages/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /packages/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /packages/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /packages/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /packages/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /packages/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /packages/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /packages/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /packages/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /packages/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /packages/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/imessage/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /packages/imessage/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /packages/imessage/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/imessage/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /packages/imessage/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/imessage/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /packages/imessage/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/imessage/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /packages/imessage/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /packages/imessage/ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /packages/imessage/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /packages/imessage/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | imessage 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | CADisableMinimumFrameDurationOnPhone 45 | 46 | UIApplicationSupportsIndirectInputEvents 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /packages/imessage/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /packages/imessage/lib/channel_image.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart' 3 | show Channel; 4 | 5 | import 'package:imessage/utils.dart'; 6 | 7 | class ChannelImage extends StatelessWidget { 8 | const ChannelImage({ 9 | Key? key, 10 | required this.channel, 11 | required this.size, 12 | }) : super(key: key); 13 | 14 | final Channel channel; 15 | final double size; 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | final avatarUrl = channel.extraData.containsKey('image') && 20 | (channel.extraData['image'] as String).isNotEmpty 21 | ? channel.extraData['image'] as String? 22 | : 'https://4.bp.blogspot.com/-Jx21kNqFSTU/UXemtqPhZCI/AAAAAAAAh74/BMGSzpU6F48/s1600/funny-cat-pictures-047-001.jpg'; 23 | 24 | return CupertinoCircleAvatar( 25 | size: size, 26 | url: avatarUrl, 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /packages/imessage/lib/channel_list_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:imessage/channel_preview.dart'; 3 | import 'package:imessage/message_page.dart'; 4 | import 'package:animations/animations.dart'; 5 | import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart' 6 | show Channel, StreamChannel; 7 | 8 | class ChannelListView extends StatelessWidget { 9 | const ChannelListView({Key? key, required this.channels}) : super(key: key); 10 | final List channels; 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | final filteredChannels = List.from(channels) 15 | ..removeWhere((channel) => channel.lastMessageAt == null); 16 | 17 | return SliverList( 18 | delegate: SliverChildBuilderDelegate( 19 | ( 20 | BuildContext context, 21 | int index, 22 | ) { 23 | return Padding( 24 | padding: const EdgeInsets.symmetric(vertical: 4.0), 25 | child: ChannelPreview( 26 | channel: filteredChannels[index], 27 | onTap: () { 28 | Navigator.push( 29 | context, 30 | PageRouteBuilder( 31 | pageBuilder: (_, __, ___) => StreamChannel( 32 | channel: filteredChannels[index], 33 | child: const MessagePage(), 34 | ), 35 | transitionsBuilder: ( 36 | _, 37 | animation, 38 | secondaryAnimation, 39 | child, 40 | ) => 41 | SharedAxisTransition( 42 | animation: animation, 43 | secondaryAnimation: secondaryAnimation, 44 | transitionType: SharedAxisTransitionType.horizontal, 45 | child: child, 46 | ), 47 | ), 48 | ); 49 | }, 50 | ), 51 | ); 52 | }, 53 | childCount: filteredChannels.length, 54 | ), 55 | ); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /packages/imessage/lib/channel_name_text.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart' 3 | show Channel; 4 | 5 | class ChannelNameText extends StatelessWidget { 6 | const ChannelNameText({ 7 | Key? key, 8 | required this.channel, 9 | this.size = 17, 10 | this.fontWeight, 11 | }) : super(key: key); 12 | 13 | final Channel channel; 14 | final double size; 15 | final FontWeight? fontWeight; 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | return Text( 20 | channel.extraData['name'] as String? ?? 'No name', 21 | style: TextStyle( 22 | fontSize: size, 23 | fontWeight: fontWeight, 24 | color: CupertinoColors.black, 25 | ), 26 | ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /packages/imessage/lib/channel_page_appbar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | 3 | class ChannelPageAppBar extends StatelessWidget { 4 | const ChannelPageAppBar({ 5 | Key? key, 6 | }) : super(key: key); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return const CupertinoSliverNavigationBar( 11 | largeTitle: Text( 12 | 'Messages', 13 | style: TextStyle(letterSpacing: -1.3), 14 | ), 15 | ); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/imessage/lib/message_header.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | 3 | import 'package:imessage/utils.dart'; 4 | 5 | class MessageHeader extends StatelessWidget { 6 | final String rawTimeStamp; 7 | const MessageHeader({Key? key, required this.rawTimeStamp}) : super(key: key); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | final receivedAt = DateTime.parse(rawTimeStamp); 12 | const textStyle = TextStyle( 13 | color: CupertinoColors.systemGrey, 14 | fontWeight: FontWeight.w400, 15 | fontSize: 11, 16 | ); 17 | return isSameWeek(receivedAt) 18 | ? Text( 19 | formatDateSameWeek(receivedAt), 20 | style: textStyle, 21 | ) 22 | : Text( 23 | formatDate(receivedAt), 24 | style: textStyle, 25 | ); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /packages/imessage/lib/message_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:imessage/message_list_view.dart'; 3 | import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart' 4 | show 5 | LazyLoadScrollView, 6 | MessageListController, 7 | MessageListCore, 8 | StreamChannel, 9 | StreamChatCore; 10 | 11 | import 'package:imessage/channel_image.dart'; 12 | import 'package:imessage/channel_name_text.dart'; 13 | 14 | class MessagePage extends StatelessWidget { 15 | const MessagePage({Key? key}) : super(key: key); 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | final streamChannel = StreamChannel.of(context); 20 | 21 | var messageListController = MessageListController(); 22 | return CupertinoPageScaffold( 23 | navigationBar: CupertinoNavigationBar( 24 | middle: Column( 25 | children: [ 26 | ChannelImage( 27 | size: 32, 28 | channel: streamChannel.channel, 29 | ), 30 | ChannelNameText( 31 | channel: streamChannel.channel, 32 | size: 10, 33 | fontWeight: FontWeight.w300, 34 | ), 35 | ], 36 | ), 37 | ), 38 | child: StreamChatCore( 39 | client: streamChannel.channel.client, 40 | child: MessageListCore( 41 | messageListController: messageListController, 42 | loadingBuilder: (context) { 43 | return const Center( 44 | child: CupertinoActivityIndicator(), 45 | ); 46 | }, 47 | errorBuilder: (context, err) { 48 | return const Center( 49 | child: Text('Error'), 50 | ); 51 | }, 52 | emptyBuilder: (context) { 53 | return const Center( 54 | child: Text('Nothing here...'), 55 | ); 56 | }, 57 | messageListBuilder: (context, messages) => LazyLoadScrollView( 58 | onStartOfPage: () async { 59 | await messageListController.paginateData!(); 60 | }, 61 | child: MessageListView( 62 | messages: messages, 63 | ), 64 | ), 65 | ), 66 | ), 67 | ); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /packages/imessage/lib/utils.dart: -------------------------------------------------------------------------------- 1 | import 'package:cached_network_image/cached_network_image.dart'; 2 | import 'package:intl/intl.dart'; 3 | import 'package:flutter/cupertino.dart'; 4 | 5 | String formatDate(DateTime date) { 6 | final dateFormat = DateFormat.yMd(); 7 | return dateFormat.format(date); 8 | } 9 | 10 | String formatDateSameWeek(DateTime date) { 11 | DateFormat dateFormat; 12 | if (date.day == DateTime.now().day) { 13 | dateFormat = DateFormat('hh:mm a'); 14 | } else { 15 | dateFormat = DateFormat('EEEE'); 16 | } 17 | return dateFormat.format(date); 18 | } 19 | 20 | String formatDateMessage(DateTime date) { 21 | final dateFormat = DateFormat('EEE. MMM. d ' 'yy' ' hh:mm a'); 22 | return dateFormat.format(date); 23 | } 24 | 25 | bool isSameWeek(DateTime timestamp) => 26 | DateTime.now().difference(timestamp).inDays < 7; 27 | 28 | class CupertinoCircleAvatar extends StatelessWidget { 29 | final String? url; 30 | final double? size; 31 | const CupertinoCircleAvatar({Key? key, this.url, this.size}) 32 | : super(key: key); 33 | 34 | @override 35 | Widget build(BuildContext context) { 36 | return ClipRRect( 37 | borderRadius: BorderRadius.circular(size! / 2), 38 | child: CachedNetworkImage( 39 | imageUrl: url!, 40 | height: size, 41 | width: size, 42 | fit: BoxFit.cover, 43 | errorWidget: (context, url, error) { 44 | //TODO: this crash the app when getting 404 and in debug mode, see :https://github.com/Baseflow/flutter_cached_network_image/issues/504 45 | return CachedNetworkImage( 46 | imageUrl: 47 | 'https://4.bp.blogspot.com/-Jx21kNqFSTU/UXemtqPhZCI/AAAAAAAAh74/BMGSzpU6F48/s1600/funny-cat-pictures-047-001.jp', 48 | ); 49 | }), 50 | ); 51 | } 52 | } 53 | 54 | class Divider extends StatelessWidget { 55 | const Divider({ 56 | Key? key, 57 | }) : super(key: key); 58 | 59 | @override 60 | Widget build(BuildContext context) { 61 | return Expanded( 62 | child: Align( 63 | alignment: Alignment.bottomCenter, 64 | child: Container( 65 | height: 1, 66 | color: CupertinoColors.systemGrey5, 67 | ), 68 | ), 69 | ); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | 36 | # Symbolication related 37 | app.*.symbols 38 | 39 | # Obfuscation related 40 | app.*.map.json 41 | 42 | # Android Studio will place build artifacts here 43 | /android/app/debug 44 | /android/app/profile 45 | /android/app/release 46 | lib/production_app_config.dart 47 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled. 5 | 6 | version: 7 | revision: b06b8b2710955028a6b562f5aa6fe62941d6febf 8 | channel: stable 9 | 10 | project_type: app 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf 17 | base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf 18 | - platform: android 19 | create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf 20 | base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf 21 | 22 | # User provided section 23 | 24 | # List of Local paths (relative to this file) that should be 25 | # ignored by the migrate tool. 26 | # 27 | # Files that are not part of the templates will be ignored by default. 28 | unmanaged_files: 29 | - 'lib/main.dart' 30 | - 'ios/Runner.xcodeproj/project.pbxproj' 31 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/README.md: -------------------------------------------------------------------------------- 1 | # Stream Chat v1 2 | 3 | ![](https://raw.githubusercontent.com/GetStream/flutter-samples/master/images/sdk_hero_v4.png) 4 | 5 | Stream Chat V1 is a sample app implemented using Stream Chat and Flutter. It is a fully fledged messaging app built using a combination of our pre-made widgets and custom Flutter widgets. 6 | 7 | It supports several advanced features like: 8 | 9 | - Channels list UI 10 | - Channel UI 11 | - Message reactions 12 | - Link preview 13 | - Image, video and file attachments 14 | - Editing and deleting messages 15 | - Typing indicators 16 | - Read indicators 17 | - Image gallery 18 | - GIF support 19 | - Light and dark themes 20 | - Threads 21 | - Slash commands 22 | - Markdown message formatting 23 | - Count for unread messages 24 | 25 | ![Features iOS](https://user-images.githubusercontent.com/20601437/110333493-eb023a80-8021-11eb-8fb1-b74f9ef37897.gif) 26 | 27 | ## Getting Started 28 | 29 | Before running this project please ensure Flutter is installed and configured on your machine. If you're new to Flutter, please checkout the [official guide](https://flutter.dev/docs/get-started/install) with installation instructions for your OS. 30 | 31 | 32 | 33 | This project is only configured to support the following platforms: 34 | 35 | - Android 36 | - iOS 37 | 38 | Web and Desktop are not supported at this time. 39 | 40 | After installing Flutter and the necessary toolchain for your device (Android or iOS), connect your device or open your emulator before running the following: 41 | 42 | **Clone the repo** 43 | 44 | ```bash 45 | git clone https://github.com/GetStream/flutter-samples 46 | ``` 47 | 48 | **Open the app folder** 49 | 50 | ```bash 51 | cd flutter-samples/stream_chat_v1 52 | ``` 53 | 54 | **Install package dependencies:** 55 | 56 | ```bash 57 | flutter packages get 58 | ``` 59 | 60 | **Open or create an emulator** 61 | 62 | ```bash 63 | # To run an emulator, run 'flutter emulators --launch '. 64 | # To create a new emulator, run 'flutter emulators --create [--name xyz]'. 65 | # You can find more information on managing emulators at the links below: 66 | # [https://developer.android.com/studio/run/managing-avds](https://developer.android.com/studio/run/managing-avds)[https://developer.android.com/studio/command-line/avdmanager](https://developer.android.com/studio/command-line/avdmanager) 67 | ``` 68 | 69 | **Run the project on your device or emulator:** 70 | 71 | ```bash 72 | flutter run 73 | ``` 74 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/android/app/debug.keystore -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/app/src/main/kotlin/com/example/example/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.example 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/app/src/main/res/drawable-anydpi-v24/ic_notification.xml: -------------------------------------------------------------------------------- 1 | 8 | 12 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/app/src/main/res/drawable-anydpi-v24/ic_notification_in_app.xml: -------------------------------------------------------------------------------- 1 | 7 | 11 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/app/src/main/res/drawable-hdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/android/app/src/main/res/drawable-hdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/app/src/main/res/drawable-hdpi/ic_notification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/android/app/src/main/res/drawable-hdpi/ic_notification.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/app/src/main/res/drawable-hdpi/ic_notification_in_app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/android/app/src/main/res/drawable-hdpi/ic_notification_in_app.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/app/src/main/res/drawable-mdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/android/app/src/main/res/drawable-mdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/app/src/main/res/drawable-mdpi/ic_notification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/android/app/src/main/res/drawable-mdpi/ic_notification.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/app/src/main/res/drawable-mdpi/ic_notification_in_app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/android/app/src/main/res/drawable-mdpi/ic_notification_in_app.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/app/src/main/res/drawable-xhdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/android/app/src/main/res/drawable-xhdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/app/src/main/res/drawable-xhdpi/ic_notification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/android/app/src/main/res/drawable-xhdpi/ic_notification.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/app/src/main/res/drawable-xhdpi/ic_notification_in_app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/android/app/src/main/res/drawable-xhdpi/ic_notification_in_app.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/app/src/main/res/drawable-xxhdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/android/app/src/main/res/drawable-xxhdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/app/src/main/res/drawable-xxhdpi/ic_notification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/android/app/src/main/res/drawable-xxhdpi/ic_notification.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/app/src/main/res/drawable-xxhdpi/ic_notification_in_app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/android/app/src/main/res/drawable-xxhdpi/ic_notification_in_app.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/build.gradle: -------------------------------------------------------------------------------- 1 | allprojects { 2 | repositories { 3 | google() 4 | mavenCentral() 5 | } 6 | } 7 | 8 | rootProject.buildDir = '../build' 9 | subprojects { 10 | project.buildDir = "${rootProject.buildDir}/${project.name}" 11 | 12 | afterEvaluate { 13 | // check if `android` block is available and namespace isn't set 14 | if(it.hasProperty('android') && it.android.namespace == null){ 15 | def manifest = new XmlSlurper().parse(file(it.android.sourceSets.main.manifest.srcFile)) 16 | def packageName = manifest.@package.text() 17 | android.namespace= packageName 18 | } 19 | } 20 | 21 | } 22 | subprojects { 23 | project.evaluationDependsOn(':app') 24 | } 25 | 26 | tasks.register("clean", Delete) { 27 | delete rootProject.buildDir 28 | } 29 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Oct 22 11:03:39 CEST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip 7 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | def flutterSdkPath = { 3 | def properties = new Properties() 4 | file("local.properties").withInputStream { properties.load(it) } 5 | def flutterSdkPath = properties.getProperty("flutter.sdk") 6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 7 | return flutterSdkPath 8 | }() 9 | 10 | includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") 11 | 12 | repositories { 13 | google() 14 | mavenCentral() 15 | gradlePluginPortal() 16 | } 17 | } 18 | 19 | plugins { 20 | id "dev.flutter.flutter-plugin-loader" version "1.0.0" 21 | id "com.android.application" version '8.3.2' apply false 22 | id "org.jetbrains.kotlin.android" version "1.9.24" apply false 23 | } 24 | 25 | include ":app" -------------------------------------------------------------------------------- /packages/stream_chat_v1/android/settings_aar.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/assets/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/assets/ic_launcher.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/assets/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/assets/ic_launcher_background.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/assets/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/assets/ic_launcher_foreground.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/assets/icon_arrow_right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/assets/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/.ruby-version: -------------------------------------------------------------------------------- 1 | 3.1.0 -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Flutter/.last_build_id: -------------------------------------------------------------------------------- 1 | c3757524e06ced55f3d1b83411b9e99c -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 12.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gem "fastlane" 4 | 5 | plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile') 6 | eval_gemfile(plugins_path) if File.exist?(plugins_path) 7 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @main 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | let sharedDefaults = UserDefaults(suiteName: "group.io.getstream.flutter") 7 | 8 | override func application( 9 | _ application: UIApplication, 10 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 11 | ) -> Bool { 12 | if let messageQueue = sharedDefaults?.stringArray(forKey: "messageQueue") { 13 | UserDefaults.standard.setValue(messageQueue, forKey: "flutter.messageQueue") 14 | sharedDefaults?.removeObject(forKey: "messageQueue") 15 | } 16 | 17 | if #available(iOS 10.0, *) { 18 | UNUserNotificationCenter.current().delegate = self 19 | } 20 | 21 | GeneratedPluginRegistrant.register(with: self) 22 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 23 | } 24 | 25 | override func applicationDidEnterBackground(_ application: UIApplication) { 26 | if let apiKey = UserDefaults.standard.string(forKey: "flutter.KEY_API_KEY") { 27 | sharedDefaults?.setValue(apiKey, forKey: "KEY_API_KEY") 28 | } 29 | 30 | if let token = UserDefaults.standard.string(forKey: "flutter.KEY_TOKEN") { 31 | sharedDefaults?.setValue(token, forKey: "KEY_TOKEN") 32 | } 33 | 34 | if let userId = UserDefaults.standard.string(forKey: "flutter.KEY_USER_ID") { 35 | sharedDefaults?.setValue(userId, forKey: "KEY_USER_ID") 36 | } 37 | } 38 | 39 | override func applicationWillEnterForeground(_ application: UIApplication) { 40 | if let messageQueue = sharedDefaults?.stringArray(forKey: "messageQueue") { 41 | UserDefaults.standard.setValue(messageQueue, forKey: "flutter.messageQueue") 42 | sharedDefaults?.removeObject(forKey: "messageQueue") 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "background.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "LaunchImage.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "LaunchImage@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "LaunchImage@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner/GoogleService-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CLIENT_ID 6 | 674907137625-flarfn9cefu4lermgpbc4b8rm8l15ian.apps.googleusercontent.com 7 | REVERSED_CLIENT_ID 8 | com.googleusercontent.apps.674907137625-flarfn9cefu4lermgpbc4b8rm8l15ian 9 | ANDROID_CLIENT_ID 10 | 674907137625-2scfo9a5cs074dced5vhm712ej6hhtpm.apps.googleusercontent.com 11 | API_KEY 12 | AIzaSyBTAsaKFUPLAJqfsLiz0yPUVzwrgJkOwSE 13 | GCM_SENDER_ID 14 | 674907137625 15 | PLIST_VERSION 16 | 1 17 | BUNDLE_ID 18 | io.getstream.flutter 19 | PROJECT_ID 20 | stream-chat-internal 21 | STORAGE_BUCKET 22 | stream-chat-internal.appspot.com 23 | IS_ADS_ENABLED 24 | 25 | IS_ANALYTICS_ENABLED 26 | 27 | IS_APPINVITE_ENABLED 28 | 29 | IS_GCM_ENABLED 30 | 31 | IS_SIGNIN_ENABLED 32 | 33 | GOOGLE_APP_ID 34 | 1:674907137625:ios:cafb9fb076a453c4d7f348 35 | DATABASE_URL 36 | https://stream-chat-internal.firebaseio.com 37 | 38 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/Runner/Runner.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | com.apple.security.application-groups 8 | 9 | group.io.getstream.flutter 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/fastlane/Appfile: -------------------------------------------------------------------------------- 1 | # app_identifier("[[APP_IDENTIFIER]]") # The bundle identifier of your app 2 | # apple_id("[[APPLE_ID]]") # Your Apple email address 3 | 4 | 5 | # For more information about the Appfile, see: 6 | # https://docs.fastlane.tools/advanced/#appfile 7 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/fastlane/Fastfile: -------------------------------------------------------------------------------- 1 | fastlane_version "2.195.0" 2 | default_platform :ios 3 | 4 | before_all do 5 | if is_ci 6 | setup_ci() 7 | end 8 | end 9 | 10 | desc "Installs all Certs and Profiles necessary for development and ad-hoc" 11 | lane :match_me do 12 | match( 13 | type: "adhoc", 14 | app_identifier: [ 15 | "io.getstream.flutter", 16 | ], 17 | readonly: is_ci, 18 | force_for_new_devices: true 19 | ) 20 | end 21 | 22 | desc "Installs all Certs and Profiles necessary for appstore" 23 | lane :match_appstore do 24 | match( 25 | type: "appstore", 26 | app_identifier: [ 27 | "io.getstream.flutter", 28 | ], 29 | readonly: is_ci 30 | ) 31 | end 32 | 33 | platform :ios do 34 | desc "Deploy build to Firebase" 35 | lane :deploy_to_firebase do 36 | match_me 37 | 38 | gym( 39 | workspace: "./Runner.xcworkspace", 40 | scheme: "Runner", 41 | export_method: "ad-hoc", 42 | export_options: "./fastlane/beta_gym_export_options.plist", 43 | silent: true, 44 | clean: true, 45 | include_symbols: true, 46 | output_directory: "./dist" 47 | ) 48 | 49 | message = changelog_from_git_commits(commits_count: 10) 50 | 51 | firebase_app_distribution( 52 | app: "1:674907137625:ios:cafb9fb076a453c4d7f348", 53 | groups: "ios-stream-testers" 54 | ) 55 | end 56 | end 57 | 58 | platform :ios do 59 | desc "Deploy build to TestFlight" 60 | lane :deploy_to_testflight do 61 | match_appstore 62 | 63 | settings_to_override = { 64 | :BUNDLE_IDENTIFIER => "io.getstream.flutter", 65 | :PROVISIONING_PROFILE_SPECIFIER => "match AppStore io.getstream.flutter 1651569762" 66 | } 67 | 68 | gym( 69 | workspace: "./Runner.xcworkspace", 70 | scheme: "Runner", 71 | export_method: "app-store", 72 | export_options: "./fastlane/testflight_gym_export_options.plist", 73 | silent: true, 74 | clean: true, 75 | xcargs: settings_to_override, 76 | include_symbols: true, 77 | output_directory: "./dist", 78 | ) 79 | 80 | message = changelog_from_git_commits(commits_count: 10) 81 | 82 | upload_to_testflight( 83 | groups: ['Public'], 84 | distribute_external: true, 85 | changelog: message, 86 | username: 'salvatore@getstream.io', 87 | reject_build_waiting_for_review: true 88 | ) 89 | end 90 | end 91 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/fastlane/Matchfile: -------------------------------------------------------------------------------- 1 | git_url("https://github.com/GetStream/ios-certificates") 2 | 3 | storage_mode("git") 4 | 5 | username("salvatore@getstream.io") 6 | 7 | team_id("EHV7XZLAHA") 8 | 9 | # app_identifier(["tools.fastlane.app", "tools.fastlane.app2"]) 10 | 11 | # username("user@fastlane.tools") # Your Apple Developer Portal username 12 | 13 | # For all available options run `fastlane match --help` 14 | # Remove the # in the beginning of the line to enable the other options 15 | 16 | # The docs are available on https://docs.fastlane.tools/actions/match 17 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/fastlane/Pluginfile: -------------------------------------------------------------------------------- 1 | # Autogenerated by fastlane 2 | # 3 | # Ensure this file is checked in to source control! 4 | 5 | gem 'fastlane-plugin-firebase_app_distribution' 6 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/fastlane/README.md: -------------------------------------------------------------------------------- 1 | fastlane documentation 2 | ================ 3 | # Installation 4 | 5 | Make sure you have the latest version of the Xcode command line tools installed: 6 | 7 | ``` 8 | xcode-select --install 9 | ``` 10 | 11 | Install _fastlane_ using 12 | ``` 13 | [sudo] gem install fastlane -NV 14 | ``` 15 | or alternatively using `brew install fastlane` 16 | 17 | # Available Actions 18 | ### match_me 19 | ``` 20 | fastlane match_me 21 | ``` 22 | Installs all Certs and Profiles necessary for development and ad-hoc 23 | ### match_appstore 24 | ``` 25 | fastlane match_appstore 26 | ``` 27 | Installs all Certs and Profiles necessary for appstore 28 | 29 | ---- 30 | 31 | ## iOS 32 | ### ios deploy_to_firebase 33 | ``` 34 | fastlane ios deploy_to_firebase 35 | ``` 36 | Deploy build to Firebase 37 | ### ios deploy_to_testflight 38 | ``` 39 | fastlane ios deploy_to_testflight 40 | ``` 41 | Deploy build to TestFlight 42 | 43 | ---- 44 | 45 | This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run. 46 | More information about fastlane can be found on [fastlane.tools](https://fastlane.tools). 47 | The documentation of fastlane can be found on [docs.fastlane.tools](https://docs.fastlane.tools). 48 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/fastlane/beta_gym_export_options.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | iCloudContainerEnvironment 6 | Development 7 | provisioningProfiles 8 | 9 | io.getstream.flutter 10 | match AdHoc io.getstream.flutter 11 | 12 | 13 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/fastlane/report.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/fastlane/testflight_gym_export_options.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | iCloudContainerEnvironment 6 | Production 7 | provisioningProfiles 8 | 9 | io.getstream.flutter 10 | match AppStore io.getstream.flutter 1651569762 11 | 12 | 13 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/ios/firebase_app_id_file.json: -------------------------------------------------------------------------------- 1 | { 2 | "file_generated_by": "FlutterFire CLI", 3 | "purpose": "FirebaseAppID & ProjectID for this Firebase app in this directory", 4 | "GOOGLE_APP_ID": "1:674907137625:ios:cafb9fb076a453c4d7f348", 5 | "FIREBASE_PROJECT_ID": "stream-chat-internal", 6 | "GCM_SENDER_ID": "674907137625" 7 | } -------------------------------------------------------------------------------- /packages/stream_chat_v1/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:example/app.dart'; 4 | import 'package:example/utils/app_config.dart'; 5 | import 'package:firebase_core/firebase_core.dart'; 6 | import 'package:flutter/foundation.dart'; 7 | import 'package:flutter/material.dart'; 8 | import 'package:sentry_flutter/sentry_flutter.dart'; 9 | 10 | import 'firebase_options.dart'; 11 | 12 | Future main() async { 13 | /// Captures errors reported by the Flutter framework. 14 | FlutterError.onError = (FlutterErrorDetails details) { 15 | if (kDebugMode) { 16 | // In development mode, simply print to console. 17 | FlutterError.dumpErrorToConsole(details); 18 | } else { 19 | // In production mode, report to the application zone to report to sentry. 20 | Zone.current.handleUncaughtError(details.exception, details.stack!); 21 | } 22 | }; 23 | 24 | /// Captures errors reported by the native environment, including native iOS 25 | /// and Android code. 26 | Future reportError(dynamic error, StackTrace stackTrace) async { 27 | // Print the exception to the console. 28 | if (kDebugMode) { 29 | // Print the full stacktrace in debug mode. 30 | print(stackTrace); 31 | return; 32 | } else { 33 | // Send the Exception and Stacktrace to sentry in Production mode. 34 | await Sentry.captureException(error, stackTrace: stackTrace); 35 | } 36 | } 37 | 38 | /// Runs the app wrapped in a [Zone] that captures errors and sends them to 39 | /// sentry. 40 | runZonedGuarded( 41 | () async { 42 | WidgetsFlutterBinding.ensureInitialized(); 43 | 44 | // Wait for Sentry and Firebase to initialize before running the app. 45 | await Future.wait([ 46 | SentryFlutter.init((options) => options.dsn = sentryDsn), 47 | Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform), 48 | ]); 49 | 50 | runApp(const StreamChatSampleApp()); 51 | }, 52 | reportError, 53 | ); 54 | } 55 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/lib/pages/thread_list_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:example/pages/thread_page.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:stream_chat_flutter/stream_chat_flutter.dart'; 4 | 5 | class ThreadListPage extends StatefulWidget { 6 | const ThreadListPage({super.key}); 7 | 8 | @override 9 | State createState() => _ThreadListPageState(); 10 | } 11 | 12 | class _ThreadListPageState extends State { 13 | late final controller = StreamThreadListController( 14 | client: StreamChat.of(context).client, 15 | ); 16 | 17 | @override 18 | void dispose() { 19 | controller.dispose(); 20 | super.dispose(); 21 | } 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | return Column( 26 | children: [ 27 | ValueListenableBuilder( 28 | valueListenable: controller.unseenThreadIds, 29 | builder: (_, unreadThreads, __) => StreamUnreadThreadsBanner( 30 | unreadThreads: unreadThreads, 31 | onTap: () => controller 32 | .refresh(resetValue: false) 33 | .then((_) => controller.clearUnseenThreadIds()), 34 | ), 35 | ), 36 | Expanded( 37 | child: StreamThreadListView( 38 | controller: controller, 39 | onThreadTap: (thread) async { 40 | final channelCid = thread.channelCid; 41 | 42 | final channel = StreamChat.of(context).client.channel( 43 | channelCid.split(':')[0], 44 | id: channelCid.split(':')[1], 45 | ); 46 | 47 | Navigator.of(context).push( 48 | MaterialPageRoute( 49 | builder: (context) { 50 | return StreamChannel( 51 | channel: channel, 52 | child: ThreadPage(parent: thread.parentMessage!), 53 | ); 54 | }, 55 | ), 56 | ); 57 | }, 58 | ), 59 | ), 60 | ], 61 | ); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/lib/routes/routes.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: constant_identifier_names 2 | 3 | import 'package:stream_chat_flutter/stream_chat_flutter.dart'; 4 | 5 | /// Application routes 6 | abstract class Routes { 7 | static const RouteConfig CHOOSE_USER = 8 | RouteConfig(name: 'choose_user', path: '/users'); 9 | static const RouteConfig ADVANCED_OPTIONS = 10 | RouteConfig(name: 'advanced_options', path: '/options'); 11 | static const ChannelRouteConfig CHANNEL_PAGE = 12 | ChannelRouteConfig(name: 'channel_page', path: 'channel/:cid'); 13 | static const RouteConfig NEW_CHAT = 14 | RouteConfig(name: 'new_chat', path: '/new_chat'); 15 | static const RouteConfig NEW_GROUP_CHAT = 16 | RouteConfig(name: 'new_group_chat', path: '/new_group_chat'); 17 | static const RouteConfig NEW_GROUP_CHAT_DETAILS = RouteConfig( 18 | name: 'new_group_chat_details', path: '/new_group_chat_details'); 19 | static const ChannelRouteConfig CHAT_INFO_SCREEN = 20 | ChannelRouteConfig(name: 'chat_info_screen', path: 'chat_info_screen'); 21 | static const ChannelRouteConfig GROUP_INFO_SCREEN = 22 | ChannelRouteConfig(name: 'group_info_screen', path: 'group_info_screen'); 23 | static const RouteConfig CHANNEL_LIST_PAGE = 24 | RouteConfig(name: 'channel_list_page', path: '/channels'); 25 | } 26 | 27 | class RouteConfig { 28 | final String name; 29 | final String path; 30 | 31 | const RouteConfig({required this.name, required this.path}); 32 | } 33 | 34 | class ChannelRouteConfig extends RouteConfig { 35 | const ChannelRouteConfig({required super.name, required super.path}); 36 | 37 | Map params(Channel channel) => {'cid': channel.cid!}; 38 | 39 | Map queryParams(Message message) => { 40 | 'mid': message.id, 41 | if (message.parentId != null) 'pid': message.parentId! 42 | }; 43 | } 44 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/lib/state/init_data.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/widgets.dart'; 2 | import 'package:stream_chat_flutter/stream_chat_flutter.dart'; 3 | import 'package:streaming_shared_preferences/streaming_shared_preferences.dart'; 4 | 5 | /// {@template init_notifier} 6 | /// [ChangeNotifier] to store [InitData] and notify listeners on change. 7 | /// {@endtemplate} 8 | class InitNotifier extends ChangeNotifier { 9 | /// {@macro init_notifier} 10 | InitNotifier(); 11 | 12 | InitData? _initData; 13 | 14 | set initData(InitData? data) { 15 | _initData = data; 16 | notifyListeners(); 17 | } 18 | 19 | InitData? get initData => _initData; 20 | } 21 | 22 | /// {@template init_data} 23 | /// Manages the initialization data for the sample application. 24 | /// 25 | /// Stores a reference to the current [StreamChatClient]. 26 | /// {@endtemplate} 27 | class InitData { 28 | /// {@macro init_data} 29 | InitData(this.client, this.preferences); 30 | 31 | final StreamChatClient client; 32 | final StreamingSharedPreferences preferences; 33 | 34 | InitData copyWith({required StreamChatClient client}) => 35 | InitData(client, preferences); 36 | } 37 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/lib/state/new_group_chat_state.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/widgets.dart'; 2 | import 'package:stream_chat_flutter/stream_chat_flutter.dart'; 3 | 4 | class NewGroupChatState extends ChangeNotifier { 5 | final users = {}; 6 | 7 | void addUser(User user) { 8 | if (!users.contains(user)) { 9 | users.add(user); 10 | notifyListeners(); 11 | } 12 | } 13 | 14 | void removeUser(User user) { 15 | if (users.contains(user)) { 16 | users.remove(user); 17 | notifyListeners(); 18 | } 19 | } 20 | 21 | void addOrRemoveUser(User user) { 22 | if (users.contains(user)) { 23 | users.remove(user); 24 | } else { 25 | users.add(user); 26 | } 27 | notifyListeners(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/lib/utils/local_notification_observer.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:example/routes/routes.dart'; 4 | import 'package:example/utils/notifications_service.dart' as pn; 5 | import 'package:flutter/material.dart'; 6 | import 'package:stream_chat_flutter/stream_chat_flutter.dart'; 7 | 8 | class LocalNotificationObserver extends NavigatorObserver { 9 | Route? currentRoute; 10 | late final StreamSubscription _subscription; 11 | 12 | LocalNotificationObserver( 13 | StreamChatClient client, 14 | GlobalKey navigatorKey, 15 | ) { 16 | _subscription = client 17 | .on( 18 | EventType.messageNew, 19 | EventType.notificationMessageNew, 20 | ) 21 | .listen((event) { 22 | _handleEvent(event, client, navigatorKey); 23 | }); 24 | } 25 | 26 | void _handleEvent(Event event, StreamChatClient client, 27 | GlobalKey navigatorKey) { 28 | if (event.message?.user?.id == client.state.currentUser?.id) { 29 | return; 30 | } 31 | final channelId = event.cid; 32 | if (currentRoute?.settings.name == Routes.CHANNEL_PAGE.name) { 33 | final args = currentRoute?.settings.arguments as Map; 34 | if (args['cid'] == channelId) { 35 | return; 36 | } 37 | } 38 | 39 | pn.showLocalNotification( 40 | event, 41 | client.state.currentUser!.id, 42 | navigatorKey.currentState!.context, 43 | ); 44 | } 45 | 46 | @override 47 | void didPop(Route route, Route? previousRoute) { 48 | currentRoute = route; 49 | } 50 | 51 | @override 52 | void didPush(Route route, Route? previousRoute) { 53 | currentRoute = route; 54 | } 55 | 56 | @override 57 | void didRemove(Route route, Route? previousRoute) { 58 | currentRoute = route; 59 | } 60 | 61 | @override 62 | void didReplace({Route? newRoute, Route? oldRoute}) { 63 | currentRoute = newRoute; 64 | } 65 | 66 | void dispose() { 67 | _subscription.cancel(); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/lib/widgets/stream_version.dart: -------------------------------------------------------------------------------- 1 | import 'package:example/utils/localizations.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter/services.dart'; 4 | import 'package:yaml/yaml.dart'; 5 | import 'package:stream_chat_flutter/stream_chat_flutter.dart'; 6 | 7 | class StreamVersion extends StatelessWidget { 8 | const StreamVersion({ 9 | Key? key, 10 | }) : super(key: key); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return Container( 15 | padding: const EdgeInsets.symmetric(vertical: 16), 16 | alignment: Alignment.bottomCenter, 17 | child: FutureBuilder( 18 | future: rootBundle.loadString('pubspec.lock'), 19 | builder: (context, snapshot) { 20 | if (!snapshot.hasData) { 21 | return const SizedBox(); 22 | } 23 | 24 | final pubspec = snapshot.data!; 25 | final yaml = loadYaml(pubspec); 26 | final streamChatDep = 27 | yaml['packages']['stream_chat_flutter']['version']; 28 | 29 | return Text( 30 | '${AppLocalizations.of(context).streamSDK} v $streamChatDep', 31 | style: TextStyle( 32 | fontSize: 14, 33 | color: StreamChatTheme.of(context).colorTheme.disabled, 34 | ), 35 | ); 36 | }, 37 | ), 38 | ); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/xcuserdata/ 7 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @NSApplicationMain 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "version": 1, 4 | "author": "xcode" 5 | }, 6 | "images": [ 7 | { 8 | "size": "16x16", 9 | "idiom": "mac", 10 | "filename": "app_icon_16.png", 11 | "scale": "1x" 12 | }, 13 | { 14 | "size": "16x16", 15 | "idiom": "mac", 16 | "filename": "app_icon_32.png", 17 | "scale": "2x" 18 | }, 19 | { 20 | "size": "32x32", 21 | "idiom": "mac", 22 | "filename": "app_icon_32.png", 23 | "scale": "1x" 24 | }, 25 | { 26 | "size": "32x32", 27 | "idiom": "mac", 28 | "filename": "app_icon_64.png", 29 | "scale": "2x" 30 | }, 31 | { 32 | "size": "128x128", 33 | "idiom": "mac", 34 | "filename": "app_icon_128.png", 35 | "scale": "1x" 36 | }, 37 | { 38 | "size": "128x128", 39 | "idiom": "mac", 40 | "filename": "app_icon_256.png", 41 | "scale": "2x" 42 | }, 43 | { 44 | "size": "256x256", 45 | "idiom": "mac", 46 | "filename": "app_icon_256.png", 47 | "scale": "1x" 48 | }, 49 | { 50 | "size": "256x256", 51 | "idiom": "mac", 52 | "filename": "app_icon_512.png", 53 | "scale": "2x" 54 | }, 55 | { 56 | "size": "512x512", 57 | "idiom": "mac", 58 | "filename": "app_icon_512.png", 59 | "scale": "1x" 60 | }, 61 | { 62 | "size": "512x512", 63 | "idiom": "mac", 64 | "filename": "app_icon_1024.png", 65 | "scale": "2x" 66 | } 67 | ] 68 | } -------------------------------------------------------------------------------- /packages/stream_chat_v1/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = stream_chat_v1 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = io.getstream.streamChatV1 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2021 io.getstream. All rights reserved. 15 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/macos/Runner/Configs/Warnings.xcconfig: -------------------------------------------------------------------------------- 1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings 2 | GCC_WARN_UNDECLARED_SELECTOR = YES 3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 6 | CLANG_WARN_PRAGMA_PACK = YES 7 | CLANG_WARN_STRICT_PROTOTYPES = YES 8 | CLANG_WARN_COMMA = YES 9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 12 | GCC_WARN_SHADOW = YES 13 | CLANG_WARN_UNREACHABLE_CODE = YES 14 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.files.user-selected.read-write 10 | 11 | com.apple.security.network.client 12 | 13 | com.apple.security.network.server 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/macos/Runner/GoogleService-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CLIENT_ID 6 | 674907137625-p3msks3snq0h22l7ekpqcf0frr0vt8mg.apps.googleusercontent.com 7 | REVERSED_CLIENT_ID 8 | com.googleusercontent.apps.674907137625-p3msks3snq0h22l7ekpqcf0frr0vt8mg 9 | ANDROID_CLIENT_ID 10 | 674907137625-2scfo9a5cs074dced5vhm712ej6hhtpm.apps.googleusercontent.com 11 | API_KEY 12 | AIzaSyBTAsaKFUPLAJqfsLiz0yPUVzwrgJkOwSE 13 | GCM_SENDER_ID 14 | 674907137625 15 | PLIST_VERSION 16 | 1 17 | BUNDLE_ID 18 | io.getstream.streamChatV1 19 | PROJECT_ID 20 | stream-chat-internal 21 | STORAGE_BUCKET 22 | stream-chat-internal.appspot.com 23 | IS_ADS_ENABLED 24 | 25 | IS_ANALYTICS_ENABLED 26 | 27 | IS_APPINVITE_ENABLED 28 | 29 | IS_GCM_ENABLED 30 | 31 | IS_SIGNIN_ENABLED 32 | 33 | GOOGLE_APP_ID 34 | 1:674907137625:ios:c719c700198c28b1d7f348 35 | DATABASE_URL 36 | https://stream-chat-internal.firebaseio.com 37 | 38 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/macos/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | $(PRODUCT_COPYRIGHT) 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController.init() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-write 8 | 9 | com.apple.security.network.client 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/macos/Runner/RunnerDebug.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.files.user-selected.read-write 10 | 11 | com.apple.security.network.client 12 | 13 | com.apple.security.network.server 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/macos/firebase_app_id_file.json: -------------------------------------------------------------------------------- 1 | { 2 | "file_generated_by": "FlutterFire CLI", 3 | "purpose": "FirebaseAppID & ProjectID for this Firebase app in this directory", 4 | "GOOGLE_APP_ID": "1:674907137625:ios:c719c700198c28b1d7f348", 5 | "FIREBASE_PROJECT_ID": "stream-chat-internal", 6 | "GCM_SENDER_ID": "674907137625" 7 | } -------------------------------------------------------------------------------- /packages/stream_chat_v1/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: example 2 | description: A new Flutter project. 3 | publish_to: "none" 4 | version: 2.2.0 5 | 6 | environment: 7 | sdk: '>=3.0.0 <4.0.0' 8 | flutter: ">=3.7.0" 9 | 10 | dependencies: 11 | flutter_app_badger: ^1.5.0 12 | flutter: 13 | sdk: flutter 14 | stream_chat_flutter: ^9.1.0 15 | stream_chat_persistence: ^9.1.0 16 | stream_chat_localizations: ^9.1.0 17 | flutter_local_notifications: ^18.0.1 18 | flutter_svg: ^2.0.7 19 | flutter_secure_storage: ^9.2.2 20 | yaml: ^3.1.2 21 | uuid: ^4.4.2 22 | streaming_shared_preferences: ^2.0.0 23 | lottie: ^3.1.2 24 | collection: ^1.17.1 25 | sentry_flutter: ^8.3.0 26 | flutter_slidable: ^3.1.1 27 | go_router: ^14.6.2 28 | provider: ^6.0.5 29 | video_player: ^2.7.0 30 | firebase_core: ^3.0.0 31 | firebase_messaging: ^15.0.0 32 | 33 | dev_dependencies: 34 | flutter_launcher_icons: ^0.14.2 35 | flutter_lints: ^5.0.0 36 | 37 | flutter: 38 | uses-material-design: true 39 | assets: 40 | - assets/ 41 | - pubspec.lock 42 | 43 | flutter_icons: 44 | image_path: "assets/ic_launcher.png" 45 | 46 | android: true 47 | adaptive_icon_background: "assets/ic_launcher_background.png" 48 | adaptive_icon_foreground: "assets/ic_launcher_foreground.png" 49 | ios: true 50 | web: 51 | generate: true 52 | windows: 53 | generate: true 54 | macos: 55 | generate: true -------------------------------------------------------------------------------- /packages/stream_chat_v1/pubspec_overrides.yaml: -------------------------------------------------------------------------------- 1 | dependency_overrides: 2 | stream_chat: 3 | git: 4 | url: https://github.com/GetStream/stream-chat-flutter.git 5 | ref: master 6 | path: packages/stream_chat 7 | stream_chat_flutter_core: 8 | git: 9 | url: https://github.com/GetStream/stream-chat-flutter.git 10 | ref: master 11 | path: packages/stream_chat_flutter_core 12 | stream_chat_flutter: 13 | git: 14 | url: https://github.com/GetStream/stream-chat-flutter.git 15 | ref: master 16 | path: packages/stream_chat_flutter 17 | stream_chat_persistence: 18 | git: 19 | url: https://github.com/GetStream/stream-chat-flutter.git 20 | ref: master 21 | path: packages/stream_chat_persistence 22 | stream_chat_localizations: 23 | git: 24 | url: https://github.com/GetStream/stream-chat-flutter.git 25 | ref: master 26 | path: packages/stream_chat_localizations 27 | 28 | # The last chewie version that supports flutter 3.24.5 29 | # Issue: https://github.com/fluttercommunity/chewie/issues/888 30 | chewie: 1.8.5 -------------------------------------------------------------------------------- /packages/stream_chat_v1/web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/web/favicon.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/web/icons/Icon-192.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/web/icons/Icon-512.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /packages/stream_chat_v1/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | Stream Chat V1 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /packages/stream_chat_v1/web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Stream Chat v1", 3 | "short_name": "SCv1", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "Sample app for the Stream Chat Flutter SDK", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } -------------------------------------------------------------------------------- /packages/stream_chat_v1/web/sql-wasm.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/flutter-samples/5e108e802ed0a88546000790b277ffe485bf3060/packages/stream_chat_v1/web/sql-wasm.wasm --------------------------------------------------------------------------------