GroupAnnotation constructor
GroupAnnotation({
- required String id,
- required Offset position,
- required Size size,
- required String title,
- Color color = Colors.blue,
- GroupBehavior behavior = GroupBehavior.bounds,
- Set<
String> ? nodeIds, - EdgeInsets padding = defaultPadding,
- int zIndex = -1,
- bool isVisible = true,
- bool selected = false,
- bool isInteractive = true,
- Map<
String, dynamic> metadata = const {},
Implementation
GroupAnnotation({
required super.id,
required Offset position,
required Size size,
required String title,
Color color = Colors.blue,
GroupBehavior behavior = GroupBehavior.bounds,
Set<String>? nodeIds,
this.padding = defaultPadding,
int zIndex = -1, // Usually behind nodes
bool isVisible = true,
super.selected = false,
super.isInteractive = true,
super.metadata,
}) : _nodeIds = ObservableSet.of(nodeIds ?? {}),
_observableBehavior = Observable(behavior),
super(
type: 'group',
initialPosition: position,
initialZIndex: zIndex,
initialIsVisible: isVisible,
) {
_observableSize = Observable(size);
_observableTitle = Observable(title);
_observableColor = Observable(color);
}