RuntimeList.fromMap constructor

RuntimeList.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory RuntimeList.fromMap(
  Map<String, dynamic> map,
) {
  map = {
    'total': 0,
    'runtimes': [],
    ...map,
  };

  return RuntimeList(
    total: map['total'],
    runtimes: List<Runtime>.from(
      map['runtimes'].map((p) => Runtime.fromMap(p)),
    ),
  );
}