showInfo method

Future<bool?> showInfo({
  1. required String message,
  2. Duration duration = const Duration(seconds: 2),
  3. DencendToastGravity position = DencendToastGravity.top,
})

显示信息Toast

Implementation

Future<bool?> showInfo({
  required String message,
  Duration duration = const Duration(seconds: 2),
  DencendToastGravity position = DencendToastGravity.top,
}) {
  const style = ToastStyle(
    webBgColor: "linear-gradient(to right, #00b09b, #96c93d)",
    backgroundColor: Color(0xFF9E9E9E),
    textColor: Colors.black,
    borderRadius: 12,
    fontSize: 11,
  );

  return show(
    message: message,
    duration: duration,
    position: position,
    style: style,
  );
}