hubCommandTypeNullableListFromJson function

List<HubCommandType>? hubCommandTypeNullableListFromJson(
  1. List? hubCommandType, [
  2. List<HubCommandType>? defaultValue
])

Implementation

List<enums.HubCommandType>? hubCommandTypeNullableListFromJson(
  List? hubCommandType, [
  List<enums.HubCommandType>? defaultValue,
]) {
  if (hubCommandType == null) {
    return defaultValue;
  }

  return hubCommandType
      .map((e) => hubCommandTypeFromJson(e.toString()))
      .toList();
}