showGrockMaterialBanner method

void showGrockMaterialBanner(
  1. String message, {
  2. Duration? duration,
  3. required String actionLabel,
  4. required VoidCallback action,
})

showMaterialBanner method

Implementation

void showGrockMaterialBanner(
  String message, {
  Duration? duration,
  required String actionLabel,
  required VoidCallback action,
}) {
  ScaffoldMessenger.of(context).showMaterialBanner(
    MaterialBanner(
      content: Text(message),
      actions: [
        TextButton(
          child: Text(actionLabel),
          onPressed: action,
        ),
      ],
    ),
  );
}