CockpitMultiTouchStep.fromJson constructor

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

Decodes a CockpitMultiTouchStep from a JSON object.

Implementation

factory CockpitMultiTouchStep.fromJson(Map<String, Object?> json) {
  return CockpitMultiTouchStep(
    pointer: json['pointer']! as int,
    phase: CockpitMultiTouchPhase.fromJson(json['phase']),
    atMs: json['atMs']! as int,
    dx: (json['dx'] as num).toDouble(),
    dy: (json['dy'] as num).toDouble(),
  );
}