HiddenPage class

Pages to be used in nested navigators instead of at the top level or to intentionally not set URLs.

If used with this, it will not be accessible via deep linking.

When redirect is set, it is possible to write reroute settings that correspond only to that page.

You can give a name to a page by specifying name, and you can bind an object (including enums, etc.) to a page by specifying key. All of these can be obtained from RouteQuery.

トップレベルではなくネストされたナビゲーターで用いたり、意図的にURLを設定しないためのページ。

これで使用した場合、ディープリンクでのアクセスができなくなります。

redirectを設定するとそのページのみに対応するリルート設定を記述することが可能です。

nameを指定することでページに名前をつけることができ、keyを指定することでページにオブジェクト(enumなども含む)を紐付けることが可能です。これらはすべてRouteQueryから取得することができます。

@HiddenPage()
class TestWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text("Test")),
      body: Center(child: Text("Body")),
    );
  }
}
Available Extensions

Constructors

HiddenPage({Object? key, String? name, Object? transition, List<Object> redirect = const [], Type? implementType})
Pages to be used in nested navigators instead of at the top level or to intentionally not set URLs.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
implementType Type?
Specify a class that extends RouteQueryBuilder to enable page swapping.
final
key Object?
Key object of the page.
final
name String?
Page Name.
final
redirect List<Object>
Reroute settings.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
transition Object?
Specifies page transitions.
final

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