PCanvasPanel2D.fromJson constructor
PCanvasPanel2D.fromJson(
- Map<
String, dynamic> j, { - PCanvasElementContainer<
PCanvasElement> ? parent,
Implementation
factory PCanvasPanel2D.fromJson(Map<String, dynamic> j,
{PCanvasElementContainer? parent}) =>
PCanvasPanel2D(
parent: parent,
style: PStyle.fromJson(j['style']),
zIndex: j.containsKey('zIndex') ? parseInt(j['zIndex']) : null,
pos: Position.fromJson(j['pos']),
dimension: PDimension.fromJson(j['dimension']),
id: j['id'],
elements:
PCanvasElement2D.fromList(j['elements']).whereNotNull().toList(),
);