Skip to main content

WidgetsApp

Struct WidgetsApp 

Source
pub struct WidgetsApp {
Show 29 fields pub key: Option<KeyRef>, pub navigator_key: Option<GlobalKey>, pub on_generate_route: Option<RouteFactory>, pub on_generate_initial_routes: Option<InitialRouteListFactory>, pub page_route_builder: Option<PageRouteFactory>, pub home: Option<WidgetRef>, pub routes: HashMap<String, WidgetBuilder>, pub on_unknown_route: Option<RouteFactory>, pub on_navigation_notification: Option<NotificationListenerCallback<NavigationNotification>>, pub initial_route: Option<String>, pub navigator_observers: Vec<NavigatorObserverRef>, pub builder: Option<TransitionBuilder>, pub title: Option<String>, pub on_generate_title: Option<GenerateAppTitle>, pub text_style: Option<TextStyle>, pub color: Color, pub locale: Option<Locale>, pub localizations_delegates: Option<Vec<LocalizationsDelegateRef>>, pub locale_list_resolution_callback: Option<LocaleListResolutionCallback>, pub locale_resolution_callback: Option<LocaleResolutionCallback>, pub supported_locales: Vec<Locale>, pub show_performance_overlay: bool, pub show_semantics_debugger: bool, pub debug_show_widget_inspector: bool, pub debug_show_checked_mode_banner: bool, pub shortcuts: Option<ShortcutMap>, pub actions: Option<HashMap<TypeId, ActionRef>>, pub restoration_scope_id: Option<String>, pub use_inherited_media_query: bool,
}
Expand description

A convenience widget that wraps a number of widgets that are commonly required for an application.

One of the primary roles that WidgetsApp provides is binding the system back button to popping the Navigator or quitting the application.

It is used by both MaterialApp and CupertinoApp to implement base functionality for an app.

Find references to many of the widgets that WidgetsApp wraps in the “See also” section.

See also:

  • CheckedModeBanner, which displays a Banner saying “DEBUG” when running in debug mode.
  • DefaultTextStyle, the text style to apply to descendant Text widgets without an explicit style.
  • MediaQuery, which establishes a subtree in which media queries resolve to a MediaQueryData.
  • Localizations, which defines the Locale for its child.
  • Title, a widget that describes this app in the operating system.
  • Navigator, a widget that manages a set of child widgets with a stack discipline.
  • Overlay, a widget that manages a Stack of entries that can be managed independently.

Fields§

§key: Option<KeyRef>§navigator_key: Option<GlobalKey>

A key to use when building the Navigator.

If a navigator_key is specified, the Navigator can be directly manipulated without first obtaining it from a BuildContext via Navigator::of: from the navigator_key, use the GlobalKey::current_state getter.

If this is changed, a new Navigator will be created, losing all the application state in the process; in that case, the navigator_observers must also be changed, since the previous observers will be attached to the previous navigator.

The Navigator is only built if on_generate_route is not None; if it is None, navigator_key must also be None.

§on_generate_route: Option<RouteFactory>

The route generator callback used when the app is navigated to a named route.

If this returns None when building the routes to handle the specified initial_route, then all the routes are discarded and Navigator::DEFAULT_ROUTE_NAME is used instead (/). See initial_route.

During normal app operation, the on_generate_route callback will only be applied to route names pushed by the application, and so should never return None.

This is used if routes does not contain the requested route.

The Navigator is only built if routes are provided (either via home, routes, on_generate_route, or on_unknown_route); if they are not, builder must not be None.

If this property is not set, either the routes or home properties must be set, so that the default handler knows what routes to build, and page_route_builder must be set too, so that handler knows what transition to build them with.

§on_generate_initial_routes: Option<InitialRouteListFactory>

The routes generator callback used for generating initial routes if initial_route is provided.

If this property is not set, the underlying Navigator::on_generate_initial_routes will default to Navigator::default_generate_initial_routes.

§page_route_builder: Option<PageRouteFactory>

The PageRoute generator callback used when the app is navigated to a named route.

A PageRoute represents the page in a Navigator, so that it can correctly animate between pages, and to represent the “return value” of a route (e.g. which button a user selected in a modal dialog).

