SmoothLine.fromJson constructor
SmoothLine.fromJson(
- Map<String, dynamic> data
)
Implementation
factory SmoothLine.fromJson(Map<String, dynamic> data) {
return SmoothLine.data(
brushPrecision: data['brushPrecision'] as double,
points: (data['points'] as List<dynamic>)
.map((dynamic e) => jsonToOffset(e as Map<String, dynamic>))
.toList(),
strokeWidthList: (data['strokeWidthList'] as List<dynamic>)
.map((dynamic e) => e as double)
.toList(),
paint: jsonToPaint(data['paint'] as Map<String, dynamic>),
);
}