showCustomSnackbar static method
void
showCustomSnackbar(
- String message
)
Implementation
static void showCustomSnackbar(String message) {
Get.showSnackbar(
GetSnackBar(
padding: EdgeInsets.all(SizeConstant.getHeightWithScreen(10)),
messageText: Row(
children: [
SizedBox(width: SizeConstant.getHeightWithScreen(12)),
Text(
message,
style: TextStyle(
color: ColorConstant.black3,
fontSize: SizeConstant.xSmallFont,
),
),
],
),
backgroundColor: ColorConstant.green5,
snackPosition: SnackPosition.TOP,
borderRadius: SizeConstant.getHeightWithScreen(10),
borderColor: ColorConstant.green6,
margin: EdgeInsets.only(
left: SizeConstant.getHeightWithScreen(16),
right: SizeConstant.getHeightWithScreen(16),
bottom: SizeConstant.getHeightWithScreen(144),
),
icon: Container(
height: SizeConstant.getHeightWithScreen(20),
width: SizeConstant.getHeightWithScreen(20),
decoration: BoxDecoration(
color: ColorConstant.green4,
shape: BoxShape.circle,
),
padding: EdgeInsets.all(
SizeConstant.getHeightWithScreen(5),
),
child: Icon(
Icons.check,
color: ColorConstant.white,
size: SizeConstant.getHeightWithScreen(10),
),
),
duration: const Duration(seconds: 2),
),
);
}