AsukaMaterialBanner.success constructor

AsukaMaterialBanner.success(
  1. String content, {
  2. Key? key,
  3. List<Widget>? actions,
  4. double elevation = 2,
  5. Duration? duration = const Duration(seconds: 4),
})

Creates a subclass of AsukaMaterialBanner called AsukaMaterialBanner.Success passing the key, content, setting the color to Color(0xFF80AD49), an action and the icon to Icons.check_circle. This AsukaMaterialBanner was created to with the purpose of supply the user with a success Snackbar.

Example:

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

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

Implementation

factory AsukaMaterialBanner.success(
  String content, {
  Key? key,
  List<Widget>? actions,
  double elevation = 2,
  Duration? duration = const Duration(seconds: 4),
}) =>
    AsukaMaterialBanner._(
      key,
      content,
      successConfig.color,
      actions: actions,
      icon: successConfig.icon,
      elevation: elevation,
      duration: duration,
    );