AppRouter class abstract

Класс для управления навигацией и диалогами в приложении.

Реализует набор статических методов для работы с роутером и управлением диалоговыми окнами.

Constructors

AppRouter()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance → RootStackRouter
Возвращает зарегистрированный экземпляр RootStackRouter.
no setter
isDialogOpened bool
Возвращает статус открытия диалогового окна.
no setter

Static Methods

canPop() bool
Проверяет, можно ли выполнить операцию pop (возврат назад) в навигационной истории.
closeDialog<T>([T? result]) Future<void>
Закрывает текущее диалоговое окно, если оно открыто.
closeToast() → void
Закрывает все отображаемые тосты.
Выполняет навигацию к указанному маршруту, используя расширение BuildContext.navigateTo.
Выполняет навигацию к маршруту по имени, используя расширение BuildContext.navigateToPath.
openBottomSheet(BuildContext context, Widget builder(BuildContext), {ShapeBorder? shape}) Future<void>
Открывает нижний лист (BottomSheet) в приложении.
openDialog<T>({required BuildContext context, required Widget dialog, bool barrierDismissible = true, Color barrierColor = Colors.black54, bool useSafeArea = true}) Future<T?>
Открывает диалоговое окно.
openToast(Widget child) → ToastFuture
Открывает тост-сообщение.
pop<T>([T? result]) Future<bool>
Выполняет операцию pop (возврат назад) с возможным результатом.
push<T>(PageRouteInfo<Object?> route) Future<T?>
Переходит на указанный маршрут.
pushPath<T>(String path, {Map<String, String> queryParameters = const {}}) Future<T?>
Переходит по заданному имени маршрута.
registerInstance<T extends RootStackRouter>(T router) → void
Регистрирует экземпляр RootStackRouter для дальнейшего использования.
replace<T>(PageRouteInfo<Object?> route) Future<T?>
Заменяет текущий маршрут на новый.
replacePath<T>(String path, {Map<String, String> queryParameters = const {}}) Future<T?>
Заменяет текущий маршрут на новый по имени.
unfocus(BuildContext context) → void
Снимает фокус с текущего виджета.