fromJson static method
Implementation
static WatchPush fromJson(Map<String, Object?> json) => WatchPush(
entryId: json['entryId'] as String?,
frame: (json['frame'] as num?)?.toInt() ?? 0,
nodes: (json['nodes'] as num?)?.toInt() ?? 0,
hashMicros: (json['hashMicros'] as num?)?.toInt() ?? 0,
structureChanged: json['structure'] == true,
resized: json['resized'] == true,
scrolled: json['scrolled'] == true,
geometry: switch (json['geometry']) {
Map box => WatchBox.fromJson(box.cast<String, Object?>()),
_ => null,
},
);