showGrockMaterialBannerWithIconAndColor method
void
showGrockMaterialBannerWithIconAndColor(})
showMaterialBanner
method
Implementation
void showGrockMaterialBannerWithIconAndColor(
String message, {
Duration? duration,
required String actionLabel,
required VoidCallback action,
required IconData icon,
required Color color,
}) {
ScaffoldMessenger.of(context).showMaterialBanner(
MaterialBanner(
content: Row(
children: [
Icon(icon, color: color),
SizedBox(width: 10),
Text(message),
],
),
actions: [
TextButton(
child: Text(actionLabel),
onPressed: action,
),
],
),
);
}