├── android ├── settings_aar.gradle ├── gradle.properties ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── drawable │ │ │ │ │ └── launch_background.xml │ │ │ │ └── values │ │ │ │ │ └── styles.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── build_viking │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── settings.gradle └── build.gradle ├── ios ├── Runner │ ├── Runner-Bridging-Header.h │ ├── Assets.xcassets │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ └── project.pbxproj ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist ├── .gitignore ├── Podfile └── Podfile.lock ├── demo.gif ├── assets ├── barcode.png ├── stream_banner.png ├── viking_dash.png ├── viking_village.png ├── viking_chat_logo.png └── flutter_viking_logo.png ├── lib ├── services │ ├── services.dart │ └── api_service.dart ├── widgets │ ├── widgets.dart │ ├── viking_card.dart │ ├── user_image.dart │ ├── viking_chat_logo.dart │ ├── chat_item.dart │ ├── branded_scaffold.dart │ └── message_item.dart ├── utils │ ├── extensions.dart │ ├── utils.dart │ └── providers.dart ├── assets.dart ├── models │ └── user_model.dart ├── main.dart └── screen │ ├── chat_home_screen.dart │ ├── users_screen.dart │ ├── home_screen.dart │ └── conversation_screen.dart ├── .metadata ├── pubspec.yaml ├── .gitignore ├── test └── widget_test.dart ├── README.md └── pubspec.lock /android/settings_aar.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/build-viking-sample/HEAD/demo.gif -------------------------------------------------------------------------------- /assets/barcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/build-viking-sample/HEAD/assets/barcode.png -------------------------------------------------------------------------------- /assets/stream_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/build-viking-sample/HEAD/assets/stream_banner.png -------------------------------------------------------------------------------- /assets/viking_dash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/build-viking-sample/HEAD/assets/viking_dash.png -------------------------------------------------------------------------------- /assets/viking_village.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/build-viking-sample/HEAD/assets/viking_village.png -------------------------------------------------------------------------------- /assets/viking_chat_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/build-viking-sample/HEAD/assets/viking_chat_logo.png -------------------------------------------------------------------------------- /assets/flutter_viking_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/build-viking-sample/HEAD/assets/flutter_viking_logo.png -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | android.enableR8=true 5 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/build-viking-sample/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/build-viking-sample/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/build-viking-sample/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/build-viking-sample/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/build-viking-sample/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/build-viking-sample/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /lib/services/services.dart: -------------------------------------------------------------------------------- 1 | import 'package:build_viking/models/user_model.dart'; 2 | 3 | abstract class APIService { 4 | Future getUserProfile(final String ticketID); 5 | } 6 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/build-viking-sample/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/build-viking-sample/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/build-viking-sample/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/build-viking-sample/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/build-viking-sample/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/build-viking-sample/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/build-viking-sample/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/build-viking-sample/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/build-viking-sample/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/build-viking-sample/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/build-viking-sample/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/build-viking-sample/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/build-viking-sample/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/build-viking-sample/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/build-viking-sample/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/build-viking-sample/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetStream/build-viking-sample/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/build_viking/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.build_viking 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /lib/widgets/widgets.dart: -------------------------------------------------------------------------------- 1 | export './branded_scaffold.dart'; 2 | export './chat_item.dart'; 3 | export './message_item.dart'; 4 | export './user_image.dart'; 5 | export './viking_card.dart'; 6 | export './viking_chat_logo.dart'; 7 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /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.5-all.zip 7 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/utils/extensions.dart: -------------------------------------------------------------------------------- 1 | import 'package:build_viking/services/services.dart'; 2 | import 'package:build_viking/utils/providers.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | extension BuildContextExtensions on BuildContext { 6 | APIService get apiService => ApiProvider.of(this); 7 | NavigatorState get nav => Navigator.of(this); 8 | } 9 | -------------------------------------------------------------------------------- /lib/utils/utils.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | export './extensions.dart'; 4 | export './providers.dart'; 5 | 6 | String formatDate(BuildContext context, DateTime time) { 7 | if (time == null) { 8 | return "Never"; 9 | } else { 10 | return MaterialLocalizations.of(context).formatMediumDate(time); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /.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: 8874f21e79d7ec66d0457c7ab338348e31b17f1d 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /lib/assets.dart: -------------------------------------------------------------------------------- 1 | class Assets { 2 | static const barcode = "assets/barcode.png"; 3 | static const flutterVikingsLogo = "assets/flutter_viking_logo.png"; 4 | static const streamBanner = "assets/stream_banner.png"; 5 | static const chatLogo = "assets/viking_chat_logo.png"; 6 | static const vikingVillage = "assets/viking_village.png"; 7 | static const vikingDash = "assets/viking_dash.png"; 8 | } 9 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/utils/providers.dart: -------------------------------------------------------------------------------- 1 | import 'package:build_viking/services/services.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class ApiProvider extends InheritedWidget { 5 | const ApiProvider({ 6 | Key key, 7 | @required Widget child, 8 | @required this.service, 9 | }) : assert(child != null), 10 | assert(service != null), 11 | super(key: key, child: child); 12 | 13 | final APIService service; 14 | 15 | static APIService of(BuildContext context) { 16 | return context.dependOnInheritedWidgetOfExactType().service; 17 | } 18 | 19 | @override 20 | bool updateShouldNotify(ApiProvider old) { 21 | return old.service != service; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /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.6.3' 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 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: build_viking 2 | description: Stream's Build Viking sample app 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | version: 1.0.0+1 8 | 9 | environment: 10 | sdk: ">=2.7.0 <3.0.0" 11 | 12 | dependencies: 13 | flutter: 14 | sdk: flutter 15 | cupertino_icons: ^1.0.0 16 | google_fonts: ^1.1.1 17 | qr_code_scanner: 0.0.13 18 | permission_handler: 5.0.1+1 19 | stream_chat_flutter: ^0.2.13 20 | http: ^0.12.2 21 | dev_dependencies: 22 | flutter_test: 23 | sdk: flutter 24 | flutter: 25 | uses-material-design: true 26 | assets: 27 | - assets/ -------------------------------------------------------------------------------- /lib/models/user_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:meta/meta.dart'; 2 | 3 | class VikingUser { 4 | VikingUser({ 5 | @required this.name, 6 | @required this.image, 7 | @required this.token, 8 | }) : assert(name != null && name.isNotEmpty), 9 | assert(token != null && token.isNotEmpty), 10 | assert(token != null); 11 | 12 | factory VikingUser.fromJson(Map data) { 13 | return VikingUser( 14 | name: data['name'], 15 | image: data['image'] ?? "", 16 | token: data['token'], 17 | ); 18 | } 19 | 20 | final String name; 21 | final String image; 22 | final String token; 23 | 24 | @override 25 | String toString() { 26 | return 'VikingUser{name: $name, image: $image, token: $token}'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /.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 | .fvm/ 33 | /build/ 34 | lib/api.dart 35 | 36 | # Web related 37 | lib/generated_plugin_registrant.dart 38 | 39 | # Symbolication related 40 | app.*.symbols 41 | 42 | # Obfuscation related 43 | app.*.map.json 44 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/widgets/viking_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class BuildVikingCard extends StatelessWidget { 4 | const BuildVikingCard({ 5 | Key key, 6 | @required this.child, 7 | this.onTap, 8 | }) : assert(child != null), 9 | super(key: key); 10 | final VoidCallback onTap; 11 | final Widget child; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Align( 16 | child: Card( 17 | clipBehavior: Clip.hardEdge, 18 | shape: RoundedRectangleBorder( 19 | borderRadius: BorderRadius.circular(32.0), 20 | ), 21 | color: Theme.of(context).primaryColor, 22 | child: InkWell( 23 | onTap: onTap, 24 | child: Padding( 25 | padding: const EdgeInsets.symmetric( 26 | vertical: 36.0, 27 | horizontal: 24.0, 28 | ), 29 | child: child, 30 | ), 31 | ), 32 | ), 33 | ); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lib/widgets/user_image.dart: -------------------------------------------------------------------------------- 1 | import 'package:build_viking/assets.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class UserImage extends StatelessWidget { 5 | const UserImage({Key key, @required this.image}) : super(key: key); 6 | final String image; 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | final bool canDisplayImage = image != null && image.isNotEmpty; 11 | if (canDisplayImage) { 12 | return CircleAvatar( 13 | backgroundColor: Colors.white, 14 | radius: 32, 15 | child: Center( 16 | child: Image.network( 17 | image, 18 | height: 32.0, 19 | ), 20 | ), 21 | ); 22 | } else { 23 | return CircleAvatar( 24 | backgroundColor: Colors.white, 25 | radius: 32, 26 | child: Center( 27 | child: Image.asset( 28 | Assets.vikingDash, 29 | height: 56.0, 30 | ), 31 | ), 32 | ); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /lib/widgets/viking_chat_logo.dart: -------------------------------------------------------------------------------- 1 | import 'package:build_viking/assets.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:google_fonts/google_fonts.dart'; 4 | 5 | class VikingChatLogo extends StatelessWidget { 6 | @override 7 | Widget build(BuildContext context) { 8 | return Column( 9 | crossAxisAlignment: CrossAxisAlignment.center, 10 | mainAxisSize: MainAxisSize.min, 11 | children: [ 12 | Image.asset(Assets.chatLogo, height: 56.0), 13 | SizedBox(height: 8.0), 14 | RichText( 15 | text: TextSpan( 16 | text: "Viking", 17 | style: GoogleFonts.caesarDressing( 18 | fontSize: 24.0, 19 | color: Colors.white, 20 | ), 21 | children: [ 22 | TextSpan( 23 | text: "Chat", 24 | style: GoogleFonts.inter( 25 | fontSize: 24.0, 26 | color: Colors.white, 27 | ), 28 | ), 29 | ], 30 | ), 31 | ), 32 | ], 33 | ); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:build_viking/main.dart'; 9 | import 'package:flutter/material.dart'; 10 | import 'package:flutter_test/flutter_test.dart'; 11 | 12 | void main() { 13 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 14 | // Build our app and trigger a frame. 15 | await tester.pumpWidget(App()); 16 | 17 | // Verify that our counter starts at 0. 18 | expect(find.text('0'), findsOneWidget); 19 | expect(find.text('1'), findsNothing); 20 | 21 | // Tap the '+' icon and trigger a frame. 22 | await tester.tap(find.byIcon(Icons.add)); 23 | await tester.pump(); 24 | 25 | // Verify that our counter has incremented. 26 | expect(find.text('0'), findsNothing); 27 | expect(find.text('1'), findsOneWidget); 28 | }); 29 | } 30 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! 32 | use_modular_headers! 33 | 34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35 | end 36 | 37 | post_install do |installer| 38 | installer.pods_project.targets.each do |target| 39 | flutter_additional_ios_build_settings(target) 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /lib/widgets/chat_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:build_viking/widgets/user_image.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:google_fonts/google_fonts.dart'; 4 | import 'package:stream_chat_flutter/stream_chat_flutter.dart'; 5 | 6 | class ChatItem extends StatelessWidget { 7 | const ChatItem({ 8 | Key key, 9 | @required this.subtitle, 10 | @required this.onTap, 11 | @required this.image, 12 | this.name, 13 | }) : assert(subtitle != null), 14 | assert(image != null), 15 | super(key: key); 16 | final Widget name; 17 | final String subtitle; 18 | final VoidCallback onTap; 19 | final String image; 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | return Padding( 24 | padding: const EdgeInsets.symmetric(vertical: 8.0), 25 | child: ListTile( 26 | onTap: onTap, 27 | leading: UserImage(image: image), 28 | title: name ?? 29 | ChannelName( 30 | textStyle: GoogleFonts.caesarDressing( 31 | fontSize: 20.0, 32 | color: Colors.white, 33 | ), 34 | ), 35 | subtitle: Text( 36 | subtitle, 37 | style: GoogleFonts.inter( 38 | fontSize: 12.0, 39 | color: Colors.white.withOpacity(0.3), 40 | ), 41 | ), 42 | trailing: Icon( 43 | Icons.chevron_right, 44 | size: 18.0, 45 | color: Colors.white.withOpacity(0.65), 46 | ), 47 | ), 48 | ); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/widgets/branded_scaffold.dart: -------------------------------------------------------------------------------- 1 | import 'package:build_viking/assets.dart'; 2 | import 'package:build_viking/widgets/widgets.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | class BrandedScaffold extends StatelessWidget { 6 | const BrandedScaffold({ 7 | Key key, 8 | @required this.child, 9 | this.header, 10 | }) : assert(child != null), 11 | super(key: key); 12 | final Widget child; 13 | final Widget header; 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | final viewPadding = MediaQuery.of(context).viewPadding; 18 | return Scaffold( 19 | body: Stack( 20 | fit: StackFit.expand, 21 | children: [ 22 | Positioned( 23 | left: 0.0, 24 | right: 0.0, 25 | bottom: viewPadding.bottom, 26 | child: Image.asset( 27 | Assets.vikingVillage, 28 | fit: BoxFit.fitWidth, 29 | ), 30 | ), 31 | Column( 32 | children: [ 33 | SizedBox(height: viewPadding.top + 12.0), 34 | VikingChatLogo(), 35 | if (header != null) header, 36 | const SizedBox(height: 12.0), 37 | Expanded( 38 | child: child, 39 | ), 40 | SizedBox(height: viewPadding.bottom + 48) 41 | ], 42 | ), 43 | Align( 44 | alignment: FractionalOffset.bottomCenter, 45 | child: Container( 46 | padding: EdgeInsets.only(bottom: viewPadding.bottom), 47 | width: double.maxFinite, 48 | color: Theme.of(context).primaryColor, 49 | child: Image.asset( 50 | Assets.streamBanner, 51 | height: 40.0, 52 | ), 53 | ), 54 | ), 55 | ], 56 | ), 57 | ); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | LSApplicationCategoryType 6 | 7 | CFBundleDevelopmentRegion 8 | $(DEVELOPMENT_LANGUAGE) 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | build_viking 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | NSCameraUsageDescription 28 | Camera permission is need to scan event tickets. 29 | UILaunchStoryboardName 30 | LaunchScreen 31 | UIMainStoryboardFile 32 | Main 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | UIViewControllerBasedStatusBarAppearance 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion 29 30 | 31 | sourceSets { 32 | main.java.srcDirs += 'src/main/kotlin' 33 | } 34 | 35 | lintOptions { 36 | disable 'InvalidPackage' 37 | } 38 | 39 | defaultConfig { 40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 41 | applicationId "com.example.build_viking" 42 | minSdkVersion 24 43 | targetSdkVersion 29 44 | versionCode flutterVersionCode.toInteger() 45 | versionName flutterVersionName 46 | } 47 | 48 | buildTypes { 49 | release { 50 | // TODO: Add your own signing config for the release build. 51 | // Signing with the debug keys for now, so `flutter run --release` works. 52 | signingConfig signingConfigs.debug 53 | } 54 | } 55 | } 56 | 57 | flutter { 58 | source '../..' 59 | } 60 | 61 | dependencies { 62 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 63 | } 64 | -------------------------------------------------------------------------------- /lib/services/api_service.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:build_viking/api.dart'; 4 | import 'package:build_viking/models/user_model.dart'; 5 | import 'package:build_viking/services/services.dart'; 6 | import 'package:http/http.dart' as http; 7 | import 'package:stream_chat_flutter/stream_chat_flutter.dart'; 8 | 9 | class HttpAPIService implements APIService { 10 | HttpAPIService(this.client, this.streamClient) 11 | : assert(client != null), 12 | assert(streamClient != null); 13 | 14 | final http.Client client; 15 | final Client streamClient; 16 | 17 | @override 18 | Future getUserProfile(String ticketID) async { 19 | final _rawId = parseTicketUrl(ticketID); 20 | final _user = await _fetchUserAccount(_rawId); 21 | await streamClient.setUser( 22 | User( 23 | id: _rawId, 24 | extraData: { 25 | "name": _user.name, 26 | "image": _user.image, 27 | }, 28 | ), 29 | _user.token, 30 | ); 31 | return _user; 32 | } 33 | 34 | Future _fetchUserAccount(final String ticketID) async { 35 | try { 36 | print(ticketID); 37 | final http.Response response = await client.post( 38 | API.apiUrl, 39 | body: jsonEncode({ 40 | "id": ticketID, 41 | }), 42 | headers: {"Content-Type": "application/json"}, 43 | ); 44 | 45 | if (response.statusCode == 200) { 46 | final VikingUser user = VikingUser.fromJson( 47 | jsonDecode(response.body)['data'], 48 | ); 49 | return user; 50 | } else { 51 | throw StateError("API returned an invalid status code."); 52 | } 53 | } catch (error) { 54 | throw StateError("API returned an invalid response. Please see logs."); 55 | } 56 | } 57 | 58 | String parseTicketUrl(final String url) { 59 | if (url.contains('https://passbook.tito.io/')) { 60 | final _path = Uri.dataFromString(url).pathSegments; 61 | return _path[_path.length - 1]; 62 | } else { 63 | return url; 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:build_viking/api.dart'; 2 | import 'package:build_viking/screen/home_screen.dart'; 3 | import 'package:build_viking/services/api_service.dart'; 4 | import 'package:build_viking/utils/utils.dart'; 5 | import 'package:build_viking/widgets/widgets.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:flutter/services.dart'; 8 | import 'package:http/http.dart' as http; 9 | import 'package:stream_chat_flutter/stream_chat_flutter.dart'; 10 | 11 | void main() { 12 | SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.light); 13 | final service = HttpAPIService(http.Client(), Client(API.streamApi)); 14 | runApp(App(service: service)); 15 | } 16 | 17 | class App extends StatelessWidget { 18 | const App({ 19 | Key key, 20 | @required this.service, 21 | }) : assert(service != null), 22 | super(key: key); 23 | 24 | final HttpAPIService service; 25 | 26 | @override 27 | Widget build(BuildContext context) { 28 | return MaterialApp( 29 | title: 'Build Viking', 30 | debugShowCheckedModeBanner: false, 31 | theme: ThemeData( 32 | primaryColor: Color(0xFF000040), 33 | scaffoldBackgroundColor: Color(0xFF000A51), 34 | visualDensity: VisualDensity.adaptivePlatformDensity, 35 | ), 36 | builder: (BuildContext context, Widget child) { 37 | return StreamChat( 38 | streamChatThemeData: StreamChatThemeData( 39 | ownMessageTheme: MessageTheme( 40 | messageBackgroundColor: Color(0xFF4FC6F9), 41 | createdAt: TextStyle( 42 | color: Colors.white, 43 | ), 44 | messageText: TextStyle( 45 | color: Colors.white, 46 | ), 47 | ), 48 | otherMessageTheme: MessageTheme( 49 | messageBackgroundColor: Color(0xFF000040), 50 | createdAt: TextStyle( 51 | color: Colors.white, 52 | ), 53 | messageText: TextStyle( 54 | color: Colors.white, 55 | ), 56 | ), 57 | channelTheme: ChannelTheme( 58 | inputBackground: Color(0xFF000A51), 59 | ), 60 | backgroundColor: Color(0xFF000A51), 61 | defaultUserImage: (_, user) => UserImage( 62 | image: user.extraData['image'] ?? "", 63 | ), 64 | ), 65 | client: service.streamClient, 66 | child: child, 67 | ); 68 | }, 69 | home: ApiProvider( 70 | service: service, 71 | child: BuildVikings(), 72 | ), 73 | ); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 12 | 19 | 23 | 27 | 32 | 36 | 37 | 38 | 39 | 40 | 41 | 43 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Build Viking 🛠 2 | This repo contains sample code for Stream's Build Viking activity. 3 | ![Demo Gif](./demo.gif) 4 | 5 |
6 | 7 | ### Prerequisites 🧬 8 | This to run this application, you must have the following: 9 | - Flutter `1.24.0-7.0.pre` or higher installed 10 | - A [Stream](https://bit.ly/35mihAp) account 11 | - An `api.dart` file in `lib/` containing the following: 12 | ```dart 13 | class API { 14 | static const apiUrl = 15 | "YOUR_API_URL"; 16 | static const streamApi = "YOUR_STREAM_API_KEY"; 17 | } 18 | ``` 19 | 20 |
21 | 22 | ### Build Instructions 23 | This project consists of two parts, the application (this repo) and a simple API that verifies a Flutter Viking ticket ID and creates a [Stream] user associated with that ID. 24 | 25 | You can implement a custom API using the sample code below or remove it entirely by eliminating the call to `__fetchUserAccount` on line 20 of `lib/services/api_service.dart`. In its place, you can return an instance of `VikingUser` containing placeholder information. 26 | 27 | > Note, if you chose the latter, you would need to generate a user token manually using our [online tool](https://getstream.io/chat/docs/token_generator/?language=dart). 28 | ```js 29 | import { StreamChat } from 'stream-chat'; 30 | import axios from 'axios'; 31 | 32 | export const stream = async event => { 33 | const data = JSON.parse(event.body); 34 | 35 | try { 36 | const res = await axios.get(`${process.env.TICKET_URL}${data.id}`, { 37 | headers: { 38 | Authorization: `Token token=${process.env.TICKET_SECRET}`, 39 | 'Content-Type': 'application/json', 40 | }, 41 | }); 42 | 43 | const client = new StreamChat(process.env.STREAM_API_KEY, process.env.STREAM_API_SECRET); 44 | 45 | const ticket = res.data.ticket; 46 | 47 | const user = { 48 | id: ticket.id.toString(), 49 | name: ticket.name, 50 | role: 'channel_member', 51 | image: 'https://stream-blog-v2.imgix.net/blog/wp-content/uploads/35e4570ddc67c374f9dbbf57c743acaa/dash.png', 52 | }; 53 | 54 | const token = client.createToken(user.id); 55 | 56 | await client.upsertUser(user); 57 | 58 | return { 59 | statusCode: 200, 60 | headers: { 61 | 'Access-Control-Allow-Origin': '*', 62 | }, 63 | body: JSON.stringify({ 64 | data: { 65 | token, 66 | id: user.id, 67 | name: user.name, 68 | image: user.image, 69 | }, 70 | }), 71 | }; 72 | } catch (error) { 73 | console.error(error); 74 | 75 | return { 76 | statusCode: error.response.status, 77 | headers: { 78 | 'Access-Control-Allow-Origin': '*', 79 | }, 80 | body: JSON.stringify({ 81 | message: error.message, 82 | }), 83 | }; 84 | } 85 | }; 86 | ``` 87 | 88 | Finally, you can run the application using regular Flutter build commands. 89 | 90 | 1. Run `flutter packages get` to install the project dependencies 91 | 2. Launch the application in debug mode using `flutter run -d ` 92 | 93 | Happy Hacking! 94 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /lib/screen/chat_home_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:build_viking/screen/conversation_screen.dart'; 2 | import 'package:build_viking/screen/users_screen.dart'; 3 | import 'package:build_viking/utils/utils.dart'; 4 | import 'package:build_viking/widgets/widgets.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:google_fonts/google_fonts.dart'; 7 | import 'package:stream_chat_flutter/stream_chat_flutter.dart'; 8 | 9 | class ChatHomeScreen extends StatelessWidget { 10 | Widget buildMessageCard(String message, [double bottomPadding = 12.0]) { 11 | return Center( 12 | child: Container( 13 | margin: EdgeInsets.only(bottom: bottomPadding), 14 | height: 200.0, 15 | width: 200.0, 16 | child: BuildVikingCard( 17 | child: Center( 18 | child: Text( 19 | message, 20 | style: GoogleFonts.inter( 21 | color: Colors.white.withOpacity(0.6), 22 | fontSize: 14.0, 23 | letterSpacing: 1.2, 24 | fontWeight: FontWeight.bold), 25 | ), 26 | ), 27 | ), 28 | ), 29 | ); 30 | } 31 | 32 | void _navigateToUsers(BuildContext context) { 33 | context.nav.push( 34 | MaterialPageRoute( 35 | builder: (context) => UsersScreen(), 36 | ), 37 | ); 38 | } 39 | 40 | @override 41 | Widget build(BuildContext context) { 42 | final viewPadding = MediaQuery.of(context).viewPadding; 43 | final id = StreamChat.of(context).user.id; 44 | return BrandedScaffold( 45 | header: Align( 46 | alignment: Alignment.centerLeft, 47 | child: Padding( 48 | padding: const EdgeInsets.only( 49 | left: 12.0, 50 | top: 24.0, 51 | right: 24.0, 52 | ), 53 | child: FlatButton.icon( 54 | onPressed: () => _navigateToUsers(context), 55 | label: Text( 56 | "Create new chat", 57 | style: GoogleFonts.inter( 58 | color: Colors.white.withOpacity(0.55), 59 | ), 60 | ), 61 | icon: Icon( 62 | Icons.add, 63 | color: Colors.white.withOpacity(0.5), 64 | ), 65 | ), 66 | ), 67 | ), 68 | child: ChannelsBloc( 69 | child: ChannelListView( 70 | filter: { 71 | 'members': { 72 | '\$in': [id], 73 | } 74 | }, 75 | sort: [SortOption('last_message_at')], 76 | pagination: PaginationParams( 77 | limit: 20, 78 | ), 79 | channelWidget: ConversationScreen(), 80 | errorBuilder: (error) { 81 | return buildMessageCard( 82 | "We could not load your messages at this time.", 83 | viewPadding.bottom + 24.0, 84 | ); 85 | }, 86 | emptyBuilder: (context) { 87 | return InkWell( 88 | onTap: () => _navigateToUsers(context), 89 | child: buildMessageCard( 90 | "Tap to get started.", 91 | viewPadding.bottom + 24.0, 92 | ), 93 | ); 94 | }, 95 | channelPreviewBuilder: ( 96 | BuildContext context, 97 | Channel channel, 98 | ) { 99 | return ChatItem( 100 | key: ValueKey(channel.id), 101 | subtitle: formatDate( 102 | context, 103 | channel.lastMessageAt, 104 | ), 105 | onTap: () {}, 106 | image: channel.createdBy.extraData['image'] ?? '', 107 | ); 108 | }, 109 | ), 110 | ), 111 | ); 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /lib/widgets/message_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:build_viking/assets.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:google_fonts/google_fonts.dart'; 4 | 5 | class MessageItem extends StatelessWidget { 6 | const MessageItem({ 7 | Key key, 8 | @required this.message, 9 | @required this.timeStamp, 10 | @required this.name, 11 | this.imageUrl, 12 | this.isSender = false, 13 | }) : assert(message != null), 14 | assert(timeStamp != null), 15 | assert(name != null), 16 | super(key: key); 17 | 18 | final bool isSender; 19 | final String message; 20 | final String timeStamp; 21 | final String name; 22 | final String imageUrl; 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | final bool hasImage = imageUrl != null && imageUrl.isNotEmpty; 27 | final MainAxisAlignment rowAlignment = 28 | isSender ? MainAxisAlignment.end : MainAxisAlignment.start; 29 | 30 | return DefaultTextStyle( 31 | style: GoogleFonts.inter(fontSize: 14.0, color: Colors.white), 32 | child: Padding( 33 | padding: const EdgeInsets.all(8.0), 34 | child: Row( 35 | mainAxisAlignment: rowAlignment, 36 | children: [ 37 | const SizedBox(width: 6.0), 38 | if (!isSender) 39 | Padding( 40 | padding: const EdgeInsets.only(right: 8.0), 41 | child: CircleAvatar( 42 | backgroundColor: Colors.white, 43 | radius: 16, 44 | child: Center( 45 | child: hasImage 46 | ? Image.network( 47 | imageUrl, 48 | height: 56.0, 49 | ) 50 | : Image.asset( 51 | Assets.vikingDash, 52 | height: 56.0, 53 | ), 54 | ), 55 | ), 56 | ), 57 | SizedBox( 58 | width: 150.0, 59 | child: Column( 60 | crossAxisAlignment: CrossAxisAlignment.stretch, 61 | children: [ 62 | Card( 63 | color: isSender ? Color(0xFF4FC6F9) : Color(0xFF000040), 64 | shape: RoundedRectangleBorder( 65 | borderRadius: BorderRadius.only( 66 | topLeft: Radius.circular(12.0), 67 | topRight: Radius.circular(12.0), 68 | bottomLeft: Radius.circular(isSender ? 12.0 : 0.0), 69 | bottomRight: Radius.circular(isSender ? 0.0 : 12.0), 70 | ), 71 | ), 72 | child: Padding( 73 | padding: const EdgeInsets.all(8.0), 74 | child: Text( 75 | message, 76 | style: TextStyle(color: Colors.white), 77 | ), 78 | ), 79 | ), 80 | Row( 81 | mainAxisAlignment: rowAlignment, 82 | children: [ 83 | Text( 84 | timeStamp, 85 | style: TextStyle( 86 | fontSize: 12.0, 87 | color: Colors.white.withOpacity(0.6), 88 | ), 89 | ), 90 | const SizedBox(width: 12.0), 91 | Text( 92 | isSender ? "You" : name, 93 | style: TextStyle( 94 | fontSize: 12.0, 95 | color: Colors.white, 96 | ), 97 | ), 98 | ], 99 | ), 100 | ], 101 | ), 102 | ), 103 | ], 104 | ), 105 | ), 106 | ); 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /lib/screen/users_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:build_viking/screen/conversation_screen.dart'; 2 | import 'package:build_viking/utils/utils.dart'; 3 | import 'package:build_viking/widgets/widgets.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:google_fonts/google_fonts.dart'; 6 | import 'package:stream_chat_flutter/stream_chat_flutter.dart'; 7 | 8 | class UsersScreen extends StatelessWidget { 9 | Widget buildMessageCard(String message, [double bottomPadding = 12.0]) { 10 | return Center( 11 | child: Container( 12 | margin: EdgeInsets.only( 13 | bottom: bottomPadding, 14 | ), 15 | height: 200.0, 16 | width: 200.0, 17 | child: BuildVikingCard( 18 | child: Center( 19 | child: Text( 20 | message, 21 | style: GoogleFonts.inter( 22 | color: Colors.white.withOpacity(0.6), 23 | fontSize: 14.0, 24 | letterSpacing: 1.2, 25 | fontWeight: FontWeight.bold), 26 | ), 27 | ), 28 | ), 29 | ), 30 | ); 31 | } 32 | 33 | Widget buildText(final String text) { 34 | return Text( 35 | text, 36 | style: GoogleFonts.caesarDressing( 37 | fontSize: 20.0, 38 | color: Colors.white, 39 | ), 40 | ); 41 | } 42 | 43 | @override 44 | Widget build(BuildContext context) { 45 | final client = StreamChat.of(context).client; 46 | final user = StreamChat.of(context).user; 47 | return BrandedScaffold( 48 | child: FutureBuilder( 49 | future: client.queryUsers(filter: { 50 | "id": {"\$ne": user.id} 51 | }), 52 | builder: ( 53 | BuildContext context, 54 | AsyncSnapshot snapshot, 55 | ) { 56 | if (snapshot.hasData) { 57 | return ListView.builder( 58 | itemCount: snapshot.data.users.length, 59 | itemBuilder: (BuildContext context, int index) { 60 | final data = snapshot.data.users[index]; 61 | return ChatItem( 62 | image: data.extraData['image'] ?? "", 63 | subtitle: 64 | "Last seen: ${formatDate(context, data.lastActive)}", 65 | name: buildText(data.extraData['name'] ?? ""), 66 | onTap: () async { 67 | final channel = client.channel("messaging", 68 | id: "${data.id}-${user.id}", 69 | extraData: { 70 | "members": [data.id, user.id] 71 | }); 72 | await channel.watch(); 73 | context.nav.push( 74 | MaterialPageRoute( 75 | builder: (BuildContext context) { 76 | return StreamChannel( 77 | channel: channel, 78 | child: ConversationScreen(), 79 | ); 80 | }, 81 | ), 82 | ); 83 | }, 84 | ); 85 | }, 86 | ); 87 | } else if (snapshot.hasError) { 88 | return Center( 89 | child: Container( 90 | height: 200.0, 91 | width: 200.0, 92 | child: BuildVikingCard( 93 | child: Center( 94 | child: Text( 95 | "We are having some difficulties loading users", 96 | style: GoogleFonts.inter( 97 | color: Colors.white.withOpacity(0.6), 98 | fontSize: 16.0, 99 | ), 100 | ), 101 | ), 102 | ), 103 | ), 104 | ); 105 | } else { 106 | return Center( 107 | child: Container( 108 | height: 200.0, 109 | width: 200.0, 110 | child: BuildVikingCard( 111 | child: Center( 112 | child: CircularProgressIndicator(), 113 | ), 114 | ), 115 | ), 116 | ); 117 | } 118 | }, 119 | ), 120 | ); 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - DKImagePickerController/Core (4.3.2): 3 | - DKImagePickerController/ImageDataManager 4 | - DKImagePickerController/Resource 5 | - DKImagePickerController/ImageDataManager (4.3.2) 6 | - DKImagePickerController/PhotoGallery (4.3.2): 7 | - DKImagePickerController/Core 8 | - DKPhotoGallery 9 | - DKImagePickerController/Resource (4.3.2) 10 | - DKPhotoGallery (0.0.17): 11 | - DKPhotoGallery/Core (= 0.0.17) 12 | - DKPhotoGallery/Model (= 0.0.17) 13 | - DKPhotoGallery/Preview (= 0.0.17) 14 | - DKPhotoGallery/Resource (= 0.0.17) 15 | - SDWebImage 16 | - SwiftyGif 17 | - DKPhotoGallery/Core (0.0.17): 18 | - DKPhotoGallery/Model 19 | - DKPhotoGallery/Preview 20 | - SDWebImage 21 | - SwiftyGif 22 | - DKPhotoGallery/Model (0.0.17): 23 | - SDWebImage 24 | - SwiftyGif 25 | - DKPhotoGallery/Preview (0.0.17): 26 | - DKPhotoGallery/Model 27 | - DKPhotoGallery/Resource 28 | - SDWebImage 29 | - SwiftyGif 30 | - DKPhotoGallery/Resource (0.0.17): 31 | - SDWebImage 32 | - SwiftyGif 33 | - file_picker (0.0.1): 34 | - DKImagePickerController/PhotoGallery 35 | - Flutter 36 | - Flutter (1.0.0) 37 | - flutter_keyboard_visibility (0.0.1): 38 | - Flutter 39 | - FMDB (2.7.5): 40 | - FMDB/standard (= 2.7.5) 41 | - FMDB/standard (2.7.5) 42 | - image_picker (0.0.1): 43 | - Flutter 44 | - MTBBarcodeScanner (5.0.11) 45 | - path_provider (0.0.1): 46 | - Flutter 47 | - "permission_handler (5.0.1+1)": 48 | - Flutter 49 | - qr_code_scanner (0.0.2): 50 | - Flutter 51 | - MTBBarcodeScanner 52 | - SDWebImage (5.9.4): 53 | - SDWebImage/Core (= 5.9.4) 54 | - SDWebImage/Core (5.9.4) 55 | - shared_preferences (0.0.1): 56 | - Flutter 57 | - sqflite (0.0.2): 58 | - Flutter 59 | - FMDB (>= 2.7.5) 60 | - sqlite3 (3.32.3): 61 | - sqlite3/common (= 3.32.3) 62 | - sqlite3/common (3.32.3) 63 | - sqlite3/fts5 (3.32.3): 64 | - sqlite3/common 65 | - sqlite3/json1 (3.32.3): 66 | - sqlite3/common 67 | - sqlite3/perf-threadsafe (3.32.3): 68 | - sqlite3/common 69 | - sqlite3/rtree (3.32.3): 70 | - sqlite3/common 71 | - sqlite3_flutter_libs (0.0.1): 72 | - Flutter 73 | - sqlite3 (~> 3.32.3) 74 | - sqlite3/fts5 75 | - sqlite3/json1 76 | - sqlite3/perf-threadsafe 77 | - sqlite3/rtree 78 | - SwiftyGif (5.3.0) 79 | - url_launcher (0.0.1): 80 | - Flutter 81 | - video_player (0.0.1): 82 | - Flutter 83 | - wakelock (0.0.1): 84 | - Flutter 85 | 86 | DEPENDENCIES: 87 | - file_picker (from `.symlinks/plugins/file_picker/ios`) 88 | - Flutter (from `Flutter`) 89 | - flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`) 90 | - image_picker (from `.symlinks/plugins/image_picker/ios`) 91 | - path_provider (from `.symlinks/plugins/path_provider/ios`) 92 | - permission_handler (from `.symlinks/plugins/permission_handler/ios`) 93 | - qr_code_scanner (from `.symlinks/plugins/qr_code_scanner/ios`) 94 | - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`) 95 | - sqflite (from `.symlinks/plugins/sqflite/ios`) 96 | - sqlite3_flutter_libs (from `.symlinks/plugins/sqlite3_flutter_libs/ios`) 97 | - url_launcher (from `.symlinks/plugins/url_launcher/ios`) 98 | - video_player (from `.symlinks/plugins/video_player/ios`) 99 | - wakelock (from `.symlinks/plugins/wakelock/ios`) 100 | 101 | SPEC REPOS: 102 | trunk: 103 | - DKImagePickerController 104 | - DKPhotoGallery 105 | - FMDB 106 | - MTBBarcodeScanner 107 | - SDWebImage 108 | - sqlite3 109 | - SwiftyGif 110 | 111 | EXTERNAL SOURCES: 112 | file_picker: 113 | :path: ".symlinks/plugins/file_picker/ios" 114 | Flutter: 115 | :path: Flutter 116 | flutter_keyboard_visibility: 117 | :path: ".symlinks/plugins/flutter_keyboard_visibility/ios" 118 | image_picker: 119 | :path: ".symlinks/plugins/image_picker/ios" 120 | path_provider: 121 | :path: ".symlinks/plugins/path_provider/ios" 122 | permission_handler: 123 | :path: ".symlinks/plugins/permission_handler/ios" 124 | qr_code_scanner: 125 | :path: ".symlinks/plugins/qr_code_scanner/ios" 126 | shared_preferences: 127 | :path: ".symlinks/plugins/shared_preferences/ios" 128 | sqflite: 129 | :path: ".symlinks/plugins/sqflite/ios" 130 | sqlite3_flutter_libs: 131 | :path: ".symlinks/plugins/sqlite3_flutter_libs/ios" 132 | url_launcher: 133 | :path: ".symlinks/plugins/url_launcher/ios" 134 | video_player: 135 | :path: ".symlinks/plugins/video_player/ios" 136 | wakelock: 137 | :path: ".symlinks/plugins/wakelock/ios" 138 | 139 | SPEC CHECKSUMS: 140 | DKImagePickerController: b5eb7f7a388e4643264105d648d01f727110fc3d 141 | DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179 142 | file_picker: 3e6c3790de664ccf9b882732d9db5eaf6b8d4eb1 143 | Flutter: 0e3d915762c693b495b44d77113d4970485de6ec 144 | flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069 145 | FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a 146 | image_picker: 9c3312491f862b28d21ecd8fdf0ee14e601b3f09 147 | MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb 148 | path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c 149 | permission_handler: eac8e15b4a1a3fba55b761d19f3f4e6b005d15b6 150 | qr_code_scanner: 16107718bdad7d708cdf6a5eacdca24b56cdf471 151 | SDWebImage: b69257f4ab14e9b6a2ef53e910fdf914d8f757c1 152 | shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d 153 | sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904 154 | sqlite3: 8f7d2078ae27778699a622a94b853285793422a2 155 | sqlite3_flutter_libs: 5651f8ff48e3b44d910863c4ea5916085b1b245f 156 | SwiftyGif: e466e86c660d343357ab944a819a101c4127cb40 157 | url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef 158 | video_player: 9cc823b1d9da7e8427ee591e8438bfbcde500e6e 159 | wakelock: bfc7955c418d0db797614075aabbc58a39ab5107 160 | 161 | PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c 162 | 163 | COCOAPODS: 1.10.0 164 | -------------------------------------------------------------------------------- /lib/screen/home_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:build_viking/assets.dart'; 2 | import 'package:build_viking/screen/chat_home_screen.dart'; 3 | import 'package:build_viking/utils/utils.dart'; 4 | import 'package:build_viking/widgets/widgets.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:google_fonts/google_fonts.dart'; 7 | import 'package:permission_handler/permission_handler.dart'; 8 | import 'package:qr_code_scanner/qr_code_scanner.dart'; 9 | 10 | class BuildVikings extends StatefulWidget { 11 | @override 12 | _BuildVikingsState createState() => _BuildVikingsState(); 13 | } 14 | 15 | class _BuildVikingsState extends State { 16 | ValueNotifier _showingCamera = ValueNotifier(false); 17 | ValueNotifier _hasError = ValueNotifier(false); 18 | bool canMakeRequest = true; 19 | 20 | void _onQRViewCreated(QRViewController controller) { 21 | controller.scannedDataStream.listen(onScan); 22 | } 23 | 24 | Future onScan(String data) async { 25 | if (canMakeRequest) { 26 | canMakeRequest = false; 27 | try { 28 | await context.apiService.getUserProfile(data); 29 | canMakeRequest = true; 30 | context.nav.pushReplacement( 31 | MaterialPageRoute( 32 | builder: (context) => ChatHomeScreen(), 33 | ), 34 | ); 35 | } catch (e) { 36 | canMakeRequest = true; 37 | _hasError.value = true; 38 | print(e); 39 | } 40 | } 41 | } 42 | 43 | Future showCamera(bool value) async { 44 | await Permission.camera.request(); 45 | _showingCamera.value = !value; 46 | } 47 | 48 | Widget _buildScanCard() { 49 | return ValueListenableBuilder( 50 | valueListenable: _showingCamera, 51 | builder: (context, bool value, _) { 52 | return AnimatedSwitcher( 53 | duration: kThemeAnimationDuration, 54 | child: value 55 | ? BuildVikingCard( 56 | key: ValueKey("barcode-scanner"), 57 | onTap: () => _showingCamera.value = !value, 58 | child: _TicketScanner( 59 | onQRViewCreated: _onQRViewCreated, 60 | hasError: _hasError, 61 | ), 62 | ) 63 | : BuildVikingCard( 64 | key: ValueKey("scan-ticket"), 65 | onTap: () => showCamera(value), 66 | child: _InfoCard(), 67 | ), 68 | ); 69 | }, 70 | ); 71 | } 72 | 73 | @override 74 | Widget build(BuildContext context) { 75 | final viewPadding = MediaQuery.of(context).viewPadding; 76 | return Scaffold( 77 | body: Stack( 78 | children: [ 79 | Positioned( 80 | left: 0.0, 81 | right: 0.0, 82 | bottom: viewPadding.bottom, 83 | child: Image.asset( 84 | Assets.vikingVillage, 85 | fit: BoxFit.fitWidth, 86 | ), 87 | ), 88 | Column( 89 | mainAxisAlignment: MainAxisAlignment.center, 90 | crossAxisAlignment: CrossAxisAlignment.stretch, 91 | children: [ 92 | Image.asset( 93 | Assets.flutterVikingsLogo, 94 | height: 173.0, 95 | ), 96 | const SizedBox(height: 48.0), 97 | _buildScanCard(), 98 | Flexible(child: FractionallySizedBox(heightFactor: 0.3)), 99 | ], 100 | ), 101 | Align( 102 | alignment: FractionalOffset.bottomCenter, 103 | child: Container( 104 | padding: EdgeInsets.only(bottom: viewPadding.bottom), 105 | width: double.maxFinite, 106 | color: Theme.of(context).primaryColor, 107 | child: Image.asset( 108 | Assets.streamBanner, 109 | height: 40.0, 110 | ), 111 | ), 112 | ), 113 | ], 114 | ), 115 | ); 116 | } 117 | } 118 | 119 | class _TicketScanner extends StatelessWidget { 120 | const _TicketScanner({ 121 | Key key, 122 | this.hasError, 123 | this.onQRViewCreated, 124 | }) : assert(hasError != null), 125 | assert(onQRViewCreated != null), 126 | super(key: key); 127 | 128 | final ValueNotifier hasError; 129 | final QRViewCreatedCallback onQRViewCreated; 130 | 131 | @override 132 | Widget build(BuildContext context) { 133 | return Container( 134 | height: 132.0, 135 | width: 160.0, 136 | child: ValueListenableBuilder( 137 | valueListenable: hasError, 138 | builder: (BuildContext context, value, _) { 139 | if (!value) { 140 | return QRView( 141 | key: GlobalKey(), 142 | onQRViewCreated: onQRViewCreated, 143 | overlay: QrScannerOverlayShape( 144 | borderColor: Colors.red, 145 | borderRadius: 10, 146 | borderLength: 30, 147 | borderWidth: 10, 148 | cutOutSize: 300, 149 | ), 150 | ); 151 | } else { 152 | return InkWell( 153 | onTap: () => hasError.value = !hasError.value, 154 | child: Center( 155 | child: Text( 156 | "We are unable to scan your ticket at this time.", 157 | style: GoogleFonts.inter( 158 | fontSize: 16.0, 159 | fontWeight: FontWeight.w600, 160 | color: Colors.white.withOpacity(0.6), 161 | ), 162 | ), 163 | ), 164 | ); 165 | } 166 | }, 167 | ), 168 | ); 169 | } 170 | } 171 | 172 | class _InfoCard extends StatelessWidget { 173 | @override 174 | Widget build(BuildContext context) { 175 | return Column( 176 | children: [ 177 | Image.asset( 178 | Assets.barcode, 179 | height: 64.0, 180 | ), 181 | const SizedBox(height: 12.0), 182 | Text( 183 | "Scan your ticket", 184 | style: GoogleFonts.caesarDressing( 185 | fontSize: 24.0, 186 | color: Colors.white, 187 | ), 188 | ), 189 | const SizedBox(height: 8.0), 190 | Text( 191 | "Tap to begin".toUpperCase(), 192 | style: GoogleFonts.inter( 193 | fontSize: 16.0, 194 | fontWeight: FontWeight.bold, 195 | letterSpacing: 1.5, 196 | color: Colors.white.withOpacity(0.25), 197 | ), 198 | ), 199 | ], 200 | ); 201 | } 202 | } 203 | -------------------------------------------------------------------------------- /lib/screen/conversation_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:build_viking/assets.dart'; 2 | import 'package:build_viking/utils/utils.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:google_fonts/google_fonts.dart'; 5 | import 'package:stream_chat_flutter/stream_chat_flutter.dart'; 6 | 7 | class ConversationScreen extends StatelessWidget { 8 | @override 9 | Widget build(BuildContext context) { 10 | final channel = StreamChannel.of(context).channel; 11 | return Scaffold( 12 | appBar: AppBar( 13 | elevation: 0.0, 14 | leading: BackButton( 15 | color: Colors.white, 16 | ), 17 | centerTitle: false, 18 | title: Padding( 19 | padding: const EdgeInsets.all(8.0), 20 | child: Row( 21 | mainAxisAlignment: MainAxisAlignment.start, 22 | mainAxisSize: MainAxisSize.min, 23 | children: [ 24 | CircleAvatar( 25 | radius: 20.0, 26 | backgroundColor: Colors.white, 27 | child: Center( 28 | child: Image.asset( 29 | Assets.vikingDash, 30 | height: 56.0, 31 | ), 32 | ), 33 | ), 34 | const SizedBox(width: 20.0), 35 | Expanded( 36 | child: Column( 37 | crossAxisAlignment: CrossAxisAlignment.start, 38 | children: [ 39 | ChannelName(), 40 | StreamBuilder( 41 | stream: channel.lastMessageAtStream, 42 | initialData: channel.lastMessageAt, 43 | builder: (context, snapshot) { 44 | if (snapshot.data == null) { 45 | return SizedBox(); 46 | } 47 | final jiffyDate = formatDate(context, snapshot.data); 48 | return Text( 49 | 'Active $jiffyDate', 50 | style: StreamChatTheme.of(context) 51 | .channelTheme 52 | .channelHeaderTheme 53 | .lastMessageAt 54 | .copyWith(color: Colors.white), 55 | ); 56 | }, 57 | ) 58 | ], 59 | ), 60 | ) 61 | ], 62 | ), 63 | ), 64 | ), 65 | body: Column( 66 | children: [ 67 | Expanded( 68 | child: MessageListView( 69 | dateDividerBuilder: (date) { 70 | return Theme( 71 | data: ThemeData( 72 | textTheme: TextTheme( 73 | headline6: TextStyle(color: Colors.white) 74 | ), 75 | ), 76 | child: DateDivider( 77 | dateTime: date, 78 | ), 79 | ); 80 | }, 81 | messageBuilder: ( 82 | BuildContext context, 83 | MessageDetails details, 84 | List messages, 85 | ) { 86 | final theme = StreamChatTheme.of(context); 87 | return Column( 88 | crossAxisAlignment: details.isMyMessage 89 | ? CrossAxisAlignment.end 90 | : CrossAxisAlignment.start, 91 | children: [ 92 | MessageWidget( 93 | message: details.message, 94 | messageTheme: details.isMyMessage 95 | ? theme.ownMessageTheme 96 | : theme.otherMessageTheme, 97 | showUserAvatar: details.isMyMessage 98 | ? DisplayWidget.gone 99 | : (details.isNextUser 100 | ? DisplayWidget.hide 101 | : DisplayWidget.show), 102 | showTimestamp: false, 103 | showSendingIndicator: details.isNextUser 104 | ? DisplayWidget.hide 105 | : DisplayWidget.show, 106 | showEditMessage: false, 107 | shape: RoundedRectangleBorder( 108 | borderRadius: BorderRadius.only( 109 | topLeft: Radius.circular(12.0), 110 | topRight: Radius.circular(12.0), 111 | bottomLeft: Radius.circular(0.0), 112 | bottomRight: Radius.circular(12.0), 113 | ), 114 | ), 115 | showUsername: false, 116 | reverse: details.isMyMessage, 117 | ), 118 | if (!details.isNextUser) 119 | Padding( 120 | padding: EdgeInsets.symmetric( 121 | horizontal: details.isMyMessage ? 24.0 : 68, 122 | ), 123 | child: Row( 124 | children: [ 125 | Padding( 126 | padding: const EdgeInsets.only(right: 8.0), 127 | child: Text( 128 | MaterialLocalizations.of(context) 129 | .formatMediumDate( 130 | details.message.createdAt), 131 | style: TextStyle( 132 | fontSize: 12.0, 133 | color: Colors.white.withOpacity(0.6), 134 | ), 135 | ), 136 | ), 137 | Text( 138 | details.isMyMessage 139 | ? "You" 140 | : details.message.user.name, 141 | style: TextStyle( 142 | fontSize: 12.0, 143 | color: Colors.white, 144 | ), 145 | ), 146 | ], 147 | mainAxisAlignment: details.isMyMessage 148 | ? MainAxisAlignment.end 149 | : MainAxisAlignment.start, 150 | ), 151 | ), 152 | ], 153 | ); 154 | }, 155 | ), 156 | ), 157 | MessageInput( 158 | inputTextStyle: GoogleFonts.inter(color: Colors.white), 159 | attachmentIconColor: Colors.white, 160 | ), 161 | ], 162 | ), 163 | ); 164 | } 165 | } 166 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | args: 5 | dependency: transitive 6 | description: 7 | name: args 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "1.6.0" 11 | async: 12 | dependency: transitive 13 | description: 14 | name: async 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "2.5.0-nullsafety.1" 18 | boolean_selector: 19 | dependency: transitive 20 | description: 21 | name: boolean_selector 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.1.0-nullsafety.1" 25 | cached_network_image: 26 | dependency: transitive 27 | description: 28 | name: cached_network_image 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "2.3.3" 32 | characters: 33 | dependency: transitive 34 | description: 35 | name: characters 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.1.0-nullsafety.3" 39 | charcode: 40 | dependency: transitive 41 | description: 42 | name: charcode 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.2.0-nullsafety.1" 46 | chewie: 47 | dependency: transitive 48 | description: 49 | name: chewie 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "0.10.4" 53 | clock: 54 | dependency: transitive 55 | description: 56 | name: clock 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "1.1.0-nullsafety.1" 60 | collection: 61 | dependency: transitive 62 | description: 63 | name: collection 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "1.15.0-nullsafety.3" 67 | convert: 68 | dependency: transitive 69 | description: 70 | name: convert 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "2.1.1" 74 | crypto: 75 | dependency: transitive 76 | description: 77 | name: crypto 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "2.1.5" 81 | csslib: 82 | dependency: transitive 83 | description: 84 | name: csslib 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "0.16.2" 88 | cupertino_icons: 89 | dependency: "direct main" 90 | description: 91 | name: cupertino_icons 92 | url: "https://pub.dartlang.org" 93 | source: hosted 94 | version: "1.0.0" 95 | dio: 96 | dependency: transitive 97 | description: 98 | name: dio 99 | url: "https://pub.dartlang.org" 100 | source: hosted 101 | version: "3.0.10" 102 | fake_async: 103 | dependency: transitive 104 | description: 105 | name: fake_async 106 | url: "https://pub.dartlang.org" 107 | source: hosted 108 | version: "1.2.0-nullsafety.1" 109 | ffi: 110 | dependency: transitive 111 | description: 112 | name: ffi 113 | url: "https://pub.dartlang.org" 114 | source: hosted 115 | version: "0.1.3" 116 | file: 117 | dependency: transitive 118 | description: 119 | name: file 120 | url: "https://pub.dartlang.org" 121 | source: hosted 122 | version: "5.2.1" 123 | file_picker: 124 | dependency: transitive 125 | description: 126 | name: file_picker 127 | url: "https://pub.dartlang.org" 128 | source: hosted 129 | version: "2.0.13" 130 | flutter: 131 | dependency: "direct main" 132 | description: flutter 133 | source: sdk 134 | version: "0.0.0" 135 | flutter_blurhash: 136 | dependency: transitive 137 | description: 138 | name: flutter_blurhash 139 | url: "https://pub.dartlang.org" 140 | source: hosted 141 | version: "0.5.0" 142 | flutter_cache_manager: 143 | dependency: transitive 144 | description: 145 | name: flutter_cache_manager 146 | url: "https://pub.dartlang.org" 147 | source: hosted 148 | version: "2.0.0" 149 | flutter_keyboard_visibility: 150 | dependency: transitive 151 | description: 152 | name: flutter_keyboard_visibility 153 | url: "https://pub.dartlang.org" 154 | source: hosted 155 | version: "3.3.0" 156 | flutter_markdown: 157 | dependency: transitive 158 | description: 159 | name: flutter_markdown 160 | url: "https://pub.dartlang.org" 161 | source: hosted 162 | version: "0.5.0" 163 | flutter_plugin_android_lifecycle: 164 | dependency: transitive 165 | description: 166 | name: flutter_plugin_android_lifecycle 167 | url: "https://pub.dartlang.org" 168 | source: hosted 169 | version: "1.0.11" 170 | flutter_portal: 171 | dependency: transitive 172 | description: 173 | name: flutter_portal 174 | url: "https://pub.dartlang.org" 175 | source: hosted 176 | version: "0.3.0" 177 | flutter_test: 178 | dependency: "direct dev" 179 | description: flutter 180 | source: sdk 181 | version: "0.0.0" 182 | flutter_web_plugins: 183 | dependency: transitive 184 | description: flutter 185 | source: sdk 186 | version: "0.0.0" 187 | google_fonts: 188 | dependency: "direct main" 189 | description: 190 | name: google_fonts 191 | url: "https://pub.dartlang.org" 192 | source: hosted 193 | version: "1.1.1" 194 | html: 195 | dependency: transitive 196 | description: 197 | name: html 198 | url: "https://pub.dartlang.org" 199 | source: hosted 200 | version: "0.14.0+4" 201 | http: 202 | dependency: "direct main" 203 | description: 204 | name: http 205 | url: "https://pub.dartlang.org" 206 | source: hosted 207 | version: "0.12.2" 208 | http_parser: 209 | dependency: transitive 210 | description: 211 | name: http_parser 212 | url: "https://pub.dartlang.org" 213 | source: hosted 214 | version: "3.1.4" 215 | image_picker: 216 | dependency: transitive 217 | description: 218 | name: image_picker 219 | url: "https://pub.dartlang.org" 220 | source: hosted 221 | version: "0.6.7+14" 222 | image_picker_platform_interface: 223 | dependency: transitive 224 | description: 225 | name: image_picker_platform_interface 226 | url: "https://pub.dartlang.org" 227 | source: hosted 228 | version: "1.1.1" 229 | import_js_library: 230 | dependency: transitive 231 | description: 232 | name: import_js_library 233 | url: "https://pub.dartlang.org" 234 | source: hosted 235 | version: "1.0.2" 236 | intl: 237 | dependency: transitive 238 | description: 239 | name: intl 240 | url: "https://pub.dartlang.org" 241 | source: hosted 242 | version: "0.16.1" 243 | jiffy: 244 | dependency: transitive 245 | description: 246 | name: jiffy 247 | url: "https://pub.dartlang.org" 248 | source: hosted 249 | version: "3.0.1" 250 | js: 251 | dependency: transitive 252 | description: 253 | name: js 254 | url: "https://pub.dartlang.org" 255 | source: hosted 256 | version: "0.6.2" 257 | json_annotation: 258 | dependency: transitive 259 | description: 260 | name: json_annotation 261 | url: "https://pub.dartlang.org" 262 | source: hosted 263 | version: "3.1.0" 264 | logging: 265 | dependency: transitive 266 | description: 267 | name: logging 268 | url: "https://pub.dartlang.org" 269 | source: hosted 270 | version: "0.11.4" 271 | markdown: 272 | dependency: transitive 273 | description: 274 | name: markdown 275 | url: "https://pub.dartlang.org" 276 | source: hosted 277 | version: "3.0.0" 278 | matcher: 279 | dependency: transitive 280 | description: 281 | name: matcher 282 | url: "https://pub.dartlang.org" 283 | source: hosted 284 | version: "0.12.10-nullsafety.1" 285 | meta: 286 | dependency: transitive 287 | description: 288 | name: meta 289 | url: "https://pub.dartlang.org" 290 | source: hosted 291 | version: "1.3.0-nullsafety.3" 292 | mime: 293 | dependency: transitive 294 | description: 295 | name: mime 296 | url: "https://pub.dartlang.org" 297 | source: hosted 298 | version: "0.9.7" 299 | moor: 300 | dependency: transitive 301 | description: 302 | name: moor 303 | url: "https://pub.dartlang.org" 304 | source: hosted 305 | version: "3.4.0" 306 | octo_image: 307 | dependency: transitive 308 | description: 309 | name: octo_image 310 | url: "https://pub.dartlang.org" 311 | source: hosted 312 | version: "0.3.0" 313 | path: 314 | dependency: transitive 315 | description: 316 | name: path 317 | url: "https://pub.dartlang.org" 318 | source: hosted 319 | version: "1.8.0-nullsafety.1" 320 | path_provider: 321 | dependency: transitive 322 | description: 323 | name: path_provider 324 | url: "https://pub.dartlang.org" 325 | source: hosted 326 | version: "1.6.24" 327 | path_provider_linux: 328 | dependency: transitive 329 | description: 330 | name: path_provider_linux 331 | url: "https://pub.dartlang.org" 332 | source: hosted 333 | version: "0.0.1+2" 334 | path_provider_macos: 335 | dependency: transitive 336 | description: 337 | name: path_provider_macos 338 | url: "https://pub.dartlang.org" 339 | source: hosted 340 | version: "0.0.4+6" 341 | path_provider_platform_interface: 342 | dependency: transitive 343 | description: 344 | name: path_provider_platform_interface 345 | url: "https://pub.dartlang.org" 346 | source: hosted 347 | version: "1.0.4" 348 | path_provider_windows: 349 | dependency: transitive 350 | description: 351 | name: path_provider_windows 352 | url: "https://pub.dartlang.org" 353 | source: hosted 354 | version: "0.0.4+3" 355 | pedantic: 356 | dependency: transitive 357 | description: 358 | name: pedantic 359 | url: "https://pub.dartlang.org" 360 | source: hosted 361 | version: "1.9.2" 362 | permission_handler: 363 | dependency: "direct main" 364 | description: 365 | name: permission_handler 366 | url: "https://pub.dartlang.org" 367 | source: hosted 368 | version: "5.0.1+1" 369 | permission_handler_platform_interface: 370 | dependency: transitive 371 | description: 372 | name: permission_handler_platform_interface 373 | url: "https://pub.dartlang.org" 374 | source: hosted 375 | version: "2.0.1" 376 | photo_view: 377 | dependency: transitive 378 | description: 379 | name: photo_view 380 | url: "https://pub.dartlang.org" 381 | source: hosted 382 | version: "0.10.3" 383 | platform: 384 | dependency: transitive 385 | description: 386 | name: platform 387 | url: "https://pub.dartlang.org" 388 | source: hosted 389 | version: "2.2.1" 390 | plugin_platform_interface: 391 | dependency: transitive 392 | description: 393 | name: plugin_platform_interface 394 | url: "https://pub.dartlang.org" 395 | source: hosted 396 | version: "1.0.3" 397 | process: 398 | dependency: transitive 399 | description: 400 | name: process 401 | url: "https://pub.dartlang.org" 402 | source: hosted 403 | version: "3.0.13" 404 | qr_code_scanner: 405 | dependency: "direct main" 406 | description: 407 | name: qr_code_scanner 408 | url: "https://pub.dartlang.org" 409 | source: hosted 410 | version: "0.0.13" 411 | rxdart: 412 | dependency: transitive 413 | description: 414 | name: rxdart 415 | url: "https://pub.dartlang.org" 416 | source: hosted 417 | version: "0.24.1" 418 | shared_preferences: 419 | dependency: transitive 420 | description: 421 | name: shared_preferences 422 | url: "https://pub.dartlang.org" 423 | source: hosted 424 | version: "0.5.12+4" 425 | shared_preferences_linux: 426 | dependency: transitive 427 | description: 428 | name: shared_preferences_linux 429 | url: "https://pub.dartlang.org" 430 | source: hosted 431 | version: "0.0.2+4" 432 | shared_preferences_macos: 433 | dependency: transitive 434 | description: 435 | name: shared_preferences_macos 436 | url: "https://pub.dartlang.org" 437 | source: hosted 438 | version: "0.0.1+11" 439 | shared_preferences_platform_interface: 440 | dependency: transitive 441 | description: 442 | name: shared_preferences_platform_interface 443 | url: "https://pub.dartlang.org" 444 | source: hosted 445 | version: "1.0.4" 446 | shared_preferences_web: 447 | dependency: transitive 448 | description: 449 | name: shared_preferences_web 450 | url: "https://pub.dartlang.org" 451 | source: hosted 452 | version: "0.1.2+7" 453 | shared_preferences_windows: 454 | dependency: transitive 455 | description: 456 | name: shared_preferences_windows 457 | url: "https://pub.dartlang.org" 458 | source: hosted 459 | version: "0.0.1+3" 460 | sky_engine: 461 | dependency: transitive 462 | description: flutter 463 | source: sdk 464 | version: "0.0.99" 465 | source_span: 466 | dependency: transitive 467 | description: 468 | name: source_span 469 | url: "https://pub.dartlang.org" 470 | source: hosted 471 | version: "1.8.0-nullsafety.2" 472 | sqflite: 473 | dependency: transitive 474 | description: 475 | name: sqflite 476 | url: "https://pub.dartlang.org" 477 | source: hosted 478 | version: "1.3.2+1" 479 | sqflite_common: 480 | dependency: transitive 481 | description: 482 | name: sqflite_common 483 | url: "https://pub.dartlang.org" 484 | source: hosted 485 | version: "1.0.2+1" 486 | sqlite3: 487 | dependency: transitive 488 | description: 489 | name: sqlite3 490 | url: "https://pub.dartlang.org" 491 | source: hosted 492 | version: "0.1.8" 493 | sqlite3_flutter_libs: 494 | dependency: transitive 495 | description: 496 | name: sqlite3_flutter_libs 497 | url: "https://pub.dartlang.org" 498 | source: hosted 499 | version: "0.2.0" 500 | stack_trace: 501 | dependency: transitive 502 | description: 503 | name: stack_trace 504 | url: "https://pub.dartlang.org" 505 | source: hosted 506 | version: "1.10.0-nullsafety.1" 507 | stream_channel: 508 | dependency: transitive 509 | description: 510 | name: stream_channel 511 | url: "https://pub.dartlang.org" 512 | source: hosted 513 | version: "2.1.0-nullsafety.1" 514 | stream_chat: 515 | dependency: transitive 516 | description: 517 | name: stream_chat 518 | url: "https://pub.dartlang.org" 519 | source: hosted 520 | version: "0.2.13" 521 | stream_chat_flutter: 522 | dependency: "direct main" 523 | description: 524 | name: stream_chat_flutter 525 | url: "https://pub.dartlang.org" 526 | source: hosted 527 | version: "0.2.13" 528 | string_scanner: 529 | dependency: transitive 530 | description: 531 | name: string_scanner 532 | url: "https://pub.dartlang.org" 533 | source: hosted 534 | version: "1.1.0-nullsafety.1" 535 | synchronized: 536 | dependency: transitive 537 | description: 538 | name: synchronized 539 | url: "https://pub.dartlang.org" 540 | source: hosted 541 | version: "2.2.0+2" 542 | term_glyph: 543 | dependency: transitive 544 | description: 545 | name: term_glyph 546 | url: "https://pub.dartlang.org" 547 | source: hosted 548 | version: "1.2.0-nullsafety.1" 549 | test_api: 550 | dependency: transitive 551 | description: 552 | name: test_api 553 | url: "https://pub.dartlang.org" 554 | source: hosted 555 | version: "0.2.19-nullsafety.2" 556 | typed_data: 557 | dependency: transitive 558 | description: 559 | name: typed_data 560 | url: "https://pub.dartlang.org" 561 | source: hosted 562 | version: "1.3.0-nullsafety.3" 563 | url_launcher: 564 | dependency: transitive 565 | description: 566 | name: url_launcher 567 | url: "https://pub.dartlang.org" 568 | source: hosted 569 | version: "5.7.10" 570 | url_launcher_linux: 571 | dependency: transitive 572 | description: 573 | name: url_launcher_linux 574 | url: "https://pub.dartlang.org" 575 | source: hosted 576 | version: "0.0.1+4" 577 | url_launcher_macos: 578 | dependency: transitive 579 | description: 580 | name: url_launcher_macos 581 | url: "https://pub.dartlang.org" 582 | source: hosted 583 | version: "0.0.1+9" 584 | url_launcher_platform_interface: 585 | dependency: transitive 586 | description: 587 | name: url_launcher_platform_interface 588 | url: "https://pub.dartlang.org" 589 | source: hosted 590 | version: "1.0.9" 591 | url_launcher_web: 592 | dependency: transitive 593 | description: 594 | name: url_launcher_web 595 | url: "https://pub.dartlang.org" 596 | source: hosted 597 | version: "0.1.5+1" 598 | url_launcher_windows: 599 | dependency: transitive 600 | description: 601 | name: url_launcher_windows 602 | url: "https://pub.dartlang.org" 603 | source: hosted 604 | version: "0.0.1+3" 605 | uuid: 606 | dependency: transitive 607 | description: 608 | name: uuid 609 | url: "https://pub.dartlang.org" 610 | source: hosted 611 | version: "2.2.2" 612 | vector_math: 613 | dependency: transitive 614 | description: 615 | name: vector_math 616 | url: "https://pub.dartlang.org" 617 | source: hosted 618 | version: "2.1.0-nullsafety.3" 619 | video_player: 620 | dependency: transitive 621 | description: 622 | name: video_player 623 | url: "https://pub.dartlang.org" 624 | source: hosted 625 | version: "1.0.1" 626 | video_player_platform_interface: 627 | dependency: transitive 628 | description: 629 | name: video_player_platform_interface 630 | url: "https://pub.dartlang.org" 631 | source: hosted 632 | version: "2.2.0" 633 | video_player_web: 634 | dependency: transitive 635 | description: 636 | name: video_player_web 637 | url: "https://pub.dartlang.org" 638 | source: hosted 639 | version: "0.1.4+1" 640 | visibility_detector: 641 | dependency: transitive 642 | description: 643 | name: visibility_detector 644 | url: "https://pub.dartlang.org" 645 | source: hosted 646 | version: "0.1.5" 647 | wakelock: 648 | dependency: transitive 649 | description: 650 | name: wakelock 651 | url: "https://pub.dartlang.org" 652 | source: hosted 653 | version: "0.2.1+1" 654 | wakelock_platform_interface: 655 | dependency: transitive 656 | description: 657 | name: wakelock_platform_interface 658 | url: "https://pub.dartlang.org" 659 | source: hosted 660 | version: "0.1.0+1" 661 | wakelock_web: 662 | dependency: transitive 663 | description: 664 | name: wakelock_web 665 | url: "https://pub.dartlang.org" 666 | source: hosted 667 | version: "0.1.0+3" 668 | web_socket_channel: 669 | dependency: transitive 670 | description: 671 | name: web_socket_channel 672 | url: "https://pub.dartlang.org" 673 | source: hosted 674 | version: "1.1.0" 675 | win32: 676 | dependency: transitive 677 | description: 678 | name: win32 679 | url: "https://pub.dartlang.org" 680 | source: hosted 681 | version: "1.7.4" 682 | xdg_directories: 683 | dependency: transitive 684 | description: 685 | name: xdg_directories 686 | url: "https://pub.dartlang.org" 687 | source: hosted 688 | version: "0.1.2" 689 | sdks: 690 | dart: ">=2.10.2 <2.11.0" 691 | flutter: ">=1.22.2 <2.0.0" 692 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 51; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 5588B2E2DE985210DEA6369A /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E380B1BE1EF5840B64BC248F /* Pods_Runner.framework */; }; 13 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 14 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 15 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 16 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXCopyFilesBuildPhase section */ 20 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 21 | isa = PBXCopyFilesBuildPhase; 22 | buildActionMask = 2147483647; 23 | dstPath = ""; 24 | dstSubfolderSpec = 10; 25 | files = ( 26 | ); 27 | name = "Embed Frameworks"; 28 | runOnlyForDeploymentPostprocessing = 0; 29 | }; 30 | /* End PBXCopyFilesBuildPhase section */ 31 | 32 | /* Begin PBXFileReference section */ 33 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 34 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 35 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 36 | 5A53808C30C03C33E5011C4D /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 37 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 38 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 39 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 40 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 41 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 42 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 43 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 44 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 45 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 46 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 47 | B44243E31F5DD3E44CE95AB8 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 48 | E380B1BE1EF5840B64BC248F /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | F15AB55C612F70BDB2972AE1 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 50 | /* End PBXFileReference section */ 51 | 52 | /* Begin PBXFrameworksBuildPhase section */ 53 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 54 | isa = PBXFrameworksBuildPhase; 55 | buildActionMask = 2147483647; 56 | files = ( 57 | 5588B2E2DE985210DEA6369A /* Pods_Runner.framework in Frameworks */, 58 | ); 59 | runOnlyForDeploymentPostprocessing = 0; 60 | }; 61 | /* End PBXFrameworksBuildPhase section */ 62 | 63 | /* Begin PBXGroup section */ 64 | 9740EEB11CF90186004384FC /* Flutter */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 68 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 69 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 70 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 71 | ); 72 | name = Flutter; 73 | sourceTree = ""; 74 | }; 75 | 97C146E51CF9000F007C117D = { 76 | isa = PBXGroup; 77 | children = ( 78 | 9740EEB11CF90186004384FC /* Flutter */, 79 | 97C146F01CF9000F007C117D /* Runner */, 80 | 97C146EF1CF9000F007C117D /* Products */, 81 | DA16547C7C0EC2B503826457 /* Pods */, 82 | D75862EB4D6D99FB2DB61CCB /* Frameworks */, 83 | ); 84 | sourceTree = ""; 85 | }; 86 | 97C146EF1CF9000F007C117D /* Products */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 97C146EE1CF9000F007C117D /* Runner.app */, 90 | ); 91 | name = Products; 92 | sourceTree = ""; 93 | }; 94 | 97C146F01CF9000F007C117D /* Runner */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 98 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 99 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 100 | 97C147021CF9000F007C117D /* Info.plist */, 101 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 102 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 103 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 104 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 105 | ); 106 | path = Runner; 107 | sourceTree = ""; 108 | }; 109 | D75862EB4D6D99FB2DB61CCB /* Frameworks */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | E380B1BE1EF5840B64BC248F /* Pods_Runner.framework */, 113 | ); 114 | name = Frameworks; 115 | sourceTree = ""; 116 | }; 117 | DA16547C7C0EC2B503826457 /* Pods */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | 5A53808C30C03C33E5011C4D /* Pods-Runner.debug.xcconfig */, 121 | B44243E31F5DD3E44CE95AB8 /* Pods-Runner.release.xcconfig */, 122 | F15AB55C612F70BDB2972AE1 /* Pods-Runner.profile.xcconfig */, 123 | ); 124 | path = Pods; 125 | sourceTree = ""; 126 | }; 127 | /* End PBXGroup section */ 128 | 129 | /* Begin PBXNativeTarget section */ 130 | 97C146ED1CF9000F007C117D /* Runner */ = { 131 | isa = PBXNativeTarget; 132 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 133 | buildPhases = ( 134 | 4D57ABBFE1A9108B83EB4075 /* [CP] Check Pods Manifest.lock */, 135 | 9740EEB61CF901F6004384FC /* Run Script */, 136 | 97C146EA1CF9000F007C117D /* Sources */, 137 | 97C146EB1CF9000F007C117D /* Frameworks */, 138 | 97C146EC1CF9000F007C117D /* Resources */, 139 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 140 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 141 | 7C63B40D18617E5F166D5F87 /* [CP] Embed Pods Frameworks */, 142 | ); 143 | buildRules = ( 144 | ); 145 | dependencies = ( 146 | ); 147 | name = Runner; 148 | productName = Runner; 149 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 150 | productType = "com.apple.product-type.application"; 151 | }; 152 | /* End PBXNativeTarget section */ 153 | 154 | /* Begin PBXProject section */ 155 | 97C146E61CF9000F007C117D /* Project object */ = { 156 | isa = PBXProject; 157 | attributes = { 158 | LastUpgradeCheck = 1020; 159 | ORGANIZATIONNAME = ""; 160 | TargetAttributes = { 161 | 97C146ED1CF9000F007C117D = { 162 | CreatedOnToolsVersion = 7.3.1; 163 | LastSwiftMigration = 1100; 164 | }; 165 | }; 166 | }; 167 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 168 | compatibilityVersion = "Xcode 9.3"; 169 | developmentRegion = en; 170 | hasScannedForEncodings = 0; 171 | knownRegions = ( 172 | en, 173 | Base, 174 | ); 175 | mainGroup = 97C146E51CF9000F007C117D; 176 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 177 | projectDirPath = ""; 178 | projectRoot = ""; 179 | targets = ( 180 | 97C146ED1CF9000F007C117D /* Runner */, 181 | ); 182 | }; 183 | /* End PBXProject section */ 184 | 185 | /* Begin PBXResourcesBuildPhase section */ 186 | 97C146EC1CF9000F007C117D /* Resources */ = { 187 | isa = PBXResourcesBuildPhase; 188 | buildActionMask = 2147483647; 189 | files = ( 190 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 191 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 192 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 193 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 194 | ); 195 | runOnlyForDeploymentPostprocessing = 0; 196 | }; 197 | /* End PBXResourcesBuildPhase section */ 198 | 199 | /* Begin PBXShellScriptBuildPhase section */ 200 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 201 | isa = PBXShellScriptBuildPhase; 202 | buildActionMask = 2147483647; 203 | files = ( 204 | ); 205 | inputPaths = ( 206 | ); 207 | name = "Thin Binary"; 208 | outputPaths = ( 209 | ); 210 | runOnlyForDeploymentPostprocessing = 0; 211 | shellPath = /bin/sh; 212 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 213 | }; 214 | 4D57ABBFE1A9108B83EB4075 /* [CP] Check Pods Manifest.lock */ = { 215 | isa = PBXShellScriptBuildPhase; 216 | buildActionMask = 2147483647; 217 | files = ( 218 | ); 219 | inputFileListPaths = ( 220 | ); 221 | inputPaths = ( 222 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 223 | "${PODS_ROOT}/Manifest.lock", 224 | ); 225 | name = "[CP] Check Pods Manifest.lock"; 226 | outputFileListPaths = ( 227 | ); 228 | outputPaths = ( 229 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", 230 | ); 231 | runOnlyForDeploymentPostprocessing = 0; 232 | shellPath = /bin/sh; 233 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 234 | showEnvVarsInLog = 0; 235 | }; 236 | 7C63B40D18617E5F166D5F87 /* [CP] Embed Pods Frameworks */ = { 237 | isa = PBXShellScriptBuildPhase; 238 | buildActionMask = 2147483647; 239 | files = ( 240 | ); 241 | inputFileListPaths = ( 242 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", 243 | ); 244 | name = "[CP] Embed Pods Frameworks"; 245 | outputFileListPaths = ( 246 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", 247 | ); 248 | runOnlyForDeploymentPostprocessing = 0; 249 | shellPath = /bin/sh; 250 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; 251 | showEnvVarsInLog = 0; 252 | }; 253 | 9740EEB61CF901F6004384FC /* Run Script */ = { 254 | isa = PBXShellScriptBuildPhase; 255 | buildActionMask = 2147483647; 256 | files = ( 257 | ); 258 | inputPaths = ( 259 | ); 260 | name = "Run Script"; 261 | outputPaths = ( 262 | ); 263 | runOnlyForDeploymentPostprocessing = 0; 264 | shellPath = /bin/sh; 265 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 266 | }; 267 | /* End PBXShellScriptBuildPhase section */ 268 | 269 | /* Begin PBXSourcesBuildPhase section */ 270 | 97C146EA1CF9000F007C117D /* Sources */ = { 271 | isa = PBXSourcesBuildPhase; 272 | buildActionMask = 2147483647; 273 | files = ( 274 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 275 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 276 | ); 277 | runOnlyForDeploymentPostprocessing = 0; 278 | }; 279 | /* End PBXSourcesBuildPhase section */ 280 | 281 | /* Begin PBXVariantGroup section */ 282 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 283 | isa = PBXVariantGroup; 284 | children = ( 285 | 97C146FB1CF9000F007C117D /* Base */, 286 | ); 287 | name = Main.storyboard; 288 | sourceTree = ""; 289 | }; 290 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 291 | isa = PBXVariantGroup; 292 | children = ( 293 | 97C147001CF9000F007C117D /* Base */, 294 | ); 295 | name = LaunchScreen.storyboard; 296 | sourceTree = ""; 297 | }; 298 | /* End PBXVariantGroup section */ 299 | 300 | /* Begin XCBuildConfiguration section */ 301 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 302 | isa = XCBuildConfiguration; 303 | buildSettings = { 304 | ALWAYS_SEARCH_USER_PATHS = NO; 305 | CLANG_ANALYZER_NONNULL = YES; 306 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 307 | CLANG_CXX_LIBRARY = "libc++"; 308 | CLANG_ENABLE_MODULES = YES; 309 | CLANG_ENABLE_OBJC_ARC = YES; 310 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 311 | CLANG_WARN_BOOL_CONVERSION = YES; 312 | CLANG_WARN_COMMA = YES; 313 | CLANG_WARN_CONSTANT_CONVERSION = YES; 314 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 315 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 316 | CLANG_WARN_EMPTY_BODY = YES; 317 | CLANG_WARN_ENUM_CONVERSION = YES; 318 | CLANG_WARN_INFINITE_RECURSION = YES; 319 | CLANG_WARN_INT_CONVERSION = YES; 320 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 321 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 322 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 323 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 324 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 325 | CLANG_WARN_STRICT_PROTOTYPES = YES; 326 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 327 | CLANG_WARN_UNREACHABLE_CODE = YES; 328 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 329 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 330 | COPY_PHASE_STRIP = NO; 331 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 332 | ENABLE_NS_ASSERTIONS = NO; 333 | ENABLE_STRICT_OBJC_MSGSEND = YES; 334 | GCC_C_LANGUAGE_STANDARD = gnu99; 335 | GCC_NO_COMMON_BLOCKS = YES; 336 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 337 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 338 | GCC_WARN_UNDECLARED_SELECTOR = YES; 339 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 340 | GCC_WARN_UNUSED_FUNCTION = YES; 341 | GCC_WARN_UNUSED_VARIABLE = YES; 342 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 343 | MTL_ENABLE_DEBUG_INFO = NO; 344 | SDKROOT = iphoneos; 345 | SUPPORTED_PLATFORMS = iphoneos; 346 | TARGETED_DEVICE_FAMILY = "1,2"; 347 | VALIDATE_PRODUCT = YES; 348 | }; 349 | name = Profile; 350 | }; 351 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 352 | isa = XCBuildConfiguration; 353 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 354 | buildSettings = { 355 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 356 | CLANG_ENABLE_MODULES = YES; 357 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 358 | DEVELOPMENT_TEAM = BHG62PRC3S; 359 | ENABLE_BITCODE = NO; 360 | FRAMEWORK_SEARCH_PATHS = ( 361 | "$(inherited)", 362 | "$(PROJECT_DIR)/Flutter", 363 | ); 364 | INFOPLIST_FILE = Runner/Info.plist; 365 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 366 | LD_RUNPATH_SEARCH_PATHS = ( 367 | "$(inherited)", 368 | "@executable_path/Frameworks", 369 | ); 370 | LIBRARY_SEARCH_PATHS = ( 371 | "$(inherited)", 372 | "$(PROJECT_DIR)/Flutter", 373 | ); 374 | PRODUCT_BUNDLE_IDENTIFIER = "io.getstream.build-vikings"; 375 | PRODUCT_NAME = "$(TARGET_NAME)"; 376 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 377 | SWIFT_VERSION = 5.0; 378 | VERSIONING_SYSTEM = "apple-generic"; 379 | }; 380 | name = Profile; 381 | }; 382 | 97C147031CF9000F007C117D /* Debug */ = { 383 | isa = XCBuildConfiguration; 384 | buildSettings = { 385 | ALWAYS_SEARCH_USER_PATHS = NO; 386 | CLANG_ANALYZER_NONNULL = YES; 387 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 388 | CLANG_CXX_LIBRARY = "libc++"; 389 | CLANG_ENABLE_MODULES = YES; 390 | CLANG_ENABLE_OBJC_ARC = YES; 391 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 392 | CLANG_WARN_BOOL_CONVERSION = YES; 393 | CLANG_WARN_COMMA = YES; 394 | CLANG_WARN_CONSTANT_CONVERSION = YES; 395 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 396 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 397 | CLANG_WARN_EMPTY_BODY = YES; 398 | CLANG_WARN_ENUM_CONVERSION = YES; 399 | CLANG_WARN_INFINITE_RECURSION = YES; 400 | CLANG_WARN_INT_CONVERSION = YES; 401 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 402 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 403 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 404 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 405 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 406 | CLANG_WARN_STRICT_PROTOTYPES = YES; 407 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 408 | CLANG_WARN_UNREACHABLE_CODE = YES; 409 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 410 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 411 | COPY_PHASE_STRIP = NO; 412 | DEBUG_INFORMATION_FORMAT = dwarf; 413 | ENABLE_STRICT_OBJC_MSGSEND = YES; 414 | ENABLE_TESTABILITY = YES; 415 | GCC_C_LANGUAGE_STANDARD = gnu99; 416 | GCC_DYNAMIC_NO_PIC = NO; 417 | GCC_NO_COMMON_BLOCKS = YES; 418 | GCC_OPTIMIZATION_LEVEL = 0; 419 | GCC_PREPROCESSOR_DEFINITIONS = ( 420 | "DEBUG=1", 421 | "$(inherited)", 422 | ); 423 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 424 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 425 | GCC_WARN_UNDECLARED_SELECTOR = YES; 426 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 427 | GCC_WARN_UNUSED_FUNCTION = YES; 428 | GCC_WARN_UNUSED_VARIABLE = YES; 429 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 430 | MTL_ENABLE_DEBUG_INFO = YES; 431 | ONLY_ACTIVE_ARCH = YES; 432 | SDKROOT = iphoneos; 433 | TARGETED_DEVICE_FAMILY = "1,2"; 434 | }; 435 | name = Debug; 436 | }; 437 | 97C147041CF9000F007C117D /* Release */ = { 438 | isa = XCBuildConfiguration; 439 | buildSettings = { 440 | ALWAYS_SEARCH_USER_PATHS = NO; 441 | CLANG_ANALYZER_NONNULL = YES; 442 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 443 | CLANG_CXX_LIBRARY = "libc++"; 444 | CLANG_ENABLE_MODULES = YES; 445 | CLANG_ENABLE_OBJC_ARC = YES; 446 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 447 | CLANG_WARN_BOOL_CONVERSION = YES; 448 | CLANG_WARN_COMMA = YES; 449 | CLANG_WARN_CONSTANT_CONVERSION = YES; 450 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 451 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 452 | CLANG_WARN_EMPTY_BODY = YES; 453 | CLANG_WARN_ENUM_CONVERSION = YES; 454 | CLANG_WARN_INFINITE_RECURSION = YES; 455 | CLANG_WARN_INT_CONVERSION = YES; 456 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 457 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 458 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 459 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 460 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 461 | CLANG_WARN_STRICT_PROTOTYPES = YES; 462 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 463 | CLANG_WARN_UNREACHABLE_CODE = YES; 464 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 465 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 466 | COPY_PHASE_STRIP = NO; 467 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 468 | ENABLE_NS_ASSERTIONS = NO; 469 | ENABLE_STRICT_OBJC_MSGSEND = YES; 470 | GCC_C_LANGUAGE_STANDARD = gnu99; 471 | GCC_NO_COMMON_BLOCKS = YES; 472 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 473 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 474 | GCC_WARN_UNDECLARED_SELECTOR = YES; 475 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 476 | GCC_WARN_UNUSED_FUNCTION = YES; 477 | GCC_WARN_UNUSED_VARIABLE = YES; 478 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 479 | MTL_ENABLE_DEBUG_INFO = NO; 480 | SDKROOT = iphoneos; 481 | SUPPORTED_PLATFORMS = iphoneos; 482 | SWIFT_COMPILATION_MODE = wholemodule; 483 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 484 | TARGETED_DEVICE_FAMILY = "1,2"; 485 | VALIDATE_PRODUCT = YES; 486 | }; 487 | name = Release; 488 | }; 489 | 97C147061CF9000F007C117D /* Debug */ = { 490 | isa = XCBuildConfiguration; 491 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 492 | buildSettings = { 493 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 494 | CLANG_ENABLE_MODULES = YES; 495 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 496 | DEVELOPMENT_TEAM = BHG62PRC3S; 497 | ENABLE_BITCODE = NO; 498 | FRAMEWORK_SEARCH_PATHS = ( 499 | "$(inherited)", 500 | "$(PROJECT_DIR)/Flutter", 501 | ); 502 | INFOPLIST_FILE = Runner/Info.plist; 503 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 504 | LD_RUNPATH_SEARCH_PATHS = ( 505 | "$(inherited)", 506 | "@executable_path/Frameworks", 507 | ); 508 | LIBRARY_SEARCH_PATHS = ( 509 | "$(inherited)", 510 | "$(PROJECT_DIR)/Flutter", 511 | ); 512 | PRODUCT_BUNDLE_IDENTIFIER = "io.getstream.build-vikings"; 513 | PRODUCT_NAME = "$(TARGET_NAME)"; 514 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 515 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 516 | SWIFT_VERSION = 5.0; 517 | VERSIONING_SYSTEM = "apple-generic"; 518 | }; 519 | name = Debug; 520 | }; 521 | 97C147071CF9000F007C117D /* Release */ = { 522 | isa = XCBuildConfiguration; 523 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 524 | buildSettings = { 525 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 526 | CLANG_ENABLE_MODULES = YES; 527 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 528 | DEVELOPMENT_TEAM = BHG62PRC3S; 529 | ENABLE_BITCODE = NO; 530 | FRAMEWORK_SEARCH_PATHS = ( 531 | "$(inherited)", 532 | "$(PROJECT_DIR)/Flutter", 533 | ); 534 | INFOPLIST_FILE = Runner/Info.plist; 535 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 536 | LD_RUNPATH_SEARCH_PATHS = ( 537 | "$(inherited)", 538 | "@executable_path/Frameworks", 539 | ); 540 | LIBRARY_SEARCH_PATHS = ( 541 | "$(inherited)", 542 | "$(PROJECT_DIR)/Flutter", 543 | ); 544 | PRODUCT_BUNDLE_IDENTIFIER = "io.getstream.build-vikings"; 545 | PRODUCT_NAME = "$(TARGET_NAME)"; 546 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 547 | SWIFT_VERSION = 5.0; 548 | VERSIONING_SYSTEM = "apple-generic"; 549 | }; 550 | name = Release; 551 | }; 552 | /* End XCBuildConfiguration section */ 553 | 554 | /* Begin XCConfigurationList section */ 555 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 556 | isa = XCConfigurationList; 557 | buildConfigurations = ( 558 | 97C147031CF9000F007C117D /* Debug */, 559 | 97C147041CF9000F007C117D /* Release */, 560 | 249021D3217E4FDB00AE95B9 /* Profile */, 561 | ); 562 | defaultConfigurationIsVisible = 0; 563 | defaultConfigurationName = Release; 564 | }; 565 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 566 | isa = XCConfigurationList; 567 | buildConfigurations = ( 568 | 97C147061CF9000F007C117D /* Debug */, 569 | 97C147071CF9000F007C117D /* Release */, 570 | 249021D4217E4FDB00AE95B9 /* Profile */, 571 | ); 572 | defaultConfigurationIsVisible = 0; 573 | defaultConfigurationName = Release; 574 | }; 575 | /* End XCConfigurationList section */ 576 | }; 577 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 578 | } 579 | --------------------------------------------------------------------------------