ServerStorageVersion.fromJson constructor

ServerStorageVersion.fromJson(
  1. Map<String, dynamic> json
)

Creates a ServerStorageVersion from JSON data.

Implementation

factory ServerStorageVersion.fromJson(Map<String, dynamic> json) {
  final tempApiServerIDJson = json['apiServerID'];
  final tempDecodableVersionsJson = json['decodableVersions'];
  final tempEncodingVersionJson = json['encodingVersion'];

  final String? tempApiServerID = tempApiServerIDJson;
  final List<String>? tempDecodableVersions =
      tempDecodableVersionsJson != null
          ? List<String>.from(tempDecodableVersionsJson)
          : null;
  final String? tempEncodingVersion = tempEncodingVersionJson;

  return ServerStorageVersion(
    apiServerID: tempApiServerID,
    decodableVersions: tempDecodableVersions,
    encodingVersion: tempEncodingVersion,
  );
}