showAssetSnackbar static method

void showAssetSnackbar(
  1. String title,
  2. String message
)

Implementation

static void showAssetSnackbar(String title, String message) {
  Get.showSnackbar(
    GetSnackBar(
      padding: EdgeInsets.symmetric(
        horizontal: SizeConstant.getHeightWithScreen(16),
        vertical: SizeConstant.getHeightWithScreen(20),
      ),
      titleText: Text(
        title,
        style: TextStyle(
          color: ColorConstant.black3,
          fontSize: SizeConstant.smallFont,
          fontWeight: FontWeight.w500,
        ),
      ),
      messageText: Text(
        message,
        style: TextStyle(
          color: ColorConstant.grey35,
          fontSize: SizeConstant.smallXFont,
        ),
      ),
      mainButton: GestureDetector(
        onTap: () {
          Get.back();
        },
        child: Icon(
          Icons.close,
          color: ColorConstant.grey11,
          size: SizeConstant.getHeightWithScreen(16),
        ),
      ),
      backgroundColor: ColorConstant.green5,
      snackPosition: SnackPosition.TOP,
      icon: Image(
        fit: BoxFit.contain,
        image: const AssetImage(
          "assets/images/success.png",
          package: Constants.packageName,
        ),
        height: SizeConstant.getHeightWithScreen(20),
        width: SizeConstant.getHeightWithScreen(20),
      ),
      duration: const Duration(seconds: 2),
    ),
  );
}