TouchPoint.fromJson constructor
TouchPoint.fromJson(
- Map<String, dynamic> json
)
Implementation
factory TouchPoint.fromJson(Map<String, dynamic> json) {
return TouchPoint(
x: json['x'] as num,
y: json['y'] as num,
radiusX: json.containsKey('radiusX') ? json['radiusX'] as num : null,
radiusY: json.containsKey('radiusY') ? json['radiusY'] as num : null,
rotationAngle: json.containsKey('rotationAngle')
? json['rotationAngle'] as num
: null,
force: json.containsKey('force') ? json['force'] as num : null,
tangentialPressure: json.containsKey('tangentialPressure')
? json['tangentialPressure'] as num
: null,
tiltX: json.containsKey('tiltX') ? json['tiltX'] as num : null,
tiltY: json.containsKey('tiltY') ? json['tiltY'] as num : null,
twist: json.containsKey('twist') ? json['twist'] as int : null,
id: json.containsKey('id') ? json['id'] as num : null,
);
}