maybeWrapWithTooltip function
Widget
maybeWrapWithTooltip({
- required String? tooltip,
- EdgeInsetsGeometry? tooltipPadding,
- required Widget child,
Helper that will wrap child
in a DevToolsTooltip widget if tooltip
is
non-null.
Implementation
Widget maybeWrapWithTooltip({
required String? tooltip,
EdgeInsetsGeometry? tooltipPadding,
required Widget child,
}) {
if (tooltip != null && tooltip.isNotEmpty) {
return DevToolsTooltip(
message: tooltip,
padding: tooltipPadding,
child: child,
);
}
return child;
}