44 lines
1.1 KiB
Dart
44 lines
1.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:toastification/toastification.dart';
|
|
|
|
import '../../core/styles/app_color.dart';
|
|
import 'text_widget.dart';
|
|
|
|
ToastificationItem successToastMessage(
|
|
BuildContext context,
|
|
String textV,
|
|
) {
|
|
return toastification.show(
|
|
showProgressBar: false,
|
|
style: ToastificationStyle.minimal,
|
|
icon: const Icon(Icons.done),
|
|
type: ToastificationType.success,
|
|
context: context,
|
|
title: TextWidget().text15W400(
|
|
textV,
|
|
clr: AppColor.darkGreyColor,
|
|
txtAlign: TextAlign.start,
|
|
),
|
|
autoCloseDuration: const Duration(seconds: 5),
|
|
);
|
|
}
|
|
|
|
ToastificationItem errorToastMessage(
|
|
BuildContext context,
|
|
String textV,
|
|
) {
|
|
return toastification.show(
|
|
showProgressBar: false,
|
|
style: ToastificationStyle.minimal,
|
|
icon: const Icon(Icons.error),
|
|
type: ToastificationType.error,
|
|
context: context,
|
|
title: TextWidget().text15W400(
|
|
textV,
|
|
clr: AppColor.darkGreyColor,
|
|
txtAlign: TextAlign.start,
|
|
),
|
|
autoCloseDuration: const Duration(seconds: 5),
|
|
);
|
|
}
|