├── doc └── api │ ├── categories.json │ ├── static-assets │ ├── favicon.png │ ├── sdk_footer_text.html │ ├── play_button.svg │ ├── readme.md │ └── github.css │ ├── __404error.html │ ├── utils_Language │ └── utils_Language-library.html │ ├── utils_IamOptions │ ├── utils_IamOptions-library.html │ └── IamOptions │ │ ├── url.html │ │ ├── scope.html │ │ ├── expiresIn.html │ │ ├── iamApiKey.html │ │ ├── tokenType.html │ │ └── expiration.html │ ├── flutter_ibm_watson │ ├── ItemIdentifyLanguageResult │ │ ├── language.html │ │ ├── confidence.html │ │ └── runtimeType.html │ ├── TranslationResult │ │ ├── getWordCount.html │ │ ├── wordCount.html │ │ ├── getCharacterCount.html │ │ ├── translations.html │ │ ├── characterCount.html │ │ └── toString.html │ ├── IdentifyLanguageResult │ │ ├── IdentifyLanguageResult.html │ │ ├── add.html │ │ └── getLanguageProbability.html │ └── LanguageTranslator │ │ ├── modelId.html │ │ └── version.html │ └── visual-recognition_VisualRecognition │ ├── ClassResult │ ├── score.html │ ├── className.html │ └── typeHierarchy.html │ ├── ClassifierResult │ ├── getClassifierId.html │ └── getClassifierName.html │ └── ClassifiedImages │ └── customClasses.html ├── example ├── android │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.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 │ │ │ │ ├── values │ │ │ │ │ └── styles.xml │ │ │ │ └── drawable │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── gen │ │ │ │ └── com │ │ │ │ │ └── codigopanda │ │ │ │ │ └── example │ │ │ │ │ ├── R.java │ │ │ │ │ ├── Manifest.java │ │ │ │ │ └── BuildConfig.java │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── codigopanda │ │ │ │ │ └── example │ │ │ │ │ └── MainActivity.java │ │ │ │ └── AndroidManifest.xml │ │ └── build.gradle │ ├── .gitignore │ ├── settings.gradle │ ├── build.gradle │ └── gradlew.bat ├── 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 │ ├── .symlinks │ │ └── plugins │ │ │ ├── audioplayers │ │ │ ├── image_picker │ │ │ ├── path_provider │ │ │ ├── path_provider_linux │ │ │ ├── path_provider_macos │ │ │ └── flutter_plugin_android_lifecycle │ ├── Flutter │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ ├── flutter_export_environment.sh │ │ ├── Flutter.podspec │ │ └── AppFrameworkInfo.plist │ ├── Runner.xcodeproj │ │ ├── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ └── contents.xcworkspacedata │ ├── .gitignore │ ├── Podfile.lock │ └── Podfile ├── .gitignore ├── README.md ├── .metadata ├── pubspec.yaml ├── example.iml ├── test │ └── widget_test.dart ├── example_android.iml ├── .flutter-plugins-dependencies └── lib │ ├── screenLanguageTranslator.dart │ └── main.dart ├── .gitignore ├── ibmwatson.png ├── test └── flutter_ibm_watson_test.dart ├── lib ├── flutter_ibm_watson.dart ├── utils │ ├── IamOptions.dart │ └── Language.dart ├── services │ └── textToSpeech.dart └── language_translator │ └── LanguageTranslator.dart ├── CHANGELOG.md ├── pubspec.yaml └── pubspec.lock /doc/api/categories.json: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | -------------------------------------------------------------------------------- /example/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .atom/ 3 | .dart_tool/ 4 | .idea 5 | .packages 6 | .pub/ 7 | packages 8 | -------------------------------------------------------------------------------- /ibmwatson.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VictorRancesCode/flutter_ibm_watson/HEAD/ibmwatson.png -------------------------------------------------------------------------------- /example/ios/.symlinks/plugins/audioplayers: -------------------------------------------------------------------------------- 1 | /Users/rances/development/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.15.1 -------------------------------------------------------------------------------- /example/ios/.symlinks/plugins/image_picker: -------------------------------------------------------------------------------- 1 | /Users/rances/development/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.6.7+4 -------------------------------------------------------------------------------- /example/ios/.symlinks/plugins/path_provider: -------------------------------------------------------------------------------- 1 | /Users/rances/development/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.11 -------------------------------------------------------------------------------- /doc/api/static-assets/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VictorRancesCode/flutter_ibm_watson/HEAD/doc/api/static-assets/favicon.png -------------------------------------------------------------------------------- /example/ios/.symlinks/plugins/path_provider_linux: -------------------------------------------------------------------------------- 1 | /Users/rances/development/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-0.0.1+2 -------------------------------------------------------------------------------- /example/ios/.symlinks/plugins/path_provider_macos: -------------------------------------------------------------------------------- 1 | /Users/rances/development/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4+3 -------------------------------------------------------------------------------- /example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VictorRancesCode/flutter_ibm_watson/HEAD/example/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /example/ios/.symlinks/plugins/flutter_plugin_android_lifecycle: -------------------------------------------------------------------------------- 1 | /Users/rances/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_plugin_android_lifecycle-1.0.8 -------------------------------------------------------------------------------- /doc/api/static-assets/sdk_footer_text.html: -------------------------------------------------------------------------------- 1 | • 2 | 3 | cc license 4 | 5 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .atom/ 3 | .dart_tool/ 4 | .idea 5 | .vscode/ 6 | .packages 7 | .pub/ 8 | build/ 9 | ios/.generated/ 10 | packages 11 | .flutter-plugins 12 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VictorRancesCode/flutter_ibm_watson/HEAD/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VictorRancesCode/flutter_ibm_watson/HEAD/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VictorRancesCode/flutter_ibm_watson/HEAD/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/README.md: -------------------------------------------------------------------------------- 1 | # example 2 | 3 | A new Flutter project. 4 | 5 | ## Getting Started 6 | 7 | For help getting started with Flutter, view our online 8 | [documentation](https://flutter.io/). 9 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VictorRancesCode/flutter_ibm_watson/HEAD/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VictorRancesCode/flutter_ibm_watson/HEAD/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | *.class 3 | .gradle 4 | /local.properties 5 | /.idea/workspace.xml 6 | /.idea/libraries 7 | .DS_Store 8 | /build 9 | /captures 10 | GeneratedPluginRegistrant.java 11 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VictorRancesCode/flutter_ibm_watson/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VictorRancesCode/flutter_ibm_watson/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VictorRancesCode/flutter_ibm_watson/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VictorRancesCode/flutter_ibm_watson/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VictorRancesCode/flutter_ibm_watson/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VictorRancesCode/flutter_ibm_watson/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VictorRancesCode/flutter_ibm_watson/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VictorRancesCode/flutter_ibm_watson/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VictorRancesCode/flutter_ibm_watson/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VictorRancesCode/flutter_ibm_watson/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VictorRancesCode/flutter_ibm_watson/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VictorRancesCode/flutter_ibm_watson/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VictorRancesCode/flutter_ibm_watson/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VictorRancesCode/flutter_ibm_watson/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VictorRancesCode/flutter_ibm_watson/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VictorRancesCode/flutter_ibm_watson/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /test/flutter_ibm_watson_test.dart: -------------------------------------------------------------------------------- 1 | //import 'package:test/test.dart'; 2 | 3 | import 'package:flutter_ibm_watson/flutter_ibm_watson.dart'; 4 | 5 | void main() { 6 | //test('adds one to input values', () {}); 7 | } 8 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VictorRancesCode/flutter_ibm_watson/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VictorRancesCode/flutter_ibm_watson/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/android/app/src/main/gen/com/codigopanda/example/R.java: -------------------------------------------------------------------------------- 1 | /*___Generated_by_IDEA___*/ 2 | 3 | package com.codigopanda.example; 4 | 5 | /* This stub is only used by the IDE. It is NOT the R class actually packed into the APK */ 6 | public final class R { 7 | } -------------------------------------------------------------------------------- /example/android/app/src/main/gen/com/codigopanda/example/Manifest.java: -------------------------------------------------------------------------------- 1 | /*___Generated_by_IDEA___*/ 2 | 3 | package com.codigopanda.example; 4 | 5 | /* This stub is only used by the IDE. It is NOT the Manifest class actually packed into the APK */ 6 | public final class Manifest { 7 | } -------------------------------------------------------------------------------- /lib/flutter_ibm_watson.dart: -------------------------------------------------------------------------------- 1 | library flutter_ibm_watson; 2 | 3 | export 'language_translator/LanguageTranslator.dart'; 4 | export 'visual-recognition/VisualRecognition.dart'; 5 | export 'services/textToSpeech.dart'; 6 | export 'utils/Language.dart'; 7 | export 'utils/IamOptions.dart'; -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip 7 | -------------------------------------------------------------------------------- /example/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: b397406561f5e7a9c94e28f58d9e49fca0dd58b7 8 | channel: beta 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /doc/api/static-assets/play_button.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example/android/app/src/main/gen/com/codigopanda/example/BuildConfig.java: -------------------------------------------------------------------------------- 1 | /*___Generated_by_IDEA___*/ 2 | 3 | package com.codigopanda.example; 4 | 5 | /* This stub is only used by the IDE. It is NOT the BuildConfig class actually packed into the APK */ 6 | public final class BuildConfig { 7 | public final static boolean DEBUG = Boolean.parseBoolean(null); 8 | } -------------------------------------------------------------------------------- /doc/api/static-assets/readme.md: -------------------------------------------------------------------------------- 1 | # highlight.js 2 | 3 | Generated from https://highlightjs.org/download/ on 2017-08-30 4 | 5 | Included languages: 6 | 7 | * bash 8 | * css 9 | * dart 10 | * java 11 | * javascript 12 | * json 13 | * markdown 14 | * objectivec 15 | * ruby - dragged in by `yaml` - 🙄 16 | * shell 17 | * swift 18 | * xml - includes html 19 | * yaml 20 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## [0.0.4] - TODO: 18-08-2020. 2 | 3 | * TODO: Add service Text to Speech 4 | 5 | ## [0.0.3] - TODO: 18-08-2020. 6 | 7 | * TODO: Fix VisualRecognition 8 | 9 | ## [0.0.2] - TODO: 26-11-2018. 10 | 11 | * TODO: Support dart 2 and added dartdoc 12 | 13 | 14 | ## [0.0.1] - TODO: 24-06-2018. 15 | 16 | * TODO: The flutter_ibm_watson makes it easy to integrate IBM Watson 17 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_ibm_watson 2 | description: The flutter_ibm_watson makes it easy to integrate IBM Watson 3 | version: 0.0.4 4 | homepage: https://github.com/VictorRancesCode/flutter_ibm_watson 5 | 6 | dependencies: 7 | #flutter: 8 | # sdk: flutter 9 | http: ^0.12.2 10 | http_parser: ^3.1.4 11 | meta: ^1.1.8 12 | 13 | 14 | dev_dependencies: 15 | #flutter_test: 16 | # sdk: flutter 17 | 18 | #flutter: 19 | 20 | environment: 21 | sdk: '>=2.0.0 <3.0.0' -------------------------------------------------------------------------------- /example/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/com/codigopanda/example/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.codigopanda.example; 2 | 3 | import android.os.Bundle; 4 | 5 | import io.flutter.app.FlutterActivity; 6 | import io.flutter.plugins.GeneratedPluginRegistrant; 7 | 8 | public class MainActivity extends FlutterActivity { 9 | @Override 10 | protected void onCreate(Bundle savedInstanceState) { 11 | super.onCreate(savedInstanceState); 12 | GeneratedPluginRegistrant.registerWith(this); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /example/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 | -------------------------------------------------------------------------------- /example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: example 2 | description: A new Flutter project. 3 | version: 1.0.0+1 4 | 5 | dependencies: 6 | flutter: 7 | sdk: flutter 8 | flutter_ibm_watson: 9 | path: ../ 10 | image_picker: ^0.6.7+4 11 | 12 | # The following adds the Cupertino Icons font to your application. 13 | # Use with the CupertinoIcons class for iOS style icons. 14 | cupertino_icons: ^0.1.0 15 | audioplayers: ^0.15.1 16 | path_provider: ^1.6.11 17 | 18 | dev_dependencies: 19 | flutter_test: 20 | sdk: flutter 21 | 22 | flutter: 23 | 24 | uses-material-design: true 25 | 26 | -------------------------------------------------------------------------------- /example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.1.2' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | jcenter() 16 | } 17 | } 18 | 19 | rootProject.buildDir = '../build' 20 | subprojects { 21 | project.buildDir = "${rootProject.buildDir}/${project.name}" 22 | } 23 | subprojects { 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /example/example.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /example/ios/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vagrant/ 3 | .sconsign.dblite 4 | .svn/ 5 | 6 | .DS_Store 7 | *.swp 8 | profile 9 | 10 | DerivedData/ 11 | build/ 12 | GeneratedPluginRegistrant.h 13 | GeneratedPluginRegistrant.m 14 | 15 | *.pbxuser 16 | *.mode1v3 17 | *.mode2v3 18 | *.perspectivev3 19 | 20 | !default.pbxuser 21 | !default.mode1v3 22 | !default.mode2v3 23 | !default.perspectivev3 24 | 25 | xcuserdata 26 | 27 | *.moved-aside 28 | 29 | *.pyc 30 | *sync/ 31 | Icon? 32 | .tags* 33 | 34 | /Flutter/app.flx 35 | /Flutter/app.zip 36 | /Flutter/flutter_assets/ 37 | /Flutter/App.framework 38 | /Flutter/Flutter.framework 39 | /Flutter/Generated.xcconfig 40 | /ServiceDefinitions.json 41 | 42 | Pods/ 43 | -------------------------------------------------------------------------------- /example/ios/Flutter/flutter_export_environment.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # This is a generated file; do not edit or check into version control. 3 | export "FLUTTER_ROOT=/Users/rances/development/flutter" 4 | export "FLUTTER_APPLICATION_PATH=/Users/rances/Repositorio/MyProjects/flutter_ibm_watson/example" 5 | export "FLUTTER_TARGET=/Users/rances/Repositorio/MyProjects/flutter_ibm_watson/example/lib/main.dart" 6 | export "FLUTTER_BUILD_DIR=build" 7 | export "SYMROOT=${SOURCE_ROOT}/../build/ios" 8 | export "OTHER_LDFLAGS=$(inherited) -framework Flutter" 9 | export "FLUTTER_FRAMEWORK_DIR=/Users/rances/development/flutter/bin/cache/artifacts/engine/ios" 10 | export "FLUTTER_BUILD_NAME=1.0.0" 11 | export "FLUTTER_BUILD_NUMBER=1" 12 | export "TRACK_WIDGET_CREATION=true" 13 | -------------------------------------------------------------------------------- /example/ios/Flutter/Flutter.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # NOTE: This podspec is NOT to be published. It is only used as a local source! 3 | # 4 | 5 | Pod::Spec.new do |s| 6 | s.name = 'Flutter' 7 | s.version = '1.0.0' 8 | s.summary = 'High-performance, high-fidelity mobile apps.' 9 | s.description = <<-DESC 10 | Flutter provides an easy and productive way to build and deploy high-performance mobile apps for Android and iOS. 11 | DESC 12 | s.homepage = 'https://flutter.io' 13 | s.license = { :type => 'MIT' } 14 | s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' } 15 | s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s } 16 | s.ios.deployment_target = '8.0' 17 | s.vendored_frameworks = 'Flutter.framework' 18 | end 19 | -------------------------------------------------------------------------------- /example/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | UIRequiredDeviceCapabilities 24 | 25 | arm64 26 | 27 | MinimumOSVersion 28 | 8.0 29 | 30 | 31 | -------------------------------------------------------------------------------- /example/test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // To perform an interaction with a widget in your test, use the WidgetTester utility that Flutter 3 | // provides. For example, you can send tap and scroll gestures. You can also use WidgetTester to 4 | // find child widgets in the widget tree, read text, and verify that the values of widget properties 5 | // are correct. 6 | 7 | import 'package:flutter/material.dart'; 8 | import 'package:flutter_test/flutter_test.dart'; 9 | 10 | import 'package:example/main.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(new MyApp()); 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 | -------------------------------------------------------------------------------- /example/example_android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/utils/IamOptions.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:meta/meta.dart'; 4 | import 'package:http/http.dart' as http; 5 | import 'dart:io'; 6 | import 'dart:convert'; 7 | 8 | class IamOptions { 9 | String iamApiKey; 10 | String url; 11 | String accessToken; 12 | String refreshToken; 13 | String tokenType; 14 | int expiresIn; 15 | int expiration; 16 | String scope; 17 | 18 | IamOptions({@required this.iamApiKey, @required this.url}); 19 | 20 | Future build() async { 21 | 22 | Map datos = { 23 | "grant_type": "urn:ibm:params:oauth:grant-type:apikey", 24 | "apikey": this.iamApiKey 25 | }; 26 | var response = await http.post( 27 | "https://iam.bluemix.net/identity/token", 28 | headers: { 29 | HttpHeaders.authorizationHeader: "Basic Yng6Yng=", 30 | HttpHeaders.contentTypeHeader: "application/x-www-form-urlencoded", 31 | HttpHeaders.acceptHeader: "application/json", 32 | }, 33 | body: datos, 34 | ).timeout(const Duration(seconds: 360)); 35 | Map data = json.decode(response.body); 36 | this.accessToken = data["access_token"]; 37 | if(this.accessToken==null){ 38 | print("AccessToken is Null, verified your Token"); 39 | } 40 | this.refreshToken = data["refresh_token"]; 41 | this.tokenType = data["token_type"]; 42 | this.expiresIn = data["expires_in"]; 43 | this.expiration = data["expiration"]; 44 | this.scope = data["scope"]; 45 | return this; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /doc/api/static-assets/github.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | github.com style (c) Vasily Polovnyov 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | color: #333; 12 | background: #f8f8f8; 13 | } 14 | 15 | .hljs-comment, 16 | .hljs-quote { 17 | color: #998; 18 | font-style: italic; 19 | } 20 | 21 | .hljs-keyword, 22 | .hljs-selector-tag, 23 | .hljs-subst { 24 | color: #333; 25 | font-weight: bold; 26 | } 27 | 28 | .hljs-number, 29 | .hljs-literal, 30 | .hljs-variable, 31 | .hljs-template-variable, 32 | .hljs-tag .hljs-attr { 33 | color: #008080; 34 | } 35 | 36 | .hljs-string, 37 | .hljs-doctag { 38 | color: #d14; 39 | } 40 | 41 | .hljs-title, 42 | .hljs-section, 43 | .hljs-selector-id { 44 | color: #900; 45 | font-weight: bold; 46 | } 47 | 48 | .hljs-subst { 49 | font-weight: normal; 50 | } 51 | 52 | .hljs-type, 53 | .hljs-class .hljs-title { 54 | color: #458; 55 | font-weight: bold; 56 | } 57 | 58 | .hljs-tag, 59 | .hljs-name, 60 | .hljs-attribute { 61 | color: #000080; 62 | font-weight: normal; 63 | } 64 | 65 | .hljs-regexp, 66 | .hljs-link { 67 | color: #009926; 68 | } 69 | 70 | .hljs-symbol, 71 | .hljs-bullet { 72 | color: #990073; 73 | } 74 | 75 | .hljs-built_in, 76 | .hljs-builtin-name { 77 | color: #0086b3; 78 | } 79 | 80 | .hljs-meta { 81 | color: #999; 82 | font-weight: bold; 83 | } 84 | 85 | .hljs-deletion { 86 | background: #fdd; 87 | } 88 | 89 | .hljs-addition { 90 | background: #dfd; 91 | } 92 | 93 | .hljs-emphasis { 94 | font-style: italic; 95 | } 96 | 97 | .hljs-strong { 98 | font-weight: bold; 99 | } 100 | -------------------------------------------------------------------------------- /example/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 | -------------------------------------------------------------------------------- /example/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 | apply plugin: 'com.android.application' 15 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 16 | 17 | android { 18 | compileSdkVersion 28 19 | 20 | lintOptions { 21 | disable 'InvalidPackage' 22 | } 23 | 24 | defaultConfig { 25 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 26 | applicationId "com.codigopanda.example" 27 | minSdkVersion 16 28 | targetSdkVersion 28 29 | versionCode 1 30 | versionName "1.0" 31 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 32 | } 33 | 34 | buildTypes { 35 | release { 36 | // TODO: Add your own signing config for the release build. 37 | // Signing with the debug keys for now, so `flutter run --release` works. 38 | signingConfig signingConfigs.debug 39 | } 40 | } 41 | } 42 | 43 | flutter { 44 | source '../..' 45 | } 46 | 47 | dependencies { 48 | testImplementation 'junit:junit:4.12' 49 | androidTestImplementation 'com.android.support.test:runner:1.0.1' 50 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' 51 | } 52 | -------------------------------------------------------------------------------- /example/ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - audioplayers (0.0.1): 3 | - Flutter 4 | - Flutter (1.0.0) 5 | - flutter_plugin_android_lifecycle (0.0.1): 6 | - Flutter 7 | - image_picker (0.0.1): 8 | - Flutter 9 | - path_provider (0.0.1): 10 | - Flutter 11 | - path_provider_linux (0.0.1): 12 | - Flutter 13 | - path_provider_macos (0.0.1): 14 | - Flutter 15 | 16 | DEPENDENCIES: 17 | - audioplayers (from `.symlinks/plugins/audioplayers/ios`) 18 | - Flutter (from `Flutter`) 19 | - flutter_plugin_android_lifecycle (from `.symlinks/plugins/flutter_plugin_android_lifecycle/ios`) 20 | - image_picker (from `.symlinks/plugins/image_picker/ios`) 21 | - path_provider (from `.symlinks/plugins/path_provider/ios`) 22 | - path_provider_linux (from `.symlinks/plugins/path_provider_linux/ios`) 23 | - path_provider_macos (from `.symlinks/plugins/path_provider_macos/ios`) 24 | 25 | EXTERNAL SOURCES: 26 | audioplayers: 27 | :path: ".symlinks/plugins/audioplayers/ios" 28 | Flutter: 29 | :path: Flutter 30 | flutter_plugin_android_lifecycle: 31 | :path: ".symlinks/plugins/flutter_plugin_android_lifecycle/ios" 32 | image_picker: 33 | :path: ".symlinks/plugins/image_picker/ios" 34 | path_provider: 35 | :path: ".symlinks/plugins/path_provider/ios" 36 | path_provider_linux: 37 | :path: ".symlinks/plugins/path_provider_linux/ios" 38 | path_provider_macos: 39 | :path: ".symlinks/plugins/path_provider_macos/ios" 40 | 41 | SPEC CHECKSUMS: 42 | audioplayers: 84f968cea3f2deab00ec4f8ff53358b3c0b3992c 43 | Flutter: 0e3d915762c693b495b44d77113d4970485de6ec 44 | flutter_plugin_android_lifecycle: dc0b544e129eebb77a6bfb1239d4d1c673a60a35 45 | image_picker: 9c3312491f862b28d21ecd8fdf0ee14e601b3f09 46 | path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c 47 | path_provider_linux: 4d630dc393e1f20364f3e3b4a2ff41d9674a84e4 48 | path_provider_macos: f760a3c5b04357c380e2fddb6f9db6f3015897e0 49 | 50 | PODFILE CHECKSUM: c34e2287a9ccaa606aeceab922830efb9a6ff69a 51 | 52 | COCOAPODS: 1.7.5 53 | -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 10 | 15 | 19 | 26 | 30 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | charcode: 5 | dependency: transitive 6 | description: 7 | name: charcode 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "1.1.3" 11 | collection: 12 | dependency: transitive 13 | description: 14 | name: collection 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "1.14.12" 18 | http: 19 | dependency: "direct main" 20 | description: 21 | name: http 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "0.12.2" 25 | http_parser: 26 | dependency: "direct main" 27 | description: 28 | name: http_parser 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "3.1.4" 32 | meta: 33 | dependency: "direct main" 34 | description: 35 | name: meta 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.1.8" 39 | path: 40 | dependency: transitive 41 | description: 42 | name: path 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.6.4" 46 | pedantic: 47 | dependency: transitive 48 | description: 49 | name: pedantic 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.9.0" 53 | source_span: 54 | dependency: transitive 55 | description: 56 | name: source_span 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "1.7.0" 60 | string_scanner: 61 | dependency: transitive 62 | description: 63 | name: string_scanner 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "1.0.5" 67 | term_glyph: 68 | dependency: transitive 69 | description: 70 | name: term_glyph 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "1.1.0" 74 | typed_data: 75 | dependency: transitive 76 | description: 77 | name: typed_data 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "1.1.6" 81 | sdks: 82 | dart: ">=2.6.0 <3.0.0" 83 | -------------------------------------------------------------------------------- /example/.flutter-plugins-dependencies: -------------------------------------------------------------------------------- 1 | {"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"audioplayers","path":"/Users/rances/development/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.15.1/","dependencies":["path_provider"]},{"name":"image_picker","path":"/Users/rances/development/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.6.7+4/","dependencies":[]},{"name":"path_provider","path":"/Users/rances/development/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.11/","dependencies":[]}],"android":[{"name":"audioplayers","path":"/Users/rances/development/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.15.1/","dependencies":["path_provider"]},{"name":"flutter_plugin_android_lifecycle","path":"/Users/rances/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_plugin_android_lifecycle-1.0.8/","dependencies":[]},{"name":"image_picker","path":"/Users/rances/development/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.6.7+4/","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"path_provider","path":"/Users/rances/development/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.11/","dependencies":[]}],"macos":[{"name":"audioplayers","path":"/Users/rances/development/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.15.1/","dependencies":[]},{"name":"path_provider_macos","path":"/Users/rances/development/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4+3/","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/rances/development/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-0.0.1+2/","dependencies":[]}],"windows":[],"web":[{"name":"audioplayers","path":"/Users/rances/development/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.15.1/","dependencies":[]}]},"dependencyGraph":[{"name":"audioplayers","dependencies":["path_provider"]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"image_picker","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]}],"date_created":"2020-08-21 00:50:36.940192","version":"1.17.1"} -------------------------------------------------------------------------------- /example/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | example 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | arm64 32 | 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 | NSPhotoLibraryUsageDescription 49 | Can I use the PhotoLibrary please?NSMicrophoneUsageDescription 50 | Can I use the mic please? 51 | NSCameraUsageDescription 52 | Can I use camera please? 53 | NSAppTransportSecurity 54 | 55 | NSAllowsArbitraryLoads 56 | 57 | 58 | com.apple.security.network.client 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /example/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/services/textToSpeech.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'dart:typed_data'; 3 | import 'package:flutter_ibm_watson/utils/IamOptions.dart'; 4 | import 'package:meta/meta.dart'; 5 | import 'package:http/http.dart' as http; 6 | import 'dart:async'; 7 | import 'dart:io'; 8 | 9 | class Voice { 10 | String gender; 11 | dynamic supported_feature; 12 | String name; 13 | bool customizable; 14 | String description; 15 | String language; 16 | String url; 17 | 18 | Voice(Map data) { 19 | this.gender = data['gender']; 20 | this.supported_feature = data['supported_features']; 21 | this.name = data['name']; 22 | this.customizable = data['customizable']; 23 | this.description = data['description']; 24 | this.language = data['language']; 25 | this.url = data['url']; 26 | } 27 | } 28 | 29 | class TextToSpeech { 30 | String urlBase = "https://api.us-south.text-to-speech.watson.cloud.ibm.com"; 31 | String modelId; 32 | final String version; 33 | IamOptions iamOptions; 34 | String accept; 35 | String voice; 36 | 37 | TextToSpeech( 38 | {@required this.iamOptions, 39 | this.version = "2018-05-01", 40 | this.accept = "audio/mp3", 41 | this.voice = "en-US_AllisonV3Voice"}); 42 | 43 | void setVoice(String v) { 44 | this.voice = v; 45 | } 46 | 47 | String _getUrl(method, {param = ""}) { 48 | String url = iamOptions.url; 49 | if (iamOptions.url == "" || iamOptions.url == null) { 50 | url = urlBase; 51 | } 52 | return "$url/v1/$method$param"; 53 | } 54 | 55 | Future toSpeech(String text) async { 56 | String token = this.iamOptions.accessToken; 57 | var response = await http.post( 58 | _getUrl("synthesize", param: "?voice=$voice"), 59 | headers: { 60 | HttpHeaders.authorizationHeader: "Bearer $token", 61 | HttpHeaders.contentTypeHeader: "application/json", 62 | 'Accept': this.accept 63 | }, 64 | body: '{\"text\":\"$text\"}', 65 | ); 66 | return response.bodyBytes; 67 | } 68 | 69 | Future> getListVoices() async { 70 | String token = this.iamOptions.accessToken; 71 | var response = await http.get(_getUrl("voices"), headers: { 72 | HttpHeaders.authorizationHeader: "Bearer $token", 73 | HttpHeaders.contentTypeHeader: "application/json", 74 | HttpHeaders.acceptHeader: "application/json", 75 | }); 76 | List resp = []; 77 | if (response.statusCode == 200) { 78 | Map result = json.decode(utf8.decode(response.bodyBytes)); 79 | List data = result['voices']; 80 | for (Map d in data) { 81 | resp.add(new Voice(d)); 82 | } 83 | } 84 | return resp; 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /example/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /example/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 | -------------------------------------------------------------------------------- /doc/api/__404error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | flutter_ibm_watson - Dart API docs 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 |
23 | 26 |
flutter_ibm_watson
27 | 30 |
31 | 32 |
33 | 34 | 45 | 46 |
47 |

