Bundle.fromJson constructor
Implementation
factory Bundle.fromJson(Map<String, dynamic> json) {
return Bundle(
bundleId: json['bundleId'] as String?,
cpuCount: json['cpuCount'] as int?,
diskSizeInGb: json['diskSizeInGb'] as int?,
instanceType: json['instanceType'] as String?,
isActive: json['isActive'] as bool?,
name: json['name'] as String?,
power: json['power'] as int?,
price: json['price'] as double?,
ramSizeInGb: json['ramSizeInGb'] as double?,
supportedPlatforms: (json['supportedPlatforms'] as List?)
?.whereNotNull()
.map((e) => (e as String).toInstancePlatform())
.toList(),
transferPerMonthInGb: json['transferPerMonthInGb'] as int?,
);
}