This callback can be used, for example, to specify that a MaterialPageRoute or a CupertinoPageRoute should be used for building page transitions. It is required when home or routes are used and neither builder nor onGenerateRoute is given, as Flutter’s assert checks; a kit app sets this to its kit’s route.

§home: Option<WidgetRef>

The widget for the default route of the app (Navigator::DEFAULT_ROUTE_NAME, which is /).

This is the route that is displayed first when the application is started normally, unless initial_route is specified. It’s also the route that’s displayed if the initial_route can’t be displayed.

If home is specified, then routes must not include an entry for /, as home takes its place.

The Navigator is only built if routes are provided (either via home, routes, on_generate_route, or on_unknown_route); if they are not, builder must not be None.

The difference between using home and using builder is that the home subtree is inserted into the application below a Navigator (and thus below an Overlay, which Navigator uses). With home, therefore, dialog boxes will work automatically, the routes table will be used, and APIs such as Navigator::push and Navigator::pop will work as expected. In contrast, the widget returned from builder is inserted above the app’s Navigator (if any).

If this property is set, the page_route_builder property must also be set, unless a builder or on_generate_route is, so that the default route handler will know what kind of PageRoutes to build.

§routes: HashMap<String, WidgetBuilder>

The application’s top-level routing table.

When a named route is pushed with Navigator::push_named, the route name is looked up in this map. If the name is present, the associated WidgetBuilder is used to construct a PageRoute specified by page_route_builder to perform an appropriate transition, including Hero animations, to the new route.

If the app only has one page, then you can specify it using home instead.

If home is specified, then it implies an entry in this table for the Navigator::DEFAULT_ROUTE_NAME route (/), and it is an error to redundantly provide such a route in the routes table.

If a route is requested that is not specified in this table (or by home), then the on_generate_route callback is called to build the page instead.

The Navigator is only built if routes are provided (either via home, routes, on_generate_route, or on_unknown_route); if they are not, builder must not be None.

If the routes map is not empty, the page_route_builder property must be set, unless a builder or on_generate_route is, so that the default route handler will know what kind of PageRoutes to build.

§on_unknown_route: Option<RouteFactory>

Called when on_generate_route fails to generate a route, except for the initial_route.

This callback is typically used for error handling. For example, this callback might always generate a “not found” page that describes the route that wasn’t found.

Unknown routes can arise either from errors in the app or from external requests to push routes, such as from Android intents.

The Navigator is only built if routes are provided (either via home, routes, on_generate_route, or on_unknown_route); if they are not, builder must not be None.

§on_navigation_notification: Option<NotificationListenerCallback<NavigationNotification>>

The callback to use when receiving a NavigationNotification.

By default this updates the engine with the navigation status and stops bubbling the notification.

See also:

§initial_route: Option<String>

The name of the first route to show, if a Navigator is built.

Defaults to Platform::default_route_name, which may be overridden by the code that launched the application.

If the route name starts with a slash, then it is treated as a “deep link”, and before this route is pushed, the routes leading to this one are pushed also. For example, if the route was /a/b/c, then the app would start with the four routes /, /a, /a/b, and /a/b/c loaded, in that order. Even if the route was just /a, the app would start with / and /a loaded. You can use the on_generate_initial_routes property to override this behavior.

Intermediate routes aren’t required to exist. In the example above, /a and /a/b could be skipped if they have no matching route. But /a/b/c is required to have a route, else initial_route is ignored and Navigator::DEFAULT_ROUTE_NAME is used instead (/). This can happen if the app is started with an intent that specifies a non-existent route.

The Navigator is only built if routes are provided (either via home, routes, on_generate_route, or on_unknown_route); if they are not, initial_route must be None and builder must not be None.

Changing the initial_route will have no effect, as it only controls the initial route. To change the route while the application is running, use the Navigator APIs.

§navigator_observers: Vec<NavigatorObserverRef>

The list of observers for the Navigator created for this app.

This list must be replaced by a list of newly-created observers if the navigator_key is changed.

The Navigator is only built if routes are provided (either via home, routes, on_generate_route, or on_unknown_route); if they are not, navigator_observers must be the empty list and builder must not be None.

