accountSubtypeListFromJson function

List<AccountSubtype> accountSubtypeListFromJson(
  1. List? accountSubtype, [
  2. List<AccountSubtype>? defaultValue
])

Implementation

List<enums.AccountSubtype> accountSubtypeListFromJson(
  List? accountSubtype, [
  List<enums.AccountSubtype>? defaultValue,
]) {
  if (accountSubtype == null) {
    return defaultValue ?? [];
  }

  return accountSubtype
      .map((e) => accountSubtypeFromJson(e.toString()))
      .toList();
}