investmentTransactionTypeListFromJson function

List<InvestmentTransactionType> investmentTransactionTypeListFromJson(
  1. List? investmentTransactionType,
  2. [List<InvestmentTransactionType>? defaultValue]
)

Implementation

List<enums.InvestmentTransactionType> investmentTransactionTypeListFromJson(
  List? investmentTransactionType, [
  List<enums.InvestmentTransactionType>? defaultValue,
]) {
  if (investmentTransactionType == null) {
    return defaultValue ?? [];
  }

  return investmentTransactionType
      .map((e) => investmentTransactionTypeFromJson(e.toString()))
      .toList();
}