AsukaMaterialBanner.warning constructor

AsukaMaterialBanner.warning(
  1. String content, {
  2. Key? key,
  3. double elevation = 2,
  4. Duration? duration = const Duration(seconds: 4),
})

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

Example:

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

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

Implementation

factory AsukaMaterialBanner.warning(
  String content, {
  Key? key,
  double elevation = 2,
  Duration? duration = const Duration(seconds: 4),
}) =>
    AsukaMaterialBanner._(
      key,
      content,
      warningConfig.color,
      icon: warningConfig.icon,
      elevation: elevation,
      duration: duration,
    );