INFRA: Set Up Project.
This commit is contained in:
26
lib/themes/show_toast_dialog.dart
Normal file
26
lib/themes/show_toast_dialog.dart
Normal file
@@ -0,0 +1,26 @@
|
||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||
|
||||
class ShowToastDialog {
|
||||
/// Show a toast message with customizable position.
|
||||
static void showToast(
|
||||
String? message, {
|
||||
EasyLoadingToastPosition position = EasyLoadingToastPosition.top,
|
||||
}) {
|
||||
if (message == null || message.isEmpty) return;
|
||||
EasyLoading.showToast(message, toastPosition: position);
|
||||
}
|
||||
|
||||
/// Show a loading indicator with a status message.
|
||||
static void showLoader(String message) {
|
||||
EasyLoading.show(
|
||||
status: message,
|
||||
dismissOnTap: false,
|
||||
maskType: EasyLoadingMaskType.clear,
|
||||
);
|
||||
}
|
||||
|
||||
/// Dismiss any active loading indicator.
|
||||
static void closeLoader() {
|
||||
EasyLoading.dismiss();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user