16 lines
367 B
Dart
16 lines
367 B
Dart
|
|
library guru_utils;
|
||
|
|
|
||
|
|
typedef ToastDelegate = void Function(String message, {Duration duration});
|
||
|
|
|
||
|
|
class GuruUtils {
|
||
|
|
static ToastDelegate? toastDelegate;
|
||
|
|
|
||
|
|
static String? flavor;
|
||
|
|
|
||
|
|
static bool isTablet = false;
|
||
|
|
|
||
|
|
static void showToast(String message, {Duration duration = const Duration(seconds: 3)}) {
|
||
|
|
toastDelegate?.call(message, duration: duration);
|
||
|
|
}
|
||
|
|
}
|