content: import 'package:flutter/material.dart';
  import 'package:flutter_svg/flutter_svg.dart';
  import 'package:get/get.dart';
  import 'package:go_absensi/app/style/app_color.dart';
  
  class CustomToast {
    static errorToast(String? title, String? message) {
      Get.rawSnackbar(
        duration: Duration(seconds: 4),
        dismissDirection: DismissDirection.horizontal,
        messageText: Row(
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            SvgPicture.asset(
              "assets/icons/info-circle.svg",
              color: Colors.white,
            ),
            SizedBox(width: 16),
            Expanded(
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  Container(
                    margin: EdgeInsets.only(bottom: 4),
                    child: Text(
                      title ?? "error",
                      style: TextStyle(
                        color: Colors.white,
                        fontWeight: FontWeight.w500,
                        fontFamily: 'poppins',
                      ),
                    ),
                  ),
                  Text(
                    message ?? "Add your error message here",
                    style: TextStyle(color: Colors.white),
                  ),
                ],
              ),
            ),
          ],
        ),
        backgroundColor: AppColor.error,
        padding: EdgeInsets.symmetric(horizontal: 16, vertical: 10),
        margin: EdgeInsets.symmetric(horizontal: 16),
        borderRadius: 8,
        snackPosition: SnackPosition.TOP,
      );
    }
  
    static successToast(String? title, String? message) {
      Get.rawSnackbar(
        duration: Duration(seconds: 4),
        dismissDirection: DismissDirection.horizontal,
        messageText: Row(
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            SvgPicture.asset(
              "assets/icons/success-circle.svg",
              color: Colors.white,
            ),
            SizedBox(width: 16),
            Expanded(
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  Container(
                    margin: EdgeInsets.only(bottom: 4),
                    child: Text(
                      title ?? "Success",
                      style: TextStyle(
                        color: Colors.white,
                        fontWeight: FontWeight.w500,
                        fontFamily: 'poppins',
                      ),
                    ),
                  ),
                  Text(
                    message ?? "Add your success message here",
                    style: TextStyle(color: Colors.white),
                  ),
                ],
              ),
            ),
          ],
        ),
        backgroundColor: AppColor.success,
        padding: EdgeInsets.symmetric(horizontal: 16, vertical: 10),
        margin: EdgeInsets.symmetric(horizontal: 16),
        borderRadius: 8,
        snackPosition: SnackPosition.TOP,
      );
    }
  }
  