import 'package:freezed_annotation/freezed_annotation.dart';

import 'pointer_device_kind.dart';

part 'ink_point.freezed.dart';
part 'ink_point.g.dart';

@freezed
abstract class InkPoint with _$InkPoint {
  const factory InkPoint({
    required double x,
    required double y,
    @Default(0.5) double pressure,
    @Default(0.0) double tilt,
    required int timestamp,
    @Default(InputDeviceKind.unknown) InputDeviceKind pointerDeviceKind,
  }) = _InkPoint;

  factory InkPoint.fromJson(Map<String, dynamic> json) =>
      _$InkPointFromJson(json);
}
