AppStoreVersionAttributes.fromMap constructor Null safety
- Map map
The attributes of a version of an app in the App Store Connect API.
Implementation
factory AppStoreVersionAttributes.fromMap(Map<dynamic, dynamic> map) {
map = map.cast<String, dynamic>();
return AppStoreVersionAttributes(
platform: map['platform'] as String?,
versionString: (map['versionString'] ?? map['version']) as String?,
appStoreState: map['appStoreState'] as String?,
copyright: map['copyright'] as String?,
releaseType:
AppStoreVersionReleaseType.fromString(map['releaseType'] as String?),
earliestReleaseDate:
DateTime.tryParse(map['earliestReleaseDate'] as String? ?? ''),
downloadable: map['downloadable'] as bool?,
createdDate: DateTime.tryParse(map['createdDate'] as String? ?? ''),
);
}