Activity.fromJson constructor

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

Implementation

factory Activity.fromJson(Map<String, dynamic> json) {
  final ActivityType type = ActivityType.fromString(json['type']);
  final ActivityConfidence confidence =
      ActivityConfidence.fromString(json['confidence']);

  return Activity(type, confidence);
}