TimePoint.fromJson constructor

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

Creates a TimePoint from a JSON representation.

Parameters:

  • json: The JSON map containing height and index

Returns: A TimePoint instance reconstructed from the JSON data.

Throws:

  • TypeError if height or index are not integers

Implementation

factory TimePoint.fromJson(final Map<String, dynamic> json) {
  return TimePoint(height: json['height'] as int, index: json['index'] as int);
}