InspectLayout.fromJson constructor

InspectLayout.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory InspectLayout.fromJson(Map<String, Object?> json) => InspectLayout(
  x: _double(json['x']),
  y: _double(json['y']),
  width: _double(json['width']),
  height: _double(json['height']),
  constraints: switch (json['constraints']) {
    Map c => InspectConstraints.fromJson(c.cast<String, Object?>()),
    _ => null,
  },
  isRepaintBoundary: json['repaintBoundary'] as bool? ?? false,
  flex: switch (json['flex']) {
    Map f => InspectFlex.fromJson(f.cast<String, Object?>()),
    _ => null,
  },
  flexFactor: json['flexFactor'] as int?,
  flexFit: json['flexFit'] as String?,
);