dialog function

Future<void> dialog(
  1. Widget page, {
  2. bool dialog = false,
  3. VoidCallback? onDismiss,
})

Implementation

Future<void> dialog(
  final Widget page, {
  final bool dialog = false,
  final VoidCallback? onDismiss,
}) async {
  final Widget _page = await Future.microtask(() => page);

  Get.dialog(_page, useSafeArea: true).then(
    (final _) => onDismiss != null ? onDismiss() : null,
  );
}