404: Something's gone wrong :-(

48 | 49 |
50 |

You've tried to visit a page that doesn't exist. Luckily this site 51 | has other pages.

52 |

If you were looking for something specific, try searching: 53 |

56 |

57 | 58 |
59 |
60 | 61 |
62 | 63 |
64 | 65 | flutter_ibm_watson 0.0.2 66 | 67 | 68 |
69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /example/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 parse_KV_file(file, separator='=') 14 | file_abs_path = File.expand_path(file) 15 | if !File.exists? file_abs_path 16 | return []; 17 | end 18 | generated_key_values = {} 19 | skip_line_start_symbols = ["#", "/"] 20 | File.foreach(file_abs_path) do |line| 21 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } 22 | plugin = line.split(pattern=separator) 23 | if plugin.length == 2 24 | podname = plugin[0].strip() 25 | path = plugin[1].strip() 26 | podpath = File.expand_path("#{path}", file_abs_path) 27 | generated_key_values[podname] = podpath 28 | else 29 | puts "Invalid plugin specification: #{line}" 30 | end 31 | end 32 | generated_key_values 33 | end 34 | 35 | target 'Runner' do 36 | use_frameworks! 37 | use_modular_headers! 38 | 39 | # Flutter Pod 40 | 41 | copied_flutter_dir = File.join(__dir__, 'Flutter') 42 | copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework') 43 | copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec') 44 | unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path) 45 | # Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet. 46 | # That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration. 47 | # CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist. 48 | 49 | generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig') 50 | unless File.exist?(generated_xcode_build_settings_path) 51 | raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first" 52 | end 53 | generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path) 54 | cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR']; 55 | 56 | unless File.exist?(copied_framework_path) 57 | FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir) 58 | end 59 | unless File.exist?(copied_podspec_path) 60 | FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir) 61 | end 62 | end 63 | 64 | # Keep pod path relative so it can be checked into Podfile.lock. 65 | pod 'Flutter', :path => 'Flutter' 66 | 67 | # Plugin Pods 68 | 69 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock 70 | # referring to absolute paths on developers' machines. 71 | system('rm -rf .symlinks') 72 | system('mkdir -p .symlinks/plugins') 73 | plugin_pods = parse_KV_file('../.flutter-plugins') 74 | plugin_pods.each do |name, path| 75 | symlink = File.join('.symlinks', 'plugins', name) 76 | File.symlink(path, symlink) 77 | pod name, :path => File.join(symlink, 'ios') 78 | end 79 | end 80 | 81 | post_install do |installer| 82 | installer.pods_project.targets.each do |target| 83 | target.build_configurations.each do |config| 84 | config.build_settings['ENABLE_BITCODE'] = 'NO' 85 | end 86 | end 87 | end 88 | -------------------------------------------------------------------------------- /example/lib/screenLanguageTranslator.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_ibm_watson/flutter_ibm_watson.dart'; 4 | 5 | class ScreenLanguageTranslator extends StatefulWidget { 6 | ScreenLanguageTranslator({Key key, this.title}) : super(key: key); 7 | final String title; 8 | 9 | @override 10 | _ScreenLanguageTranslator createState() => new _ScreenLanguageTranslator(); 11 | } 12 | 13 | class _ScreenLanguageTranslator extends State { 14 | IamOptions options; 15 | String text; 16 | String result = ""; 17 | 18 | Future getOptions() async { 19 | this.options = await IamOptions( 20 | iamApiKey: "fr8sBBKkjZidQJij6HWaetAWAvzfdXmSrKZoHGF8LB", 21 | url: 22 | "https://gateway-syd.watsonplatform.net/language-translator/api") 23 | .build(); 24 | print(this.options.accessToken); 25 | } 26 | 27 | void languageTranslator() async { 28 | //await getOptions(); 29 | LanguageTranslator service = 30 | new LanguageTranslator(iamOptions: this.options); 31 | TranslationResult translationResult = 32 | await service.translate(this.text, Language.ENGLISH, Language.SPANISH); 33 | print(translationResult); 34 | setState(() { 35 | this.result = translationResult.toString(); 36 | }); 37 | } 38 | 39 | void identifyLanguage() async { 40 | LanguageTranslator service = 41 | new LanguageTranslator(iamOptions: this.options); 42 | IdentifyLanguageResult identifyLanguageResult = await service 43 | .identifylanguage("You have pushed the button this many times:s"); 44 | print(identifyLanguageResult); 45 | setState(() { 46 | this.result = identifyLanguageResult.toString(); 47 | }); 48 | } 49 | 50 | @override 51 | void initState() { 52 | // TODO: implement initState 53 | getOptions(); 54 | super.initState(); 55 | } 56 | 57 | @override 58 | Widget build(BuildContext context) { 59 | return Scaffold( 60 | appBar: AppBar( 61 | title: Text("IBM Watson Language Translator"), 62 | ), 63 | body: new Column( 64 | mainAxisAlignment: MainAxisAlignment.center, 65 | children: [ 66 | new Container( 67 | margin: const EdgeInsets.all(10.0), 68 | child: new TextField( 69 | decoration: new InputDecoration( 70 | labelText: "Enter Text", 71 | ), 72 | onChanged: (String value) { 73 | this.text = value; 74 | }, 75 | ), 76 | ), 77 | new Container( 78 | margin: const EdgeInsets.all(10.0), 79 | child: new RaisedButton( 80 | child: const Text('Language Translator'), 81 | color: Theme.of(context).accentColor, 82 | elevation: 4.0, 83 | splashColor: Colors.blueGrey, 84 | textColor: Colors.white, 85 | onPressed: languageTranslator, 86 | ), 87 | ), 88 | new Container( 89 | margin: const EdgeInsets.all(10.0), 90 | child: new RaisedButton( 91 | child: const Text('Identify Language'), 92 | color: Theme.of(context).accentColor, 93 | elevation: 4.0, 94 | splashColor: Colors.blueGrey, 95 | textColor: Colors.white, 96 | onPressed: identifyLanguage, 97 | ), 98 | ), 99 | new Text("result: $result") 100 | ], 101 | ), 102 | ); 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 56 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 75 | 77 | 83 | 84 | 85 | 86 | 88 | 89 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /doc/api/utils_Language/utils_Language-library.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Language library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 |
24 | 25 | 29 |
Language
30 | 33 |
34 | 35 |
36 | 37 | 48 | 49 |
50 |

