workouttest_util/lib/model/split_test.dart
2023-02-12 22:42:51 +01:00

37 lines
917 B
Dart

class SplitTest {
late int testId;
late String name;
late String remoteConfigKey;
late String remoteConfigValue;
late String testValue;
String? source;
late bool active;
DateTime? validTo;
SplitTest.fromJson(Map json) {
testId = json['testId'];
name = json['name'];
remoteConfigKey = json['remoteConfigKey'];
remoteConfigValue = json['remoteConfigValue'];
testValue = json['testValue'];
source = json['source'];
active = json['active'];
validTo = json['validTo'] == null ? null : DateTime.parse(json['validTo']);
}
@override
String toString() {
Map<String, dynamic> json = {
'productId': testId,
'name': name,
'remoteConfigKey': remoteConfigKey,
'remoteConfigValue': remoteConfigValue,
'testValue': testValue,
'source': source,
'active': active,
'validTo': validTo,
};
return json.toString();
}
}