feat:login page done
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
import 'package:toastification/toastification.dart';
|
||||
import '../../../../food_delivery_client.dart';
|
||||
|
||||
showErrorToast(String? message) {
|
||||
toastification.show(
|
||||
context: navigatorKey.currentContext,
|
||||
type: ToastificationType.error,
|
||||
style: ToastificationStyle.fillColored,
|
||||
title: Text(message ?? "", maxLines: 5),
|
||||
autoCloseDuration: TimeDelayConst.duration3,
|
||||
);
|
||||
}
|
||||
|
||||
showSuccessToast(String message) {
|
||||
toastification.show(
|
||||
context: navigatorKey.currentContext,
|
||||
type: ToastificationType.success,
|
||||
style: ToastificationStyle.fillColored,
|
||||
title: Text(message, maxLines: 5),
|
||||
autoCloseDuration: TimeDelayConst.duration3,
|
||||
);
|
||||
}
|
||||
|
||||
showWarningToast(String message) {
|
||||
toastification.show(
|
||||
context: navigatorKey.currentContext,
|
||||
type: ToastificationType.warning,
|
||||
style: ToastificationStyle.fillColored,
|
||||
title: Text(message, maxLines: 5),
|
||||
autoCloseDuration: TimeDelayConst.duration3,
|
||||
);
|
||||
}
|
||||
|
||||
showInfoToast(String message) {
|
||||
toastification.show(
|
||||
alignment: Alignment.bottomCenter,
|
||||
context: navigatorKey.currentContext,
|
||||
type: ToastificationType.info,
|
||||
style: ToastificationStyle.fillColored,
|
||||
title: Text(message, maxLines: 5),
|
||||
autoCloseDuration: TimeDelayConst.duration3,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user