getLanguageHypotheses method

  1. @override
Future<Map<String, double>> getLanguageHypotheses(
  1. String text,
  2. int withMaximum
)
override

Implementation

@override
Future<Map<String, double>> getLanguageHypotheses(
    String text, int withMaximum) async {
  final result =
      await methodChannel.invokeMethod<String>('getLanguageHypotheses', {
            "text": text,
            "withMaximum": withMaximum,
          }) ??
          "";
  final decode = json.decode(result) as Map<String, dynamic>;
  final map = Map<String, double>.from(decode);
  return map;
}