readErrorMappingFromJson static method

List<NUIErrorMapping>? readErrorMappingFromJson({
  1. required String value,
  2. String json = "defaultvalue",
})

Implementation

static List<NUIErrorMapping>? readErrorMappingFromJson({required String value, String json = "defaultvalue"}){
  try {
    final endValue = jsonDecode(json);
    List<NUIErrorMapping> list = (endValue as List).map((i) => NUIErrorMappingEntity().toEntity(i)).toList();
   return list;
  }catch(e){
    return null;
  }
}