magicSchoolIndexNullableListFromJson function

List<MagicSchoolIndex>? magicSchoolIndexNullableListFromJson(
  1. List? magicSchoolIndex, [
  2. List<MagicSchoolIndex>? defaultValue
])

Implementation

List<enums.MagicSchoolIndex>? magicSchoolIndexNullableListFromJson(
  List? magicSchoolIndex, [
  List<enums.MagicSchoolIndex>? defaultValue,
]) {
  if (magicSchoolIndex == null) {
    return defaultValue;
  }

  return magicSchoolIndex
      .map((e) => magicSchoolIndexFromJson(e.toString()))
      .toList();
}