toJson method

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

Implementation

@override
Map<String, dynamic> toJson() => {
      'shape': 'path',
      if (strokeColor != null) 'strokeColor': strokeColor.toString(),
      if (strokeSize != null) 'strokeSize': strokeSize,
      if (fillColor != null) 'fillColor': fillColor.toString(),
      'paths': _paths.map((e) => e.toJson()).toList(),
    };