RunStepList.fromJson constructor

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

Creates a RunStepList from JSON.

Implementation

factory RunStepList.fromJson(Map<String, dynamic> json) {
  return RunStepList(
    object: json['object'] as String,
    data: (json['data'] as List<dynamic>)
        .map((e) => RunStep.fromJson(e as Map<String, dynamic>))
        .toList(),
    firstId: json['first_id'] as String?,
    lastId: json['last_id'] as String?,
    hasMore: json['has_more'] as bool,
  );
}