tooltip static method
Implementation
static Widget tooltip(
BuildContext context, {
IconData? icon,
double? iconSize,
String? message,
}) {
return Tooltip(
message: message ?? '',
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
color: Colors.black.withValueOpacity(0.9),
borderRadius: const BorderRadius.all(Radius.circular(4)),
border: Border.all(color: Colors.white54, width: 1),
),
textStyle: Theme.of(
context,
).textTheme.bodySmall!.copyWith(color: Colors.white),
preferBelow: true,
verticalOffset: 20,
child: Icon(
icon ?? CupertinoIcons.info,
size: iconSize ?? 14.0,
color: Theme.of(context).colorScheme.secondary.withValueOpacity(0.4),
),
);
}