HingeConfig.fromJson constructor

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

Implementation

factory HingeConfig.fromJson(Map<String, dynamic> json) {
  return HingeConfig(
    rect: dom.Rect.fromJson(json['rect'] as Map<String, dynamic>),
    contentColor: json.containsKey('contentColor')
        ? dom.RGBA.fromJson(json['contentColor'] as Map<String, dynamic>)
        : null,
    outlineColor: json.containsKey('outlineColor')
        ? dom.RGBA.fromJson(json['outlineColor'] as Map<String, dynamic>)
        : null,
  );
}