AppVersionData.fromJSON constructor

AppVersionData.fromJSON(
  1. Map<String, dynamic> json
)

Implementation

factory AppVersionData.fromJSON(Map<String, dynamic> json) {
  final playstore = json['playstore'] as String?;
  final appstore = json['appstore'] as String?;
  final meta =
      AppVersionMetadata.fromJSON(json['meta'] as Map<String, dynamic>);
  final errors = (json['errors'] as List<dynamic>)
      .map((e) => PeekanappError.fromJSON(e as Map<String, dynamic>))
      .toList();

  return AppVersionData(
    playstore: playstore,
    appstore: appstore,
    meta: meta,
    errors: errors,
  );
}