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