Language library

51 | 52 | 53 |
54 |

Classes

55 | 56 |
57 |
58 | Language 59 |
60 |
61 | 62 |
63 |
64 |
65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 |
73 | 74 | 87 | 88 |
89 | 90 |
91 | 92 | flutter_ibm_watson 0.0.2 93 | 94 | 95 |
96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /doc/api/utils_IamOptions/utils_IamOptions-library.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | IamOptions library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 |
24 | 25 | 29 |
IamOptions
30 | 33 |
34 | 35 |
36 | 37 | 48 | 49 |
50 |

IamOptions library

51 | 52 | 53 |
54 |

Classes

55 | 56 |
57 |
58 | IamOptions 59 |
60 |
61 | 62 |
63 |
64 |
65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 |
73 | 74 | 87 | 88 |
89 | 90 |
91 | 92 | flutter_ibm_watson 0.0.2 93 | 94 | 95 |
96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /example/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:io'; 3 | import 'package:example/screenLanguageTranslator.dart'; 4 | import 'package:example/screenTextToSpeech.dart'; 5 | import 'package:example/screenVisualRecognition.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:image_picker/image_picker.dart'; 8 | import 'package:flutter_ibm_watson/flutter_ibm_watson.dart'; 9 | 10 | void main() => runApp(new MyApp()); 11 | 12 | class MyApp extends StatelessWidget { 13 | @override 14 | Widget build(BuildContext context) { 15 | return new MaterialApp( 16 | title: 'Flutter Watson Demo', 17 | theme: new ThemeData( 18 | primarySwatch: Colors.blue, 19 | ), 20 | home: new MyHomePage(title: 'Flutter Watson Demo'), 21 | ); 22 | } 23 | } 24 | 25 | class MyHomePage extends StatefulWidget { 26 | MyHomePage({Key key, this.title}) : super(key: key); 27 | final String title; 28 | 29 | @override 30 | _MyHomePageState createState() => new _MyHomePageState(); 31 | } 32 | 33 | class _MyHomePageState extends State { 34 | @override 35 | Widget build(BuildContext context) { 36 | return new Scaffold( 37 | appBar: new AppBar( 38 | title: new Text(widget.title), 39 | ), 40 | body: new Center( 41 | child: new Column( 42 | mainAxisAlignment: MainAxisAlignment.center, 43 | children: [ 44 | new Container( 45 | margin: const EdgeInsets.all(10.0), 46 | child: new RaisedButton( 47 | child: const Text('Screen Language Translator'), 48 | color: Theme.of(context).accentColor, 49 | elevation: 4.0, 50 | splashColor: Colors.blueGrey, 51 | textColor: Colors.white, 52 | onPressed: () { 53 | Navigator.push( 54 | context, 55 | MaterialPageRoute( 56 | builder: (context) => ScreenLanguageTranslator()), 57 | ); 58 | }, 59 | ), 60 | ), 61 | new Container( 62 | margin: const EdgeInsets.all(10.0), 63 | child: new RaisedButton( 64 | child: const Text('Screen Visual Recognition'), 65 | color: Theme.of(context).accentColor, 66 | elevation: 4.0, 67 | splashColor: Colors.blueGrey, 68 | textColor: Colors.white, 69 | onPressed: () { 70 | Navigator.push( 71 | context, 72 | MaterialPageRoute( 73 | builder: (context) => ScreenVisualRecognition()), 74 | ); 75 | }, 76 | ), 77 | ), 78 | new Container( 79 | margin: const EdgeInsets.all(10.0), 80 | child: new RaisedButton( 81 | child: const Text('Text to Speech'), 82 | color: Theme.of(context).accentColor, 83 | elevation: 4.0, 84 | splashColor: Colors.blueGrey, 85 | textColor: Colors.white, 86 | onPressed: () { 87 | Navigator.push( 88 | context, 89 | MaterialPageRoute( 90 | builder: (context) => ScreenTextToSpeech()), 91 | ); 92 | }, 93 | ), 94 | ), 95 | ], 96 | ), 97 | ), 98 | floatingActionButton: new FloatingActionButton( 99 | onPressed: null, 100 | tooltip: 'Increment', 101 | child: new Icon(Icons.add), 102 | ), // This trailing comma makes auto-formatting nicer for build methods. 103 | ); 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /lib/language_translator/LanguageTranslator.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_ibm_watson/utils/IamOptions.dart'; 2 | import 'package:meta/meta.dart'; 3 | import 'package:http/http.dart' as http; 4 | import 'dart:async'; 5 | import 'dart:convert'; 6 | import 'dart:io'; 7 | 8 | class TranslationResult { 9 | int wordCount; 10 | int characterCount; 11 | dynamic translations; 12 | 13 | TranslationResult(Map result) { 14 | translations = result["translations"]; 15 | wordCount = result["word_count"]; 16 | characterCount = result["character_count"]; 17 | } 18 | 19 | String toString() { 20 | return translations[0]["translation"]; 21 | } 22 | 23 | int getWordCount() { 24 | return this.wordCount; 25 | } 26 | 27 | int getCharacterCount() { 28 | return this.translations; 29 | } 30 | } 31 | 32 | class ItemIdentifyLanguageResult { 33 | double confidence; 34 | String language; 35 | 36 | ItemIdentifyLanguageResult({this.confidence, this.language}); 37 | 38 | @override 39 | String toString() { 40 | // TODO: implement toString 41 | return json.encode({"language":this.language,"condidence":this.confidence}); 42 | } 43 | } 44 | 45 | class IdentifyLanguageResult { 46 | List _list; 47 | 48 | IdentifyLanguageResult() { 49 | this._list = new List(); 50 | } 51 | 52 | void add(ItemIdentifyLanguageResult item) { 53 | this._list.add(item); 54 | } 55 | 56 | String getLanguageProbability() { 57 | if (this._list.length < 1) { 58 | return ""; 59 | } 60 | return this._list.elementAt(0).language; 61 | } 62 | 63 | List getAllLanguageProbability() { 64 | return this._list; 65 | } 66 | 67 | @override 68 | String toString() { 69 | // TODO: implement toString 70 | return getLanguageProbability(); 71 | } 72 | } 73 | 74 | class LanguageTranslator { 75 | String urlBase = "https://gateway.watsonplatform.net/language-translator/api"; 76 | String modelId; 77 | final String version; 78 | IamOptions iamOptions; 79 | 80 | LanguageTranslator({ 81 | @required this.iamOptions, 82 | this.version = "2018-05-01", 83 | }); 84 | 85 | String _getUrl(method) { 86 | String url = iamOptions.url; 87 | if (iamOptions.url == "" || iamOptions.url == null) { 88 | url = urlBase; 89 | } 90 | return "$url/v3/$method?version=$version"; 91 | } 92 | 93 | Future translate( 94 | String text, String source, String target) async { 95 | String token = this.iamOptions.accessToken; 96 | modelId = source + "-" + target; 97 | var response = await http.post( 98 | _getUrl("translate"), 99 | headers: { 100 | HttpHeaders.authorizationHeader: "Bearer $token", 101 | HttpHeaders.acceptHeader: "application/json", 102 | HttpHeaders.contentTypeHeader: "application/json", 103 | }, 104 | body: '{\"text\":[\"$text\"],\"model_id\":\"$modelId\"}', 105 | ).timeout(const Duration(seconds: 360)); 106 | return new TranslationResult(json.decode(response.body)); 107 | } 108 | 109 | Future identifylanguage(String text) async { 110 | IdentifyLanguageResult identifyLanguageResult = 111 | new IdentifyLanguageResult(); 112 | String token = this.iamOptions.accessToken; 113 | var response = await http.post( 114 | _getUrl("identify"), 115 | headers: { 116 | HttpHeaders.authorizationHeader: "Bearer $token", 117 | HttpHeaders.acceptHeader: "application/json", 118 | HttpHeaders.contentTypeHeader: "text/plain", 119 | }, 120 | body: text, 121 | ).timeout(const Duration(seconds: 360)); 122 | Map result = json.decode(response.body); 123 | dynamic languages = result["languages"]; 124 | List listLanguages = languages; 125 | for (int i = 0; i < listLanguages.length; i++) { 126 | Map language = listLanguages[0]; 127 | identifyLanguageResult.add(new ItemIdentifyLanguageResult( 128 | confidence: language["confidence"], language: language["language"])); 129 | } 130 | return identifyLanguageResult; 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /lib/utils/Language.dart: -------------------------------------------------------------------------------- 1 | class Language { 2 | /** Afrikaans. */ 3 | static String AFRIKAANS = "af"; 4 | 5 | /** Arabic. */ 6 | static String ARABIC = "ar"; 7 | 8 | /** Azerbaijani. */ 9 | static String AZERBAIJANI = "az"; 10 | 11 | /** Bashkir. */ 12 | static String BASHKIR = "ba"; 13 | 14 | /** Belarusian. */ 15 | static String BELARUSIAN = "be"; 16 | 17 | /** Bulgarian. */ 18 | static String BULGARIAN = "bg"; 19 | 20 | /** Bengali. */ 21 | static String BENGALI = "bn"; 22 | 23 | /** Bosnian. */ 24 | static String BOSNIAN = "bs"; 25 | 26 | /** Czech. */ 27 | static String CZECH = "cs"; 28 | 29 | /** Chuvash. */ 30 | static String CHUVASH = "cv"; 31 | 32 | /** Danish. */ 33 | static String DANISH = "da"; 34 | 35 | /** German. */ 36 | static String GERMAN = "de"; 37 | 38 | /** Greek. */ 39 | static String GREEK = "el"; 40 | 41 | /** English. */ 42 | static String ENGLISH = "en"; 43 | 44 | /** Esperanto. */ 45 | static String ESPERANTO = "eo"; 46 | 47 | /** Spanish. */ 48 | static String SPANISH = "es"; 49 | 50 | /** Estonian. */ 51 | static String ESTONIAN = "et"; 52 | 53 | /** Basque. */ 54 | static String BASQUE = "eu"; 55 | 56 | /** Persian. */ 57 | static String PERSIAN = "fa"; 58 | 59 | /** Finnish. */ 60 | static String FINNISH = "fi"; 61 | 62 | /** French. */ 63 | static String FRENCH = "fr"; 64 | 65 | /** Gujarati. */ 66 | static String GUJARATI = "gu"; 67 | 68 | /** Hebrew. */ 69 | static String HEBREW = "he"; 70 | 71 | /** Hindi. */ 72 | static String HINDI = "hi"; 73 | 74 | /** Haitian. */ 75 | static String HAITIAN = "ht"; 76 | 77 | /** Hungarian. */ 78 | static String HUNGARIAN = "hu"; 79 | 80 | /** Armenian. */ 81 | static String ARMENIAN = "hy"; 82 | 83 | /** Indonesian. */ 84 | static String INDONESIAN = "id"; 85 | 86 | /** Icelandic. */ 87 | static String ICELANDIC = "is"; 88 | 89 | /** Italian. */ 90 | static String ITALIAN = "it"; 91 | 92 | /** Japanese. */ 93 | static String JAPANESE = "ja"; 94 | 95 | /** Georgian. */ 96 | static String GEORGIAN = "ka"; 97 | 98 | /** Kazakh. */ 99 | static String KAZAKH = "kk"; 100 | 101 | /** Central Khmer. */ 102 | static String CENTRAL_KHMER = "km"; 103 | 104 | /** Korean. */ 105 | static String KOREAN = "ko"; 106 | 107 | /** Kurdish. */ 108 | static String KURDISH = "ku"; 109 | 110 | /** Kirghiz. */ 111 | static String KIRGHIZ = "ky"; 112 | 113 | /** Lithuanian. */ 114 | static String LITHUANIAN = "lt"; 115 | 116 | /** Latvian. */ 117 | static String LATVIAN = "lv"; 118 | 119 | /** Malayalam. */ 120 | static String MALAYALAM = "ml"; 121 | 122 | /** Mongolian. */ 123 | static String MONGOLIAN = "mn"; 124 | 125 | /** Norwegian Bokmal. */ 126 | static String NORWEGIAN_BOKMAL = "nb"; 127 | 128 | /** Dutch. */ 129 | static String DUTCH = "nl"; 130 | 131 | /** Norwegian Nynorsk. */ 132 | static String NORWEGIAN_NYNORSK = "nn"; 133 | 134 | /** Panjabi. */ 135 | static String PANJABI = "pa"; 136 | 137 | /** Polish. */ 138 | static String POLISH = "pl"; 139 | 140 | /** Pushto. */ 141 | static String PUSHTO = "ps"; 142 | 143 | /** Portuguese. */ 144 | static String PORTUGUESE = "pt"; 145 | 146 | /** Romanian. */ 147 | static String ROMANIAN = "ro"; 148 | 149 | /** Russian. */ 150 | static String RUSSIAN = "ru"; 151 | 152 | /** Slovakian. */ 153 | static String SLOVAKIAN = "sk"; 154 | 155 | /** Somali. */ 156 | static String SOMALI = "so"; 157 | 158 | /** Albanian. */ 159 | static String ALBANIAN = "sq"; 160 | 161 | /** Swedish. */ 162 | static String SWEDISH = "sv"; 163 | 164 | /** Tamil. */ 165 | static String TAMIL = "ta"; 166 | 167 | /** Telugu. */ 168 | static String TELUGU = "te"; 169 | 170 | /** Turkish. */ 171 | static String TURKISH = "tr"; 172 | 173 | /** Ukrainian. */ 174 | static String UKRAINIAN = "uk"; 175 | 176 | /** Urdu. */ 177 | static String URDU = "ur"; 178 | 179 | /** Vietnamese. */ 180 | static String VIETNAMESE = "vi"; 181 | 182 | /** Chinese. */ 183 | static String CHINESE = "zh"; 184 | 185 | /** Traditional Chinese. */ 186 | static String TRADITIONAL_CHINESE = "zh-TW"; 187 | } 188 | -------------------------------------------------------------------------------- /doc/api/flutter_ibm_watson/ItemIdentifyLanguageResult/language.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | language property - ItemIdentifyLanguageResult class - flutter_ibm_watson library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 |
24 | 25 | 31 |
language
32 | 35 |
36 | 37 |
38 | 39 | 64 | 65 |
66 |

language property

67 | 68 |
69 | String 70 | language 71 |
read / write
72 |
73 |
74 |

Implementation

75 |
String language
 76 | 
 77 | 
78 |
79 | 80 |
81 | 82 | 84 | 85 |
86 | 87 |
88 | 89 | flutter_ibm_watson 0.0.2 90 | 91 | 92 |
93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /doc/api/flutter_ibm_watson/ItemIdentifyLanguageResult/confidence.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | confidence property - ItemIdentifyLanguageResult class - flutter_ibm_watson library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 |
24 | 25 | 31 |
confidence
32 | 35 |
36 | 37 |
38 | 39 | 64 | 65 |
66 |

confidence property

67 | 68 |
69 | double 70 | confidence 71 |
read / write
72 |
73 |
74 |

Implementation

75 |
double confidence
 76 | 
 77 | 
78 |
79 | 80 |
81 | 82 | 84 | 85 |
86 | 87 |
88 | 89 | flutter_ibm_watson 0.0.2 90 | 91 | 92 |
93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /doc/api/flutter_ibm_watson/TranslationResult/getWordCount.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | getWordCount method - TranslationResult class - flutter_ibm_watson library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 |
24 | 25 | 31 |
getWordCount
32 | 35 |
36 | 37 |
38 | 39 | 67 | 68 |
69 |

getWordCount method

70 | 71 |
72 | int 73 | getWordCount 74 | () 75 |
76 | 77 |
78 |

Implementation

79 |
int getWordCount() {
 80 |   return this.wordCount;
 81 | }
82 |
83 | 84 |
85 | 86 | 88 | 89 |
90 | 91 |
92 | 93 | flutter_ibm_watson 0.0.2 94 | 95 | 96 |
97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /doc/api/flutter_ibm_watson/TranslationResult/wordCount.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | wordCount property - TranslationResult class - flutter_ibm_watson library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 |
24 | 25 | 31 |
wordCount
32 | 35 |
36 | 37 |
38 | 39 | 67 | 68 |
69 |

wordCount property

70 | 71 |
72 | int 73 | wordCount 74 |
read / write
75 |
76 |
77 |

Implementation

78 |
int wordCount
 79 | 
 80 | 
81 |
82 | 83 |
84 | 85 | 87 | 88 |
89 | 90 |
91 | 92 | flutter_ibm_watson 0.0.2 93 | 94 | 95 |
96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /doc/api/flutter_ibm_watson/TranslationResult/getCharacterCount.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | getCharacterCount method - TranslationResult class - flutter_ibm_watson library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 |
24 | 25 | 31 |
getCharacterCount
32 | 35 |
36 | 37 |
38 | 39 | 67 | 68 |
69 |

getCharacterCount method

70 | 71 |
72 | int 73 | getCharacterCount 74 | () 75 |
76 | 77 |
78 |

Implementation

79 |
int getCharacterCount() {
 80 |   return this.translations;
 81 | }
82 |
83 | 84 |
85 | 86 | 88 | 89 |
90 | 91 |
92 | 93 | flutter_ibm_watson 0.0.2 94 | 95 | 96 |
97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /doc/api/visual-recognition_VisualRecognition/ClassResult/score.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | score property - ClassResult class - VisualRecognition library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 |
24 | 25 | 31 |
score
32 | 35 |
36 | 37 |
38 | 39 | 66 | 67 |
68 |

score property

69 | 70 |
71 | double 72 | score 73 |
read / write
74 |
75 |
76 |

Implementation

77 |
double score
 78 | 
 79 | 
80 |
81 | 82 |
83 | 84 | 86 | 87 |
88 | 89 |
90 | 91 | flutter_ibm_watson 0.0.2 92 | 93 | 94 |
95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /doc/api/flutter_ibm_watson/TranslationResult/translations.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | translations property - TranslationResult class - flutter_ibm_watson library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 |
24 | 25 | 31 |
translations
32 | 35 |
36 | 37 |
38 | 39 | 67 | 68 |
69 |

translations property

70 | 71 |
72 | dynamic 73 | translations 74 |
read / write
75 |
76 |
77 |

Implementation

78 |
dynamic translations
 79 | 
 80 | 
81 |
82 | 83 |
84 | 85 | 87 | 88 |
89 | 90 |
91 | 92 | flutter_ibm_watson 0.0.2 93 | 94 | 95 |
96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /doc/api/flutter_ibm_watson/ItemIdentifyLanguageResult/runtimeType.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | runtimeType property - ItemIdentifyLanguageResult class - flutter_ibm_watson library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 |
24 | 25 | 31 |
runtimeType
32 | 35 |
36 | 37 |
38 | 39 | 64 | 65 |
66 |

runtimeType property

67 | 68 | 69 |
70 | 71 |
72 | Type 73 | runtimeType 74 |
inherited
75 |
76 | 77 |
78 |

A representation of the runtime type of the object.

79 |
80 |
81 |

Implementation

82 |
external Type get runtimeType;
83 |
84 |
85 | 86 |
87 | 88 | 90 | 91 |
92 | 93 |
94 | 95 | flutter_ibm_watson 0.0.2 96 | 97 | 98 |
99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /doc/api/flutter_ibm_watson/TranslationResult/characterCount.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | characterCount property - TranslationResult class - flutter_ibm_watson library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 |
24 | 25 | 31 |
characterCount
32 | 35 |
36 | 37 |
38 | 39 | 67 | 68 |
69 |

characterCount property

70 | 71 |
72 | int 73 | characterCount 74 |
read / write
75 |
76 |
77 |

Implementation

78 |
int characterCount
 79 | 
 80 | 
81 |
82 | 83 |
84 | 85 | 87 | 88 |
89 | 90 |
91 | 92 | flutter_ibm_watson 0.0.2 93 | 94 | 95 |
96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /doc/api/flutter_ibm_watson/IdentifyLanguageResult/IdentifyLanguageResult.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | IdentifyLanguageResult constructor - IdentifyLanguageResult class - flutter_ibm_watson library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 |
24 | 25 | 31 |
IdentifyLanguageResult
32 | 35 |
36 | 37 |
38 | 39 | 65 | 66 |
67 |

IdentifyLanguageResult constructor

68 | 69 |
70 | 71 | IdentifyLanguageResult() 72 |
73 | 74 | 75 |
76 |

Implementation

77 |
IdentifyLanguageResult() {
 78 |   this._list = new List<ItemIdentifyLanguageResult>();
 79 | }
80 |
81 | 82 |
83 | 84 | 86 | 87 |
88 | 89 |
90 | 91 | flutter_ibm_watson 0.0.2 92 | 93 | 94 |
95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /doc/api/visual-recognition_VisualRecognition/ClassResult/className.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | className property - ClassResult class - VisualRecognition library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 |
24 | 25 | 31 |
className
32 | 35 |
36 | 37 |
38 | 39 | 66 | 67 |
68 |

className property

69 | 70 |
71 | String 72 | className 73 |
read / write
74 |
75 |
76 |

Implementation

77 |
String className
 78 | 
 79 | 
80 |
81 | 82 |
83 | 84 | 86 | 87 |
88 | 89 |
90 | 91 | flutter_ibm_watson 0.0.2 92 | 93 | 94 |
95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /doc/api/utils_IamOptions/IamOptions/url.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | url property - IamOptions class - IamOptions library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 |
24 | 25 | 31 |
url
32 | 35 |
36 | 37 |
38 | 39 | 71 | 72 |
73 |

url property

74 | 75 |
76 | String 77 | url 78 |
read / write
79 |
80 |
81 |

Implementation

82 |
String url
 83 | 
 84 | 
85 |
86 | 87 |
88 | 89 | 91 | 92 |
93 | 94 |
95 | 96 | flutter_ibm_watson 0.0.2 97 | 98 | 99 |
100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /doc/api/utils_IamOptions/IamOptions/scope.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | scope property - IamOptions class - IamOptions library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 |
24 | 25 | 31 |
scope
32 | 35 |
36 | 37 |
38 | 39 | 71 | 72 |
73 |

scope property

74 | 75 |
76 | String 77 | scope 78 |
read / write
79 |
80 |
81 |

Implementation

82 |
String scope
 83 | 
 84 | 
85 |
86 | 87 |
88 | 89 | 91 | 92 |
93 | 94 |
95 | 96 | flutter_ibm_watson 0.0.2 97 | 98 | 99 |
100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /doc/api/flutter_ibm_watson/IdentifyLanguageResult/add.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | add method - IdentifyLanguageResult class - flutter_ibm_watson library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 |
24 | 25 | 31 |
add
32 | 35 |
36 | 37 |
38 | 39 | 65 | 66 |
67 |

add method

68 | 69 |
70 | void 71 | add 72 | (ItemIdentifyLanguageResult item) 73 |
74 | 75 |
76 |

Implementation

77 |
void add(ItemIdentifyLanguageResult item) {
 78 |   this._list.add(item);
 79 | }
80 |
81 | 82 |
83 | 84 | 86 | 87 |
88 | 89 |
90 | 91 | flutter_ibm_watson 0.0.2 92 | 93 | 94 |
95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /doc/api/flutter_ibm_watson/IdentifyLanguageResult/getLanguageProbability.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | getLanguageProbability method - IdentifyLanguageResult class - flutter_ibm_watson library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 |
24 | 25 | 31 |
getLanguageProbability
32 | 35 |
36 | 37 |
38 | 39 | 65 | 66 |
67 |

getLanguageProbability method

68 | 69 |
70 | String 71 | getLanguageProbability 72 | () 73 |
74 | 75 |
76 |

Implementation

77 |
String getLanguageProbability() {
 78 |   if (this._list.length < 1) {
 79 |     return "";
 80 |   }
 81 |   return this._list.elementAt(0).language;
 82 | }
83 |
84 | 85 |
86 | 87 | 89 | 90 |
91 | 92 |
93 | 94 | flutter_ibm_watson 0.0.2 95 | 96 | 97 |
98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /doc/api/visual-recognition_VisualRecognition/ClassResult/typeHierarchy.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | typeHierarchy property - ClassResult class - VisualRecognition library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 |
24 | 25 | 31 |
typeHierarchy
32 | 35 |
36 | 37 |
38 | 39 | 66 | 67 |
68 |

typeHierarchy property

69 | 70 |
71 | String 72 | typeHierarchy 73 |
read / write
74 |
75 |
76 |

Implementation

77 |
String typeHierarchy
 78 | 
 79 | 
80 |
81 | 82 |
83 | 84 | 86 | 87 |
88 | 89 |
90 | 91 | flutter_ibm_watson 0.0.2 92 | 93 | 94 |
95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /doc/api/flutter_ibm_watson/LanguageTranslator/modelId.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | modelId property - LanguageTranslator class - flutter_ibm_watson library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 |
24 | 25 | 31 |
modelId
32 | 35 |
36 | 37 |
38 | 39 | 68 | 69 |
70 |

modelId property

71 | 72 |
73 | String 74 | modelId 75 |
read / write
76 |
77 |
78 |

Implementation

79 |
String modelId
 80 | 
 81 | 
82 |
83 | 84 |
85 | 86 | 88 | 89 |
90 | 91 |
92 | 93 | flutter_ibm_watson 0.0.2 94 | 95 | 96 |
97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /doc/api/flutter_ibm_watson/LanguageTranslator/version.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | version property - LanguageTranslator class - flutter_ibm_watson library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 |
24 | 25 | 31 |
version
32 | 35 |
36 | 37 |
38 | 39 | 68 | 69 |
70 |

version property

71 | 72 |
73 | String 74 | version 75 |
final
76 |
77 |
78 |

Implementation

79 |
final String version
 80 | 
 81 | 
82 |
83 | 84 |
85 | 86 | 88 | 89 |
90 | 91 |
92 | 93 | flutter_ibm_watson 0.0.2 94 | 95 | 96 |
97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /doc/api/visual-recognition_VisualRecognition/ClassifierResult/getClassifierId.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | getClassifierId method - ClassifierResult class - VisualRecognition library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 |
24 | 25 | 31 |
getClassifierId
32 | 35 |
36 | 37 |
38 | 39 | 65 | 66 |
67 |

getClassifierId method

68 | 69 |
70 | String 71 | getClassifierId 72 | () 73 |
74 | 75 |
76 |

Implementation

77 |
String getClassifierId() {
 78 |   return this._classifierId;
 79 | }
80 |
81 | 82 |
83 | 84 | 86 | 87 |
88 | 89 |
90 | 91 | flutter_ibm_watson 0.0.2 92 | 93 | 94 |
95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /doc/api/flutter_ibm_watson/TranslationResult/toString.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | toString method - TranslationResult class - flutter_ibm_watson library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 |
24 | 25 | 31 |
toString
32 | 35 |
36 | 37 |
38 | 39 | 67 | 68 |
69 |

toString method

70 | 71 |
72 | String 73 | toString 74 | () 75 |
76 |
77 |

Returns a string representation of this object.

78 |
79 | 80 |
81 |

Implementation

82 |
String toString() {
 83 |   return translations[0]["translation"];
 84 | }
85 |
86 | 87 |
88 | 89 | 91 | 92 |
93 | 94 |
95 | 96 | flutter_ibm_watson 0.0.2 97 | 98 | 99 |
100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /doc/api/utils_IamOptions/IamOptions/expiresIn.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | expiresIn property - IamOptions class - IamOptions library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 |
24 | 25 | 31 |
expiresIn
32 | 35 |
36 | 37 |
38 | 39 | 71 | 72 |
73 |

expiresIn property

74 | 75 |
76 | int 77 | expiresIn 78 |
read / write
79 |
80 |
81 |

Implementation

82 |
int expiresIn
 83 | 
 84 | 
85 |
86 | 87 |
88 | 89 | 91 | 92 |
93 | 94 |
95 | 96 | flutter_ibm_watson 0.0.2 97 | 98 | 99 |
100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /doc/api/visual-recognition_VisualRecognition/ClassifiedImages/customClasses.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | customClasses property - ClassifiedImages class - VisualRecognition library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 |
24 | 25 | 31 |
customClasses
32 | 35 |
36 | 37 |
38 | 39 | 65 | 66 |
67 |

customClasses property

68 | 69 |
70 | int 71 | customClasses 72 |
read / write
73 |
74 |
75 |

Implementation

76 |
int customClasses
 77 | 
 78 | 
79 |
80 | 81 |
82 | 83 | 85 | 86 |
87 | 88 |
89 | 90 | flutter_ibm_watson 0.0.2 91 | 92 | 93 |
94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /doc/api/utils_IamOptions/IamOptions/iamApiKey.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | iamApiKey property - IamOptions class - IamOptions library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 |
24 | 25 | 31 |
iamApiKey
32 | 35 |
36 | 37 |
38 | 39 | 71 | 72 |
73 |

iamApiKey property

74 | 75 |
76 | String 77 | iamApiKey 78 |
read / write
79 |
80 |
81 |

Implementation

82 |
String iamApiKey
 83 | 
 84 | 
85 |
86 | 87 |
88 | 89 | 91 | 92 |
93 | 94 |
95 | 96 | flutter_ibm_watson 0.0.2 97 | 98 | 99 |
100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /doc/api/utils_IamOptions/IamOptions/tokenType.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | tokenType property - IamOptions class - IamOptions library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 |
24 | 25 | 31 |
tokenType
32 | 35 |
36 | 37 |
38 | 39 | 71 | 72 |
73 |

tokenType property

74 | 75 |
76 | String 77 | tokenType 78 |
read / write
79 |
80 |
81 |

Implementation

82 |
String tokenType
 83 | 
 84 | 
85 |
86 | 87 |
88 | 89 | 91 | 92 |
93 | 94 |
95 | 96 | flutter_ibm_watson 0.0.2 97 | 98 | 99 |
100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /doc/api/visual-recognition_VisualRecognition/ClassifierResult/getClassifierName.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | getClassifierName method - ClassifierResult class - VisualRecognition library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 |
24 | 25 | 31 |
getClassifierName
32 | 35 |
36 | 37 |
38 | 39 | 65 | 66 |
67 |

getClassifierName method

68 | 69 |
70 | String 71 | getClassifierName 72 | () 73 |
74 | 75 |
76 |

Implementation

77 |
String getClassifierName() {
 78 |   return this._name;
 79 | }
80 |
81 | 82 |
83 | 84 | 86 | 87 |
88 | 89 |
90 | 91 | flutter_ibm_watson 0.0.2 92 | 93 | 94 |
95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /doc/api/utils_IamOptions/IamOptions/expiration.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | expiration property - IamOptions class - IamOptions library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 |
24 | 25 | 31 |
expiration
32 | 35 |
36 | 37 |
38 | 39 | 71 | 72 |
73 |

expiration property

74 | 75 |
76 | int 77 | expiration 78 |
read / write
79 |
80 |
81 |

Implementation

82 |
int expiration
 83 | 
 84 | 
85 |
86 | 87 |
88 | 89 | 91 | 92 |
93 | 94 |
95 | 96 | flutter_ibm_watson 0.0.2 97 | 98 | 99 |
100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | --------------------------------------------------------------------------------