AsukaSnackbar.warning constructor

AsukaSnackbar.warning(
  1. String content, {
  2. Key? key,
  3. double? width,
  4. double elevation = 2,
})

Creates a subclass of AsukaSnackbar called AsukaSnackbar.Warning passing the key, content, setting the color to Color(0xFFE6CA72) and the icon to Icons.warning. This AsukaSnackbar was created to with the purpose of supply the user with a warning Snackbar.

Example:

ElevatedButton(
onPressed: () {
  asuka.AsukaSnackbar.warning("Warning").show();
},
child: const Text("Show warning"),
)

This code generates an ElevatedButton, when pressed, it calls asuka.AsukaSnackbar.warning("Warning").show()

Implementation

factory AsukaSnackbar.warning(
  String content, {
  Key? key,
  double? width,
  double elevation = 2,
}) =>
    AsukaSnackbar._(
      key,
      content,
      warningConfig.color,
      icon: warningConfig.icon,
      width: width,
      elevation: elevation,
    );