showSuccessToast static method
Future<void>
showSuccessToast(
- BuildContext context, {
- String? message,
- Widget? child,
- Widget? leading,
- bool isClosable = false,
- double expandedHeight = 100,
- Color? backgroundColor,
- Color? shadowColor,
- Curve? slideCurve,
- Curve positionCurve = Curves.elasticOut,
- ToastLength length = ToastLength.short,
- DismissDirection dismissDirection = DismissDirection.down,
Implementation
static Future<void> showSuccessToast(
BuildContext context, {
String? message,
Widget? child,
Widget? leading,
bool isClosable = false,
double expandedHeight = 100,
Color? backgroundColor,
Color? shadowColor,
Curve? slideCurve,
Curve positionCurve = Curves.elasticOut,
ToastLength length = ToastLength.short,
DismissDirection dismissDirection = DismissDirection.down,
}) async {
_showToast(
context,
message: message,
messageStyle: const TextStyle(
color: Colors.white,
),
isClosable: isClosable,
expandedHeight: expandedHeight,
backgroundColor: backgroundColor ?? Colors.green,
shadowColor: shadowColor ?? Colors.green.shade500,
positionCurve: positionCurve,
length: length,
dismissDirection: dismissDirection,
leading: leading ??
const Icon(
Icons.check_circle,
color: Colors.white,
),
child: child,
);
}