toJson method

  1. @override
Map<String, dynamic> toJson()
override

Converts the Circle to a JSON map.

Returns a Map<String, dynamic> representing the JSON serialization of the circle.

Implementation

@override
Map<String, dynamic> toJson() => {
      'center': {
        'x': center.x,
        'y': center.y,
      },
      'radius': radius,
    };