import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';

// void showAppToast(BuildContext context, String message) {
//   ScaffoldMessenger.of(context)
//     ..hideCurrentSnackBar()
//     ..showSnackBar(
//       SnackBar(content: Text(message), duration: const Duration(seconds: 2)),
//     );
// }

Future<bool?> toastInfo({
  required String msg,
  Color backgroundColor = const Color(0xCC111111),
  Color textColor = Colors.white,
}) {
  return Fluttertoast.showToast(
    msg: msg,
    toastLength: Toast.LENGTH_SHORT,
    gravity: ToastGravity.BOTTOM,
    timeInSecForIosWeb: 1,
    backgroundColor: backgroundColor,
    textColor: textColor,
    fontSize: 16,
  );
}
