AppStoreBuild.fromMap constructor Null safety

AppStoreBuild.fromMap(
  1. Map map
)

An image asset, including its height, width, and template URL.

Implementation

factory AppStoreBuild.fromMap(Map<dynamic, dynamic> map) {
  map = map.cast<String, dynamic>();

  return AppStoreBuild(
    type: map['type'] as String?,
    id: map['id'] as String?,
    attributes: map['attributes'] == null
        ? null
        : AppStoreBuildAttributes.fromMap(map['attributes'] as Map? ?? {}),
  );
}