PCanvasBackgroundGradient.fromJson constructor

PCanvasBackgroundGradient.fromJson(
  1. Map<String, dynamic> j
)

Implementation

factory PCanvasBackgroundGradient.fromJson(Map<String, dynamic> j) =>
    PCanvasBackgroundGradient(
      PColor.fromJson(j['colorFrom']),
      PColor.fromJson(j['colorTo']),
      pos: Position.fromJson(j['position']),
      dimension: PDimension.fromJson(j['dimension']),
      zIndex: j.containsKey('zIndex') ? parseInt(j['zIndex']) : defaultZIndex,
    );