class DismissibleSnackBar extends SnackBar {
final Color backgroundColor;
final Duration duration;
const DismissibleSnackBar({
Key? key,
required this.backgroundColor,
required this.duration,
required Widget content,
}) : super(
key: key,
content: content,
backgroundColor: backgroundColor,
duration: duration,
dismissDirection: DismissDirection.vertical,
);
}
I tried building a custom widget, but then it has an error with passing into
ScaffoldMessenger.of(context)
.showSnackBar(DismissibleSnackBar(
Basically, I tried everything