import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:Intaleq/constant/colors.dart';
import 'package:Intaleq/constant/style.dart';

class Toast {
  static void show(BuildContext context, String message, Color color) {
    final snackBar = SnackBar(
      clipBehavior: Clip.antiAliasWithSaveLayer,
      backgroundColor: color,
      elevation: 3,
      content: Text(
        message,
        style: AppStyle.title.copyWith(color: AppColor.secondaryColor),
      ),
      behavior: SnackBarBehavior.floating,
      animation: const AlwaysStoppedAnimation(1.0),
      shape: RoundedRectangleBorder(
        borderRadius: BorderRadius.circular(10.0), // Custom border radius
      ),
      width: Get.width * .8,
      // shape: const StadiumBorder(
      //     side: BorderSide(
      //   color: AppColor.secondaryColor,
      //   width: 1.0,
      //   style: BorderStyle.solid,
      // )),
      duration: const Duration(seconds: 2),
    );

    ScaffoldMessenger.of(context).showSnackBar(
      snackBar,
    );
  }
}