§builder: Option<TransitionBuilder>

A builder for inserting widgets above the Navigator but below the other widgets created by the WidgetsApp widget, or for replacing the Navigator entirely.

For example, from the BuildContext passed to this method, the Directionality, Localizations, DefaultTextStyle, MediaQuery, etc, are all available. They can also be overridden in a way that impacts all the routes in the Navigator.

This is rarely useful, but can be used in applications that wish to override those defaults, e.g. to force the application into right-to-left mode despite being in English, or to override the MediaQuery metrics (e.g. to leave a gap for advertisements shown by a plugin from OEM code).

For specifically overriding the title with a value based on the Localizations, consider on_generate_title instead.

The builder callback is passed two arguments, the BuildContext and a Navigator widget (as child).

If no routes are provided using home, routes, on_generate_route, or on_unknown_route, the child will be None, and it is the responsibility of the builder to provide the application’s routing machinery.

If routes are provided using one or more of those properties, then child is not None, and the returned value should include the child in the widget subtree; if it does not, then the application will have no Navigator and the routing related properties are ignored.

If builder is None, it is as if a builder was specified that returned the child directly. If it is None, routes must be provided using one of the other properties listed above.

Unless a Navigator is provided, either implicitly from builder being None, or by a builder including its child argument, or by a builder explicitly providing a Navigator of its own, widgets and APIs such as Hero, Navigator::push and Navigator::pop, will not function.

§title: Option<String>

A one-line description used by the device to identify the app for the user.

On Android the titles appear above the task manager’s app snapshots which are displayed when the user presses the “recent apps” button. On iOS this value cannot be used. CFBundleDisplayName from the app’s Info.plist is referred to instead whenever present, CFBundleName otherwise. On the web it is used as the page title, which shows up in the browser’s list of open tabs.

To provide a localized title instead, use on_generate_title.

§on_generate_title: Option<GenerateAppTitle>

If non-None this callback function is called to produce the app’s title string, otherwise title is used.

The on_generate_title context parameter includes the WidgetsApp’s Localizations widget so that this callback can be used to produce a localized title.

The on_generate_title callback is called each time the WidgetsApp rebuilds.

§text_style: Option<TextStyle>

The default text style for Text in the application.

§color: Color

The primary color to use for the application in the operating system interface.

For example, on Android this is the color used for the application in the application switcher.

§locale: Option<Locale>

The initial locale for this app’s Localizations widget is based on this value.

If the locale is None then the system’s locale value is used.

The value of Localizations::locale_of will equal this locale if it matches one of the supported_locales. Otherwise it will be the first element of supported_locales.

See also:

§localizations_delegates: Option<Vec<LocalizationsDelegateRef>>

The delegates for this app’s Localizations widget.

The delegates collectively define all of the localized resources for this application’s Localizations widget.

§locale_list_resolution_callback: Option<LocaleListResolutionCallback>

This callback is responsible for choosing the app’s locale when the app is started, and when the user changes the device’s locale.

When a locale_list_resolution_callback is provided, the resolver will first attempt to resolve the locale with it. If the callback or result is None, it will fall back to trying the locale_resolution_callback. If both are left None or fail to resolve, the basic fallback algorithm will be used.

The priority of each available fallback is:

  1. locale_list_resolution_callback is attempted.
  2. locale_resolution_callback is attempted.
  3. basic_locale_list_resolution, the basic resolution algorithm, is attempted last.

This callback considers the entire list of preferred locales.

This algorithm should be able to handle a None or empty list of preferred locales, which indicates the platform has not reported locale information yet.

§locale_resolution_callback: Option<LocaleResolutionCallback>

See locale_list_resolution_callback.

This callback considers only the default locale, which is the first locale in the preferred locales list. It is preferred to set locale_list_resolution_callback over locale_resolution_callback as it provides the full preferred locales list.

§supported_locales: Vec<Locale>

The list of locales that this app has been localized for.

By default only the American English locale is supported. Apps should configure this list to match the locales they support.

