├── .github ├── ISSUE_TEMPLATE │ ├── bug-report.md │ └── feature-request.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ ├── build.yaml │ └── pana.yaml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── SECURITY.md ├── analysis_options.yaml ├── codecov.yml ├── example ├── .gitignore ├── .metadata ├── README.md ├── android │ ├── .gitignore │ ├── app │ │ ├── build.gradle │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── magarex │ │ │ │ │ └── example │ │ │ │ │ └── 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 ├── 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 │ ├── activity_item.dart │ ├── add_activity_dialog.dart │ ├── app_user.dart │ ├── client_provider.dart │ ├── extension.dart │ ├── home.dart │ ├── main.dart │ ├── people_screen.dart │ ├── profile_screen.dart │ └── timeline_screen.dart └── pubspec.yaml ├── images ├── Screen_Shot_2021-03-31_at_4.13.52_PM.png ├── Screen_Shot_2021-04-14_at_10.55.00_AM.png ├── Screen_Shot_2021-04-14_at_10.56.17_AM.png ├── Screen_Shot_2021-04-14_at_11.08.48_AM.png ├── d1d0f6c27141606521bfa6171bfe2a84.png ├── flutter_feeds_alpha.png ├── flutter_feeds_beta_1.png ├── githubhero.png └── its-coding-time.jpeg ├── melos.yaml ├── packages ├── faye_dart │ ├── .gitignore │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── lib │ │ ├── faye_dart.dart │ │ └── src │ │ │ ├── channel.dart │ │ │ ├── client.dart │ │ │ ├── error.dart │ │ │ ├── event_emitter.dart │ │ │ ├── extensible.dart │ │ │ ├── grammar.dart │ │ │ ├── message.dart │ │ │ ├── subscription.dart │ │ │ └── timeout_helper.dart │ ├── pubspec.yaml │ └── test │ │ ├── channel_test.dart │ │ ├── error_test.dart │ │ ├── event_emitter_test.dart │ │ ├── extensible_test.dart │ │ ├── grammar_test.dart │ │ ├── mock.dart │ │ ├── models_test.dart │ │ ├── subscription_test.dart │ │ └── timeout_helper_test.dart ├── stream_feed │ ├── .gitignore │ ├── .metadata │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── build.yaml │ ├── example │ │ ├── lib │ │ │ └── main.dart │ │ └── pubspec.yaml │ ├── lib │ │ ├── src │ │ │ ├── client │ │ │ │ ├── aggregated_feed.dart │ │ │ │ ├── analytics_client.dart │ │ │ │ ├── batch_operations_client.dart │ │ │ │ ├── collections_client.dart │ │ │ │ ├── feed.dart │ │ │ │ ├── file_storage_client.dart │ │ │ │ ├── flat_feed.dart │ │ │ │ ├── image_storage_client.dart │ │ │ │ ├── index.dart │ │ │ │ ├── notification_feed.dart │ │ │ │ ├── personalization_client.dart │ │ │ │ ├── reactions_client.dart │ │ │ │ ├── stream_feed_client.dart │ │ │ │ ├── stream_feed_client_impl.dart │ │ │ │ └── stream_user.dart │ │ │ └── core │ │ │ │ ├── api │ │ │ │ ├── analytics_api.dart │ │ │ │ ├── batch_api.dart │ │ │ │ ├── collections_api.dart │ │ │ │ ├── feed_api.dart │ │ │ │ ├── files_api.dart │ │ │ │ ├── images_api.dart │ │ │ │ ├── personalization_api.dart │ │ │ │ ├── reactions_api.dart │ │ │ │ ├── responses.dart │ │ │ │ ├── responses.g.dart │ │ │ │ ├── stream_api.dart │ │ │ │ ├── stream_api_impl.dart │ │ │ │ └── users_api.dart │ │ │ │ ├── error │ │ │ │ ├── exceptions.dart │ │ │ │ ├── feeds_error_code.dart │ │ │ │ ├── index.dart │ │ │ │ ├── stream_feeds_dio_error.dart │ │ │ │ └── stream_feeds_error.dart │ │ │ │ ├── http │ │ │ │ ├── index.dart │ │ │ │ ├── interceptor │ │ │ │ │ └── logging_interceptor.dart │ │ │ │ ├── location.dart │ │ │ │ ├── stream_http_client.dart │ │ │ │ ├── stream_http_client_options.dart │ │ │ │ ├── token.dart │ │ │ │ └── typedefs.dart │ │ │ │ ├── index.dart │ │ │ │ ├── models │ │ │ │ ├── activity.dart │ │ │ │ ├── activity.g.dart │ │ │ │ ├── activity_marker.dart │ │ │ │ ├── activity_update.dart │ │ │ │ ├── activity_update.g.dart │ │ │ │ ├── attachment_file.dart │ │ │ │ ├── attachment_file.g.dart │ │ │ │ ├── collection_entry.dart │ │ │ │ ├── collection_entry.g.dart │ │ │ │ ├── crop.dart │ │ │ │ ├── enriched_activity.dart │ │ │ │ ├── enriched_activity.g.dart │ │ │ │ ├── enrichment_flags.dart │ │ │ │ ├── event.dart │ │ │ │ ├── event.g.dart │ │ │ │ ├── feed_id.dart │ │ │ │ ├── filter.dart │ │ │ │ ├── follow.dart │ │ │ │ ├── follow.g.dart │ │ │ │ ├── follow_relation.dart │ │ │ │ ├── follow_relation.g.dart │ │ │ │ ├── follow_stats.dart │ │ │ │ ├── follow_stats.g.dart │ │ │ │ ├── followers.dart │ │ │ │ ├── followers.g.dart │ │ │ │ ├── following.dart │ │ │ │ ├── following.g.dart │ │ │ │ ├── foreign_id_time_pair.dart │ │ │ │ ├── group.dart │ │ │ │ ├── group.g.dart │ │ │ │ ├── index.dart │ │ │ │ ├── lookup_attribute.dart │ │ │ │ ├── next_params.dart │ │ │ │ ├── notification_feed_meta.dart │ │ │ │ ├── notification_feed_meta.g.dart │ │ │ │ ├── open_graph_data.dart │ │ │ │ ├── open_graph_data.g.dart │ │ │ │ ├── paginated.dart │ │ │ │ ├── paginated_activities.dart │ │ │ │ ├── paginated_activities.g.dart │ │ │ │ ├── paginated_activities_group.dart │ │ │ │ ├── paginated_activities_group.g.dart │ │ │ │ ├── paginated_reactions.dart │ │ │ │ ├── paginated_reactions.g.dart │ │ │ │ ├── personalized_feed.dart │ │ │ │ ├── personalized_feed.g.dart │ │ │ │ ├── reaction.dart │ │ │ │ ├── reaction.g.dart │ │ │ │ ├── realtime_message.dart │ │ │ │ ├── realtime_message.g.dart │ │ │ │ ├── resize.dart │ │ │ │ ├── thumbnail.dart │ │ │ │ ├── user.dart │ │ │ │ └── user.g.dart │ │ │ │ ├── platform_detector │ │ │ │ ├── platform_detector.dart │ │ │ │ ├── platform_detector_io.dart │ │ │ │ ├── platform_detector_stub.dart │ │ │ │ └── platform_detector_web.dart │ │ │ │ └── util │ │ │ │ ├── default.dart │ │ │ │ ├── enrichment.dart │ │ │ │ ├── extension.dart │ │ │ │ ├── index.dart │ │ │ │ ├── parse_next.dart │ │ │ │ ├── routes.dart │ │ │ │ ├── serializer.dart │ │ │ │ ├── token_helper.dart │ │ │ │ ├── typedefs.dart │ │ │ │ └── utc_converter.dart │ │ ├── stream_feed.dart │ │ └── version.dart │ ├── pubspec.yaml │ └── test │ │ ├── aggregated_client_test.dart │ │ ├── analytics_api_test.dart │ │ ├── analytics_client_test.dart │ │ ├── assets │ │ ├── example.pdf │ │ └── test_image.jpeg │ │ ├── collections_api_test.dart │ │ ├── collections_client_test.dart │ │ ├── enrichment_test.dart │ │ ├── execeptions_test.dart │ │ ├── faye_client_test.dart │ │ ├── feed_api_test.dart │ │ ├── feed_client_test.dart │ │ ├── files_api_test.dart │ │ ├── files_client_test.dart │ │ ├── fixtures │ │ ├── activity.json │ │ ├── activity_update_with_foreign_id.json │ │ ├── activity_update_with_id.json │ │ ├── attachment_file.json │ │ ├── audio.json │ │ ├── collection_entry.json │ │ ├── enriched_activity.json │ │ ├── enriched_activity_collection_entry.json │ │ ├── enriched_activity_issue61.json │ │ ├── follow.json │ │ ├── follow_stats.json │ │ ├── group.json │ │ ├── group_enriched_activity.json │ │ ├── image.json │ │ ├── meta.json │ │ ├── notification_group.json │ │ ├── open_graph_data.json │ │ ├── paginated_reactions.json │ │ ├── reaction.json │ │ ├── realtime_message.json │ │ ├── realtime_message_issue89.json │ │ ├── unfollow_relation.json │ │ ├── user.json │ │ └── video.json │ │ ├── flat_client_test.dart │ │ ├── images_api_test.dart │ │ ├── images_client_test.dart │ │ ├── matcher.dart │ │ ├── mock.dart │ │ ├── models_test.dart │ │ ├── notification_client_test.dart │ │ ├── parse_next.dart │ │ ├── reactions_api_test.dart │ │ ├── reactions_client_test.dart │ │ ├── routes_test.dart │ │ ├── stream_api_test.dart │ │ ├── stream_feed_client_test.dart │ │ ├── stream_feeds_error_test.dart │ │ ├── stream_http_client_test.dart │ │ ├── token_helper_test.dart │ │ ├── users_api_test.dart │ │ ├── users_client_test.dart │ │ ├── utils.dart │ │ ├── utils_test.dart │ │ └── version_test.dart ├── stream_feed_flutter │ ├── .gitignore │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── example │ │ ├── .gitignore │ │ ├── .metadata │ │ ├── README.md │ │ ├── analysis_options.yaml │ │ ├── android │ │ │ ├── .gitignore │ │ │ ├── app │ │ │ │ ├── build.gradle │ │ │ │ └── src │ │ │ │ │ ├── debug │ │ │ │ │ └── AndroidManifest.xml │ │ │ │ │ ├── main │ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ │ ├── kotlin │ │ │ │ │ │ └── com │ │ │ │ │ │ │ └── example │ │ │ │ │ │ │ └── example │ │ │ │ │ │ │ └── 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 │ │ ├── assets │ │ │ └── stream_logo.png │ │ ├── ios │ │ │ ├── .gitignore │ │ │ ├── Flutter │ │ │ │ ├── AppFrameworkInfo.plist │ │ │ │ ├── Debug.xcconfig │ │ │ │ └── Release.xcconfig │ │ │ ├── Podfile │ │ │ ├── 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 │ │ │ └── main.dart │ │ ├── macos │ │ │ ├── .gitignore │ │ │ ├── Flutter │ │ │ │ ├── Flutter-Debug.xcconfig │ │ │ │ ├── Flutter-Release.xcconfig │ │ │ │ └── GeneratedPluginRegistrant.swift │ │ │ ├── Podfile │ │ │ ├── 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 │ │ │ │ ├── Info.plist │ │ │ │ ├── MainFlutterWindow.swift │ │ │ │ └── Release.entitlements │ │ ├── pubspec.yaml │ │ └── web │ │ │ ├── favicon.png │ │ │ ├── icons │ │ │ ├── Icon-192.png │ │ │ ├── Icon-512.png │ │ │ ├── Icon-maskable-192.png │ │ │ └── Icon-maskable-512.png │ │ │ ├── index.html │ │ │ └── manifest.json │ ├── lib │ │ ├── src │ │ │ ├── default │ │ │ │ ├── default.dart │ │ │ │ ├── empty_state.dart │ │ │ │ ├── error_state.dart │ │ │ │ └── loading_state.dart │ │ │ ├── media │ │ │ │ ├── fullscreen_media.dart │ │ │ │ ├── gallery_header.dart │ │ │ │ ├── gallery_preview.dart │ │ │ │ ├── media_widget.dart │ │ │ │ └── video_package.dart │ │ │ ├── theme │ │ │ │ ├── child_reaction_theme.dart │ │ │ │ ├── gallery_header_theme.dart │ │ │ │ ├── gif_dialog_theme.dart │ │ │ │ ├── og_card_theme.dart │ │ │ │ ├── reaction_theme.dart │ │ │ │ ├── stream_feed_theme.dart │ │ │ │ ├── themes.dart │ │ │ │ └── user_bar_theme.dart │ │ │ ├── utils │ │ │ │ ├── constants.dart │ │ │ │ ├── debug.dart │ │ │ │ ├── display.dart │ │ │ │ ├── extensions.dart │ │ │ │ ├── tag_detector.dart │ │ │ │ └── typedefs.dart │ │ │ └── widgets │ │ │ │ ├── activity │ │ │ │ ├── activity.dart │ │ │ │ ├── content.dart │ │ │ │ ├── footer.dart │ │ │ │ └── header.dart │ │ │ │ ├── buttons │ │ │ │ ├── buttons.dart │ │ │ │ ├── like.dart │ │ │ │ ├── reaction.dart │ │ │ │ ├── reactive_elevated_button.dart │ │ │ │ ├── reply_button.dart │ │ │ │ └── repost.dart │ │ │ │ ├── circular_progress_indicator.dart │ │ │ │ ├── comment │ │ │ │ ├── button.dart │ │ │ │ ├── field.dart │ │ │ │ ├── item.dart │ │ │ │ └── textarea.dart │ │ │ │ ├── dialogs │ │ │ │ ├── comment.dart │ │ │ │ ├── delete_activity_dialog.dart │ │ │ │ ├── dialogs.dart │ │ │ │ ├── emojis.dart │ │ │ │ ├── gif.dart │ │ │ │ └── medias.dart │ │ │ │ ├── human_readable_timestamp.dart │ │ │ │ ├── icons.dart │ │ │ │ ├── interactive_text.dart │ │ │ │ ├── og │ │ │ │ └── card.dart │ │ │ │ ├── pages │ │ │ │ ├── compose_view.dart │ │ │ │ ├── flat_feed_list_view.dart │ │ │ │ └── reaction_list_view.dart │ │ │ │ ├── stream_feed_app.dart │ │ │ │ └── user │ │ │ │ ├── avatar.dart │ │ │ │ ├── user_bar.dart │ │ │ │ └── username.dart │ │ ├── stream_feed_flutter.dart │ │ └── svgs │ │ │ ├── avatar.svg │ │ │ ├── categories.svg │ │ │ ├── close.svg │ │ │ ├── gear.svg │ │ │ ├── love_active.svg │ │ │ ├── love_inactive.svg │ │ │ ├── post.svg │ │ │ ├── reply.svg │ │ │ ├── repost.svg │ │ │ └── share.svg │ ├── pubspec.yaml │ └── test │ │ ├── activity_test.dart │ │ ├── avatar_test.dart │ │ ├── button_test.dart │ │ ├── card_test.dart │ │ ├── circular_progress_indicator_test.dart │ │ ├── comment_test.dart │ │ ├── compose_view_test.dart │ │ ├── dialogs_test.dart │ │ ├── flat_feed_test.dart │ │ ├── flutter_test_config.dart │ │ ├── goldens │ │ ├── activity_footer.png │ │ ├── avatar.png │ │ ├── avatar_icon.png │ │ ├── buttons_grid.png │ │ ├── categories_icon.png │ │ ├── close.png │ │ ├── gear_icon.png │ │ ├── love_active_icon.png │ │ ├── love_inactive_icon.png │ │ ├── post_icon.png │ │ ├── reaction_toggle_onAddReaction.png │ │ ├── reaction_toggle_onRemoveReaction.png │ │ ├── reply_icon.png │ │ ├── repost.png │ │ ├── repost_icon.png │ │ └── share_icon.png │ │ ├── human_readable_timestamp_test.dart │ │ ├── icons_test.dart │ │ ├── interactive_text_test.dart │ │ ├── media │ │ ├── fullscreen_media_test.dart │ │ ├── gallery_header_test.dart │ │ └── gallery_preview_test.dart │ │ ├── mock.dart │ │ ├── tag_detector_test.dart │ │ ├── theme │ │ ├── gallery_header_theme_test.dart │ │ ├── gif_dialog_theme_test.dart │ │ ├── og_card_theme_test.dart │ │ ├── reaction_theme_test.dart │ │ ├── stream_feed_theme_test.dart │ │ └── userbar_theme_test.dart │ │ └── user_bar_test.dart └── stream_feed_flutter_core │ ├── .gitignore │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── example │ ├── .gitignore │ ├── .metadata │ ├── README.md │ ├── analysis_options.yaml │ ├── android │ │ ├── .gitignore │ │ ├── app │ │ │ ├── build.gradle │ │ │ └── src │ │ │ │ ├── debug │ │ │ │ └── AndroidManifest.xml │ │ │ │ ├── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── kotlin │ │ │ │ │ └── com │ │ │ │ │ │ └── example │ │ │ │ │ │ └── example │ │ │ │ │ │ └── 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 │ │ ├── Podfile │ │ ├── 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 │ │ └── main.dart │ ├── macos │ │ ├── .gitignore │ │ ├── Flutter │ │ │ ├── Flutter-Debug.xcconfig │ │ │ ├── Flutter-Release.xcconfig │ │ │ └── GeneratedPluginRegistrant.swift │ │ ├── Podfile │ │ ├── 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 │ │ │ ├── Info.plist │ │ │ ├── MainFlutterWindow.swift │ │ │ └── Release.entitlements │ ├── pubspec.yaml │ └── web │ │ ├── favicon.png │ │ ├── icons │ │ ├── Icon-192.png │ │ ├── Icon-512.png │ │ ├── Icon-maskable-192.png │ │ └── Icon-maskable-512.png │ │ ├── index.html │ │ └── manifest.json │ ├── lib │ ├── src │ │ ├── aggregated_feed_core.dart │ │ ├── attachment.dart │ │ ├── bloc │ │ │ ├── activities_manager.dart │ │ │ ├── bloc.dart │ │ │ ├── feed_bloc.dart │ │ │ ├── grouped_activities_manager.dart │ │ │ ├── provider.dart │ │ │ └── reactions_manager.dart │ │ ├── extensions.dart │ │ ├── flat_feed_core.dart │ │ ├── media.dart │ │ ├── reactions_list_core.dart │ │ ├── typedefs.dart │ │ ├── upload │ │ │ ├── states.dart │ │ │ ├── upload.dart │ │ │ ├── upload_controller.dart │ │ │ └── widgets.dart │ │ └── upload_list_core.dart │ └── stream_feed_flutter_core.dart │ ├── pubspec.yaml │ └── test │ ├── aggregated_feed_core_test.dart │ ├── assets │ ├── cavalier.mp3 │ ├── example.pdf │ ├── penserais.mp3 │ ├── test_image.jpeg │ └── test_image2.png │ ├── bloc │ ├── bloc_test.dart │ ├── extensions_test.dart │ └── upload_test.dart │ ├── flat_feed_core_test.dart │ ├── media_test.dart │ ├── mocks.dart │ ├── reactions_list_core_test.dart │ ├── states │ └── upload_test.dart │ ├── stream_feed_flutter_core_test.dart │ ├── upload_core_test.dart │ └── utils.dart └── scripts └── coverage.sh /.github/ISSUE_TEMPLATE/bug-report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **What version of Flutter do you use?** 14 | 15 | **What package are you using? What version?** 16 | 17 | **What platform is it about?** 18 | - [ ] Android 19 | - [ ] iOS 20 | - [ ] Web 21 | - [ ] Windows 22 | - [ ] MacOS 23 | - [ ] Linux 24 | 25 | **a copy of `flutter doctor --verbose`** 26 | 27 | **To Reproduce** 28 | Steps to reproduce the behavior: 29 | 1. Go to '...' 30 | 2. Click on '....' 31 | 3. Scroll down to '....' 32 | 4. See error 33 | 34 | **Expected behavior** 35 | A clear and concise description of what you expected to happen. 36 | 37 | **Screenshots** 38 | If applicable, add screenshots to help explain your problem. 39 | 40 | **Logs ** 41 | Run `flutter analyze` and attach any output of that command below. 42 | If there are any analysis errors, try resolving them before filing this issue. 43 | 44 | Paste the output of running `flutter doctor -v` here. 45 | 46 | **Additional context** 47 | Add any other context about the problem here. 48 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | # Submit a pull request 2 | 3 | ## CLA 4 | 5 | - [ ] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required). 6 | - [ ] The code changes follow best practices 7 | - [ ] Code changes are tested (add some information if not applicable) 8 | 9 | ## Description of the pull request 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.lock 4 | *.log 5 | *.pyc 6 | *.swp 7 | .DS_Store 8 | .atom/ 9 | .buildlog/ 10 | .history 11 | .svn/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # Visual Studio Code related 20 | .vscode/ 21 | 22 | # Flutter/Dart/Pub related 23 | **/doc/api/ 24 | .dart_tool/ 25 | .flutter-plugins 26 | .packages 27 | .pub-cache/ 28 | .pub/ 29 | build/ 30 | example/pubspec.lock 31 | coverage.lcov 32 | coverage/ 33 | packages/stream_feed_flutter/example/.flutter-plugins-dependencies 34 | packages/stream_feed_flutter/example/.flutter-plugins-dependencies 35 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Reporting a Vulnerability 2 | At Stream we are committed to the security of our Software. We appreciate your efforts in disclosing vulnerabilities responsibly and we will make every effort to acknowledge your contributions. 3 | 4 | Report security vulnerabilities at the following email address: 5 | ``` 6 | [security@getstream.io](mailto:security@getstream.io) 7 | ``` 8 | Alternatively it is also possible to open a new issue in the affected repository, tagging it with the `security` tag. 9 | 10 | A team member will acknowledge the vulnerability and will follow-up with more detailed information. A representative of the security team will be in touch if more information is needed. 11 | 12 | # Information to include in a report 13 | While we appreciate any information that you are willing to provide, please make sure to include the following: 14 | * Which repository is affected 15 | * Which branch, if relevant 16 | * Be as descriptive as possible, the team will replicate the vulnerability before working on a fix. 17 | -------------------------------------------------------------------------------- /codecov.yml: -------------------------------------------------------------------------------- 1 | ignore: 2 | - "**/*.g.dart" 3 | -------------------------------------------------------------------------------- /example/.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: d408d302e22179d598f467e11da5dd968dbdc9ec 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /example/README.md: -------------------------------------------------------------------------------- 1 | # example 2 | 3 | A new Flutter application. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /example/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 | -------------------------------------------------------------------------------- /example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/android/app/src/main/kotlin/com/magarex/example/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.magarex.example 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/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:3.5.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | jcenter() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | android.enableR8=true 5 | -------------------------------------------------------------------------------- /example/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-5.6.2-all.zip 7 | -------------------------------------------------------------------------------- /example/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 | -------------------------------------------------------------------------------- /example/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 | -------------------------------------------------------------------------------- /example/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 | 9.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/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 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /example/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 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /example/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. -------------------------------------------------------------------------------- /example/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /example/lib/client_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter/widgets.dart'; 4 | import 'package:stream_feed/stream_feed.dart'; 5 | 6 | class ClientProvider extends InheritedWidget { 7 | const ClientProvider({ 8 | Key? key, 9 | required this.client, 10 | required Widget child, 11 | }) : super(key: key, child: child); 12 | 13 | /// Access the [StreamFeedClient] from the provider to perform API actions. 14 | final StreamFeedClient client; 15 | 16 | static ClientProvider of(BuildContext context) { 17 | final client = context.dependOnInheritedWidgetOfExactType(); 18 | assert(client != null, 'Client not found in the widget tree'); 19 | return client!; 20 | } 21 | 22 | @override 23 | bool updateShouldNotify(ClientProvider old) { 24 | return old.child != child || old.client != client; 25 | } 26 | 27 | @override 28 | void debugFillProperties(DiagnosticPropertiesBuilder properties) { 29 | super.debugFillProperties(properties); 30 | properties.add(DiagnosticsProperty('client', client)); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /example/lib/extension.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:stream_feed/stream_feed.dart'; 3 | import 'package:stream_feed_example/client_provider.dart'; 4 | 5 | //ignore: public_member_api_docs 6 | extension ProviderX on BuildContext { 7 | //ignore: public_member_api_docs 8 | StreamFeedClient get client => ClientProvider.of(this).client; 9 | } 10 | 11 | //ignore: public_member_api_docs 12 | extension Snackbar on BuildContext { 13 | //ignore: public_member_api_docs 14 | void showSnackBar(final String message) { 15 | ScaffoldMessenger.of(this).showSnackBar(SnackBar(content: Text(message))); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: stream_feed_example 2 | description: A new Flutter application. 3 | 4 | publish_to: "none" # Remove this line if you wish to publish to pub.dev 5 | version: 1.0.0+1 6 | 7 | environment: 8 | sdk: ">=2.12.0 <3.0.0" 9 | 10 | dependencies: 11 | cupertino_icons: ^1.0.2 12 | flutter: 13 | sdk: flutter 14 | stream_feed: 15 | path: ../packages/stream_feed 16 | timeago: ^3.0.2 17 | 18 | dev_dependencies: 19 | flutter_test: 20 | sdk: flutter 21 | 22 | flutter: 23 | uses-material-design: true 24 | -------------------------------------------------------------------------------- /images/Screen_Shot_2021-03-31_at_4.13.52_PM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/images/Screen_Shot_2021-03-31_at_4.13.52_PM.png -------------------------------------------------------------------------------- /images/Screen_Shot_2021-04-14_at_10.55.00_AM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/images/Screen_Shot_2021-04-14_at_10.55.00_AM.png -------------------------------------------------------------------------------- /images/Screen_Shot_2021-04-14_at_10.56.17_AM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/images/Screen_Shot_2021-04-14_at_10.56.17_AM.png -------------------------------------------------------------------------------- /images/Screen_Shot_2021-04-14_at_11.08.48_AM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/images/Screen_Shot_2021-04-14_at_11.08.48_AM.png -------------------------------------------------------------------------------- /images/d1d0f6c27141606521bfa6171bfe2a84.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/images/d1d0f6c27141606521bfa6171bfe2a84.png -------------------------------------------------------------------------------- /images/flutter_feeds_alpha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/images/flutter_feeds_alpha.png -------------------------------------------------------------------------------- /images/flutter_feeds_beta_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/images/flutter_feeds_beta_1.png -------------------------------------------------------------------------------- /images/githubhero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/images/githubhero.png -------------------------------------------------------------------------------- /images/its-coding-time.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/images/its-coding-time.jpeg -------------------------------------------------------------------------------- /packages/faye_dart/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## [0.1.1+2] - (27-05-2022) 2 | - nothing new / lints 3 | 4 | ## [0.1.1+1] - (25-02-2022) 5 | 6 | - fix: implement Equatable on `FayeClient`. With this change, if you fetch your client from an `InheritedWidget` for example, `updateShouldNotify` doesn't trigger every time. 7 | 8 | 9 | ## [0.1.1] - (25-02-2022) 10 | 11 | - new: expose connexion status stream `Stream` via the `Subscription` class to check if the Faye client is unconnected, connecting, connected or disconnected, and act accordingly. 12 | 13 | 14 | ## [0.1.0] - (07-05-2021) 15 | 16 | * Initial release. 17 | -------------------------------------------------------------------------------- /packages/faye_dart/lib/faye_dart.dart: -------------------------------------------------------------------------------- 1 | library faye_dart; 2 | 3 | export 'src/client.dart' show FayeClient, FayeClientState; 4 | export 'src/error.dart'; 5 | export 'src/extensible.dart' show MessageHandler; 6 | export 'src/subscription.dart'; 7 | -------------------------------------------------------------------------------- /packages/faye_dart/lib/src/error.dart: -------------------------------------------------------------------------------- 1 | import 'package:faye_dart/src/grammar.dart' as grammar; 2 | 3 | class FayeClientError { 4 | const FayeClientError({ 5 | this.code, 6 | this.params = const [], 7 | required this.errorMessage, 8 | }); 9 | 10 | factory FayeClientError.parse(String? errorMessage) { 11 | errorMessage = errorMessage ?? ''; 12 | if (!RegExp(grammar.error).hasMatch(errorMessage)) { 13 | return FayeClientError(errorMessage: errorMessage); 14 | } 15 | 16 | final parts = errorMessage.split(':'); 17 | final code = int.parse(parts[0]); 18 | final params = parts[1].split(','); 19 | final message = parts[2]; 20 | 21 | return FayeClientError(code: code, params: params, errorMessage: message); 22 | } 23 | 24 | final int? code; 25 | final List params; 26 | final String errorMessage; 27 | 28 | @override 29 | String toString() => '$code : ${params.join(',')} : $errorMessage'; 30 | } 31 | -------------------------------------------------------------------------------- /packages/faye_dart/lib/src/extensible.dart: -------------------------------------------------------------------------------- 1 | import 'dart:collection'; 2 | 3 | import 'package:faye_dart/src/message.dart'; 4 | 5 | typedef MessageHandler = Message Function(Message message); 6 | 7 | class Extensible { 8 | late final _extensions = Queue>(); 9 | 10 | void addExtension(Map extension) => 11 | addExtensions([extension]); 12 | 13 | void addExtensions(Iterable> extensions) => 14 | _extensions.addAll(extensions); 15 | 16 | void removeExtension(Map extension) { 17 | if (_extensions.isEmpty) return; 18 | _extensions.remove(extension); 19 | } 20 | 21 | void pipeThroughExtensions( 22 | String stage, 23 | Message message, 24 | void Function(Message message) callback, 25 | ) { 26 | if (_extensions.isEmpty) return callback(message); 27 | final extensions = Queue>.from(_extensions); 28 | void pipe(Message message) { 29 | if (extensions.isEmpty) return callback(message); 30 | final extension = extensions.removeFirst(); 31 | final fn = extension[stage]; 32 | if (fn == null) return pipe(message); 33 | final modifiedMessage = fn(message); 34 | pipe(modifiedMessage); 35 | } 36 | 37 | pipe(message); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /packages/faye_dart/lib/src/grammar.dart: -------------------------------------------------------------------------------- 1 | const channelName = 2 | r'^\/(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)))+(\/(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)))+)*$'; 3 | 4 | const channelPattern = 5 | r'^(\/(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)))+)*\/\*{1,2}$'; 6 | 7 | const error = 8 | r'^([0-9][0-9][0-9]:(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)| |\/|\*|\.))*(,(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)| |\/|\*|\.))*)*:(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)| |\/|\*|\.))*|[0-9][0-9][0-9]::(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)| |\/|\*|\.))*)$'; 9 | 10 | const version = 11 | r'^([0-9])+(\.(([a-z]|[A-Z])|[0-9])(((([a-z]|[A-Z])|[0-9])|\-|\_))*)*$'; 12 | -------------------------------------------------------------------------------- /packages/faye_dart/lib/src/subscription.dart: -------------------------------------------------------------------------------- 1 | import 'package:faye_dart/src/client.dart'; 2 | import 'package:faye_dart/src/message.dart'; 3 | 4 | typedef Callback = void Function(Map? data); 5 | typedef WithChannelCallback = void Function(String, Map?); 6 | 7 | class Subscription { 8 | Subscription( 9 | this._client, 10 | this._channel, { 11 | Callback? callback, 12 | }) : _callback = callback; 13 | final FayeClient _client; 14 | final String _channel; 15 | final Callback? _callback; 16 | WithChannelCallback? _withChannel; 17 | bool _cancelled = false; 18 | 19 | /// Connexion status stream 20 | Stream get stateStream => _client.stateStream; 21 | 22 | void call(Message message) { 23 | _callback?.call(message.data); 24 | _withChannel?.call(message.channel, message.data); 25 | } 26 | 27 | Subscription withChannel(WithChannelCallback withChannel) { 28 | _withChannel = withChannel; 29 | return this; 30 | } 31 | 32 | void cancel() { 33 | if (_cancelled) return; 34 | _client.unsubscribe(_channel, this); 35 | _cancelled = true; 36 | } 37 | 38 | @override 39 | List get props => [_client, _channel, _callback, _withChannel]; 40 | } 41 | -------------------------------------------------------------------------------- /packages/faye_dart/lib/src/timeout_helper.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'package:uuid/uuid.dart'; 3 | 4 | class TimeoutHelper { 5 | final _uuid = const Uuid(); 6 | late final _timers = {}; 7 | 8 | String setTimeout(Duration duration, void Function() callback) { 9 | final id = _uuid.v1(); 10 | final timer = Timer(duration, callback); 11 | _timers[id] = timer; 12 | return id; 13 | } 14 | 15 | void cancelTimeout(String id) { 16 | final timer = _timers.remove(id); 17 | return timer?.cancel(); 18 | } 19 | 20 | void cancelAllTimeout() { 21 | for (final t in _timers.values) { 22 | t.cancel(); 23 | } 24 | _timers.clear(); 25 | } 26 | 27 | bool get hasTimeouts => _timers.isNotEmpty; 28 | } 29 | -------------------------------------------------------------------------------- /packages/faye_dart/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: faye_dart 2 | description: Faye is a publish/subscribe messaging protocol that is built on the Bayeux protocol, a messaging system utilized for transporting asynchronous messages over HTTP. 3 | version: 0.1.1+2 4 | homepage: https://github.com/GetStream/stream-feed-flutter/blob/master/packages/faye_dart 5 | repository: https://github.com/GetStream/stream-feed-flutter/blob/master/packages/faye_dart 6 | issue_tracker: https://github.com/GetStream/stream-feed-flutter/issues 7 | 8 | environment: 9 | sdk: ">=2.12.0 <3.0.0" 10 | 11 | dependencies: 12 | equatable: ^2.0.0 13 | logging: ^1.0.1 14 | meta: ^1.3.0 15 | uuid: ^3.0.4 16 | web_socket_channel: ^2.1.0 17 | 18 | dev_dependencies: 19 | mocktail: ^0.3.0 20 | test: ^1.17.3 21 | 22 | # For information on the generic Dart part of this file, see the 23 | # following page: https://dart.dev/tools/pub/pubspec -------------------------------------------------------------------------------- /packages/faye_dart/test/error_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:faye_dart/src/error.dart'; 2 | import 'package:test/test.dart'; 3 | 4 | void main() { 5 | test('should successfully parse error if it matches error grammar', () { 6 | const errorMessage = '405:bayeuxChannel:Invalid channel'; 7 | final error = FayeClientError.parse(errorMessage); 8 | expect(error.code, 405); 9 | expect(error.params, ['bayeuxChannel']); 10 | expect(error.errorMessage, 'Invalid channel'); 11 | }); 12 | 13 | test( 14 | 'should return same errorMessage if it does not matches error grammar', 15 | () { 16 | const errorMessage = 'dummy error message'; 17 | final error = FayeClientError.parse(errorMessage); 18 | expect(error.code, isNull); 19 | expect(error.params, isEmpty); 20 | expect(error.errorMessage, errorMessage); 21 | }, 22 | ); 23 | 24 | test('should print error as a String', () { 25 | const errorMessage = '405:bayeuxChannel:Invalid channel'; 26 | final error = FayeClientError.parse(errorMessage); 27 | expect( 28 | error.toString(), 29 | '${error.code} : ${error.params.join(',')} : ${error.errorMessage}', 30 | ); 31 | }); 32 | } 33 | -------------------------------------------------------------------------------- /packages/faye_dart/test/mock.dart: -------------------------------------------------------------------------------- 1 | import 'package:faye_dart/src/client.dart'; 2 | import 'package:mocktail/mocktail.dart'; 3 | 4 | class MockClient extends Mock implements FayeClient { 5 | @override 6 | bool operator ==(Object? other) => true; 7 | 8 | @override 9 | // TODO: implement hashCode 10 | int get hashCode => super.hashCode; 11 | } 12 | -------------------------------------------------------------------------------- /packages/faye_dart/test/timeout_helper_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:faye_dart/src/timeout_helper.dart'; 2 | import 'package:test/test.dart'; 3 | 4 | void main() { 5 | test('setTimeout', () { 6 | final timeoutHelper = TimeoutHelper(); 7 | expect(timeoutHelper.hasTimeouts, isFalse); 8 | timeoutHelper.setTimeout(const Duration(seconds: 3), () {}); 9 | expect(timeoutHelper.hasTimeouts, isTrue); 10 | 11 | addTearDown(timeoutHelper.cancelAllTimeout); 12 | }); 13 | 14 | test('cancelTimeout', () { 15 | final timeoutHelper = TimeoutHelper(); 16 | expect(timeoutHelper.hasTimeouts, isFalse); 17 | final id = timeoutHelper.setTimeout(const Duration(seconds: 3), () {}); 18 | expect(timeoutHelper.hasTimeouts, isTrue); 19 | timeoutHelper.cancelTimeout(id); 20 | expect(timeoutHelper.hasTimeouts, isFalse); 21 | }); 22 | 23 | test('cancelTimeouts', () { 24 | final timeoutHelper = TimeoutHelper(); 25 | expect(timeoutHelper.hasTimeouts, isFalse); 26 | timeoutHelper.setTimeout(const Duration(seconds: 3), () {}); 27 | timeoutHelper.setTimeout(const Duration(seconds: 6), () {}); 28 | timeoutHelper.setTimeout(const Duration(seconds: 9), () {}); 29 | expect(timeoutHelper.hasTimeouts, isTrue); 30 | timeoutHelper.cancelAllTimeout(); 31 | expect(timeoutHelper.hasTimeouts, isFalse); 32 | }); 33 | } 34 | -------------------------------------------------------------------------------- /packages/stream_feed/.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: 2ae34518b87dd891355ed6c6ea8cb68c4d52bb9d 8 | channel: stable 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /packages/stream_feed/build.yaml: -------------------------------------------------------------------------------- 1 | targets: 2 | $default: 3 | builders: 4 | json_serializable: 5 | options: 6 | explicit_to_json: true 7 | field_rename: snake 8 | any_map: true 9 | -------------------------------------------------------------------------------- /packages/stream_feed/example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: stream_feed_example 2 | description: A new Flutter project. 3 | 4 | publish_to: "none" # Remove this line if you wish to publish to pub.dev 5 | 6 | version: 1.0.0+1 7 | 8 | environment: 9 | sdk: ">=2.16.2 <3.0.0" 10 | 11 | dependencies: 12 | cupertino_icons: ^1.0.2 13 | flutter: 14 | sdk: flutter 15 | stream_feed: 16 | path: ../ 17 | 18 | dev_dependencies: 19 | flutter_lints: ^2.0.0 20 | 21 | flutter_test: 22 | sdk: flutter 23 | 24 | flutter: 25 | uses-material-design: true 26 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/client/index.dart: -------------------------------------------------------------------------------- 1 | export 'aggregated_feed.dart'; 2 | export 'analytics_client.dart'; 3 | export 'file_storage_client.dart'; 4 | export 'flat_feed.dart'; 5 | export 'image_storage_client.dart'; 6 | export 'reactions_client.dart'; 7 | export 'stream_feed_client.dart'; 8 | export 'stream_user.dart'; 9 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/api/responses.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | part 'responses.g.dart'; 4 | 5 | class _BaseResponse { 6 | const _BaseResponse(this.duration); 7 | final String? duration; 8 | } 9 | 10 | /// Model response for [StreamFeedNetworkError] data 11 | @JsonSerializable() 12 | class ErrorResponse extends _BaseResponse { 13 | /// Create a new instance from a json 14 | const ErrorResponse( 15 | {String? duration, 16 | this.message, 17 | this.code, 18 | this.statusCode, 19 | this.moreInfo}) 20 | : super(duration); 21 | 22 | /// Create a new instance from a json 23 | factory ErrorResponse.fromJson(Map json) => 24 | _$ErrorResponseFromJson(json); 25 | 26 | /// The http error code 27 | final int? code; 28 | 29 | /// The message associated to the error code 30 | final String? message; 31 | 32 | /// The backend error code 33 | final int? statusCode; 34 | 35 | /// A detailed message about the error 36 | final String? moreInfo; 37 | 38 | /// Serialize to json 39 | Map toJson() => _$ErrorResponseToJson(this); 40 | 41 | @override 42 | String toString() => 'ErrorResponse(code: $code, ' 43 | 'message: $message, ' 44 | 'statusCode: $statusCode, ' 45 | 'moreInfo: $moreInfo)'; 46 | } 47 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/api/responses.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'responses.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | ErrorResponse _$ErrorResponseFromJson(Map json) => ErrorResponse( 10 | duration: json['duration'] as String?, 11 | message: json['message'] as String?, 12 | code: json['code'] as int?, 13 | statusCode: json['status_code'] as int?, 14 | moreInfo: json['more_info'] as String?, 15 | ); 16 | 17 | Map _$ErrorResponseToJson(ErrorResponse instance) => 18 | { 19 | 'duration': instance.duration, 20 | 'code': instance.code, 21 | 'message': instance.message, 22 | 'status_code': instance.statusCode, 23 | 'more_info': instance.moreInfo, 24 | }; 25 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/error/index.dart: -------------------------------------------------------------------------------- 1 | export 'exceptions.dart'; 2 | export 'feeds_error_code.dart'; 3 | export 'stream_feeds_error.dart'; 4 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/error/stream_feeds_dio_error.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | import 'package:stream_feed/src/core/error/stream_feeds_error.dart'; 3 | 4 | /// Error class specific to StreamFeed and Dio 5 | class StreamFeedsDioError extends DioError { 6 | /// Initialize a stream feed dio error 7 | StreamFeedsDioError({ 8 | required this.error, 9 | required RequestOptions requestOptions, 10 | Response? response, 11 | DioErrorType type = DioErrorType.other, 12 | }) : super( 13 | error: error, 14 | requestOptions: requestOptions, 15 | response: response, 16 | type: type, 17 | ); 18 | 19 | @override 20 | final StreamFeedsNetworkError error; 21 | } 22 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/http/index.dart: -------------------------------------------------------------------------------- 1 | export 'location.dart'; 2 | export 'stream_http_client.dart' show StreamHttpClientOptions; 3 | export 'token.dart'; 4 | export 'typedefs.dart'; 5 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/http/location.dart: -------------------------------------------------------------------------------- 1 | /// Location of the cluster closest to your user. 2 | /// 3 | /// The closer the location is to the user, the less latency they'll have. 4 | enum Location { 5 | /// US East cluster 6 | usEast, 7 | 8 | /// US West cluster 9 | euWest, 10 | 11 | /// Singapore cluster 12 | singapore, 13 | 14 | /// Tokyo cluster 15 | tokyo, 16 | } 17 | 18 | /// Convenient class Extension to on [Location] enum 19 | extension LocationX on Location { 20 | /// Convenient method Extension to generate [name] from [DummyAppUser] enum 21 | String? get name => { 22 | Location.usEast: 'us-east', 23 | Location.euWest: 'dublin', 24 | Location.singapore: 'singapore', 25 | Location.tokyo: 'tokyo', 26 | }[this]; 27 | } 28 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/http/token.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | 3 | //TODO change this to typedef in dart 2.13 4 | /// The JWT auth token for a specific feed. 5 | /// 6 | /// It is created by signing the base 64 encoded JWT header and payload with 7 | /// the api_secret 8 | /// 9 | /// For example: yuXEO2nNOrcwd36sgq8nMC1e2qU 10 | class Token extends Equatable { 11 | /// Instantiates a new [Token] 12 | const Token(this.token); 13 | 14 | /// The underlying token 15 | final String token; 16 | 17 | @override 18 | List get props => [token]; 19 | 20 | @override 21 | String toString() => token; 22 | } 23 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/http/typedefs.dart: -------------------------------------------------------------------------------- 1 | typedef OnSendProgress = void Function(int sentBytes, int totalBytes); 2 | 3 | typedef OnReceiveProgress = void Function(int receivedBytes, int totalBytes); 4 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/index.dart: -------------------------------------------------------------------------------- 1 | export 'error/index.dart'; 2 | export 'http/index.dart'; 3 | export 'models/index.dart'; 4 | export 'util/index.dart'; 5 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/models/activity_update.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'activity_update.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | ActivityUpdate _$ActivityUpdateFromJson(Map json) => ActivityUpdate( 10 | set: (json['set'] as Map?)?.map( 11 | (k, e) => MapEntry(k as String, e as Object), 12 | ), 13 | unset: 14 | (json['unset'] as List?)?.map((e) => e as String).toList(), 15 | id: json['id'] as String?, 16 | foreignId: json['foreign_id'] as String?, 17 | time: const DateTimeUTCConverter().fromJson(json['time'] as String?), 18 | ); 19 | 20 | Map _$ActivityUpdateToJson(ActivityUpdate instance) { 21 | final val = {}; 22 | 23 | void writeNotNull(String key, dynamic value) { 24 | if (value != null) { 25 | val[key] = value; 26 | } 27 | } 28 | 29 | writeNotNull('id', instance.id); 30 | writeNotNull('foreign_id', instance.foreignId); 31 | writeNotNull('time', const DateTimeUTCConverter().toJson(instance.time)); 32 | writeNotNull('set', instance.set); 33 | writeNotNull('unset', instance.unset); 34 | return val; 35 | } 36 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/models/attachment_file.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'attachment_file.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | AttachmentFile _$AttachmentFileFromJson(Map json) => AttachmentFile( 10 | path: json['path'] as String?, 11 | name: json['name'] as String?, 12 | bytes: _fromString(json['bytes'] as String?), 13 | size: json['size'] as int?, 14 | ); 15 | 16 | Map _$AttachmentFileToJson(AttachmentFile instance) => 17 | { 18 | 'path': instance.path, 19 | 'name': instance.name, 20 | 'bytes': _toString(instance.bytes), 21 | 'size': instance.size, 22 | }; 23 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/models/collection_entry.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'collection_entry.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | CollectionEntry _$CollectionEntryFromJson(Map json) => CollectionEntry( 10 | id: json['id'] as String?, 11 | collection: json['collection'] as String?, 12 | foreignId: json['foreign_id'] as String?, 13 | data: (json['data'] as Map?)?.map( 14 | (k, e) => MapEntry(k as String, e as Object), 15 | ), 16 | createdAt: 17 | const DateTimeUTCConverter().fromJson(json['created_at'] as String?), 18 | updatedAt: 19 | const DateTimeUTCConverter().fromJson(json['updated_at'] as String?), 20 | ); 21 | 22 | Map _$CollectionEntryToJson(CollectionEntry instance) => 23 | { 24 | 'id': instance.id, 25 | 'collection': instance.collection, 26 | 'foreign_id': instance.foreignId, 27 | 'data': instance.data, 28 | 'created_at': const DateTimeUTCConverter().toJson(instance.createdAt), 29 | 'updated_at': const DateTimeUTCConverter().toJson(instance.updatedAt), 30 | }; 31 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/models/follow.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'follow.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Follow _$FollowFromJson(Map json) => Follow( 10 | feedId: json['feed_id'] as String, 11 | targetId: json['target_id'] as String, 12 | createdAt: DateTime.parse(json['created_at'] as String), 13 | updatedAt: DateTime.parse(json['updated_at'] as String), 14 | ); 15 | 16 | Map _$FollowToJson(Follow instance) => { 17 | 'feed_id': instance.feedId, 18 | 'target_id': instance.targetId, 19 | 'created_at': instance.createdAt.toIso8601String(), 20 | 'updated_at': instance.updatedAt.toIso8601String(), 21 | }; 22 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/models/follow_relation.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'follow_relation.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | FollowRelation _$FollowRelationFromJson(Map json) => FollowRelation( 10 | source: json['source'] as String, 11 | target: json['target'] as String, 12 | ); 13 | 14 | Map _$FollowRelationToJson(FollowRelation instance) => 15 | { 16 | 'source': instance.source, 17 | 'target': instance.target, 18 | }; 19 | 20 | UnFollowRelation _$UnFollowRelationFromJson(Map json) => UnFollowRelation( 21 | source: json['source'] as String, 22 | target: json['target'] as String, 23 | keepHistory: json['keep_history'] as bool?, 24 | ); 25 | 26 | Map _$UnFollowRelationToJson(UnFollowRelation instance) => 27 | { 28 | 'source': instance.source, 29 | 'target': instance.target, 30 | 'keep_history': instance.keepHistory, 31 | }; 32 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/models/follow_stats.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'follow_stats.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | FollowStats _$FollowStatsFromJson(Map json) => FollowStats( 10 | following: Following.fromJson( 11 | Map.from(json['following'] as Map)), 12 | followers: Followers.fromJson( 13 | Map.from(json['followers'] as Map)), 14 | ); 15 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/models/followers.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | import 'package:json_annotation/json_annotation.dart'; 3 | import 'package:stream_feed/src/core/models/feed_id.dart'; 4 | 5 | part 'followers.g.dart'; 6 | 7 | ///{@template followers} 8 | /// Followers of a feed used as a field in [FollowStats] 9 | ///{@endtemplate} 10 | @JsonSerializable() 11 | class Followers extends Equatable { 12 | /// Builds a [Followers]. 13 | const Followers({required this.feed, this.count, this.slugs}); 14 | 15 | /// Builds a [Followers] from a JSON object. 16 | factory Followers.fromJson(Map json) => 17 | _$FollowersFromJson(json); 18 | 19 | @JsonKey(fromJson: _fromId, toJson: FeedId.toId) 20 | final FeedId feed; 21 | final List? slugs; 22 | final int? count; 23 | 24 | /// Serialize to json 25 | Map toJson() => _$FollowersToJson(this); 26 | 27 | static FeedId _fromId(String id) => FeedId.id(id); 28 | 29 | @override 30 | List get props => [feed, count]; 31 | } 32 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/models/followers.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'followers.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Followers _$FollowersFromJson(Map json) => Followers( 10 | feed: Followers._fromId(json['feed'] as String), 11 | count: json['count'] as int?, 12 | slugs: 13 | (json['slugs'] as List?)?.map((e) => e as String).toList(), 14 | ); 15 | 16 | Map _$FollowersToJson(Followers instance) => { 17 | 'feed': FeedId.toId(instance.feed), 18 | 'slugs': instance.slugs, 19 | 'count': instance.count, 20 | }; 21 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/models/following.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | import 'package:json_annotation/json_annotation.dart'; 3 | import 'package:stream_feed/src/core/models/feed_id.dart'; 4 | 5 | part 'following.g.dart'; 6 | 7 | /// {@template following} 8 | /// Following of a feed used in [FollowStats] as field 9 | /// {@endtemplate} 10 | @JsonSerializable() 11 | class Following extends Equatable { 12 | /// Builds a [Following]. 13 | const Following({required this.feed, this.count, this.slugs}); 14 | 15 | /// Builds a [Following] from a JSON object. 16 | factory Following.fromJson(Map json) => 17 | _$FollowingFromJson(json); 18 | 19 | @JsonKey(fromJson: _fromId, toJson: FeedId.toId) 20 | final FeedId feed; 21 | final List? slugs; 22 | final int? count; 23 | 24 | /// Serialize to json 25 | Map toJson() => _$FollowingToJson(this); 26 | 27 | static FeedId _fromId(String id) => FeedId.id(id); 28 | 29 | @override 30 | List get props => [feed, count]; 31 | } 32 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/models/following.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'following.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Following _$FollowingFromJson(Map json) => Following( 10 | feed: Following._fromId(json['feed'] as String), 11 | count: json['count'] as int?, 12 | slugs: 13 | (json['slugs'] as List?)?.map((e) => e as String).toList(), 14 | ); 15 | 16 | Map _$FollowingToJson(Following instance) => { 17 | 'feed': FeedId.toId(instance.feed), 18 | 'slugs': instance.slugs, 19 | 'count': instance.count, 20 | }; 21 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/models/index.dart: -------------------------------------------------------------------------------- 1 | export 'activity.dart'; 2 | export 'activity_marker.dart'; 3 | export 'activity_update.dart'; 4 | export 'attachment_file.dart'; 5 | export 'collection_entry.dart'; 6 | export 'crop.dart'; 7 | export 'enriched_activity.dart'; 8 | export 'enrichment_flags.dart'; 9 | export 'event.dart' show Impression, Engagement, UserData, Content; 10 | export 'feed_id.dart'; 11 | export 'filter.dart'; 12 | export 'follow.dart'; 13 | export 'follow_stats.dart'; 14 | export 'followers.dart'; 15 | export 'following.dart'; 16 | export 'foreign_id_time_pair.dart'; 17 | export 'group.dart'; 18 | export 'lookup_attribute.dart'; 19 | export 'next_params.dart'; 20 | export 'notification_feed_meta.dart'; 21 | export 'open_graph_data.dart'; 22 | export 'paginated_activities.dart'; 23 | export 'paginated_activities_group.dart'; 24 | export 'paginated_reactions.dart'; 25 | export 'reaction.dart'; 26 | export 'realtime_message.dart'; 27 | export 'resize.dart'; 28 | export 'thumbnail.dart'; 29 | export 'user.dart'; 30 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/models/lookup_attribute.dart: -------------------------------------------------------------------------------- 1 | /// {@template lookupAttribute} 2 | /// Lookup objects based on attributes 3 | /// {@endtemplate} 4 | enum LookupAttribute { 5 | /// The id of the activity you want to lookup 6 | activityId, 7 | 8 | /// The id of the reaction you want to lookup 9 | reactionId, 10 | 11 | /// The id of the user you want to lookup 12 | userId, 13 | } 14 | 15 | /// Convenient class Extension on [LookupAttribute] enum 16 | extension LookupAttributeX on LookupAttribute { 17 | /// Convenient method Extension to generate [attr] from [LookupAttribute] enum 18 | String? get attr => { 19 | LookupAttribute.activityId: 'activity_id', 20 | LookupAttribute.reactionId: 'reaction_id', 21 | LookupAttribute.userId: 'user_id', 22 | }[this]; 23 | } 24 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/models/next_params.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | import 'package:stream_feed/src/core/models/filter.dart'; 3 | 4 | class NextParams extends Equatable { 5 | const NextParams({ 6 | required this.limit, 7 | required this.idLT, 8 | this.ranking, 9 | this.withOwnReactions, 10 | this.withRecentReactions, 11 | this.withReactionCounts, 12 | this.withOwnChildren, 13 | this.recentReactionsLimit, 14 | this.reactionKindsFilter, 15 | this.offset, 16 | }); 17 | 18 | final int limit; 19 | final Filter idLT; 20 | final int? offset; 21 | final String? ranking; 22 | final bool? withOwnReactions; 23 | final bool? withRecentReactions; 24 | final bool? withReactionCounts; 25 | final bool? withOwnChildren; 26 | final int? recentReactionsLimit; 27 | final String? reactionKindsFilter; 28 | 29 | @override 30 | List get props => [limit, idLT]; 31 | } 32 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/models/notification_feed_meta.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | import 'package:json_annotation/json_annotation.dart'; 3 | 4 | part 'notification_feed_meta.g.dart'; 5 | 6 | @JsonSerializable(createToJson: true) 7 | class NotificationFeedMeta extends Equatable { 8 | const NotificationFeedMeta({ 9 | required this.unreadCount, 10 | required this.unseenCount, 11 | }); 12 | 13 | factory NotificationFeedMeta.fromJson(Map json) => 14 | _$NotificationFeedMetaFromJson(json); 15 | 16 | Map toJson() => _$NotificationFeedMetaToJson(this); 17 | 18 | @JsonKey(name: 'unread') 19 | final int unreadCount; 20 | 21 | @JsonKey(name: 'unseen') 22 | final int unseenCount; 23 | 24 | @override 25 | List get props => [unreadCount, unseenCount]; 26 | } 27 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/models/notification_feed_meta.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'notification_feed_meta.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | NotificationFeedMeta _$NotificationFeedMetaFromJson(Map json) => 10 | NotificationFeedMeta( 11 | unreadCount: json['unread'] as int, 12 | unseenCount: json['unseen'] as int, 13 | ); 14 | 15 | Map _$NotificationFeedMetaToJson( 16 | NotificationFeedMeta instance) => 17 | { 18 | 'unread': instance.unreadCount, 19 | 'unseen': instance.unseenCount, 20 | }; 21 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/models/paginated.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | 3 | /// A general paginated response object. 4 | class Paginated extends Equatable { 5 | /// [Paginated] constructor 6 | const Paginated(this.next, this.results, this.duration); 7 | 8 | /// A url string that can be used to fetch the next page of reactions. 9 | final String? next; 10 | 11 | /// Response results of generic objects. 12 | final List? results; 13 | 14 | /// A duration of the response. 15 | final String? duration; 16 | 17 | @override 18 | List get props => [next, results, duration]; 19 | } 20 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/models/resize.dart: -------------------------------------------------------------------------------- 1 | /// The type of resize 2 | enum ResizeType { 3 | /// resize by clipping the image 4 | clip, 5 | 6 | /// resize by cropping the image 7 | crop, 8 | 9 | /// resize by scaling the image 10 | scale, 11 | 12 | /// resize by filling the image 13 | fill, 14 | } 15 | 16 | /// Extensions for [ResizeType]. 17 | extension ResizeX on ResizeType { 18 | /// Gets the [ResizeType] as a String. 19 | String get name => { 20 | ResizeType.clip: 'clip', 21 | ResizeType.crop: 'crop', 22 | ResizeType.scale: 'scale', 23 | ResizeType.fill: 'fill', 24 | }[this]!; 25 | } 26 | 27 | /// Resize an image based on supplied [_width],[_height] and eventually [_type] 28 | class Resize { 29 | /// [Resize] constructor 30 | const Resize( 31 | this._width, 32 | this._height, { 33 | ResizeType type = ResizeType.clip, 34 | }) : assert(_width > 0, 'Width should be a positive number'), 35 | assert(_height > 0, 'Height should be a positive number'), 36 | _type = type; 37 | 38 | final int _width; 39 | final int _height; 40 | final ResizeType _type; 41 | 42 | /// Serialize params 43 | Map get params => { 44 | 'resize': _type.name, 45 | 'w': _width, 46 | 'h': _height, 47 | }; 48 | } 49 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/models/thumbnail.dart: -------------------------------------------------------------------------------- 1 | import 'package:stream_feed/src/core/models/crop.dart'; 2 | import 'package:stream_feed/src/core/models/resize.dart'; 3 | 4 | /// Create a Thumbnail of an image based on supplied [_width],[_height] 5 | /// and eventually [cropTypes] and [resizeType] 6 | class Thumbnail { 7 | /// [Thumbnail] constructor 8 | const Thumbnail(this._width, this._height, 9 | {this.resizeType = ResizeType.clip, 10 | this.cropTypes = const [CropType.center]}) 11 | : assert(_width > 0, 'Width should be a positive number'), 12 | assert(_height > 0, 'Height should be a positive number'); 13 | 14 | final int _width; 15 | final int _height; 16 | 17 | /// Type of resizing to be applied to the image 18 | final ResizeType resizeType; 19 | 20 | /// Types of cropping to be applied to the image 21 | final List cropTypes; 22 | 23 | /// Serialize params 24 | Map get params => { 25 | 'resize': resizeType.name, 26 | 'crop': cropTypes.map((cropType) => cropType.name).join(','), 27 | 'w': _width, 28 | 'h': _height, 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/platform_detector/platform_detector_io.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:stream_feed/src/core/platform_detector/platform_detector.dart'; 4 | 5 | /// Version running on native systems 6 | PlatformType get currentPlatform { 7 | if (Platform.isWindows) return PlatformType.windows; 8 | if (Platform.isFuchsia) return PlatformType.fuchsia; 9 | if (Platform.isMacOS) return PlatformType.macOS; 10 | if (Platform.isLinux) return PlatformType.linux; 11 | if (Platform.isIOS) return PlatformType.ios; 12 | return PlatformType.android; 13 | } 14 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/platform_detector/platform_detector_stub.dart: -------------------------------------------------------------------------------- 1 | import 'package:stream_feed/src/core/platform_detector/platform_detector.dart'; 2 | 3 | /// Stub implementation 4 | PlatformType get currentPlatform => throw UnimplementedError(); 5 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/platform_detector/platform_detector_web.dart: -------------------------------------------------------------------------------- 1 | import 'package:stream_feed/src/core/platform_detector/platform_detector.dart'; 2 | 3 | /// Version running on web 4 | PlatformType get currentPlatform => PlatformType.web; 5 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/util/default.dart: -------------------------------------------------------------------------------- 1 | import 'package:stream_feed/src/core/models/activity_marker.dart'; 2 | import 'package:stream_feed/src/core/models/enrichment_flags.dart'; 3 | import 'package:stream_feed/src/core/models/filter.dart'; 4 | 5 | /// Default values 6 | class Default { 7 | const Default._(); 8 | 9 | /// The default amount of activities requested from the APIs 10 | static const int limit = 25; 11 | 12 | /// The default offset 13 | static const int offset = 0; 14 | 15 | /// The default filter 16 | static Filter filter = Filter(); 17 | 18 | /// The default marker 19 | static ActivityMarker marker = ActivityMarker(); 20 | 21 | /// The default enrichment flag 22 | static EnrichmentFlags enrichmentFlags = EnrichmentFlags(); 23 | 24 | /// The default amount of activities that should be copied from the target 25 | /// feed 26 | static const int activityCopyLimit = 100; 27 | 28 | /// The max amount of activities that should be copied from the target feed 29 | static const int maxActivityCopyLimit = 1000; 30 | //TODO: time now ? 31 | } 32 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/util/enrichment.dart: -------------------------------------------------------------------------------- 1 | /// Returns a new collection reference string in the form SO::. 2 | String createCollectionReference(String? collection, String? id) => 3 | 'SO:$collection:$id'; 4 | 5 | /// Returns a new user reference string in the form SU:. 6 | String createUserReference(String id) => 'SU:$id'; 7 | 8 | /// Returns a new collection reference string in the form SA:. 9 | String createActivityReference(String id) => 'SA:$id'; 10 | 11 | /// Returns a new reaction reference string in the form SR:. 12 | String createReactionReference(String id) => 'SR:$id'; 13 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/util/index.dart: -------------------------------------------------------------------------------- 1 | export 'enrichment.dart'; 2 | export 'extension.dart'; 3 | export 'parse_next.dart'; 4 | export 'typedefs.dart'; 5 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/util/parse_next.dart: -------------------------------------------------------------------------------- 1 | import 'package:stream_feed/src/core/models/filter.dart'; 2 | import 'package:stream_feed/src/core/models/next_params.dart'; 3 | 4 | NextParams parseNext(String next) { 5 | final uri = Uri.parse(next); 6 | final queryParameters = uri.queryParameters; 7 | final nextParams = NextParams( 8 | idLT: Filter().idLessThan(queryParameters['id_lt']!), 9 | limit: int.parse(queryParameters['limit']!), 10 | ranking: queryParameters['ranking'], 11 | withOwnReactions: queryParameters['withOwnReactions'] as bool?, 12 | withRecentReactions: queryParameters['withRecentReactions'] as bool?, 13 | withReactionCounts: queryParameters['withReactionCounts'] as bool?, 14 | withOwnChildren: queryParameters['withOwnChildren'] as bool?, 15 | recentReactionsLimit: queryParameters['recentReactionsLimit'] != null 16 | ? int.tryParse(queryParameters['recentReactionsLimit']!) 17 | : null, 18 | reactionKindsFilter: queryParameters['reactionKindsFilter'], 19 | offset: queryParameters['offset'] != null 20 | ? int.tryParse(queryParameters['offset']!) 21 | : null); 22 | return nextParams; 23 | } 24 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/util/typedefs.dart: -------------------------------------------------------------------------------- 1 | import 'package:stream_feed/src/core/models/enriched_activity.dart'; 2 | import 'package:stream_feed/src/core/models/user.dart'; 3 | 4 | /// Convenient typedef for [GenericEnrichedActivity] with default parameters 5 | /// ready to use and suitable for most use cases 6 | typedef EnrichedActivity 7 | = GenericEnrichedActivity; 8 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/src/core/util/utc_converter.dart: -------------------------------------------------------------------------------- 1 | import 'package:intl/intl.dart'; 2 | import 'package:json_annotation/json_annotation.dart'; 3 | 4 | class DateTimeUTCConverter implements JsonConverter { 5 | const DateTimeUTCConverter(); 6 | static final DateFormat format = DateFormat('yyyy-MM-ddTHH:mm:ssZ'); 7 | 8 | @override 9 | DateTime? fromJson(String? json) => 10 | json == null ? null : format.parse(json, true); 11 | 12 | @override 13 | String? toJson(DateTime? json) => 14 | json == null ? null : formatDateWithOffset(json); 15 | } 16 | 17 | String formatDateWithOffset(DateTime date) { 18 | String twoDigits(int n) => n >= 10 ? '$n' : '0$n'; 19 | 20 | final hours = twoDigits(date.timeZoneOffset.inHours.abs()); 21 | final minutes = twoDigits(date.timeZoneOffset.inMinutes.remainder(60)); 22 | final sign = date.timeZoneOffset.inHours > 0 ? '+' : '-'; 23 | final formattedDate = DateFormat('yyyy-MM-ddTHH:mm:ss').format(date); 24 | 25 | return '$formattedDate$sign$hours:$minutes'; 26 | } 27 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/stream_feed.dart: -------------------------------------------------------------------------------- 1 | library stream_feed; 2 | 3 | export 'package:faye_dart/faye_dart.dart' show Subscription; 4 | export 'package:logging/logging.dart' show Level, Logger; 5 | export 'src/client/index.dart'; 6 | export 'src/core/index.dart'; 7 | -------------------------------------------------------------------------------- /packages/stream_feed/lib/version.dart: -------------------------------------------------------------------------------- 1 | /// Current package version 2 | /// Used in [HttpClient] to build the `x-stream-client` header 3 | const String packageVersion = '0.6.0+2'; 4 | -------------------------------------------------------------------------------- /packages/stream_feed/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: stream_feed 2 | description: Stream Feed official Dart SDK. Build your own feed experience using 3 | Dart and Flutter. 4 | version: 0.6.0+2 5 | repository: https://github.com/GetStream/stream-feed-flutter 6 | issue_tracker: https://github.com/GetStream/stream-feed-flutter/issues 7 | homepage: https://getstream.io/ 8 | environment: 9 | sdk: ">=2.14.0 <3.0.0" 10 | 11 | dependencies: 12 | collection: ^1.15.0 13 | dio: ^4.0.0 14 | equatable: ^2.0.0 15 | faye_dart: ^0.1.1+2 16 | http_parser: ^4.0.0 17 | intl: ^0.17.0 18 | jose: ^0.3.2 19 | json_annotation: ^4.4.0 20 | logging: ^1.0.1 21 | meta: ^1.3.0 22 | mime: ^1.0.0 23 | 24 | dev_dependencies: 25 | build_runner: ^2.0.2 26 | json_serializable: ^6.1.5 27 | mocktail: ^0.3.0 28 | test: ^1.17.3 29 | # For information on the generic Dart part of this file, see the 30 | # following page: https://dart.dev/tools/pub/pubspec 31 | -------------------------------------------------------------------------------- /packages/stream_feed/test/assets/example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed/test/assets/example.pdf -------------------------------------------------------------------------------- /packages/stream_feed/test/assets/test_image.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed/test/assets/test_image.jpeg -------------------------------------------------------------------------------- /packages/stream_feed/test/enrichment_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:stream_feed/src/core/util/enrichment.dart'; 2 | import 'package:test/test.dart'; 3 | 4 | void main() { 5 | test('createCollectionReference', () { 6 | expect(createCollectionReference('collection', 'id'), 'SO:collection:id'); 7 | }); 8 | test('createUserReference', () { 9 | expect(createUserReference('id'), 'SU:id'); 10 | }); 11 | 12 | test('createActivityReference', () { 13 | expect(createActivityReference('id'), 'SA:id'); 14 | }); 15 | 16 | test('createReactionReference', () { 17 | expect(createReactionReference('id'), 'SR:id'); 18 | }); 19 | } 20 | -------------------------------------------------------------------------------- /packages/stream_feed/test/execeptions_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:stream_feed/src/core/error/exceptions.dart'; 2 | import 'package:test/test.dart'; 3 | 4 | void main() { 5 | test('StreamApiException', () { 6 | final streamApiException = StreamApiException('{"code":404}', 404); 7 | expect(streamApiException.code, 404); 8 | }); 9 | } 10 | -------------------------------------------------------------------------------- /packages/stream_feed/test/fixtures/activity.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "test", 3 | "actor": "test", 4 | "verb": "test", 5 | "object": "test", 6 | "foreign_id": "test", 7 | "target": "test", 8 | "time": "2001-09-11T00:01:02.000", 9 | "origin": "test", 10 | "to": [ 11 | "slug:id" 12 | ], 13 | "score": 1.0, 14 | "analytics": { 15 | "test": "test" 16 | }, 17 | "extra_context": { 18 | "test": "test" 19 | }, 20 | "test": "test" 21 | } 22 | -------------------------------------------------------------------------------- /packages/stream_feed/test/fixtures/activity_update_with_foreign_id.json: -------------------------------------------------------------------------------- 1 | { 2 | "foreign_id": "test", 3 | "time": "2001-09-11T00:01:02.000", 4 | "set": { 5 | "hey": "hey" 6 | }, 7 | "unset": [ 8 | "test" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /packages/stream_feed/test/fixtures/activity_update_with_id.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "test", 3 | "set": { 4 | "hey": "hey" 5 | }, 6 | "unset": [ 7 | "test" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /packages/stream_feed/test/fixtures/attachment_file.json: -------------------------------------------------------------------------------- 1 | { 2 | "path": "testPath", 3 | "name": "testFile", 4 | "bytes": "", 5 | "size": 0 6 | } 7 | -------------------------------------------------------------------------------- /packages/stream_feed/test/fixtures/audio.json: -------------------------------------------------------------------------------- 1 | { 2 | "audio": "test", 3 | "url": "test", 4 | "secure_url": "test", 5 | "type": "test" 6 | } 7 | -------------------------------------------------------------------------------- /packages/stream_feed/test/fixtures/collection_entry.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "test", 3 | "collection": "test", 4 | "foreign_id": "test", 5 | "data": { 6 | "test": "test" 7 | }, 8 | "created_at": "2001-09-11T00:01:02.000", 9 | "updated_at": "2001-09-11T00:01:02.000" 10 | } 11 | -------------------------------------------------------------------------------- /packages/stream_feed/test/fixtures/follow.json: -------------------------------------------------------------------------------- 1 | { 2 | "feed_id": "feedId", 3 | "target_id": "targetId", 4 | "created_at": "2021-05-14T19:58:27.274792063Z", 5 | "updated_at": "2021-05-14T19:58:27.274792063Z" 6 | } -------------------------------------------------------------------------------- /packages/stream_feed/test/fixtures/follow_stats.json: -------------------------------------------------------------------------------- 1 | {"following":{"feed":"user:jessica","count":0},"followers":{"feed":"user:jessica","count":1}} -------------------------------------------------------------------------------- /packages/stream_feed/test/fixtures/group.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "test", 3 | "group": "test", 4 | "activities": [ 5 | { 6 | "id": "test", 7 | "actor": "test", 8 | "verb": "test", 9 | "object": "test", 10 | "foreign_id": "test", 11 | "target": "test", 12 | "time": "2001-09-11T00:01:02.000", 13 | "origin": "test", 14 | "to": [ 15 | "slug:id" 16 | ], 17 | "score": 1.0, 18 | "analytics": { 19 | "test": "test" 20 | }, 21 | "extra_context": { 22 | "test": "test" 23 | }, 24 | "test": "test" 25 | } 26 | ], 27 | "actor_count": 1, 28 | "created_at": "2001-09-11T00:01:02.000", 29 | "updated_at": "2001-09-11T00:01:02.000" 30 | } 31 | -------------------------------------------------------------------------------- /packages/stream_feed/test/fixtures/image.json: -------------------------------------------------------------------------------- 1 | { 2 | "image": "test", 3 | "url": "test", 4 | "secure_url": "test", 5 | "width": "test", 6 | "height": "test", 7 | "type": "test", 8 | "alt": "test" 9 | } 10 | -------------------------------------------------------------------------------- /packages/stream_feed/test/fixtures/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "unread": 1, 3 | "unseen": 1 4 | } -------------------------------------------------------------------------------- /packages/stream_feed/test/fixtures/notification_group.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "test", 3 | "group": "test", 4 | "activities": [ 5 | { 6 | "id": "test", 7 | "actor": "test", 8 | "verb": "test", 9 | "object": "test", 10 | "foreign_id": "test", 11 | "target": "test", 12 | "time": "2001-09-11T00:01:02.000", 13 | "origin": "test", 14 | "to": [ 15 | "slug:id" 16 | ], 17 | "score": 1.0, 18 | "analytics": { 19 | "test": "test" 20 | }, 21 | "extra_context": { 22 | "test": "test" 23 | }, 24 | "test": "test" 25 | } 26 | ], 27 | "actor_count": 1, 28 | "created_at": "2001-09-11T00:01:02.000", 29 | "updated_at": "2001-09-11T00:01:02.000", 30 | "is_read": true, 31 | "is_seen": true 32 | } 33 | -------------------------------------------------------------------------------- /packages/stream_feed/test/fixtures/open_graph_data.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "test", 3 | "type": "test", 4 | "url": "test", 5 | "site": "test", 6 | "site_name": "test", 7 | "description": "test", 8 | "determiner": "test", 9 | "locale": "test", 10 | "images": [ 11 | { 12 | "image": "test", 13 | "url": "test", 14 | "secure_url": "test", 15 | "width": "test", 16 | "height": "test", 17 | "type": "test", 18 | "alt": "test" 19 | } 20 | ], 21 | "videos": [ 22 | { 23 | "image": "test", 24 | "url": "test", 25 | "secure_url": "test", 26 | "width": "test", 27 | "height": "test", 28 | "type": "test", 29 | "alt": "test" 30 | } 31 | ], 32 | "audios": [ 33 | { 34 | "audio": "test", 35 | "url": "test", 36 | "secure_url": "test", 37 | "type": "test" 38 | } 39 | ] 40 | } 41 | -------------------------------------------------------------------------------- /packages/stream_feed/test/fixtures/reaction.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "test", 3 | "kind": "test", 4 | "activity_id": "test", 5 | "user_id": "test", 6 | "parent": "test", 7 | "updated_at": "2001-09-11T00:01:02.000", 8 | "created_at": "2001-09-11T00:01:02.000", 9 | "target_feeds": [ 10 | "slug:userId" 11 | ], 12 | "user": { 13 | "id": "test", 14 | "data": { 15 | "test": "test" 16 | } 17 | }, 18 | "target_feeds_extra_data": { 19 | "test": "test" 20 | }, 21 | "data": { 22 | "test": "test" 23 | }, 24 | "children_counts": { 25 | "test": 1 26 | } 27 | } -------------------------------------------------------------------------------- /packages/stream_feed/test/fixtures/realtime_message.json: -------------------------------------------------------------------------------- 1 | { 2 | "deleted": [], 3 | "deleted_foreign_ids": [], 4 | "feed": "reward:1", 5 | "new": [ 6 | { 7 | "actor": "reward:1", 8 | "foreign_id": null, 9 | "id": "f3de8328-be2d-11eb-bb18-128a130028af", 10 | "message": "@Jessica check out getstream.io it's so dang awesome.", 11 | "object": "tweet:id", 12 | "origin": "test", 13 | "target": "test", 14 | "time": "2021-05-26T14:23:33.918391", 15 | "to": ["notification:jessica"], 16 | "verb": "tweet" 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /packages/stream_feed/test/fixtures/realtime_message_issue89.json: -------------------------------------------------------------------------------- 1 | { 2 | "deleted": [], 3 | "deleted_foreign_ids": [], 4 | "feed": "task:32db0f46-3593-4e14-aa57-f05af4887260", 5 | "new": [ 6 | { 7 | "actor": { 8 | "created_at": "2021-04-13T22:53:19.670051Z", 9 | "updated_at": "2021-04-13T22:53:19.670051Z", 10 | "id": "eTHVBnEm0FQB2HeaRKVlEfVf58B3personal", 11 | "data": { 12 | "gender": "Male", 13 | "name": "Rickey Lee", 14 | "photo": "https://firebasestorage.googleapis.com/v0/b/fire-snab.appspot.com/o/profile-image-placeholder.png?alt=media&token=b17598bb-a510-4167-8354-ab75642ba89e" 15 | } 16 | }, 17 | "createdTask": { 18 | "id": "32db0f46-3593-4e14-aa57-f05af4887260", 19 | "title": "KeyPack", 20 | "isFinished": true 21 | }, 22 | "foreign_id": null, 23 | "group": "updated_2021-06-09", 24 | "id": "cff95542-c979-11eb-8080-80005abdd229", 25 | "object": "task_situation_updated to true", 26 | "origin": null, 27 | "target": null, 28 | "time": "2021-06-09T23:24:18.238189", 29 | "verb": "updated" 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /packages/stream_feed/test/fixtures/unfollow_relation.json: -------------------------------------------------------------------------------- 1 | { 2 | "source": "feedId", 3 | "target": "targetId", 4 | "keep_history": true 5 | } -------------------------------------------------------------------------------- /packages/stream_feed/test/fixtures/user.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "test", 3 | "data": { 4 | "test": "test" 5 | }, 6 | "created_at": "2001-09-11T00:01:02.000", 7 | "updated_at": "2001-09-11T00:01:02.000", 8 | "followers_count": 1, 9 | "following_count": 1 10 | } 11 | -------------------------------------------------------------------------------- /packages/stream_feed/test/fixtures/video.json: -------------------------------------------------------------------------------- 1 | { 2 | "image": "test", 3 | "url": "test", 4 | "secure_url": "test", 5 | "width": "test", 6 | "height": "test", 7 | "type": "test", 8 | "alt": "test" 9 | } 10 | -------------------------------------------------------------------------------- /packages/stream_feed/test/matcher.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart' show MultipartFile; 2 | import 'package:test/test.dart'; 3 | 4 | Matcher isSameMultipartFileAs(MultipartFile targetFile) => 5 | _IsSameMultipartFileAs(targetFile: targetFile); 6 | 7 | class _IsSameMultipartFileAs extends Matcher { 8 | const _IsSameMultipartFileAs({required this.targetFile}); 9 | 10 | final MultipartFile targetFile; 11 | 12 | @override 13 | Description describe(Description description) => 14 | description.add('is same multipartFile as $targetFile'); 15 | 16 | @override 17 | bool matches(covariant MultipartFile file, Map matchState) => 18 | file.length == targetFile.length; 19 | } 20 | -------------------------------------------------------------------------------- /packages/stream_feed/test/parse_next.dart: -------------------------------------------------------------------------------- 1 | import 'package:stream_feed/src/core/models/filter.dart'; 2 | import 'package:stream_feed/src/core/models/next_params.dart'; 3 | import 'package:stream_feed/src/core/util/parse_next.dart'; 4 | import 'package:test/test.dart'; 5 | 6 | void main() { 7 | test('parse_next', () { 8 | const next = 9 | '/api/v1.0/feed/user/1/?api_key=8rxdnw8pjmvb&id_lt=b253bfa1-83b3-11ec-8dc7-0a5c4613b2ff&limit=25'; 10 | 11 | expect( 12 | parseNext(next), 13 | NextParams( 14 | limit: 25, 15 | idLT: Filter().idLessThan('b253bfa1-83b3-11ec-8dc7-0a5c4613b2ff'))); 16 | }); 17 | } 18 | -------------------------------------------------------------------------------- /packages/stream_feed/test/utils.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'dart:io'; 3 | 4 | String fixture(String name) { 5 | final dir = currentDirectory.path; 6 | return File('$dir/test/fixtures/$name').readAsStringSync(); 7 | } 8 | 9 | File assetFile(String name) { 10 | final dir = currentDirectory.path; 11 | return File('$dir/test/assets/$name'); 12 | } 13 | 14 | Map jsonFixture(String name) => json.decode(fixture(name)); 15 | 16 | // https://github.com/flutter/flutter/issues/20907 17 | Directory get currentDirectory { 18 | var directory = Directory.current; 19 | if (directory.path.endsWith('/test')) { 20 | directory = directory.parent; 21 | } 22 | return directory; 23 | } 24 | -------------------------------------------------------------------------------- /packages/stream_feed/test/version_test.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:stream_feed/version.dart'; 4 | import 'package:test/test.dart'; 5 | 6 | import 'utils.dart'; 7 | 8 | void main() { 9 | test('stream feed version matches pubspec', () { 10 | final pubspecPath = '${currentDirectory.path}/pubspec.yaml'; 11 | final pubspec = File(pubspecPath).readAsStringSync(); 12 | final regex = RegExp('version:s*(.*)'); 13 | final match = regex.firstMatch(pubspec)!; 14 | expect(match, isNotNull); 15 | expect(packageVersion, match.group(1)!.trim()); 16 | }); 17 | } 18 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/.gitignore: -------------------------------------------------------------------------------- 1 | # Files and directories created by pub 2 | .dart_tool/ 3 | .packages 4 | 5 | # Omit commiting pubspec.lock for library packages: 6 | # https://dart.dev/guides/libraries/private-files#pubspeclock 7 | pubspec.lock 8 | 9 | # Conventional directory for build outputs 10 | build/ 11 | 12 | # Directory created by dartdoc 13 | doc/api/ 14 | .flutter-plugins-dependencies 15 | 16 | /coverage_report -------------------------------------------------------------------------------- /packages/stream_feed_flutter/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.0.0 2 | 3 | - domain parking 🏎 4 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/README.md: -------------------------------------------------------------------------------- 1 | # Official Flutter SDK for [Stream Activity Feeds](https://getstream.io/activity-feeds/) 2 | 3 | > The official Flutter components for Stream Activity Feeds 4 | 5 | **🔗 Quick Links** 6 | 7 | - [Register](https://getstream.io/activity-feeds/try-for-free) to get an API key for Stream Activity Feeds 8 | - [Tutorial](https://getstream.io/activity-feeds/sdk/flutter/tutorial/) to learn how to setup a timeline feed, follow other feeds and post new activities. 9 | - [Stream Activity Feeds UI Kit](https://getstream.io/activity-feeds/ui-kit/) to jumpstart your design with notifications and social feeds 10 | 11 | ## 🛠 (WIP: expect breaking changes) Installation 12 | 13 | #### Install as a git depedency 14 | 15 | We are doing some polishing before releasing the UI kit, but if you want to have a sneak peek this is how. Next step is to add `stream_feed_flutter` to your dependencies, to do that just open pubspec.yaml and add it inside the dependencies section. 16 | 17 | ```yaml 18 | dependencies: 19 | stream_feed_flutter: 20 | git: 21 | url: https://github.com/GetStream/stream-feed-flutter.git 22 | ref: master 23 | path: ./packages/stream_feed_flutter 24 | ``` 25 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/.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 | .flutter-plugins-dependencies 48 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/.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: 2b7b4bdcab1acfb8745a1b69ed395c29e505a079 8 | channel: master 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/README.md: -------------------------------------------------------------------------------- 1 | # example 2 | 3 | A new Flutter project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/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_feed_flutter/example/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.1.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/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.7-all.zip 7 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/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/stream_feed_flutter/example/assets/stream_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/assets/stream_logo.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 9.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/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/stream_feed_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/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/stream_feed_flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/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_feed_flutter/example/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/xcuserdata/ 7 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/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_feed_flutter/example/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_feed_flutter/example/macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | import path_provider_macos 9 | import url_launcher_macos 10 | import wakelock_macos 11 | 12 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 13 | PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) 14 | UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) 15 | WakelockMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockMacosPlugin")) 16 | } 17 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/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_feed_flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/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 = example 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2021 com.example. All rights reserved. 15 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/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_feed_flutter/example/macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.network.server 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/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_feed_flutter/example/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_feed_flutter/example/macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/web/favicon.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/web/icons/Icon-192.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/web/icons/Icon-512.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/example/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/example/web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example", 3 | "short_name": "example", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/lib/src/default/default.dart: -------------------------------------------------------------------------------- 1 | export 'empty_state.dart'; 2 | export 'error_state.dart'; 3 | export 'loading_state.dart'; 4 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/lib/src/default/empty_state.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | /// {@template onEmptyWidget} 5 | /// A default widget to be displayed for empty state builders. 6 | /// {@endtemplate} 7 | class EmptyStateWidget extends StatelessWidget { 8 | /// Builds an [EmptyStateWidget]. 9 | /// 10 | /// {@macro onEmptyWidget} 11 | const EmptyStateWidget({ 12 | Key? key, 13 | this.message = 'Nothing here...', 14 | }) : super(key: key); 15 | 16 | /// The message to be displayed 17 | final String message; 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return Center(child: Text(message)); 22 | } 23 | 24 | @override 25 | void debugFillProperties(DiagnosticPropertiesBuilder properties) { 26 | super.debugFillProperties(properties); 27 | properties.add(StringProperty('message', message)); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/lib/src/default/error_state.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | /// {@template onErrorWidget} 5 | /// A default widget to display for error builders. 6 | /// {@endtemplate} 7 | 8 | class ErrorStateWidget extends StatelessWidget { 9 | /// Builds an [ErrorStateWidget]. 10 | /// 11 | /// {@macro onErrorWidget} 12 | const ErrorStateWidget({ 13 | Key? key, 14 | this.message = 'Sorry an error has occured', 15 | }) : super(key: key); 16 | 17 | /// The error message to display 18 | final String message; 19 | 20 | @override 21 | Widget build(BuildContext context) { 22 | return Center( 23 | child: Column( 24 | children: [ 25 | const Icon( 26 | Icons.announcement, 27 | color: Colors.red, 28 | size: 40, 29 | ), 30 | const SizedBox(height: 10), 31 | Text( 32 | message, 33 | textAlign: TextAlign.center, 34 | ), 35 | ], 36 | ), 37 | ); 38 | } 39 | 40 | @override 41 | void debugFillProperties(DiagnosticPropertiesBuilder properties) { 42 | super.debugFillProperties(properties); 43 | properties.add(StringProperty('message', message)); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/lib/src/default/loading_state.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | /// {@template onProgressWidget} 4 | /// A default loading widget to display for loading builders. 5 | /// {@endtemplate} 6 | class LoadingStateWidget extends StatelessWidget { 7 | /// Builds a [LoadingStateWidget]. 8 | /// 9 | /// {@macro onProgressWidget} 10 | const LoadingStateWidget({Key? key}) : super(key: key); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return const Center( 15 | child: CircularProgressIndicator(), 16 | ); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/lib/src/theme/themes.dart: -------------------------------------------------------------------------------- 1 | export 'child_reaction_theme.dart'; 2 | export 'gallery_header_theme.dart'; 3 | export 'gif_dialog_theme.dart'; 4 | export 'og_card_theme.dart'; 5 | export 'reaction_theme.dart'; 6 | export 'stream_feed_theme.dart'; 7 | export 'user_bar_theme.dart'; 8 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/lib/src/utils/constants.dart: -------------------------------------------------------------------------------- 1 | part of 'extensions.dart'; 2 | 3 | const _letters = 4 | 'a-zA-Za-zA-Z'; //TODO: non latin letters (other scripts like japanese etc) 5 | const _symbols = r'\.·・ー_,!\(\)'; 6 | 7 | const _numbers = '0-90-9'; 8 | const _text = _symbols + _numbers + _letters; 9 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/lib/src/utils/debug.dart: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/lib/src/utils/display.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | List handleDisplay( 4 | Map? data, String jsonKey, TextStyle style) { 5 | return data?[jsonKey] != null 6 | ? [ 7 | Text(data![jsonKey]! as String, style: style), 8 | const SizedBox(width: 4), 9 | ] 10 | : [const Offstage()]; 11 | } 12 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/lib/src/utils/extensions.dart: -------------------------------------------------------------------------------- 1 | import 'package:stream_feed_flutter/src/utils/tag_detector.dart'; 2 | 3 | part 'constants.dart'; 4 | 5 | extension TagX on Tag { 6 | // TODO: Improve all regex 7 | // eg -> @#sahil (Detects as normal text) 8 | // %sahil (does not includes "%" in the normal text) 9 | String toRegEx() => { 10 | Tag.hashtag: r'(?(^|\s)(#[a-z\d-]+))', //TODO: handle uppercase 11 | Tag.mention: r'(?(^|\s)(@[a-z\d-]+))', 12 | Tag.normalText: '(?([$_text]+))' 13 | }[this]!; 14 | 15 | String str() => { 16 | Tag.hashtag: 'hashtag', 17 | Tag.mention: 'mention', 18 | Tag.normalText: 'normalText', 19 | }[this]!; 20 | } 21 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/lib/src/widgets/buttons/buttons.dart: -------------------------------------------------------------------------------- 1 | export 'like.dart'; 2 | export 'reply_button.dart'; 3 | export 'repost.dart'; 4 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/lib/src/widgets/dialogs/dialogs.dart: -------------------------------------------------------------------------------- 1 | export 'comment.dart'; 2 | export 'emojis.dart'; 3 | export 'gif.dart'; 4 | export 'medias.dart'; 5 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/lib/src/widgets/dialogs/emojis.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | ///{@template emojis_action} 4 | /// Opens an emoji dialog 5 | /// {@endtemplate} 6 | class EmojisAction extends StatelessWidget { 7 | /// Builds an [EmojiDialog]. 8 | const EmojisAction({ 9 | Key? key, 10 | }) : super(key: key); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return const Icon( 15 | Icons.emoji_emotions_outlined, //TODO: svg icons 16 | color: Colors.blue, 17 | semanticLabel: 'Emojis', //TODO: i18n 18 | ); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/lib/src/widgets/dialogs/gif.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:stream_feed_flutter/src/theme/gif_dialog_theme.dart'; 3 | 4 | ///{@template gif_action} 5 | ///Opens a gif dialog 6 | ///{@endtemplate} 7 | class GIFAction extends StatelessWidget { 8 | /// Builds a [GIFAction]. 9 | const GIFAction({ 10 | Key? key, 11 | }) : super(key: key); 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Container( 16 | decoration: GifDialogTheme.of(context).boxDecoration, 17 | child: Icon( 18 | Icons.gif_outlined, //TODO: svg icons 19 | color: GifDialogTheme.of(context).iconColor, 20 | semanticLabel: 'GIF', //TODO: i18n 21 | ), 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/lib/src/widgets/dialogs/medias.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | ///{@template medias_action} 4 | ///Opens file explorer to select a media file. 5 | ///{@endtemplate} 6 | class MediasAction extends StatelessWidget { 7 | /// Builds a [MediasAction]. 8 | const MediasAction({ 9 | Key? key, 10 | }) : super(key: key); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return const Icon( 15 | Icons.collections_outlined, //TODO: svg icons 16 | color: Colors.blue, 17 | semanticLabel: 'Medias', //TODO: i18n 18 | ); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/lib/src/widgets/human_readable_timestamp.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:stream_feed_flutter/src/theme/user_bar_theme.dart'; 4 | import 'package:timeago/timeago.dart' as timeago; 5 | 6 | /// A human readable date. 7 | class HumanReadableTimestamp extends StatelessWidget { 8 | /// Builds a [HumanReadableTimestamp]. 9 | const HumanReadableTimestamp({ 10 | Key? key, 11 | required this.timestamp, 12 | }) : super(key: key); 13 | 14 | /// The timestamp to display. 15 | final DateTime timestamp; 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | return Text( 20 | timeago.format(timestamp), 21 | style: UserBarTheme.of(context).timestampTextStyle, 22 | ); 23 | } 24 | 25 | @override 26 | void debugFillProperties(DiagnosticPropertiesBuilder properties) { 27 | super.debugFillProperties(properties); 28 | properties.add(DiagnosticsProperty('timestamp', timestamp)); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/lib/src/widgets/og/card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:stream_feed_flutter/src/media/gallery_preview.dart'; 4 | import 'package:stream_feed_flutter_core/stream_feed_flutter_core.dart'; 5 | 6 | /// {@template activity_card} 7 | /// A card used to display media attachments. 8 | /// 9 | /// For now, it can display images and videos. When clicked, the image or 10 | /// video will open in its own view. 11 | /// {@endtemplate} 12 | class ActivityCard extends StatelessWidget { 13 | /// Builds an [ActivityCard]. 14 | const ActivityCard({ 15 | Key? key, 16 | this.attachments, 17 | }) : super(key: key); 18 | 19 | /// The attachments to this post 20 | final List? attachments; 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | if (attachments != null && attachments!.isNotEmpty) { 25 | return GalleryPreview(attachments: attachments!); 26 | } else { 27 | return const SizedBox.shrink(); 28 | } 29 | } 30 | 31 | @override 32 | void debugFillProperties(DiagnosticPropertiesBuilder properties) { 33 | super.debugFillProperties(properties); 34 | properties.add(IterableProperty('attachments', attachments)); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/lib/src/widgets/stream_feed_app.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:stream_feed_flutter/src/theme/stream_feed_theme.dart'; 4 | import 'package:stream_feed_flutter_core/stream_feed_flutter_core.dart'; 5 | 6 | class StreamFeed extends StatelessWidget { 7 | StreamFeed({ 8 | Key? key, 9 | required this.bloc, 10 | required this.child, 11 | StreamFeedThemeData? themeData, 12 | }) : _themeData = themeData ?? StreamFeedThemeData.light(), 13 | super(key: key); 14 | 15 | final FeedBloc bloc; 16 | final Widget child; 17 | final StreamFeedThemeData _themeData; 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return FeedProvider( 22 | bloc: bloc, 23 | child: StreamFeedTheme( 24 | data: _themeData, 25 | child: child, 26 | ), 27 | ); 28 | } 29 | 30 | @override 31 | void debugFillProperties(DiagnosticPropertiesBuilder properties) { 32 | super.debugFillProperties(properties); 33 | properties.add(DiagnosticsProperty('bloc', bloc)); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/lib/src/widgets/user/username.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:stream_feed_flutter/stream_feed_flutter.dart'; 4 | 5 | class Username extends StatelessWidget { 6 | /// Builds a [Username]. 7 | const Username({ 8 | Key? key, 9 | this.user, 10 | required this.nameJsonKey, 11 | }) : super(key: key); 12 | 13 | /// The user to show a username for 14 | final User? user; 15 | 16 | /// The json key for the user's name. 17 | final String nameJsonKey; 18 | 19 | /// Username 20 | String? get username => user?.data?[nameJsonKey] as String?; 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return Text( 25 | username ?? 'anonymous', 26 | style: UserBarTheme.of(context).usernameTextStyle, 27 | ); 28 | } 29 | 30 | @override 31 | void debugFillProperties(DiagnosticPropertiesBuilder properties) { 32 | super.debugFillProperties(properties); 33 | properties.add(StringProperty('username', username)); 34 | properties.add(DiagnosticsProperty('user', user)); 35 | properties.add(StringProperty('nameJsonKey', nameJsonKey)); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/lib/stream_feed_flutter.dart: -------------------------------------------------------------------------------- 1 | library stream_feed_flutter; 2 | 3 | export 'package:stream_feed_flutter_core/stream_feed_flutter_core.dart' 4 | hide FlatFeed; 5 | 6 | export 'src/media/fullscreen_media.dart'; 7 | export 'src/media/gallery_header.dart'; 8 | export 'src/media/gallery_preview.dart'; 9 | export 'src/theme/themes.dart'; 10 | export 'src/utils/typedefs.dart'; 11 | export 'src/widgets/buttons/reaction.dart'; 12 | export 'src/widgets/comment/field.dart'; 13 | export 'src/widgets/icons.dart'; 14 | export 'src/widgets/pages/compose_view.dart'; 15 | export 'src/widgets/pages/flat_feed_list_view.dart'; 16 | export 'src/widgets/stream_feed_app.dart'; 17 | export 'src/widgets/user/avatar.dart'; 18 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/lib/svgs/avatar.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 9 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/lib/svgs/categories.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/lib/svgs/close.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/lib/svgs/gear.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/lib/svgs/love_active.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/lib/svgs/love_inactive.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/lib/svgs/post.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/lib/svgs/reply.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/lib/svgs/repost.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/lib/svgs/share.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: stream_feed_flutter 2 | description: Stream Feed official Flutter SDK. Build your own chat experience using Dart and Flutter. 3 | version: 0.0.0 4 | homepage: https://getstream.io/ 5 | publish_to: none 6 | 7 | environment: 8 | sdk: ">=2.13.0 <3.0.0" 9 | 10 | dependencies: 11 | animations: ^2.0.2 12 | chewie: ^1.3.2 13 | equatable: ^2.0.2 14 | flutter: 15 | sdk: flutter 16 | flutter_svg: ^0.22.0 17 | image_picker: ^0.8.4+4 18 | path_provider: ^2.0.5 19 | photo_view: ^0.13.0 20 | rxdart: ^0.27.1 21 | stream_feed_flutter_core: 22 | path: ../stream_feed_flutter_core 23 | timeago: ^3.0.2 24 | url_launcher: ^6.0.6 25 | video_thumbnail: ^0.4.3 26 | 27 | dependency_overrides: 28 | photo_view: 29 | git: 30 | url: https://github.com/bluefireteam/photo_view 31 | ref: 8156907eecfa812b181a5a729d790f6d399f311b 32 | 33 | dev_dependencies: 34 | golden_toolkit: ^0.13.0 35 | mocktail_image_network: ^0.3.1 36 | nested: ^1.0.0 37 | test: ^1.14.4 38 | 39 | flutter: 40 | assets: 41 | - lib/svgs/ 42 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/test/flutter_test_config.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:io'; 3 | 4 | import 'package:golden_toolkit/golden_toolkit.dart'; 5 | 6 | Future testExecutable(FutureOr Function() testMain) async { 7 | return GoldenToolkit.runWithConfiguration( 8 | () async { 9 | await loadAppFonts(); 10 | await testMain(); 11 | }, 12 | config: GoldenToolkitConfiguration( 13 | // Currently, goldens are not generated/validated in CI for this repo. We have settled on the goldens for this package 14 | // being captured/validated by developers running on MacOSX. We may revisit this in the future if there is a reason to invest 15 | // in more sophistication 16 | skipGoldenAssertion: () => !Platform.isMacOS, 17 | ), 18 | ); 19 | } 20 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/test/goldens/activity_footer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/test/goldens/activity_footer.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/test/goldens/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/test/goldens/avatar.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/test/goldens/avatar_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/test/goldens/avatar_icon.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/test/goldens/buttons_grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/test/goldens/buttons_grid.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/test/goldens/categories_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/test/goldens/categories_icon.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/test/goldens/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/test/goldens/close.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/test/goldens/gear_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/test/goldens/gear_icon.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/test/goldens/love_active_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/test/goldens/love_active_icon.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/test/goldens/love_inactive_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/test/goldens/love_inactive_icon.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/test/goldens/post_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/test/goldens/post_icon.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/test/goldens/reaction_toggle_onAddReaction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/test/goldens/reaction_toggle_onAddReaction.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/test/goldens/reaction_toggle_onRemoveReaction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/test/goldens/reaction_toggle_onRemoveReaction.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/test/goldens/reply_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/test/goldens/reply_icon.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/test/goldens/repost.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/test/goldens/repost.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/test/goldens/repost_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/test/goldens/repost_icon.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/test/goldens/share_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter/test/goldens/share_icon.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter/test/human_readable_timestamp_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | import 'package:stream_feed_flutter/src/widgets/human_readable_timestamp.dart'; 4 | 5 | void main() { 6 | testWidgets('debugFillProperties', (tester) async { 7 | final now = DateTime.now(); 8 | final builder = DiagnosticPropertiesBuilder(); 9 | HumanReadableTimestamp( 10 | timestamp: now, 11 | ).debugFillProperties(builder); 12 | 13 | final description = builder.properties 14 | .where((node) => !node.isFiltered(DiagnosticLevel.info)) 15 | .map((node) => node.toJsonMap(const DiagnosticsSerializationDelegate())) 16 | .toList(); 17 | 18 | expect(description[0]['description'], '$now'); 19 | }); 20 | } 21 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/test/interactive_text_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | import 'package:stream_feed_flutter/src/utils/tag_detector.dart'; 4 | import 'package:stream_feed_flutter/src/widgets/interactive_text.dart'; 5 | 6 | void main() { 7 | testWidgets('debugFillProperties', (tester) async { 8 | final builder = DiagnosticPropertiesBuilder(); 9 | const InteractiveText( 10 | tagged: TaggedText( 11 | tag: Tag.normalText, 12 | text: 'Test', 13 | ), 14 | ).debugFillProperties(builder); 15 | 16 | final description = builder.properties 17 | .where((node) => !node.isFiltered(DiagnosticLevel.info)) 18 | .map((node) => node.toJsonMap(const DiagnosticsSerializationDelegate())) 19 | .toList(); 20 | 21 | expect(description[0]['description'], 'TaggedText(Tag.normalText, Test)'); 22 | }); 23 | } 24 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/test/mock.dart: -------------------------------------------------------------------------------- 1 | import 'package:mocktail/mocktail.dart'; 2 | import 'package:stream_feed_flutter_core/stream_feed_flutter_core.dart'; 3 | 4 | class MockReactions extends Mock implements ReactionsClient {} 5 | 6 | class MockStreamAnalytics extends Mock implements StreamAnalytics {} 7 | 8 | class MockStreamFeedClient extends Mock implements StreamFeedClient {} 9 | 10 | class MockFlatFeed extends Mock implements FlatFeed {} 11 | 12 | class MockFeedBloc extends Mock implements FeedBloc {} 13 | 14 | class MockReactionsController extends Mock implements ReactionsManager {} 15 | 16 | class MockStreamUser extends Mock implements StreamUser {} 17 | 18 | class MockUploadController extends Mock implements UploadController {} 19 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter/test/tag_detector_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:stream_feed_flutter/src/utils/tag_detector.dart'; 2 | import 'package:test/test.dart'; 3 | 4 | void main() { 5 | test('TagDetector', () { 6 | final detector = TagDetector(); 7 | final result = detector 8 | .parseText('Snowboarding is awesome! #snowboarding #winter @sacha'); 9 | 10 | expect(result, [ 11 | const TaggedText(tag: Tag.normalText, text: 'Snowboarding'), 12 | const TaggedText(tag: Tag.normalText, text: 'is'), 13 | const TaggedText(tag: Tag.normalText, text: 'awesome!'), 14 | const TaggedText(tag: Tag.hashtag, text: ' #snowboarding'), 15 | const TaggedText(tag: Tag.hashtag, text: ' #winter'), 16 | const TaggedText(tag: Tag.mention, text: ' @sacha') 17 | ]); 18 | }); 19 | } 20 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/.gitignore: -------------------------------------------------------------------------------- 1 | # Files and directories created by pub 2 | .dart_tool/ 3 | .packages 4 | 5 | # Omit commiting pubspec.lock for library packages: 6 | # https://dart.dev/guides/libraries/private-files#pubspeclock 7 | pubspec.lock 8 | 9 | # Conventional directory for build outputs 10 | build/ 11 | 12 | # Directory created by dartdoc 13 | doc/api/ 14 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/.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/stream_feed_flutter_core/example/.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: 18116933e77adc82f80866c928266a5b4f1ed645 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/README.md: -------------------------------------------------------------------------------- 1 | # example 2 | 3 | A new Flutter project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/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_feed_flutter_core/example/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.1.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/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.7-all.zip 7 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/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/stream_feed_flutter_core/example/ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 9.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/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/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/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/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/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_feed_flutter_core/example/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/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_feed_flutter_core/example/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_feed_flutter_core/example/macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | 9 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 10 | } 11 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/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_feed_flutter_core/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/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 = example 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2021 com.example. All rights reserved. 15 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/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_feed_flutter_core/example/macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.network.server 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/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_feed_flutter_core/example/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_feed_flutter_core/example/macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/example/web/favicon.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/example/web/icons/Icon-192.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/example/web/icons/Icon-512.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/example/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/example/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/example/web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example", 3 | "short_name": "example", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/lib/src/bloc/bloc.dart: -------------------------------------------------------------------------------- 1 | export 'activities_manager.dart'; 2 | export 'feed_bloc.dart'; 3 | export 'grouped_activities_manager.dart'; 4 | export 'provider.dart'; 5 | export 'reactions_manager.dart'; 6 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/lib/src/upload/upload.dart: -------------------------------------------------------------------------------- 1 | export 'states.dart'; 2 | export 'upload_controller.dart'; 3 | export 'widgets.dart'; 4 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/lib/stream_feed_flutter_core.dart: -------------------------------------------------------------------------------- 1 | library stream_feed_flutter_core; 2 | 3 | export 'package:stream_feed/stream_feed.dart'; 4 | 5 | export 'src/attachment.dart'; 6 | export 'src/bloc/bloc.dart'; 7 | export 'src/extensions.dart'; 8 | export 'src/flat_feed_core.dart'; 9 | export 'src/media.dart'; 10 | export 'src/reactions_list_core.dart'; 11 | export 'src/upload/upload.dart'; 12 | export 'src/upload_list_core.dart'; 13 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: stream_feed_flutter_core 2 | description: Stream Feed official Flutter SDK Core. Build your own feed experience using Dart and Flutter. 3 | version: 0.8.0 4 | repository: https://github.com/GetStream/stream-feed-flutter 5 | issue_tracker: https://github.com/GetStream/stream-feed-flutter/issues 6 | homepage: https://getstream.io/ 7 | environment: 8 | sdk: ">=2.14.0 <3.0.0" 9 | flutter: ">=1.17.0" 10 | 11 | dependencies: 12 | dio: ^4.0.1 13 | equatable: ^2.0.3 14 | flutter: 15 | sdk: flutter 16 | meta: ^1.7.0 17 | rxdart: ^0.27.1 18 | stream_feed: ^0.6.0+2 19 | dev_dependencies: 20 | flutter_test: 21 | sdk: flutter 22 | mocktail: ^0.3.0 23 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/test/assets/cavalier.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/test/assets/cavalier.mp3 -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/test/assets/example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/test/assets/example.pdf -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/test/assets/penserais.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/test/assets/penserais.mp3 -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/test/assets/test_image.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/test/assets/test_image.jpeg -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/test/assets/test_image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/stream-feed-flutter/57208bea525beb6bb050f12f1e2f1d79f198f6fc/packages/stream_feed_flutter_core/test/assets/test_image2.png -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/test/mocks.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | import 'package:mocktail/mocktail.dart'; 3 | import 'package:stream_feed_flutter_core/stream_feed_flutter_core.dart'; 4 | 5 | class MockLogger extends Mock implements Logger {} 6 | 7 | class MockStreamFeedClient extends Mock implements StreamFeedClient {} 8 | 9 | class MockReactions extends Mock implements ReactionsClient {} 10 | 11 | class MockFiles extends Mock implements FileStorageClient {} 12 | 13 | class MockImages extends Mock implements ImageStorageClient {} 14 | 15 | class MockCancelToken extends Mock implements CancelToken {} 16 | 17 | class MockStreamAnalytics extends Mock implements StreamAnalytics {} 18 | 19 | class MockFlatFeed extends Mock implements FlatFeed {} 20 | 21 | class MockAggregatedFeed extends Mock implements AggregatedFeed {} 22 | 23 | class MockReactionsManager extends Mock implements ReactionsManager {} 24 | 25 | class MockActivitiesManager extends Mock implements ActivitiesManager {} 26 | 27 | class MockGroupedActivitiesManager extends Mock 28 | implements GroupedActivitiesManager {} 29 | 30 | class MockClient extends Mock implements StreamFeedClient { 31 | final Logger logger = MockLogger(); 32 | } 33 | 34 | class MockStreamUser extends Mock implements StreamUser {} 35 | 36 | class MockUploadController extends Mock implements UploadController {} 37 | -------------------------------------------------------------------------------- /packages/stream_feed_flutter_core/test/utils.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | File assetFile(String name) { 4 | final dir = currentDirectory.path; 5 | return File('$dir/test/assets/$name'); 6 | } 7 | 8 | // https://github.com/flutter/flutter/issues/20907 9 | Directory get currentDirectory { 10 | var directory = Directory.current; 11 | if (directory.path.endsWith('/test')) { 12 | directory = directory.parent; 13 | } 14 | return directory; 15 | } 16 | -------------------------------------------------------------------------------- /scripts/coverage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Fast fail the script on failures. 4 | set -e 5 | 6 | dart pub global activate coverage 7 | 8 | flutter test --coverage 9 | dart pub global activate remove_from_coverage 10 | dart pub global run remove_from_coverage:remove_from_coverage -f coverage/lcov.info -r '\.g\.dart$' -r '\.freezed\.dart$' --------------------------------------------------------------------------------