AppStorePreReleaseVersion.fromMap constructor Null safety

AppStorePreReleaseVersion.fromMap(
  1. Map map
)

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

Implementation

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

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