The order of the list matters. The default locale resolution algorithm, basic_locale_list_resolution, attempts to match by the following priority:

  1. Locale::language_code, Locale::script_code, and Locale::country_code
  2. Locale::language_code and Locale::script_code only
  3. Locale::language_code and Locale::country_code only
  4. Locale::language_code only
  5. Locale::country_code only when all preferred locales fail to match
  6. Returns the first element of supported_locales as a fallback

When more than one supported locale matches one of these criteria, only the first matching locale is returned.

When supporting languages with more than one script, it is recommended to specify the Locale::script_code explicitly. Locales may also be defined without Locale::country_code to specify a generic fallback for a particular script.

§show_performance_overlay: bool

Turns on a performance overlay.

See also:

§show_semantics_debugger: bool

Turns on an overlay that shows the accessibility information reported by the framework.

§debug_show_widget_inspector: bool

Turns on an overlay that enables inspecting the widget tree.

The inspector is only available in debug mode as it depends on RenderObject.debugDescribeChildren which should not be called outside of debug mode.

§debug_show_checked_mode_banner: bool

Turns on a little “DEBUG” banner in debug mode to indicate that the app is in debug mode. This is on by default (in debug mode), to turn it off, set the setter argument to false. In release mode this has no effect.

To get this banner in your application if you’re not using WidgetsApp, include a CheckedModeBanner widget in your app.

This banner is intended to deter people from complaining that your app is slow when it’s in debug mode. In debug mode, a large number of expensive diagnostics are enabled to aid in development, and so performance in debug mode is not representative of what will happen in release mode.

§shortcuts: Option<ShortcutMap>

The default map of keyboard shortcuts to intents for the application.

By default, this is set to WidgetsApp::default_shortcuts.

Passing this will not replace DefaultTextEditingShortcuts. These can be overridden by using a Shortcuts widget lower in the widget tree.

See also:

  • SingleActivator, which defines shortcut key combination of a single key and modifiers, such as “Delete” or “Control+C”.
  • The Shortcuts widget, which defines a keyboard mapping.
  • The Actions widget, which defines the mapping from intent to action.
  • The Intent and Action traits, which allow definition of new actions.
§actions: Option<HashMap<TypeId, ActionRef>>

The default map of intent keys to actions for the application.

By default, this is the output of WidgetsApp::default_actions. Specifying actions for an app overrides the default, so if you wish to modify the default actions, you can call WidgetsApp::default_actions and modify the resulting map, passing it as the actions for this app. You may also add to the bindings, or override specific bindings for a widget subtree, by adding your own Actions widget.

See also:

  • The shortcuts parameter, which defines the default set of shortcuts for the application.
  • The Shortcuts widget, which defines a keyboard mapping.
  • The Actions widget, which defines the mapping from intent to action.
§restoration_scope_id: Option<String>

The identifier to use for state restoration of this app.

Providing a restoration ID inserts a RootRestorationScope into the widget hierarchy, which enables state restoration for descendant widgets.

Providing a restoration ID also enables the Navigator built by the WidgetsApp to restore its state (i.e. to restore the history stack of active Routes). See the documentation on Navigator for more details around state restoration of Routes.

See also:

  • RestorationManager, which explains how state restoration works in Flutter.
§use_inherited_media_query: bool

Dart’s deprecated useInheritedMediaQuery. This setting is ignored.

The widget never introduces its own MediaQuery; the View widget takes care of that.

Implementations§

Source§

impl WidgetsApp

Source

pub fn new(color: Color) -> WidgetsApp

Creates a widget that wraps a number of widgets that are commonly required for an application.

Most callers will want to use the home or routes setters, or both. The home setter is a convenience for the following routes map:

{"/": |app, context| my_widget}

It is possible to specify both home and routes, but only if routes does not contain an entry for "/". Conversely, if home is omitted, routes must contain an entry for "/".

If home or routes are set, the routing implementation needs to know how to build PageRoutes, so the page_route_builder setter must be given one too, unless a builder or on_generate_route is; Flutter’s assert checks it when the widget is turned into a WidgetRef in a debug build.

The builder setter is designed to provide the ability to wrap the visible content of the app in some other widget. It is recommended that you use home rather than builder if you intend to only display a single route in your app.

