showSystemSnackBar static method
void
showSystemSnackBar({})
Implementation
static void showSystemSnackBar({
required IconData icon,
required String message,
Color backgroundColor = Colors.red,
Color textColor = Colors.white,
Duration duration = const Duration(seconds: NumberConst.INDEX_3),
}) {
ScaffoldMessenger.of(Get.context!).showSnackBar(
SnackBar(
content: Row(
children: [
Icon(
icon,
color: textColor,
size: NumberConst.SUB_HEADER_FONT_SIZE,
),
SizedBox(width: NumberConst.COMMON_HORIZONTAL_SPACE_2W),
Flexible(
child: GNSemiBoldTextWidget(
title: message,
fontsize: NumberConst.REGULAR_FONT_SIZE,
fontcolor: textColor,
),
),
],
),
// hitTestBehavior: ,
backgroundColor: backgroundColor,
behavior: SnackBarBehavior.floating,
duration: duration,
),
);
}