DiagramContentDefinition constructor

DiagramContentDefinition({
  1. required ShapeContentLayoutProvider layout,
  2. required DiagramContentCodec codec,
})

Implementation

DiagramContentDefinition({required this.layout, required this.codec}) {
  if (layout.type.trim().isEmpty ||
      layout.type != layout.type.trim() ||
      layout.type != codec.type) {
    throw ArgumentError(
      'Content layout and codec must share one valid type.',
    );
  }
}