AsukaMaterialBanner.message constructor
AsukaMaterialBanner.message(})
Creates a subclass of AsukaMaterialBanner called AsukaMaterialBanner.Message
passing the key
, content
, setting the color
to Color(0xff484848).
This AsukaMaterialBanner was created to with the purpose of supply the user with a message Snackbar
.
Example:
ElevatedButton(
onPressed: () {
asuka.AsukaMaterialBanner.message("Message").show();
},
child: const Text("Show message"),
)
This code generates an ElevatedButton, when pressed, it calls asuka.AsukaMaterialBanner.message("Message").show()
Implementation
factory AsukaMaterialBanner.message(
String content, {
Key? key,
double elevation = 2,
Duration? duration = const Duration(seconds: 4),
}) =>
AsukaMaterialBanner._(
key,
content,
messageConfig.color,
elevation: elevation,
duration: duration,
);