AsukaSnackbar.alert constructor Null safety
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}) =>
AsukaSnackbar._(key, content, Color(0xffFA5456), icon: Icons.report);