showMessageWithAction method
ScaffoldFeatureController<SnackBar, SnackBarClosedReason>
showMessageWithAction(
- String text, {
- required VoidCallback onAction,
- required String actionLabel,
- required ThemeData theme,
- Color? actionColor,
Implementation
ScaffoldFeatureController<SnackBar, SnackBarClosedReason>
showMessageWithAction(
String text, {
required VoidCallback onAction,
required String actionLabel,
required ThemeData theme,
Color? actionColor,
}) {
return _show(
SnackBar(
content: Text(text),
action: SnackBarAction(
textColor: actionColor ?? theme.colorScheme.inversePrimary,
label: actionLabel,
onPressed: onAction,
),
),
);
}