createGroupAnnotation method
Creates a new group annotation with the specified position and size.
Groups are now manually sized and use fluid containment - any node completely within the group's bounds is considered part of the group.
Parameters
id: Unique identifier for the grouptitle: Display title shown in the group headerposition: Top-left position of the groupsize: Width and height of the group (minimum 100x60)color: Color for the group header and background tint
Implementation
GroupAnnotation createGroupAnnotation({
required String id,
required String title,
required Offset position,
required Size size,
Color color = Colors.blue,
}) {
final groupAnnotation = GroupAnnotation(
id: id,
position: position,
size: size,
title: title,
color: color,
);
return groupAnnotation;
}