showToast static method

dynamic showToast({
  1. required BuildContext context,
  2. int? duration,
  3. int? position,
  4. required String? message,
})

Implementation

static showToast({required BuildContext context, int? duration, int? position, required String? message}) {
  try {
    FlutterToastr.show(message.toNotNull, context, duration: (duration ?? FlutterToastr.lengthLong), position: (position ?? FlutterToastr.bottom), textStyle: context.textTheme.labelMedium?.copyWith(color: Colors.white), backgroundRadius: 15.spMin);
  } catch (e) {
    if (kDebugMode) {
      print("CATCH_TOAST:\t$e");
    }
  }
}