DetectionResult.fromJson constructor
DetectionResult.fromJson(
- Map<String, dynamic> json
)
Implementation
factory DetectionResult.fromJson(Map<String, dynamic> json) =>
DetectionResult(
text: json['text'],
language: json['language'],
score: json['score'],
translationSupported: json['isTranslationSupported'],
transliterationSupported: json['isTransliterationSupported'],
alternatives: json.containsKey('alternatives')
? List<DetectionResult>.from(
json['alternatives'].map(DetectionAlternative.fromJson))
: null,
);