offsetFromJson function

Offset offsetFromJson(
  1. Map<String, dynamic> data
)

Implementation

Offset offsetFromJson(Map<String, dynamic> data) {
  final dx = (data["dx"] as num).toDouble();
  final dy = (data["dy"] as num).toDouble();
  return Offset(
    dx,
    dy,
  );
}