PCanvasGridPanel2D.fromJson constructor
PCanvasGridPanel2D.fromJson(
- Map<
String, dynamic> j, { - PCanvasElementContainer<
PCanvasElement> ? parent,
Implementation
factory PCanvasGridPanel2D.fromJson(Map<String, dynamic> j,
{PCanvasElementContainer? parent}) =>
PCanvasGridPanel2D(
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']),
spacing: parseInt(j['spacing']),
id: j['id'],
elements: PCanvasElement2D.fromList(j['elements'] as List)
.whereNotNull()
.toList(),
);