ModelTimestamp.fromJson constructor
ModelTimestamp.fromJson(
- DynamicMap json
Convert from json
map to ModelTimestamp.
json
のマップからModelTimestampに変換します。
Implementation
factory ModelTimestamp.fromJson(DynamicMap json) {
final timestamp = json.get(
kTimeKey,
DateTime.now().millisecondsSinceEpoch,
);
return ModelTimestamp.fromServer(
DateTime.fromMillisecondsSinceEpoch(timestamp),
);
}