showCustomWidgetWithComponentDataOver method
Allows you to add any widget to a component.
These widgets will be displayed over all components.
You have ComponentData
here so you can customize the widgets to individual component.
Implementation
@override
Widget showCustomWidgetWithComponentDataOver(
BuildContext context, ComponentData componentData) {
if (componentData.type != 'port') {
if (componentData.data.isHighlightVisible) {
context.read<ShowComponentSettingsCubit>().showSettings(componentData);
} else {
context.read<ShowComponentSettingsCubit>().hideSettings();
}
return Visibility(
visible: componentData.data.isHighlightVisible,
child: Stack(
children: [
componentTopOptions(componentData, context),
highlight(componentData, Colors.blueGrey.shade400),
resizeCorner(componentData),
],
),
);
} else {
return SizedBox.shrink();
}
}