fromMap static method

UIImage? fromMap(
  1. Map<String, dynamic>? map, {
  2. EnumMethod? enumMethod,
})

Gets a possible UIImage instance from a Map value.

Implementation

static UIImage? fromMap(Map<String, dynamic>? map, {EnumMethod? enumMethod}) {
  if (map == null) {
    return null;
  }
  final instance = UIImage(
    data: map['data'] != null
        ? Uint8List.fromList(map['data'].cast<int>())
        : null,
    name: map['name'],
    systemName: map['systemName'],
  );
  return instance;
}