toMap method

Map<String, dynamic> toMap()

Converts dat to Map (json) Exported data can be restored via HandSignatureControl.fromMap factory or via importData method.

Implementation

Map<String, dynamic> toMap() => {
      'bounds': {
        'width': _areaSize.width,
        'height': _areaSize.height,
      },
      'paths':
          paths.map((p) => p.points.map((p) => p.toMap()).toList()).toList(),
      'threshold': threshold,
      'smoothRatio': smoothRatio,
      'velocityRange': velocityRange,
    };