parent
e90e6eb70d
commit
6f67a2d9e4
1 changed files with 11 additions and 0 deletions
@ -0,0 +1,11 @@ |
||||
import 'package:flutter/material.dart'; |
||||
|
||||
/// Provides utiulity widgets. |
||||
abstract class UtilityWidgets { |
||||
/// Conditionally wraps the [child] with [Tooltip] widget if [message] |
||||
/// is not null and not empty. |
||||
static Widget maybeTooltip({required Widget child, String? message}) => |
||||
(message ?? '').isNotEmpty |
||||
? Tooltip(message: message!, child: child) |
||||
: child; |
||||
} |
Loading…
Reference in new issue