widgetExpandableListFromJson function

List<WidgetExpandable> widgetExpandableListFromJson(
  1. List? widgetExpandable, [
  2. List<WidgetExpandable>? defaultValue
])

Implementation

List<enums.WidgetExpandable> widgetExpandableListFromJson(
  List? widgetExpandable, [
  List<enums.WidgetExpandable>? defaultValue,
]) {
  if (widgetExpandable == null) {
    return defaultValue ?? [];
  }

  return widgetExpandable
      .map((e) => widgetExpandableFromJson(e.toString()))
      .toList();
}