├── README.md ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── grpc_web_example │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ └── contents.xcworkspacedata └── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-1024x1024@1x.png │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ └── Icon-App-83.5x83.5@2x.png │ └── LaunchImage.imageset │ │ ├── Contents.json │ │ ├── LaunchImage.png │ │ ├── LaunchImage@2x.png │ │ ├── LaunchImage@3x.png │ │ └── README.md │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── Runner-Bridging-Header.h ├── lib ├── echo.pb.dart ├── echo.pbenum.dart ├── echo.pbgrpc.dart ├── echo.pbjson.dart └── main.dart ├── pubspec.lock ├── pubspec.yaml ├── test └── widget_test.dart └── web └── index.html /README.md: -------------------------------------------------------------------------------- 1 | # grpc_web flutter example 2 | 3 | Minimal project demonstrating a grpc_web request from a Flutter Web project. 4 | 5 | Works with the echo-sample server from https://github.com/grpc/grpc-web. 6 | 7 | The proto definitions can be recompiled with: 8 | 9 | ```sh 10 | $ pub global activate protoc_plugin 11 | $ protoc --dart_out=grpc:lib/ protos/echo.proto -I protos 12 | ``` 13 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | -------------------------------------------------------------------------------- /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 28 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.grpc_web_example" 42 | minSdkVersion 16 43 | targetSdkVersion 28 44 | versionCode flutterVersionCode.toInteger() 45 | versionName flutterVersionName 46 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 47 | } 48 | 49 | buildTypes { 50 | release { 51 | // TODO: Add your own signing config for the release build. 52 | // Signing with the debug keys for now, so `flutter run --release` works. 53 | signingConfig signingConfigs.debug 54 | } 55 | } 56 | } 57 | 58 | flutter { 59 | source '../..' 60 | } 61 | 62 | dependencies { 63 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 64 | testImplementation 'junit:junit:4.12' 65 | androidTestImplementation 'androidx.test:runner:1.1.1' 66 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' 67 | } 68 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 12 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/grpc_web_example/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.grpc_web_example 2 | 3 | import androidx.annotation.NonNull; 4 | import io.flutter.embedding.android.FlutterActivity 5 | import io.flutter.embedding.engine.FlutterEngine 6 | import io.flutter.plugins.GeneratedPluginRegistrant 7 | 8 | class MainActivity: FlutterActivity() { 9 | override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) { 10 | GeneratedPluginRegistrant.registerWith(flutterEngine); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigurdm/grpc_web_flutter_example/3eaf741062abaed148c950542d014f83a9ffb969/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigurdm/grpc_web_flutter_example/3eaf741062abaed148c950542d014f83a9ffb969/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigurdm/grpc_web_flutter_example/3eaf741062abaed148c950542d014f83a9ffb969/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigurdm/grpc_web_flutter_example/3eaf741062abaed148c950542d014f83a9ffb969/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigurdm/grpc_web_flutter_example/3eaf741062abaed148c950542d014f83a9ffb969/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.5.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | jcenter() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip 7 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 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 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 13 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 14 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 15 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 16 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 17 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 18 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 19 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXCopyFilesBuildPhase section */ 23 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 24 | isa = PBXCopyFilesBuildPhase; 25 | buildActionMask = 2147483647; 26 | dstPath = ""; 27 | dstSubfolderSpec = 10; 28 | files = ( 29 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 30 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 31 | ); 32 | name = "Embed Frameworks"; 33 | runOnlyForDeploymentPostprocessing = 0; 34 | }; 35 | /* End PBXCopyFilesBuildPhase section */ 36 | 37 | /* Begin PBXFileReference section */ 38 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 39 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 40 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 41 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 42 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 43 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 44 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 45 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 46 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 47 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 48 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 50 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 51 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 52 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 53 | /* End PBXFileReference section */ 54 | 55 | /* Begin PBXFrameworksBuildPhase section */ 56 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 57 | isa = PBXFrameworksBuildPhase; 58 | buildActionMask = 2147483647; 59 | files = ( 60 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 61 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 62 | ); 63 | runOnlyForDeploymentPostprocessing = 0; 64 | }; 65 | /* End PBXFrameworksBuildPhase section */ 66 | 67 | /* Begin PBXGroup section */ 68 | 9740EEB11CF90186004384FC /* Flutter */ = { 69 | isa = PBXGroup; 70 | children = ( 71 | 3B80C3931E831B6300D905FE /* App.framework */, 72 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 73 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 74 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 75 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 76 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 77 | ); 78 | name = Flutter; 79 | sourceTree = ""; 80 | }; 81 | 97C146E51CF9000F007C117D = { 82 | isa = PBXGroup; 83 | children = ( 84 | 9740EEB11CF90186004384FC /* Flutter */, 85 | 97C146F01CF9000F007C117D /* Runner */, 86 | 97C146EF1CF9000F007C117D /* Products */, 87 | ); 88 | sourceTree = ""; 89 | }; 90 | 97C146EF1CF9000F007C117D /* Products */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | 97C146EE1CF9000F007C117D /* Runner.app */, 94 | ); 95 | name = Products; 96 | sourceTree = ""; 97 | }; 98 | 97C146F01CF9000F007C117D /* Runner */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 102 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 103 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 104 | 97C147021CF9000F007C117D /* Info.plist */, 105 | 97C146F11CF9000F007C117D /* Supporting Files */, 106 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 107 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 108 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 109 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 110 | ); 111 | path = Runner; 112 | sourceTree = ""; 113 | }; 114 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 115 | isa = PBXGroup; 116 | children = ( 117 | ); 118 | name = "Supporting Files"; 119 | sourceTree = ""; 120 | }; 121 | /* End PBXGroup section */ 122 | 123 | /* Begin PBXNativeTarget section */ 124 | 97C146ED1CF9000F007C117D /* Runner */ = { 125 | isa = PBXNativeTarget; 126 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 127 | buildPhases = ( 128 | 9740EEB61CF901F6004384FC /* Run Script */, 129 | 97C146EA1CF9000F007C117D /* Sources */, 130 | 97C146EB1CF9000F007C117D /* Frameworks */, 131 | 97C146EC1CF9000F007C117D /* Resources */, 132 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 133 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 134 | ); 135 | buildRules = ( 136 | ); 137 | dependencies = ( 138 | ); 139 | name = Runner; 140 | productName = Runner; 141 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 142 | productType = "com.apple.product-type.application"; 143 | }; 144 | /* End PBXNativeTarget section */ 145 | 146 | /* Begin PBXProject section */ 147 | 97C146E61CF9000F007C117D /* Project object */ = { 148 | isa = PBXProject; 149 | attributes = { 150 | LastUpgradeCheck = 1020; 151 | ORGANIZATIONNAME = ""; 152 | TargetAttributes = { 153 | 97C146ED1CF9000F007C117D = { 154 | CreatedOnToolsVersion = 7.3.1; 155 | LastSwiftMigration = 1100; 156 | }; 157 | }; 158 | }; 159 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 160 | compatibilityVersion = "Xcode 3.2"; 161 | developmentRegion = en; 162 | hasScannedForEncodings = 0; 163 | knownRegions = ( 164 | en, 165 | Base, 166 | ); 167 | mainGroup = 97C146E51CF9000F007C117D; 168 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 169 | projectDirPath = ""; 170 | projectRoot = ""; 171 | targets = ( 172 | 97C146ED1CF9000F007C117D /* Runner */, 173 | ); 174 | }; 175 | /* End PBXProject section */ 176 | 177 | /* Begin PBXResourcesBuildPhase section */ 178 | 97C146EC1CF9000F007C117D /* Resources */ = { 179 | isa = PBXResourcesBuildPhase; 180 | buildActionMask = 2147483647; 181 | files = ( 182 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 183 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 184 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 185 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 186 | ); 187 | runOnlyForDeploymentPostprocessing = 0; 188 | }; 189 | /* End PBXResourcesBuildPhase section */ 190 | 191 | /* Begin PBXShellScriptBuildPhase section */ 192 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 193 | isa = PBXShellScriptBuildPhase; 194 | buildActionMask = 2147483647; 195 | files = ( 196 | ); 197 | inputPaths = ( 198 | ); 199 | name = "Thin Binary"; 200 | outputPaths = ( 201 | ); 202 | runOnlyForDeploymentPostprocessing = 0; 203 | shellPath = /bin/sh; 204 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 205 | }; 206 | 9740EEB61CF901F6004384FC /* Run Script */ = { 207 | isa = PBXShellScriptBuildPhase; 208 | buildActionMask = 2147483647; 209 | files = ( 210 | ); 211 | inputPaths = ( 212 | ); 213 | name = "Run Script"; 214 | outputPaths = ( 215 | ); 216 | runOnlyForDeploymentPostprocessing = 0; 217 | shellPath = /bin/sh; 218 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 219 | }; 220 | /* End PBXShellScriptBuildPhase section */ 221 | 222 | /* Begin PBXSourcesBuildPhase section */ 223 | 97C146EA1CF9000F007C117D /* Sources */ = { 224 | isa = PBXSourcesBuildPhase; 225 | buildActionMask = 2147483647; 226 | files = ( 227 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 228 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 229 | ); 230 | runOnlyForDeploymentPostprocessing = 0; 231 | }; 232 | /* End PBXSourcesBuildPhase section */ 233 | 234 | /* Begin PBXVariantGroup section */ 235 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 236 | isa = PBXVariantGroup; 237 | children = ( 238 | 97C146FB1CF9000F007C117D /* Base */, 239 | ); 240 | name = Main.storyboard; 241 | sourceTree = ""; 242 | }; 243 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 244 | isa = PBXVariantGroup; 245 | children = ( 246 | 97C147001CF9000F007C117D /* Base */, 247 | ); 248 | name = LaunchScreen.storyboard; 249 | sourceTree = ""; 250 | }; 251 | /* End PBXVariantGroup section */ 252 | 253 | /* Begin XCBuildConfiguration section */ 254 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 255 | isa = XCBuildConfiguration; 256 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 257 | buildSettings = { 258 | ALWAYS_SEARCH_USER_PATHS = NO; 259 | CLANG_ANALYZER_NONNULL = YES; 260 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 261 | CLANG_CXX_LIBRARY = "libc++"; 262 | CLANG_ENABLE_MODULES = YES; 263 | CLANG_ENABLE_OBJC_ARC = YES; 264 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 265 | CLANG_WARN_BOOL_CONVERSION = YES; 266 | CLANG_WARN_COMMA = YES; 267 | CLANG_WARN_CONSTANT_CONVERSION = YES; 268 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 269 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 270 | CLANG_WARN_EMPTY_BODY = YES; 271 | CLANG_WARN_ENUM_CONVERSION = YES; 272 | CLANG_WARN_INFINITE_RECURSION = YES; 273 | CLANG_WARN_INT_CONVERSION = YES; 274 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 275 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 276 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 277 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 278 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 279 | CLANG_WARN_STRICT_PROTOTYPES = YES; 280 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 281 | CLANG_WARN_UNREACHABLE_CODE = YES; 282 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 283 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 284 | COPY_PHASE_STRIP = NO; 285 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 286 | ENABLE_NS_ASSERTIONS = NO; 287 | ENABLE_STRICT_OBJC_MSGSEND = YES; 288 | GCC_C_LANGUAGE_STANDARD = gnu99; 289 | GCC_NO_COMMON_BLOCKS = YES; 290 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 291 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 292 | GCC_WARN_UNDECLARED_SELECTOR = YES; 293 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 294 | GCC_WARN_UNUSED_FUNCTION = YES; 295 | GCC_WARN_UNUSED_VARIABLE = YES; 296 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 297 | MTL_ENABLE_DEBUG_INFO = NO; 298 | SDKROOT = iphoneos; 299 | SUPPORTED_PLATFORMS = iphoneos; 300 | TARGETED_DEVICE_FAMILY = "1,2"; 301 | VALIDATE_PRODUCT = YES; 302 | }; 303 | name = Profile; 304 | }; 305 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 306 | isa = XCBuildConfiguration; 307 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 308 | buildSettings = { 309 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 310 | CLANG_ENABLE_MODULES = YES; 311 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 312 | ENABLE_BITCODE = NO; 313 | FRAMEWORK_SEARCH_PATHS = ( 314 | "$(inherited)", 315 | "$(PROJECT_DIR)/Flutter", 316 | ); 317 | INFOPLIST_FILE = Runner/Info.plist; 318 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 319 | LIBRARY_SEARCH_PATHS = ( 320 | "$(inherited)", 321 | "$(PROJECT_DIR)/Flutter", 322 | ); 323 | PRODUCT_BUNDLE_IDENTIFIER = com.example.grpcWebExample; 324 | PRODUCT_NAME = "$(TARGET_NAME)"; 325 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 326 | SWIFT_VERSION = 5.0; 327 | VERSIONING_SYSTEM = "apple-generic"; 328 | }; 329 | name = Profile; 330 | }; 331 | 97C147031CF9000F007C117D /* Debug */ = { 332 | isa = XCBuildConfiguration; 333 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 334 | buildSettings = { 335 | ALWAYS_SEARCH_USER_PATHS = NO; 336 | CLANG_ANALYZER_NONNULL = YES; 337 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 338 | CLANG_CXX_LIBRARY = "libc++"; 339 | CLANG_ENABLE_MODULES = YES; 340 | CLANG_ENABLE_OBJC_ARC = YES; 341 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 342 | CLANG_WARN_BOOL_CONVERSION = YES; 343 | CLANG_WARN_COMMA = YES; 344 | CLANG_WARN_CONSTANT_CONVERSION = YES; 345 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 346 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 347 | CLANG_WARN_EMPTY_BODY = YES; 348 | CLANG_WARN_ENUM_CONVERSION = YES; 349 | CLANG_WARN_INFINITE_RECURSION = YES; 350 | CLANG_WARN_INT_CONVERSION = YES; 351 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 352 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 353 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 354 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 355 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 356 | CLANG_WARN_STRICT_PROTOTYPES = YES; 357 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 358 | CLANG_WARN_UNREACHABLE_CODE = YES; 359 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 360 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 361 | COPY_PHASE_STRIP = NO; 362 | DEBUG_INFORMATION_FORMAT = dwarf; 363 | ENABLE_STRICT_OBJC_MSGSEND = YES; 364 | ENABLE_TESTABILITY = YES; 365 | GCC_C_LANGUAGE_STANDARD = gnu99; 366 | GCC_DYNAMIC_NO_PIC = NO; 367 | GCC_NO_COMMON_BLOCKS = YES; 368 | GCC_OPTIMIZATION_LEVEL = 0; 369 | GCC_PREPROCESSOR_DEFINITIONS = ( 370 | "DEBUG=1", 371 | "$(inherited)", 372 | ); 373 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 374 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 375 | GCC_WARN_UNDECLARED_SELECTOR = YES; 376 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 377 | GCC_WARN_UNUSED_FUNCTION = YES; 378 | GCC_WARN_UNUSED_VARIABLE = YES; 379 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 380 | MTL_ENABLE_DEBUG_INFO = YES; 381 | ONLY_ACTIVE_ARCH = YES; 382 | SDKROOT = iphoneos; 383 | TARGETED_DEVICE_FAMILY = "1,2"; 384 | }; 385 | name = Debug; 386 | }; 387 | 97C147041CF9000F007C117D /* Release */ = { 388 | isa = XCBuildConfiguration; 389 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 390 | buildSettings = { 391 | ALWAYS_SEARCH_USER_PATHS = NO; 392 | CLANG_ANALYZER_NONNULL = YES; 393 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 394 | CLANG_CXX_LIBRARY = "libc++"; 395 | CLANG_ENABLE_MODULES = YES; 396 | CLANG_ENABLE_OBJC_ARC = YES; 397 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 398 | CLANG_WARN_BOOL_CONVERSION = YES; 399 | CLANG_WARN_COMMA = YES; 400 | CLANG_WARN_CONSTANT_CONVERSION = YES; 401 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 402 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 403 | CLANG_WARN_EMPTY_BODY = YES; 404 | CLANG_WARN_ENUM_CONVERSION = YES; 405 | CLANG_WARN_INFINITE_RECURSION = YES; 406 | CLANG_WARN_INT_CONVERSION = YES; 407 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 408 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 409 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 410 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 411 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 412 | CLANG_WARN_STRICT_PROTOTYPES = YES; 413 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 414 | CLANG_WARN_UNREACHABLE_CODE = YES; 415 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 416 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 417 | COPY_PHASE_STRIP = NO; 418 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 419 | ENABLE_NS_ASSERTIONS = NO; 420 | ENABLE_STRICT_OBJC_MSGSEND = YES; 421 | GCC_C_LANGUAGE_STANDARD = gnu99; 422 | GCC_NO_COMMON_BLOCKS = YES; 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 = 8.0; 430 | MTL_ENABLE_DEBUG_INFO = NO; 431 | SDKROOT = iphoneos; 432 | SUPPORTED_PLATFORMS = iphoneos; 433 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 434 | TARGETED_DEVICE_FAMILY = "1,2"; 435 | VALIDATE_PRODUCT = YES; 436 | }; 437 | name = Release; 438 | }; 439 | 97C147061CF9000F007C117D /* Debug */ = { 440 | isa = XCBuildConfiguration; 441 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 442 | buildSettings = { 443 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 444 | CLANG_ENABLE_MODULES = YES; 445 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 446 | ENABLE_BITCODE = NO; 447 | FRAMEWORK_SEARCH_PATHS = ( 448 | "$(inherited)", 449 | "$(PROJECT_DIR)/Flutter", 450 | ); 451 | INFOPLIST_FILE = Runner/Info.plist; 452 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 453 | LIBRARY_SEARCH_PATHS = ( 454 | "$(inherited)", 455 | "$(PROJECT_DIR)/Flutter", 456 | ); 457 | PRODUCT_BUNDLE_IDENTIFIER = com.example.grpcWebExample; 458 | PRODUCT_NAME = "$(TARGET_NAME)"; 459 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 460 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 461 | SWIFT_VERSION = 5.0; 462 | VERSIONING_SYSTEM = "apple-generic"; 463 | }; 464 | name = Debug; 465 | }; 466 | 97C147071CF9000F007C117D /* Release */ = { 467 | isa = XCBuildConfiguration; 468 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 469 | buildSettings = { 470 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 471 | CLANG_ENABLE_MODULES = YES; 472 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 473 | ENABLE_BITCODE = NO; 474 | FRAMEWORK_SEARCH_PATHS = ( 475 | "$(inherited)", 476 | "$(PROJECT_DIR)/Flutter", 477 | ); 478 | INFOPLIST_FILE = Runner/Info.plist; 479 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 480 | LIBRARY_SEARCH_PATHS = ( 481 | "$(inherited)", 482 | "$(PROJECT_DIR)/Flutter", 483 | ); 484 | PRODUCT_BUNDLE_IDENTIFIER = com.example.grpcWebExample; 485 | PRODUCT_NAME = "$(TARGET_NAME)"; 486 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 487 | SWIFT_VERSION = 5.0; 488 | VERSIONING_SYSTEM = "apple-generic"; 489 | }; 490 | name = Release; 491 | }; 492 | /* End XCBuildConfiguration section */ 493 | 494 | /* Begin XCConfigurationList section */ 495 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 496 | isa = XCConfigurationList; 497 | buildConfigurations = ( 498 | 97C147031CF9000F007C117D /* Debug */, 499 | 97C147041CF9000F007C117D /* Release */, 500 | 249021D3217E4FDB00AE95B9 /* Profile */, 501 | ); 502 | defaultConfigurationIsVisible = 0; 503 | defaultConfigurationName = Release; 504 | }; 505 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 506 | isa = XCConfigurationList; 507 | buildConfigurations = ( 508 | 97C147061CF9000F007C117D /* Debug */, 509 | 97C147071CF9000F007C117D /* Release */, 510 | 249021D4217E4FDB00AE95B9 /* Profile */, 511 | ); 512 | defaultConfigurationIsVisible = 0; 513 | defaultConfigurationName = Release; 514 | }; 515 | /* End XCConfigurationList section */ 516 | }; 517 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 518 | } 519 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigurdm/grpc_web_flutter_example/3eaf741062abaed148c950542d014f83a9ffb969/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigurdm/grpc_web_flutter_example/3eaf741062abaed148c950542d014f83a9ffb969/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/sigurdm/grpc_web_flutter_example/3eaf741062abaed148c950542d014f83a9ffb969/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/sigurdm/grpc_web_flutter_example/3eaf741062abaed148c950542d014f83a9ffb969/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/sigurdm/grpc_web_flutter_example/3eaf741062abaed148c950542d014f83a9ffb969/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/sigurdm/grpc_web_flutter_example/3eaf741062abaed148c950542d014f83a9ffb969/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/sigurdm/grpc_web_flutter_example/3eaf741062abaed148c950542d014f83a9ffb969/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/sigurdm/grpc_web_flutter_example/3eaf741062abaed148c950542d014f83a9ffb969/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/sigurdm/grpc_web_flutter_example/3eaf741062abaed148c950542d014f83a9ffb969/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/sigurdm/grpc_web_flutter_example/3eaf741062abaed148c950542d014f83a9ffb969/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/sigurdm/grpc_web_flutter_example/3eaf741062abaed148c950542d014f83a9ffb969/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/sigurdm/grpc_web_flutter_example/3eaf741062abaed148c950542d014f83a9ffb969/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/sigurdm/grpc_web_flutter_example/3eaf741062abaed148c950542d014f83a9ffb969/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/sigurdm/grpc_web_flutter_example/3eaf741062abaed148c950542d014f83a9ffb969/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigurdm/grpc_web_flutter_example/3eaf741062abaed148c950542d014f83a9ffb969/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /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/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigurdm/grpc_web_flutter_example/3eaf741062abaed148c950542d014f83a9ffb969/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigurdm/grpc_web_flutter_example/3eaf741062abaed148c950542d014f83a9ffb969/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigurdm/grpc_web_flutter_example/3eaf741062abaed148c950542d014f83a9ffb969/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | grpc_web_example 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /lib/echo.pb.dart: -------------------------------------------------------------------------------- 1 | /// 2 | // Generated code. Do not modify. 3 | // source: echo.proto 4 | // 5 | // @dart = 2.3 6 | // ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type 7 | 8 | import 'dart:core' as $core; 9 | 10 | import 'package:protobuf/protobuf.dart' as $pb; 11 | 12 | class Empty extends $pb.GeneratedMessage { 13 | static final $pb.BuilderInfo _i = $pb.BuilderInfo('Empty', package: const $pb.PackageName('grpc.gateway.testing'), createEmptyInstance: create) 14 | ..hasRequiredFields = false 15 | ; 16 | 17 | Empty._() : super(); 18 | factory Empty() => create(); 19 | factory Empty.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); 20 | factory Empty.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); 21 | Empty clone() => Empty()..mergeFromMessage(this); 22 | Empty copyWith(void Function(Empty) updates) => super.copyWith((message) => updates(message as Empty)); 23 | $pb.BuilderInfo get info_ => _i; 24 | @$core.pragma('dart2js:noInline') 25 | static Empty create() => Empty._(); 26 | Empty createEmptyInstance() => create(); 27 | static $pb.PbList createRepeated() => $pb.PbList(); 28 | @$core.pragma('dart2js:noInline') 29 | static Empty getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); 30 | static Empty _defaultInstance; 31 | } 32 | 33 | class EchoRequest extends $pb.GeneratedMessage { 34 | static final $pb.BuilderInfo _i = $pb.BuilderInfo('EchoRequest', package: const $pb.PackageName('grpc.gateway.testing'), createEmptyInstance: create) 35 | ..aOS(1, 'message') 36 | ..hasRequiredFields = false 37 | ; 38 | 39 | EchoRequest._() : super(); 40 | factory EchoRequest() => create(); 41 | factory EchoRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); 42 | factory EchoRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); 43 | EchoRequest clone() => EchoRequest()..mergeFromMessage(this); 44 | EchoRequest copyWith(void Function(EchoRequest) updates) => super.copyWith((message) => updates(message as EchoRequest)); 45 | $pb.BuilderInfo get info_ => _i; 46 | @$core.pragma('dart2js:noInline') 47 | static EchoRequest create() => EchoRequest._(); 48 | EchoRequest createEmptyInstance() => create(); 49 | static $pb.PbList createRepeated() => $pb.PbList(); 50 | @$core.pragma('dart2js:noInline') 51 | static EchoRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); 52 | static EchoRequest _defaultInstance; 53 | 54 | @$pb.TagNumber(1) 55 | $core.String get message => $_getSZ(0); 56 | @$pb.TagNumber(1) 57 | set message($core.String v) { $_setString(0, v); } 58 | @$pb.TagNumber(1) 59 | $core.bool hasMessage() => $_has(0); 60 | @$pb.TagNumber(1) 61 | void clearMessage() => clearField(1); 62 | } 63 | 64 | class EchoResponse extends $pb.GeneratedMessage { 65 | static final $pb.BuilderInfo _i = $pb.BuilderInfo('EchoResponse', package: const $pb.PackageName('grpc.gateway.testing'), createEmptyInstance: create) 66 | ..aOS(1, 'message') 67 | ..a<$core.int>(2, 'messageCount', $pb.PbFieldType.O3) 68 | ..hasRequiredFields = false 69 | ; 70 | 71 | EchoResponse._() : super(); 72 | factory EchoResponse() => create(); 73 | factory EchoResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); 74 | factory EchoResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); 75 | EchoResponse clone() => EchoResponse()..mergeFromMessage(this); 76 | EchoResponse copyWith(void Function(EchoResponse) updates) => super.copyWith((message) => updates(message as EchoResponse)); 77 | $pb.BuilderInfo get info_ => _i; 78 | @$core.pragma('dart2js:noInline') 79 | static EchoResponse create() => EchoResponse._(); 80 | EchoResponse createEmptyInstance() => create(); 81 | static $pb.PbList createRepeated() => $pb.PbList(); 82 | @$core.pragma('dart2js:noInline') 83 | static EchoResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); 84 | static EchoResponse _defaultInstance; 85 | 86 | @$pb.TagNumber(1) 87 | $core.String get message => $_getSZ(0); 88 | @$pb.TagNumber(1) 89 | set message($core.String v) { $_setString(0, v); } 90 | @$pb.TagNumber(1) 91 | $core.bool hasMessage() => $_has(0); 92 | @$pb.TagNumber(1) 93 | void clearMessage() => clearField(1); 94 | 95 | @$pb.TagNumber(2) 96 | $core.int get messageCount => $_getIZ(1); 97 | @$pb.TagNumber(2) 98 | set messageCount($core.int v) { $_setSignedInt32(1, v); } 99 | @$pb.TagNumber(2) 100 | $core.bool hasMessageCount() => $_has(1); 101 | @$pb.TagNumber(2) 102 | void clearMessageCount() => clearField(2); 103 | } 104 | 105 | class ServerStreamingEchoRequest extends $pb.GeneratedMessage { 106 | static final $pb.BuilderInfo _i = $pb.BuilderInfo('ServerStreamingEchoRequest', package: const $pb.PackageName('grpc.gateway.testing'), createEmptyInstance: create) 107 | ..aOS(1, 'message') 108 | ..a<$core.int>(2, 'messageCount', $pb.PbFieldType.O3) 109 | ..a<$core.int>(3, 'messageInterval', $pb.PbFieldType.O3) 110 | ..hasRequiredFields = false 111 | ; 112 | 113 | ServerStreamingEchoRequest._() : super(); 114 | factory ServerStreamingEchoRequest() => create(); 115 | factory ServerStreamingEchoRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); 116 | factory ServerStreamingEchoRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); 117 | ServerStreamingEchoRequest clone() => ServerStreamingEchoRequest()..mergeFromMessage(this); 118 | ServerStreamingEchoRequest copyWith(void Function(ServerStreamingEchoRequest) updates) => super.copyWith((message) => updates(message as ServerStreamingEchoRequest)); 119 | $pb.BuilderInfo get info_ => _i; 120 | @$core.pragma('dart2js:noInline') 121 | static ServerStreamingEchoRequest create() => ServerStreamingEchoRequest._(); 122 | ServerStreamingEchoRequest createEmptyInstance() => create(); 123 | static $pb.PbList createRepeated() => $pb.PbList(); 124 | @$core.pragma('dart2js:noInline') 125 | static ServerStreamingEchoRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); 126 | static ServerStreamingEchoRequest _defaultInstance; 127 | 128 | @$pb.TagNumber(1) 129 | $core.String get message => $_getSZ(0); 130 | @$pb.TagNumber(1) 131 | set message($core.String v) { $_setString(0, v); } 132 | @$pb.TagNumber(1) 133 | $core.bool hasMessage() => $_has(0); 134 | @$pb.TagNumber(1) 135 | void clearMessage() => clearField(1); 136 | 137 | @$pb.TagNumber(2) 138 | $core.int get messageCount => $_getIZ(1); 139 | @$pb.TagNumber(2) 140 | set messageCount($core.int v) { $_setSignedInt32(1, v); } 141 | @$pb.TagNumber(2) 142 | $core.bool hasMessageCount() => $_has(1); 143 | @$pb.TagNumber(2) 144 | void clearMessageCount() => clearField(2); 145 | 146 | @$pb.TagNumber(3) 147 | $core.int get messageInterval => $_getIZ(2); 148 | @$pb.TagNumber(3) 149 | set messageInterval($core.int v) { $_setSignedInt32(2, v); } 150 | @$pb.TagNumber(3) 151 | $core.bool hasMessageInterval() => $_has(2); 152 | @$pb.TagNumber(3) 153 | void clearMessageInterval() => clearField(3); 154 | } 155 | 156 | class ServerStreamingEchoResponse extends $pb.GeneratedMessage { 157 | static final $pb.BuilderInfo _i = $pb.BuilderInfo('ServerStreamingEchoResponse', package: const $pb.PackageName('grpc.gateway.testing'), createEmptyInstance: create) 158 | ..aOS(1, 'message') 159 | ..hasRequiredFields = false 160 | ; 161 | 162 | ServerStreamingEchoResponse._() : super(); 163 | factory ServerStreamingEchoResponse() => create(); 164 | factory ServerStreamingEchoResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); 165 | factory ServerStreamingEchoResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); 166 | ServerStreamingEchoResponse clone() => ServerStreamingEchoResponse()..mergeFromMessage(this); 167 | ServerStreamingEchoResponse copyWith(void Function(ServerStreamingEchoResponse) updates) => super.copyWith((message) => updates(message as ServerStreamingEchoResponse)); 168 | $pb.BuilderInfo get info_ => _i; 169 | @$core.pragma('dart2js:noInline') 170 | static ServerStreamingEchoResponse create() => ServerStreamingEchoResponse._(); 171 | ServerStreamingEchoResponse createEmptyInstance() => create(); 172 | static $pb.PbList createRepeated() => $pb.PbList(); 173 | @$core.pragma('dart2js:noInline') 174 | static ServerStreamingEchoResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); 175 | static ServerStreamingEchoResponse _defaultInstance; 176 | 177 | @$pb.TagNumber(1) 178 | $core.String get message => $_getSZ(0); 179 | @$pb.TagNumber(1) 180 | set message($core.String v) { $_setString(0, v); } 181 | @$pb.TagNumber(1) 182 | $core.bool hasMessage() => $_has(0); 183 | @$pb.TagNumber(1) 184 | void clearMessage() => clearField(1); 185 | } 186 | 187 | class ClientStreamingEchoRequest extends $pb.GeneratedMessage { 188 | static final $pb.BuilderInfo _i = $pb.BuilderInfo('ClientStreamingEchoRequest', package: const $pb.PackageName('grpc.gateway.testing'), createEmptyInstance: create) 189 | ..aOS(1, 'message') 190 | ..hasRequiredFields = false 191 | ; 192 | 193 | ClientStreamingEchoRequest._() : super(); 194 | factory ClientStreamingEchoRequest() => create(); 195 | factory ClientStreamingEchoRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); 196 | factory ClientStreamingEchoRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); 197 | ClientStreamingEchoRequest clone() => ClientStreamingEchoRequest()..mergeFromMessage(this); 198 | ClientStreamingEchoRequest copyWith(void Function(ClientStreamingEchoRequest) updates) => super.copyWith((message) => updates(message as ClientStreamingEchoRequest)); 199 | $pb.BuilderInfo get info_ => _i; 200 | @$core.pragma('dart2js:noInline') 201 | static ClientStreamingEchoRequest create() => ClientStreamingEchoRequest._(); 202 | ClientStreamingEchoRequest createEmptyInstance() => create(); 203 | static $pb.PbList createRepeated() => $pb.PbList(); 204 | @$core.pragma('dart2js:noInline') 205 | static ClientStreamingEchoRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); 206 | static ClientStreamingEchoRequest _defaultInstance; 207 | 208 | @$pb.TagNumber(1) 209 | $core.String get message => $_getSZ(0); 210 | @$pb.TagNumber(1) 211 | set message($core.String v) { $_setString(0, v); } 212 | @$pb.TagNumber(1) 213 | $core.bool hasMessage() => $_has(0); 214 | @$pb.TagNumber(1) 215 | void clearMessage() => clearField(1); 216 | } 217 | 218 | class ClientStreamingEchoResponse extends $pb.GeneratedMessage { 219 | static final $pb.BuilderInfo _i = $pb.BuilderInfo('ClientStreamingEchoResponse', package: const $pb.PackageName('grpc.gateway.testing'), createEmptyInstance: create) 220 | ..a<$core.int>(1, 'messageCount', $pb.PbFieldType.O3) 221 | ..hasRequiredFields = false 222 | ; 223 | 224 | ClientStreamingEchoResponse._() : super(); 225 | factory ClientStreamingEchoResponse() => create(); 226 | factory ClientStreamingEchoResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); 227 | factory ClientStreamingEchoResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); 228 | ClientStreamingEchoResponse clone() => ClientStreamingEchoResponse()..mergeFromMessage(this); 229 | ClientStreamingEchoResponse copyWith(void Function(ClientStreamingEchoResponse) updates) => super.copyWith((message) => updates(message as ClientStreamingEchoResponse)); 230 | $pb.BuilderInfo get info_ => _i; 231 | @$core.pragma('dart2js:noInline') 232 | static ClientStreamingEchoResponse create() => ClientStreamingEchoResponse._(); 233 | ClientStreamingEchoResponse createEmptyInstance() => create(); 234 | static $pb.PbList createRepeated() => $pb.PbList(); 235 | @$core.pragma('dart2js:noInline') 236 | static ClientStreamingEchoResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); 237 | static ClientStreamingEchoResponse _defaultInstance; 238 | 239 | @$pb.TagNumber(1) 240 | $core.int get messageCount => $_getIZ(0); 241 | @$pb.TagNumber(1) 242 | set messageCount($core.int v) { $_setSignedInt32(0, v); } 243 | @$pb.TagNumber(1) 244 | $core.bool hasMessageCount() => $_has(0); 245 | @$pb.TagNumber(1) 246 | void clearMessageCount() => clearField(1); 247 | } 248 | 249 | -------------------------------------------------------------------------------- /lib/echo.pbenum.dart: -------------------------------------------------------------------------------- 1 | /// 2 | // Generated code. Do not modify. 3 | // source: echo.proto 4 | // 5 | // @dart = 2.3 6 | // ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type 7 | 8 | -------------------------------------------------------------------------------- /lib/echo.pbgrpc.dart: -------------------------------------------------------------------------------- 1 | /// 2 | // Generated code. Do not modify. 3 | // source: echo.proto 4 | // 5 | // @dart = 2.3 6 | // ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type 7 | 8 | import 'dart:async' as $async; 9 | 10 | import 'dart:core' as $core; 11 | 12 | import 'package:grpc/service_api.dart' as $grpc; 13 | import 'echo.pb.dart' as $0; 14 | export 'echo.pb.dart'; 15 | 16 | class EchoServiceClient extends $grpc.Client { 17 | static final _$echo = $grpc.ClientMethod<$0.EchoRequest, $0.EchoResponse>( 18 | '/grpc.gateway.testing.EchoService/Echo', 19 | ($0.EchoRequest value) => value.writeToBuffer(), 20 | ($core.List<$core.int> value) => $0.EchoResponse.fromBuffer(value)); 21 | static final _$echoAbort = 22 | $grpc.ClientMethod<$0.EchoRequest, $0.EchoResponse>( 23 | '/grpc.gateway.testing.EchoService/EchoAbort', 24 | ($0.EchoRequest value) => value.writeToBuffer(), 25 | ($core.List<$core.int> value) => $0.EchoResponse.fromBuffer(value)); 26 | static final _$noOp = $grpc.ClientMethod<$0.Empty, $0.Empty>( 27 | '/grpc.gateway.testing.EchoService/NoOp', 28 | ($0.Empty value) => value.writeToBuffer(), 29 | ($core.List<$core.int> value) => $0.Empty.fromBuffer(value)); 30 | static final _$serverStreamingEcho = $grpc.ClientMethod< 31 | $0.ServerStreamingEchoRequest, $0.ServerStreamingEchoResponse>( 32 | '/grpc.gateway.testing.EchoService/ServerStreamingEcho', 33 | ($0.ServerStreamingEchoRequest value) => value.writeToBuffer(), 34 | ($core.List<$core.int> value) => 35 | $0.ServerStreamingEchoResponse.fromBuffer(value)); 36 | static final _$serverStreamingEchoAbort = $grpc.ClientMethod< 37 | $0.ServerStreamingEchoRequest, $0.ServerStreamingEchoResponse>( 38 | '/grpc.gateway.testing.EchoService/ServerStreamingEchoAbort', 39 | ($0.ServerStreamingEchoRequest value) => value.writeToBuffer(), 40 | ($core.List<$core.int> value) => 41 | $0.ServerStreamingEchoResponse.fromBuffer(value)); 42 | static final _$clientStreamingEcho = $grpc.ClientMethod< 43 | $0.ClientStreamingEchoRequest, $0.ClientStreamingEchoResponse>( 44 | '/grpc.gateway.testing.EchoService/ClientStreamingEcho', 45 | ($0.ClientStreamingEchoRequest value) => value.writeToBuffer(), 46 | ($core.List<$core.int> value) => 47 | $0.ClientStreamingEchoResponse.fromBuffer(value)); 48 | static final _$fullDuplexEcho = 49 | $grpc.ClientMethod<$0.EchoRequest, $0.EchoResponse>( 50 | '/grpc.gateway.testing.EchoService/FullDuplexEcho', 51 | ($0.EchoRequest value) => value.writeToBuffer(), 52 | ($core.List<$core.int> value) => $0.EchoResponse.fromBuffer(value)); 53 | static final _$halfDuplexEcho = 54 | $grpc.ClientMethod<$0.EchoRequest, $0.EchoResponse>( 55 | '/grpc.gateway.testing.EchoService/HalfDuplexEcho', 56 | ($0.EchoRequest value) => value.writeToBuffer(), 57 | ($core.List<$core.int> value) => $0.EchoResponse.fromBuffer(value)); 58 | 59 | EchoServiceClient($grpc.ClientChannel channel, {$grpc.CallOptions options}) 60 | : super(channel, options: options); 61 | 62 | $grpc.ResponseFuture<$0.EchoResponse> echo($0.EchoRequest request, 63 | {$grpc.CallOptions options}) { 64 | final call = $createCall(_$echo, $async.Stream.fromIterable([request]), 65 | options: options); 66 | return $grpc.ResponseFuture(call); 67 | } 68 | 69 | $grpc.ResponseFuture<$0.EchoResponse> echoAbort($0.EchoRequest request, 70 | {$grpc.CallOptions options}) { 71 | final call = $createCall(_$echoAbort, $async.Stream.fromIterable([request]), 72 | options: options); 73 | return $grpc.ResponseFuture(call); 74 | } 75 | 76 | $grpc.ResponseFuture<$0.Empty> noOp($0.Empty request, 77 | {$grpc.CallOptions options}) { 78 | final call = $createCall(_$noOp, $async.Stream.fromIterable([request]), 79 | options: options); 80 | return $grpc.ResponseFuture(call); 81 | } 82 | 83 | $grpc.ResponseStream<$0.ServerStreamingEchoResponse> serverStreamingEcho( 84 | $0.ServerStreamingEchoRequest request, 85 | {$grpc.CallOptions options}) { 86 | final call = $createCall( 87 | _$serverStreamingEcho, $async.Stream.fromIterable([request]), 88 | options: options); 89 | return $grpc.ResponseStream(call); 90 | } 91 | 92 | $grpc.ResponseStream<$0.ServerStreamingEchoResponse> serverStreamingEchoAbort( 93 | $0.ServerStreamingEchoRequest request, 94 | {$grpc.CallOptions options}) { 95 | final call = $createCall( 96 | _$serverStreamingEchoAbort, $async.Stream.fromIterable([request]), 97 | options: options); 98 | return $grpc.ResponseStream(call); 99 | } 100 | 101 | $grpc.ResponseFuture<$0.ClientStreamingEchoResponse> clientStreamingEcho( 102 | $async.Stream<$0.ClientStreamingEchoRequest> request, 103 | {$grpc.CallOptions options}) { 104 | final call = $createCall(_$clientStreamingEcho, request, options: options); 105 | return $grpc.ResponseFuture(call); 106 | } 107 | 108 | $grpc.ResponseStream<$0.EchoResponse> fullDuplexEcho( 109 | $async.Stream<$0.EchoRequest> request, 110 | {$grpc.CallOptions options}) { 111 | final call = $createCall(_$fullDuplexEcho, request, options: options); 112 | return $grpc.ResponseStream(call); 113 | } 114 | 115 | $grpc.ResponseStream<$0.EchoResponse> halfDuplexEcho( 116 | $async.Stream<$0.EchoRequest> request, 117 | {$grpc.CallOptions options}) { 118 | final call = $createCall(_$halfDuplexEcho, request, options: options); 119 | return $grpc.ResponseStream(call); 120 | } 121 | } 122 | 123 | abstract class EchoServiceBase extends $grpc.Service { 124 | $core.String get $name => 'grpc.gateway.testing.EchoService'; 125 | 126 | EchoServiceBase() { 127 | $addMethod($grpc.ServiceMethod<$0.EchoRequest, $0.EchoResponse>( 128 | 'Echo', 129 | echo_Pre, 130 | false, 131 | false, 132 | ($core.List<$core.int> value) => $0.EchoRequest.fromBuffer(value), 133 | ($0.EchoResponse value) => value.writeToBuffer())); 134 | $addMethod($grpc.ServiceMethod<$0.EchoRequest, $0.EchoResponse>( 135 | 'EchoAbort', 136 | echoAbort_Pre, 137 | false, 138 | false, 139 | ($core.List<$core.int> value) => $0.EchoRequest.fromBuffer(value), 140 | ($0.EchoResponse value) => value.writeToBuffer())); 141 | $addMethod($grpc.ServiceMethod<$0.Empty, $0.Empty>( 142 | 'NoOp', 143 | noOp_Pre, 144 | false, 145 | false, 146 | ($core.List<$core.int> value) => $0.Empty.fromBuffer(value), 147 | ($0.Empty value) => value.writeToBuffer())); 148 | $addMethod($grpc.ServiceMethod<$0.ServerStreamingEchoRequest, 149 | $0.ServerStreamingEchoResponse>( 150 | 'ServerStreamingEcho', 151 | serverStreamingEcho_Pre, 152 | false, 153 | true, 154 | ($core.List<$core.int> value) => 155 | $0.ServerStreamingEchoRequest.fromBuffer(value), 156 | ($0.ServerStreamingEchoResponse value) => value.writeToBuffer())); 157 | $addMethod($grpc.ServiceMethod<$0.ServerStreamingEchoRequest, 158 | $0.ServerStreamingEchoResponse>( 159 | 'ServerStreamingEchoAbort', 160 | serverStreamingEchoAbort_Pre, 161 | false, 162 | true, 163 | ($core.List<$core.int> value) => 164 | $0.ServerStreamingEchoRequest.fromBuffer(value), 165 | ($0.ServerStreamingEchoResponse value) => value.writeToBuffer())); 166 | $addMethod($grpc.ServiceMethod<$0.ClientStreamingEchoRequest, 167 | $0.ClientStreamingEchoResponse>( 168 | 'ClientStreamingEcho', 169 | clientStreamingEcho, 170 | true, 171 | false, 172 | ($core.List<$core.int> value) => 173 | $0.ClientStreamingEchoRequest.fromBuffer(value), 174 | ($0.ClientStreamingEchoResponse value) => value.writeToBuffer())); 175 | $addMethod($grpc.ServiceMethod<$0.EchoRequest, $0.EchoResponse>( 176 | 'FullDuplexEcho', 177 | fullDuplexEcho, 178 | true, 179 | true, 180 | ($core.List<$core.int> value) => $0.EchoRequest.fromBuffer(value), 181 | ($0.EchoResponse value) => value.writeToBuffer())); 182 | $addMethod($grpc.ServiceMethod<$0.EchoRequest, $0.EchoResponse>( 183 | 'HalfDuplexEcho', 184 | halfDuplexEcho, 185 | true, 186 | true, 187 | ($core.List<$core.int> value) => $0.EchoRequest.fromBuffer(value), 188 | ($0.EchoResponse value) => value.writeToBuffer())); 189 | } 190 | 191 | $async.Future<$0.EchoResponse> echo_Pre( 192 | $grpc.ServiceCall call, $async.Future<$0.EchoRequest> request) async { 193 | return echo(call, await request); 194 | } 195 | 196 | $async.Future<$0.EchoResponse> echoAbort_Pre( 197 | $grpc.ServiceCall call, $async.Future<$0.EchoRequest> request) async { 198 | return echoAbort(call, await request); 199 | } 200 | 201 | $async.Future<$0.Empty> noOp_Pre( 202 | $grpc.ServiceCall call, $async.Future<$0.Empty> request) async { 203 | return noOp(call, await request); 204 | } 205 | 206 | $async.Stream<$0.ServerStreamingEchoResponse> serverStreamingEcho_Pre( 207 | $grpc.ServiceCall call, 208 | $async.Future<$0.ServerStreamingEchoRequest> request) async* { 209 | yield* serverStreamingEcho(call, await request); 210 | } 211 | 212 | $async.Stream<$0.ServerStreamingEchoResponse> serverStreamingEchoAbort_Pre( 213 | $grpc.ServiceCall call, 214 | $async.Future<$0.ServerStreamingEchoRequest> request) async* { 215 | yield* serverStreamingEchoAbort(call, await request); 216 | } 217 | 218 | $async.Future<$0.EchoResponse> echo( 219 | $grpc.ServiceCall call, $0.EchoRequest request); 220 | $async.Future<$0.EchoResponse> echoAbort( 221 | $grpc.ServiceCall call, $0.EchoRequest request); 222 | $async.Future<$0.Empty> noOp($grpc.ServiceCall call, $0.Empty request); 223 | $async.Stream<$0.ServerStreamingEchoResponse> serverStreamingEcho( 224 | $grpc.ServiceCall call, $0.ServerStreamingEchoRequest request); 225 | $async.Stream<$0.ServerStreamingEchoResponse> serverStreamingEchoAbort( 226 | $grpc.ServiceCall call, $0.ServerStreamingEchoRequest request); 227 | $async.Future<$0.ClientStreamingEchoResponse> clientStreamingEcho( 228 | $grpc.ServiceCall call, 229 | $async.Stream<$0.ClientStreamingEchoRequest> request); 230 | $async.Stream<$0.EchoResponse> fullDuplexEcho( 231 | $grpc.ServiceCall call, $async.Stream<$0.EchoRequest> request); 232 | $async.Stream<$0.EchoResponse> halfDuplexEcho( 233 | $grpc.ServiceCall call, $async.Stream<$0.EchoRequest> request); 234 | } 235 | -------------------------------------------------------------------------------- /lib/echo.pbjson.dart: -------------------------------------------------------------------------------- 1 | /// 2 | // Generated code. Do not modify. 3 | // source: echo.proto 4 | // 5 | // @dart = 2.3 6 | // ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type 7 | 8 | const Empty$json = const { 9 | '1': 'Empty', 10 | }; 11 | 12 | const EchoRequest$json = const { 13 | '1': 'EchoRequest', 14 | '2': const [ 15 | const {'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'}, 16 | ], 17 | }; 18 | 19 | const EchoResponse$json = const { 20 | '1': 'EchoResponse', 21 | '2': const [ 22 | const {'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'}, 23 | const {'1': 'message_count', '3': 2, '4': 1, '5': 5, '10': 'messageCount'}, 24 | ], 25 | }; 26 | 27 | const ServerStreamingEchoRequest$json = const { 28 | '1': 'ServerStreamingEchoRequest', 29 | '2': const [ 30 | const {'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'}, 31 | const {'1': 'message_count', '3': 2, '4': 1, '5': 5, '10': 'messageCount'}, 32 | const {'1': 'message_interval', '3': 3, '4': 1, '5': 5, '10': 'messageInterval'}, 33 | ], 34 | }; 35 | 36 | const ServerStreamingEchoResponse$json = const { 37 | '1': 'ServerStreamingEchoResponse', 38 | '2': const [ 39 | const {'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'}, 40 | ], 41 | }; 42 | 43 | const ClientStreamingEchoRequest$json = const { 44 | '1': 'ClientStreamingEchoRequest', 45 | '2': const [ 46 | const {'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'}, 47 | ], 48 | }; 49 | 50 | const ClientStreamingEchoResponse$json = const { 51 | '1': 'ClientStreamingEchoResponse', 52 | '2': const [ 53 | const {'1': 'message_count', '3': 1, '4': 1, '5': 5, '10': 'messageCount'}, 54 | ], 55 | }; 56 | 57 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:grpc/grpc_web.dart'; 3 | import 'echo.pbgrpc.dart'; 4 | 5 | void main() => runApp(MyApp()); 6 | 7 | Future doRemoteCall() async { 8 | final channel = GrpcWebClientChannel.xhr(Uri.parse('http://localhost:8080')); 9 | final client = EchoServiceClient(channel); 10 | return (await client.echo(EchoRequest()..message = 'hello')).message; 11 | } 12 | 13 | class MyApp extends StatelessWidget { 14 | @override 15 | Widget build(BuildContext context) { 16 | return MaterialApp( 17 | title: 'Flutter Demo', 18 | theme: ThemeData( 19 | primarySwatch: Colors.blue, 20 | ), 21 | home: MyHomePage(title: 'Flutter Demo Home Page'), 22 | ); 23 | } 24 | } 25 | 26 | class MyHomePage extends StatefulWidget { 27 | MyHomePage({Key key, this.title}) : super(key: key); 28 | 29 | final String title; 30 | 31 | @override 32 | _MyHomePageState createState() => _MyHomePageState(); 33 | } 34 | 35 | class _MyHomePageState extends State { 36 | String _message = "nothing received yet"; 37 | 38 | void _incrementCounter() async { 39 | String reply = await doRemoteCall(); 40 | setState(() { 41 | _message = reply; 42 | }); 43 | } 44 | 45 | @override 46 | Widget build(BuildContext context) { 47 | return Scaffold( 48 | appBar: AppBar( 49 | title: Text(widget.title), 50 | ), 51 | body: Center( 52 | child: Column( 53 | mainAxisAlignment: MainAxisAlignment.center, 54 | children: [ 55 | Text( 56 | 'Message from the server:', 57 | ), 58 | Text( 59 | '$_message', 60 | style: Theme.of(context).textTheme.display1, 61 | ), 62 | ], 63 | ), 64 | ), 65 | floatingActionButton: FloatingActionButton( 66 | onPressed: _incrementCounter, 67 | tooltip: 'Increment', 68 | child: Icon(Icons.add), 69 | ), 70 | ); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | archive: 5 | dependency: transitive 6 | description: 7 | name: archive 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.0.11" 11 | args: 12 | dependency: transitive 13 | description: 14 | name: args 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "1.5.2" 18 | async: 19 | dependency: transitive 20 | description: 21 | name: async 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.4.0" 25 | boolean_selector: 26 | dependency: transitive 27 | description: 28 | name: boolean_selector 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.0.5" 32 | charcode: 33 | dependency: transitive 34 | description: 35 | name: charcode 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.1.2" 39 | collection: 40 | dependency: transitive 41 | description: 42 | name: collection 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.14.11" 46 | convert: 47 | dependency: transitive 48 | description: 49 | name: convert 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "2.1.1" 53 | crypto: 54 | dependency: transitive 55 | description: 56 | name: crypto 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "2.1.3" 60 | cupertino_icons: 61 | dependency: "direct main" 62 | description: 63 | name: cupertino_icons 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "0.1.3" 67 | fixnum: 68 | dependency: transitive 69 | description: 70 | name: fixnum 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "0.10.11" 74 | flutter: 75 | dependency: "direct main" 76 | description: flutter 77 | source: sdk 78 | version: "0.0.0" 79 | flutter_test: 80 | dependency: "direct dev" 81 | description: flutter 82 | source: sdk 83 | version: "0.0.0" 84 | googleapis_auth: 85 | dependency: transitive 86 | description: 87 | name: googleapis_auth 88 | url: "https://pub.dartlang.org" 89 | source: hosted 90 | version: "0.2.11+1" 91 | grpc: 92 | dependency: "direct main" 93 | description: 94 | name: grpc 95 | url: "https://pub.dartlang.org" 96 | source: hosted 97 | version: "2.1.3" 98 | http: 99 | dependency: transitive 100 | description: 101 | name: http 102 | url: "https://pub.dartlang.org" 103 | source: hosted 104 | version: "0.12.0+3" 105 | http2: 106 | dependency: transitive 107 | description: 108 | name: http2 109 | url: "https://pub.dartlang.org" 110 | source: hosted 111 | version: "1.0.0" 112 | http_parser: 113 | dependency: transitive 114 | description: 115 | name: http_parser 116 | url: "https://pub.dartlang.org" 117 | source: hosted 118 | version: "3.1.3" 119 | image: 120 | dependency: transitive 121 | description: 122 | name: image 123 | url: "https://pub.dartlang.org" 124 | source: hosted 125 | version: "2.1.4" 126 | matcher: 127 | dependency: transitive 128 | description: 129 | name: matcher 130 | url: "https://pub.dartlang.org" 131 | source: hosted 132 | version: "0.12.6" 133 | meta: 134 | dependency: transitive 135 | description: 136 | name: meta 137 | url: "https://pub.dartlang.org" 138 | source: hosted 139 | version: "1.1.8" 140 | path: 141 | dependency: transitive 142 | description: 143 | name: path 144 | url: "https://pub.dartlang.org" 145 | source: hosted 146 | version: "1.6.4" 147 | pedantic: 148 | dependency: transitive 149 | description: 150 | name: pedantic 151 | url: "https://pub.dartlang.org" 152 | source: hosted 153 | version: "1.8.0+1" 154 | petitparser: 155 | dependency: transitive 156 | description: 157 | name: petitparser 158 | url: "https://pub.dartlang.org" 159 | source: hosted 160 | version: "2.4.0" 161 | protobuf: 162 | dependency: "direct main" 163 | description: 164 | name: protobuf 165 | url: "https://pub.dartlang.org" 166 | source: hosted 167 | version: "1.0.1" 168 | quiver: 169 | dependency: transitive 170 | description: 171 | name: quiver 172 | url: "https://pub.dartlang.org" 173 | source: hosted 174 | version: "2.0.5" 175 | sky_engine: 176 | dependency: transitive 177 | description: flutter 178 | source: sdk 179 | version: "0.0.99" 180 | source_span: 181 | dependency: transitive 182 | description: 183 | name: source_span 184 | url: "https://pub.dartlang.org" 185 | source: hosted 186 | version: "1.5.5" 187 | stack_trace: 188 | dependency: transitive 189 | description: 190 | name: stack_trace 191 | url: "https://pub.dartlang.org" 192 | source: hosted 193 | version: "1.9.3" 194 | stream_channel: 195 | dependency: transitive 196 | description: 197 | name: stream_channel 198 | url: "https://pub.dartlang.org" 199 | source: hosted 200 | version: "2.0.0" 201 | string_scanner: 202 | dependency: transitive 203 | description: 204 | name: string_scanner 205 | url: "https://pub.dartlang.org" 206 | source: hosted 207 | version: "1.0.5" 208 | term_glyph: 209 | dependency: transitive 210 | description: 211 | name: term_glyph 212 | url: "https://pub.dartlang.org" 213 | source: hosted 214 | version: "1.1.0" 215 | test_api: 216 | dependency: transitive 217 | description: 218 | name: test_api 219 | url: "https://pub.dartlang.org" 220 | source: hosted 221 | version: "0.2.11" 222 | typed_data: 223 | dependency: transitive 224 | description: 225 | name: typed_data 226 | url: "https://pub.dartlang.org" 227 | source: hosted 228 | version: "1.1.6" 229 | vector_math: 230 | dependency: transitive 231 | description: 232 | name: vector_math 233 | url: "https://pub.dartlang.org" 234 | source: hosted 235 | version: "2.0.8" 236 | xml: 237 | dependency: transitive 238 | description: 239 | name: xml 240 | url: "https://pub.dartlang.org" 241 | source: hosted 242 | version: "3.5.0" 243 | sdks: 244 | dart: ">=2.4.0 <3.0.0" 245 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: grpc_web_example 2 | description: A new Flutter project. 3 | 4 | version: 1.0.0+1 5 | 6 | environment: 7 | sdk: ">=2.1.0 <3.0.0" 8 | 9 | dependencies: 10 | flutter: 11 | sdk: flutter 12 | grpc: 13 | protobuf: 14 | # The following adds the Cupertino Icons font to your application. 15 | # Use with the CupertinoIcons class for iOS style icons. 16 | cupertino_icons: ^0.1.2 17 | 18 | dev_dependencies: 19 | flutter_test: 20 | sdk: flutter 21 | 22 | flutter: 23 | uses-material-design: true 24 | -------------------------------------------------------------------------------- /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:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:grpc_web_example/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | grpc_web_example 6 | 7 | 8 | 9 | 10 | 11 | --------------------------------------------------------------------------------