Emotion.fromJson constructor

Emotion.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory Emotion.fromJson(Map<String, dynamic> json) {
  return Emotion(
    confidence: json['Confidence'] as double?,
    type: (json['Type'] as String?)?.toEmotionName(),
  );
}