strategyListFromJson function

List<Strategy> strategyListFromJson(
  1. List? strategy, [
  2. List<Strategy>? defaultValue
])

Implementation

List<enums.Strategy> strategyListFromJson(
  List? strategy, [
  List<enums.Strategy>? defaultValue,
]) {
  if (strategy == null) {
    return defaultValue ?? [];
  }

  return strategy.map((e) => strategyFromJson(e.toString())).toList();
}