new HourPicker

This commit is contained in:
mohammad
2024-09-11 16:04:54 +03:00
parent 8c3df39cf4
commit dbb3450c32
5 changed files with 81 additions and 56 deletions

View File

@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'color_manager.dart';
InputDecoration? textBoxDecoration({bool suffixIcon = false}) =>
@ -41,3 +42,26 @@ BoxDecoration containerDecoration = BoxDecoration(
],
color: ColorsManager.boxColor,
borderRadius: const BorderRadius.all(Radius.circular(10)));
/// A function to display a customizable toast message
void showCustomToast({
required String message,
ToastGravity gravity = ToastGravity.BOTTOM,
Color textColor = Colors.white,
Toast toastLength = Toast.LENGTH_SHORT,
int timeInSecForIosWeb = 2,
double fontSize = 16.0,
}) {
Fluttertoast.showToast(
msg: message,
webBgColor: "linear-gradient(to right, #dc1c13, #dc1c13)",
webPosition:'right' ,
toastLength: toastLength,
webShowClose: true,
gravity: gravity,
timeInSecForIosWeb: timeInSecForIosWeb,
textColor: textColor,
fontSize: fontSize,
);
}