AsukaSnackbar.success constructor
AsukaSnackbar.success(
- String content, {
- Key? key,
- SnackBarAction? snackBarAction,
- double? width,
- double elevation = 2,
Creates a subclass of AsukaSnackbar called AsukaSnackbar.Success
passing the key
, content
, setting the color
to Color(0xFF80AD49), an action and the icon
to Icons.check_circle.
This AsukaSnackbar was created to with the purpose of supply the user with a success Snackbar
.
Example:
ElevatedButton(
onPressed: () {
asuka.AsukaSnackbar.success("Success").show();
},
child: const Text("Show success"),
)
This code generates an ElevatedButton, when pressed, it calls asuka.AsukaSnackbar.success("Success").show()
Implementation
factory AsukaSnackbar.success(
String content, {
Key? key,
SnackBarAction? snackBarAction,
double? width,
double elevation = 2,
}) =>
AsukaSnackbar._(
key,
content,
successConfig.color,
action: snackBarAction,
icon: successConfig.icon,
width: width,
elevation: elevation,
);