GroupAnnotation constructor
GroupAnnotation({
- required String id,
- required Offset position,
- required String title,
- EdgeInsets padding = const EdgeInsets.all(20),
- Color color = Colors.blue,
- int zIndex = -1,
- bool isVisible = true,
- bool selected = false,
- bool isInteractive = true,
- required Set<
String> dependencies, - Offset offset = Offset.zero,
- Map<
String, dynamic> metadata = const {},
Implementation
GroupAnnotation({
required super.id,
required Offset position,
required String title,
this.padding = const EdgeInsets.all(20),
Color color = Colors.blue,
int zIndex = -1, // Usually behind nodes
bool isVisible = true,
super.selected = false,
super.isInteractive = true, // Groups should be selectable and interactive
required Set<String> dependencies, // Groups always depend on nodes
super.offset = Offset.zero,
super.metadata,
}) : super(
type: 'group',
initialPosition: position,
initialZIndex: zIndex,
initialIsVisible: isVisible,
initialDependencies: dependencies,
) {
_calculatedSize = Observable(const Size(100, 100));
_observableTitle = Observable(title);
_observableColor = Observable(color);
}