WidgetsApp is also able to provide a custom implementation of routing via the on_generate_route and on_unknown_route setters. These correspond to Navigator::on_generate_route and Navigator::on_unknown_route. If home, routes, and builder are unset, or if they fail to create a requested route, on_generate_route will be invoked. If that fails, on_unknown_route will be invoked.

The supported_locales list must have one or more elements. By default it is [Locale::new("en").country_code("US")].

The configuration is checked when the widget is turned into a WidgetRef: Dart’s constructor asserts run there, because a fluent setter cannot see the fields that are still to come.

Source

pub fn key(self, key: KeyRef) -> WidgetsApp

Dart WidgetsApp(key:).

Source

pub fn navigator_key(self, navigator_key: GlobalKey) -> WidgetsApp

Dart WidgetsApp(navigatorKey:).

Source

pub fn on_generate_route( self, on_generate_route: impl Fn(&mut App, &RouteSettings) -> Option<RouteRef> + 'static, ) -> WidgetsApp

Dart WidgetsApp(onGenerateRoute:).

Source

pub fn on_generate_initial_routes( self, on_generate_initial_routes: impl Fn(&mut App, &str) -> Vec<RouteRef> + 'static, ) -> WidgetsApp

Dart WidgetsApp(onGenerateInitialRoutes:).

Source

pub fn page_route_builder( self, page_route_builder: impl Fn(&mut App, &RouteSettings, WidgetBuilder) -> PageRouteRef + 'static, ) -> WidgetsApp

Dart WidgetsApp(pageRouteBuilder:), which a home or routes app must give unless it also gives a builder or on_generate_route.

Source

pub fn home<K>(self, home: impl IntoWidget<K>) -> WidgetsApp

Dart WidgetsApp(home:).

Source

pub fn routes( self, routes: impl IntoIterator<Item = (String, WidgetBuilder)>, ) -> WidgetsApp

Dart WidgetsApp(routes:).

Source

pub fn on_unknown_route( self, on_unknown_route: impl Fn(&mut App, &RouteSettings) -> Option<RouteRef> + 'static, ) -> WidgetsApp

Dart WidgetsApp(onUnknownRoute:).

Source

pub fn on_navigation_notification( self, on_navigation_notification: impl Fn(&mut App, &NavigationNotification) -> bool + 'static, ) -> WidgetsApp

Dart WidgetsApp(onNavigationNotification:).

Source

pub fn initial_route(self, initial_route: impl Into<String>) -> WidgetsApp

Dart WidgetsApp(initialRoute:).

Source

pub fn navigator_observers( self, navigator_observers: impl IntoIterator<Item = NavigatorObserverRef>, ) -> WidgetsApp

Dart WidgetsApp(navigatorObservers:).

Source

pub fn builder( self, builder: impl Fn(&mut App, BuildContext, Option<&WidgetRef>) -> WidgetRef + 'static, ) -> WidgetsApp

Dart WidgetsApp(builder:).

Source

pub fn title(self, title: impl Into<String>) -> WidgetsApp

Dart WidgetsApp(title:).

Source

pub fn on_generate_title( self, on_generate_title: impl Fn(&mut App, BuildContext) -> String + 'static, ) -> WidgetsApp

Dart WidgetsApp(onGenerateTitle:).

Source

pub fn text_style(self, text_style: TextStyle) -> WidgetsApp

Dart WidgetsApp(textStyle:).

Source

pub fn locale(self, locale: Locale) -> WidgetsApp

Dart WidgetsApp(locale:).

Source

pub fn localizations_delegates( self, localizations_delegates: impl IntoIterator<Item = LocalizationsDelegateRef>, ) -> WidgetsApp

Dart WidgetsApp(localizationsDelegates:).

Source

pub fn locale_list_resolution_callback( self, locale_list_resolution_callback: impl Fn(Option<&[Locale]>, &[Locale]) -> Option<Locale> + 'static, ) -> WidgetsApp

Dart WidgetsApp(localeListResolutionCallback:).

Source

pub fn locale_resolution_callback( self, locale_resolution_callback: impl Fn(Option<&Locale>, &[Locale]) -> Option<Locale> + 'static, ) -> WidgetsApp

Dart WidgetsApp(localeResolutionCallback:).

Source

pub fn supported_locales( self, supported_locales: impl IntoIterator<Item = Locale>, ) -> WidgetsApp

Dart WidgetsApp(supportedLocales:).

Source

pub fn show_performance_overlay( self, show_performance_overlay: bool, ) -> WidgetsApp

Dart WidgetsApp(showPerformanceOverlay:).

Source

pub fn show_semantics_debugger( self, show_semantics_debugger: bool, ) -> WidgetsApp

Dart WidgetsApp(showSemanticsDebugger:).

Source

pub fn debug_show_widget_inspector( self, debug_show_widget_inspector: bool, ) -> WidgetsApp

Dart WidgetsApp(debugShowWidgetInspector:).

Source

pub fn debug_show_checked_mode_banner( self, debug_show_checked_mode_banner: bool, ) -> WidgetsApp

Dart WidgetsApp(debugShowCheckedModeBanner:).

Source

pub fn shortcuts(self, shortcuts: ShortcutMap) -> WidgetsApp

Dart WidgetsApp(shortcuts:).

Source

pub fn actions(self, actions: HashMap<TypeId, ActionRef>) -> WidgetsApp

Dart WidgetsApp(actions:).

Source

pub fn restoration_scope_id( self, restoration_scope_id: impl Into<String>, ) -> WidgetsApp

Dart WidgetsApp(restorationScopeId:).

Source

pub fn use_inherited_media_query( self, use_inherited_media_query: bool, ) -> WidgetsApp

Dart WidgetsApp(useInheritedMediaQuery:), which is ignored.

Source

pub fn show_performance_overlay_override(app: &App) -> bool

If true, forces the performance overlay to be visible in all instances.

Used by the showPerformanceOverlay VM service extension.

Source

pub fn set_show_performance_overlay_override(app: &mut App, value: bool)

Source

pub fn debug_allow_banner_override(app: &App) -> bool

If false, prevents the debug banner from being visible.

Used by the debugAllowBanner VM service extension.

This is how flutter run turns off the banner when you take a screen shot with “s”.

Source

pub fn set_debug_allow_banner_override(app: &mut App, value: bool)

Source

pub fn default_shortcuts(app: &App) -> ShortcutMap

Generates the default shortcut key bindings based on the platform.

Used by WidgetsApp to assign a default value to shortcuts.

Source

pub fn default_actions(app: &mut App) -> HashMap<TypeId, ActionRef>

The default value of actions.

Trait Implementations§

Source§

impl Debug for WidgetsApp

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl StatefulWidget for WidgetsApp

Source§

type State = WidgetsAppState

The state this widget creates.
Source§

fn key(&self) -> Option<&KeyRef>

Source§

fn debug_check_constructor(&self)

Source§

fn create_state(&self) -> WidgetsAppState

Creates the mutable state for this widget at a given location in the tree. Read more
Source§

fn debug_fill_properties( &self, _app: &App, properties: &mut DiagnosticPropertiesBuilder, )

Dart’s debugFillProperties: the properties a dump shows for this widget, in Dart’s order. Dart’s Widget base only sets the dense tree style, which the framework does.
Source§

fn as_preferred_size_widget(&self) -> Option<&dyn PreferredSizeWidget>

Source§

fn type_name(&self) -> &'static str

See Widget::type_name. A stateful form another widget kind becomes (an animated or status transition widget) names the widget it wraps.

Auto Trait Implementations§

§

impl !RefUnwindSafe for WidgetsApp

§

impl !Send for WidgetsApp

§

impl !Sync for WidgetsApp

§

impl !UnwindSafe for WidgetsApp

§

impl Forget for WidgetsApp

§

impl Freeze for WidgetsApp
where *const RcInner<dyn Key> is !null: Freeze, PhantomData<RcInner<dyn Key>>: Freeze, *const RcInner<dyn Fn(&mut App, &RouteSettings) -> Option<Retained<AnyRoute>>> is !null: Freeze, PhantomData<RcInner<dyn Fn(&mut App, &RouteSettings) -> Option<Retained<AnyRoute>>>>: Freeze, *const RcInner<dyn Fn(&mut App, &str) -> Vec<Retained<AnyRoute>>> is !null: Freeze, PhantomData<RcInner<dyn Fn(&mut App, &str) -> Vec<Retained<AnyRoute>>>>: Freeze, *const RcInner<dyn Fn(&mut App, &RouteSettings, Rc<dyn Fn(&mut App, AnyElement) -> Rc<dyn Widget>>) -> Retained<AnyPageRoute>> is !null: Freeze, PhantomData<RcInner<dyn Fn(&mut App, &RouteSettings, Rc<dyn Fn(&mut App, AnyElement) -> Rc<dyn Widget>>) -> Retained<AnyPageRoute>>>: Freeze, *const RcInner<dyn Widget> is !null: Freeze, PhantomData<RcInner<dyn Widget>>: Freeze, *const u8 is !null: Freeze, PhantomData<(String, Rc<dyn Fn(&mut App, AnyElement) -> Rc<dyn Widget>>)>: Freeze, *const RcInner<dyn Fn(&mut App, &NavigationNotification) -> bool> is !null: Freeze, PhantomData<RcInner<dyn Fn(&mut App, &NavigationNotification) -> bool>>: Freeze, PhantomData<u8>: Freeze, PhantomData<Retained<AnyNavigatorObserver>>: Freeze, *const RcInner<dyn Fn(&mut App, AnyElement, Option<&Rc<dyn Widget>>) -> Rc<dyn Widget>> is !null: Freeze, PhantomData<RcInner<dyn Fn(&mut App, AnyElement, Option<&Rc<dyn Widget>>) -> Rc<dyn Widget>>>: Freeze, *const RcInner<dyn Fn(&mut App, AnyElement) -> String> is !null: Freeze, PhantomData<RcInner<dyn Fn(&mut App, AnyElement) -> String>>: Freeze, &'static dyn ColorExtension: Freeze, *const RcInner<dyn ColorExtension> is !null: Freeze, PhantomData<RcInner<dyn ColorExtension>>: Freeze, PhantomData<String>: Freeze, *const RcInner<Paint> is !null: Freeze, PhantomData<RcInner<Paint>>: Freeze, PhantomData<Shadow>: Freeze, PhantomData<FontFeature>: Freeze, PhantomData<FontVariation>: Freeze, PhantomData<LocalizationsDelegateRef>: Freeze, *const RcInner<dyn Fn(Option<&[Locale]>, &[Locale]) -> Option<Locale>> is !null: Freeze, PhantomData<RcInner<dyn Fn(Option<&[Locale]>, &[Locale]) -> Option<Locale>>>: Freeze, *const RcInner<dyn Fn(Option<&Locale>, &[Locale]) -> Option<Locale>> is !null: Freeze, PhantomData<RcInner<dyn Fn(Option<&Locale>, &[Locale]) -> Option<Locale>>>: Freeze, PhantomData<Locale>: Freeze, PhantomData<(Rc<dyn ShortcutActivator>, Rc<dyn Intent>)>: Freeze, PhantomData<(TypeId, Retained<AnyAction>)>: Freeze,

§

impl Move for WidgetsApp

§

impl Unpin for WidgetsApp
where Rc<dyn Key>: Unpin, Rc<dyn Fn(&mut App, &RouteSettings) -> Option<Retained<AnyRoute>>>: Unpin, Rc<dyn Fn(&mut App, &str) -> Vec<Retained<AnyRoute>>>: Unpin, Rc<dyn Fn(&mut App, &RouteSettings, Rc<dyn Fn(&mut App, AnyElement) -> Rc<dyn Widget>>) -> Retained<AnyPageRoute>>: Unpin, Rc<dyn Widget>: Unpin, *const u8 is !null: Unpin, Rc<dyn Fn(&mut App, AnyElement) -> Rc<dyn Widget>>: Unpin, Rc<dyn Fn(&mut App, &NavigationNotification) -> bool>: Unpin, NonZero<u32>: Unpin, &'static NavigatorObserverVTable: Unpin, Rc<Keep>: Unpin, Rc<dyn Fn(&mut App, AnyElement, Option<&Rc<dyn Widget>>) -> Rc<dyn Widget>>: Unpin, Rc<dyn Fn(&mut App, AnyElement) -> String>: Unpin, &'static dyn ColorExtension: Unpin, Rc<dyn ColorExtension>: Unpin, Rc<Paint>: Unpin, Rc<dyn AnyLocalizationsDelegate>: Unpin, Rc<dyn Fn(Option<&[Locale]>, &[Locale]) -> Option<Locale>>: Unpin, Rc<dyn Fn(Option<&Locale>, &[Locale]) -> Option<Locale>>: Unpin, Rc<dyn ShortcutActivator>: Unpin, Rc<dyn Intent>: Unpin, *const (): Unpin, &'static ActionVTable: Unpin,

§

impl UnsafeUnpin for WidgetsApp
where *const RcInner<dyn Key> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Key>>: UnsafeUnpin, *const RcInner<dyn Fn(&mut App, &RouteSettings) -> Option<Retained<AnyRoute>>> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(&mut App, &RouteSettings) -> Option<Retained<AnyRoute>>>>: UnsafeUnpin, *const RcInner<dyn Fn(&mut App, &str) -> Vec<Retained<AnyRoute>>> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(&mut App, &str) -> Vec<Retained<AnyRoute>>>>: UnsafeUnpin, *const RcInner<dyn Fn(&mut App, &RouteSettings, Rc<dyn Fn(&mut App, AnyElement) -> Rc<dyn Widget>>) -> Retained<AnyPageRoute>> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(&mut App, &RouteSettings, Rc<dyn Fn(&mut App, AnyElement) -> Rc<dyn Widget>>) -> Retained<AnyPageRoute>>>: UnsafeUnpin, *const RcInner<dyn Widget> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Widget>>: UnsafeUnpin, *const u8 is !null: UnsafeUnpin, PhantomData<(String, Rc<dyn Fn(&mut App, AnyElement) -> Rc<dyn Widget>>)>: UnsafeUnpin, *const RcInner<dyn Fn(&mut App, &NavigationNotification) -> bool> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(&mut App, &NavigationNotification) -> bool>>: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, PhantomData<Retained<AnyNavigatorObserver>>: UnsafeUnpin, *const RcInner<dyn Fn(&mut App, AnyElement, Option<&Rc<dyn Widget>>) -> Rc<dyn Widget>> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(&mut App, AnyElement, Option<&Rc<dyn Widget>>) -> Rc<dyn Widget>>>: UnsafeUnpin, *const RcInner<dyn Fn(&mut App, AnyElement) -> String> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(&mut App, AnyElement) -> String>>: UnsafeUnpin, &'static dyn ColorExtension: UnsafeUnpin, *const RcInner<dyn ColorExtension> is !null: UnsafeUnpin, PhantomData<RcInner<dyn ColorExtension>>: UnsafeUnpin, PhantomData<String>: UnsafeUnpin, *const RcInner<Paint> is !null: UnsafeUnpin, PhantomData<RcInner<Paint>>: UnsafeUnpin, PhantomData<Shadow>: UnsafeUnpin, PhantomData<FontFeature>: UnsafeUnpin, PhantomData<FontVariation>: UnsafeUnpin, PhantomData<LocalizationsDelegateRef>: UnsafeUnpin, *const RcInner<dyn Fn(Option<&[Locale]>, &[Locale]) -> Option<Locale>> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(Option<&[Locale]>, &[Locale]) -> Option<Locale>>>: UnsafeUnpin, *const RcInner<dyn Fn(Option<&Locale>, &[Locale]) -> Option<Locale>> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(Option<&Locale>, &[Locale]) -> Option<Locale>>>: UnsafeUnpin, PhantomData<Locale>: UnsafeUnpin, PhantomData<(Rc<dyn ShortcutActivator>, Rc<dyn Intent>)>: UnsafeUnpin, PhantomData<(TypeId, Retained<AnyAction>)>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<W> IntoWidget<StatefulKind> for W
where W: StatefulWidget,

Source§

fn into_widget(self) -> Rc<dyn Widget>

The widget as a tree node, made where this is called: its creation_location.
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>