fromListJson static method

List<HexColor>? fromListJson(
  1. List listJson
)

Implementation

static List<HexColor>? fromListJson(List listJson) {
  try {
    final listColor = listJson.map((e) {
      // ignore: avoid_as
      return HexColor.fromJson(e as String);
      // ignore: avoid_as
    }).toList();

    // ignore: avoid_as
    return listColor;
  } catch (e, trace) {
    printLog(e);
    printLog(trace);
    return [];
  }
}