toPoint function Null safety

Offset toPoint(
  1. Map json
)

Implementation

Offset toPoint(Map json) => Offset(
      json['x'] as double,
      json['y'] as double,
    );