fromJson static method

RectProperties fromJson(
  1. Map<String, dynamic> json
)

Implementation

static RectProperties fromJson(Map<String, dynamic> json) => json
        .entries.isEmpty
    ? CNode.defaultRProperties
    : RectProperties(
        rect: ResponsiveRect.fromJson(json['rect']),
        flipRectWhileResizing: json['flipRectWhileResizing'],
        flipChild: json['flipChild'],
        constraintsEnabled: json['constraintsEnabled'],
        resizable: json['resizable'],
        movable: json['movable'],
        hideHandlesWhenNotResizable: json['hideHandlesWhenNotResizable'],
        verticalAlign: EnumToString.fromString(
            ResponsiveAlignment.values, json['vertical_align'] ?? 'start')!,
        horizontalAlign: EnumToString.fromString(
            ResponsiveAlignment.values, json['horizontal_align'] ?? 'start')!,
      );