showInfoSnack method
Shows a styled informational SnackBar.
Implementation
void showInfoSnack(String message, {Duration? duration}) {
messenger
..hideCurrentSnackBar()
..showSnackBar(
SnackBar(
content: Row(
children: <Widget>[
const Icon(Icons.info_outline_rounded,
color: Colors.white, size: 20),
const SizedBox(width: 10),
Expanded(
child: Text(message,
style: const TextStyle(
color: Colors.white, fontWeight: FontWeight.w500)),
),
],
),
backgroundColor: AppColors.info,
duration: duration ?? const Duration(seconds: 3),
behavior: SnackBarBehavior.floating,
margin: const EdgeInsets.all(16),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(AppRadius.medium),
),
),
);
}