fromJson static method

WatchStats fromJson(
  1. Map<String, Object?> json
)

Implementation

static WatchStats fromJson(Map<String, Object?> json) => WatchStats(
  watching: json['watching'] == true,
  entryId: json['entryId'] as String?,
  node: json['node'] as String?,
  frames: (json['frames'] as num?)?.toInt() ?? 0,
  pushes: (json['pushes'] as num?)?.toInt() ?? 0,
  nodes: (json['nodes'] as num?)?.toInt() ?? 0,
  hashMicrosLast: (json['hashMicrosLast'] as num?)?.toInt() ?? 0,
  hashMicrosMean: (json['hashMicrosMean'] as num?)?.toInt() ?? 0,
  hashMicrosMax: (json['hashMicrosMax'] as num?)?.toInt() ?? 0,
  resolveMicrosLast: (json['resolveMicrosLast'] as num?)?.toInt() ?? 0,
  resolved: json['resolved'] == true,
  minIntervalMillis: (json['minIntervalMillis'] as num?)?.toInt() ?? 0,
);