ShapeSurfaceLayerDefinition constructor
ShapeSurfaceLayerDefinition({
- required String id,
- required ShapeBoundsDefinition bounds,
- required ShapeOutline? outline,
- required ShapeStyle style,
- ShapeVisibility? visibleWhen,
- String? onInteract,
Implementation
ShapeSurfaceLayerDefinition({
required super.id,
required super.bounds,
required this.outline,
required this.style,
this.visibleWhen,
this.onInteract,
}) {
if (!style.isValid ||
(outline?.isInk ?? false) ||
(onInteract?.trim().isEmpty ?? false)) {
throw ArgumentError(
'A surface requires a valid style and a contour, not ink',
);
}
}