show static method
Implementation
static void show(
BuildContext context,
String title,
String message,
MessageConfig config,
) {
final snackBar = SnackBar(
content: Row(
children: [
Icon(config.icon, color: config.textColor),
const SizedBox(width: 8),
Expanded(
child: Text(
'$title\n$message',
style: TextStyle(color: config.textColor),
),
),
],
),
backgroundColor: config.backgroundColor,
duration: config.duration ?? const Duration(seconds: 3),
);
ScaffoldMessenger.of(context).showSnackBar(snackBar);
}