Skip to main content

MaterialApp

Struct MaterialApp 

Source
pub struct MaterialApp {
Show 39 fields pub key: Option<KeyRef>, pub navigator_key: Option<GlobalKey>, pub scaffold_messenger_key: Option<GlobalKey>, pub home: Option<WidgetRef>, pub routes: HashMap<String, WidgetBuilder>, pub initial_route: Option<String>, pub on_generate_route: Option<RouteFactory>, pub on_generate_initial_routes: Option<InitialRouteListFactory>, pub on_unknown_route: Option<RouteFactory>, pub on_navigation_notification: Option<NotificationListenerCallback<NavigationNotification>>, pub navigator_observers: Vec<NavigatorObserverRef>, pub builder: Option<TransitionBuilder>, pub title: Option<String>, pub on_generate_title: Option<GenerateAppTitle>, pub theme: Option<Rc<ThemeData>>, pub dark_theme: Option<Rc<ThemeData>>, pub high_contrast_theme: Option<Rc<ThemeData>>, pub high_contrast_dark_theme: Option<Rc<ThemeData>>, pub theme_mode: Option<ThemeMode>, pub theme_animation_duration: Duration, pub theme_animation_curve: Rc<dyn Curve>, pub color: Option<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 checkerboard_raster_cache_images: bool, pub checkerboard_offscreen_layers: bool, pub show_semantics_debugger: 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 scroll_behavior: Option<ScrollBehaviorRef>, pub debug_show_material_grid: bool, pub use_inherited_media_query: bool, pub theme_animation_style: Option<AnimationStyle>,
}
Expand description

An application that uses Material Design.

A convenience widget that wraps a number of widgets that are commonly required for Material Design applications. It builds upon a WidgetsApp by adding material-design specific functionality, such as AnimatedTheme and GridPaper.

MaterialApp configures its WidgetsApp::text_style with an ugly red/yellow text style that’s intended to warn the developer that their app hasn’t defined a default text style. Typically the app’s Scaffold builds a Material widget whose default Material::text_style defines the text style for the entire scaffold.

The MaterialApp configures the top-level Navigator to search for routes in the following order:

  1. For the / route, the home property, if non-null, is used.

  2. Otherwise, the routes table is used, if it has an entry for the route.

  3. Otherwise, on_generate_route is called, if provided. It should return a non-null value for any valid route not handled by home and routes.

  4. Finally if all else fails on_unknown_route is called.

If a Navigator is created, at least one of these options must handle the / route, since it is used when an invalid initial_route is specified on startup (e.g. by another application launching this one with an intent on Android; see Platform::default_route_name).

This widget also configures the observer of the top-level Navigator (if any) to perform Hero animations.

The MaterialApp automatically creates a DefaultSelectionStyle. It uses the colors in the ThemeData::text_selection_theme if they are not null; otherwise, the MaterialApp sets DefaultSelectionStyle::selection_color to ColorScheme::primary with 0.4 opacity and DefaultSelectionStyle::cursor_color to ColorScheme::primary.

If home, routes, on_generate_route, and on_unknown_route are all null, and builder is not null, then no Navigator is created.

MaterialApp::new()
    .debug_show_checked_mode_banner(false)
    .home(Scaffold::new().body(Center::new().child(Text::new("Hello World"))))

§Troubleshooting

§Why is my app’s text red with yellow underlines?

Text widgets that lack a Material ancestor will be rendered with an ugly red/yellow text style.

The typical fix is to give the widget a Scaffold ancestor. The Scaffold creates a Material widget that defines its default text style.

See also:

  • Scaffold, which provides standard app elements like an AppBar and a Drawer.
  • Navigator, which is used to manage the app’s stack of pages.
  • MaterialPageRoute, which defines an app page that transitions in a material-specific way.
  • WidgetsApp, which defines the basic app elements but does not depend on the material library.

The four themes are shared, as Dart shares the one ThemeData object: the theme a build selects is the one given, so ThemeData::localize’s identity cache hits across rebuilds.

Fields§

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

A key to use when building the ScaffoldMessenger.

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

§home: Option<WidgetRef>§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 MaterialPageRoute that performs an appropriate transition, including Hero animations, to the new route.

See WidgetsApp::routes.

§initial_route: Option<String>§on_generate_route: Option<RouteFactory>§on_generate_initial_routes: Option<InitialRouteListFactory>§on_unknown_route: Option<RouteFactory>§on_navigation_notification: Option<NotificationListenerCallback<NavigationNotification>>§navigator_observers: Vec<NavigatorObserverRef>§builder: Option<TransitionBuilder>

See WidgetsApp::builder.

Material specific features such as showDialog and showMenu, and widgets such as Tooltip, PopupMenuButton, also require a Navigator to properly function.

§title: Option<String>

See WidgetsApp::title.

This value is passed unmodified to WidgetsApp::title.

§on_generate_title: Option<GenerateAppTitle>

See WidgetsApp::on_generate_title.

This value is passed unmodified to WidgetsApp::on_generate_title.

§theme: Option<Rc<ThemeData>>

Default visual properties, like colors fonts and shapes, for this app’s material widgets.

A second dark_theme ThemeData value, which is used to provide a dark version of the user interface can also be specified. theme_mode will control which theme will be used if a dark_theme is provided.

The default value of this property is the value of ThemeData::light.

See also:

§dark_theme: Option<Rc<ThemeData>>

The ThemeData to use when a ‘dark mode’ is requested by the system.

Some host platforms allow the users to select a system-wide ‘dark mode’, or the application may want to offer the user the ability to choose a dark theme just for this application. This is theme that will be used for such cases. theme_mode will control which theme will be used.

This theme should have a ThemeData::brightness set to Brightness::Dark.

Uses theme instead when null. Defaults to the value of ThemeData::light when both dark_theme and theme are null.

See also:

  • theme_mode, which controls which theme to use.
  • MediaQueryData::platform_brightness, which indicates the platform’s desired brightness and is used to automatically toggle between theme and dark_theme in MaterialApp.
  • ThemeData::brightness, which is typically set to the value of MediaQueryData::platform_brightness.
§high_contrast_theme: Option<Rc<ThemeData>>

The ThemeData to use when ‘high contrast’ is requested by the system.

Some host platforms (for example, iOS) allow the users to increase contrast through an accessibility setting.

Uses theme instead when null.

See also:

  • MediaQueryData::high_contrast, which indicates the platform’s desire to increase contrast.
§high_contrast_dark_theme: Option<Rc<ThemeData>>

The ThemeData to use when a ‘dark mode’ and ‘high contrast’ is requested by the system.

Some host platforms (for example, iOS) allow the users to increase contrast through an accessibility setting.

This theme should have a ThemeData::brightness set to Brightness::Dark.

Uses dark_theme instead when null.

See also:

  • MediaQueryData::high_contrast, which indicates the platform’s desire to increase contrast.
§theme_mode: Option<ThemeMode>

Determines which theme will be used by the application if both theme and dark_theme are provided.

If set to ThemeMode::System, the choice of which theme to use will be based on the user’s system preferences. If the MediaQuery::platform_brightness_of is Brightness::Light, theme will be used. If it is Brightness::Dark, dark_theme will be used (unless it is null, in which case theme will be used.

If set to ThemeMode::Light the theme will always be used, regardless of the user’s system preference.

If set to ThemeMode::Dark the dark_theme will be used regardless of the user’s system preference. If dark_theme is null then it will fallback to using theme.

The default value is ThemeMode::System.

See also:

  • theme, which is used when a light mode is selected.
  • dark_theme, which is used when a dark mode is selected.
  • ThemeData::brightness, which indicates to various parts of the system what kind of theme is being used.
§theme_animation_duration: Duration

The duration of animated theme changes.

When the theme changes (either by the theme, dark_theme or theme_mode parameters changing) it is animated to the new theme over time. The theme_animation_duration determines how long this animation takes.

To have the theme change immediately, you can set this to Duration::ZERO.

The default is K_THEME_ANIMATION_DURATION.

See also: theme_animation_curve, which defines the curve used for the animation.

§theme_animation_curve: Rc<dyn Curve>

The curve to apply when animating theme changes.

The default is Curves::linear.

This is ignored if theme_animation_duration is Duration::ZERO.

See also: theme_animation_duration, which defines how long the animation is.

§color: Option<Color>§locale: Option<Locale>§localizations_delegates: Option<Vec<LocalizationsDelegateRef>>

See WidgetsApp::localizations_delegates.

Delegates that produce WidgetsLocalizations and MaterialLocalizations are included automatically. Apps can provide their own versions of these localizations by creating implementations of LocalizationsDelegate whose load methods return custom versions of WidgetsLocalizations or MaterialLocalizations.

Only the first delegate of each LocalizationsDelegate type is used and the automatically included delegates are added to the end of the app’s localizations_delegates list, so a delegate given here overrides the included one of its type.

See also:

§locale_list_resolution_callback: Option<LocaleListResolutionCallback>

See WidgetsApp::locale_list_resolution_callback.

This callback is passed along to the WidgetsApp built by this widget.

§locale_resolution_callback: Option<LocaleResolutionCallback>

See WidgetsApp::locale_resolution_callback.

This callback is passed along to the WidgetsApp built by this widget.

§supported_locales: Vec<Locale>

See WidgetsApp::supported_locales.

It is passed along unmodified to the WidgetsApp built by this widget.

See also:

§show_performance_overlay: bool

Turns on a performance overlay.

See also:

§checkerboard_raster_cache_images: bool

Turns on checkerboarding of raster cache images.

§checkerboard_offscreen_layers: bool

Turns on checkerboarding of layers rendered to offscreen bitmaps.

§show_semantics_debugger: bool

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

§debug_show_checked_mode_banner: bool§shortcuts: Option<ShortcutMap>§actions: Option<HashMap<TypeId, ActionRef>>§restoration_scope_id: Option<String>§scroll_behavior: Option<ScrollBehaviorRef>

The default ScrollBehavior for the application.

When null, defaults to MaterialScrollBehavior.

See also:

§debug_show_material_grid: bool

Turns on a GridPaper overlay that paints a baseline grid Material apps.

Only available in debug mode.

See also:

§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.

§theme_animation_style: Option<AnimationStyle>

Used to override the theme animation curve and duration.

If AnimationStyle::duration is provided, it will be used to override the theme animation duration in the underlying AnimatedTheme widget. If it is null, then theme_animation_duration will be used. Otherwise, defaults to 200ms.

If AnimationStyle::curve is provided, it will be used to override the theme animation curve in the underlying AnimatedTheme widget. If it is null, then theme_animation_curve will be used. Otherwise, defaults to Curves::linear.

To disable the theme animation, use AnimationStyle::NO_ANIMATION.

Implementations§

Source§

impl MaterialApp

Source

pub fn new() -> MaterialApp

Creates a MaterialApp; Dart’s named arguments are the setters.

At least one of home, routes, on_generate_route, or builder must be set. If only routes is given, it must include an entry for Navigator::DEFAULT_ROUTE_NAME (/), since that is the route used when the application is launched with an intent that specifies an otherwise unsupported route.

This class creates an instance of WidgetsApp.

Source

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

Dart MaterialApp(key:).

Source

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

Dart MaterialApp(navigatorKey:).

Source

pub fn scaffold_messenger_key( self, scaffold_messenger_key: GlobalKey, ) -> MaterialApp

Dart MaterialApp(scaffoldMessengerKey:).

Source

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

Dart MaterialApp(home:).

Source

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

Dart MaterialApp(routes:).

Source

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

Dart MaterialApp(initialRoute:).

Source

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

Dart MaterialApp(onGenerateRoute:).

Source

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

Dart MaterialApp(onGenerateInitialRoutes:).

Source

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

Dart MaterialApp(onUnknownRoute:).

Source

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

Dart MaterialApp(onNavigationNotification:).

Source

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

Dart MaterialApp(navigatorObservers:).

Source

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

Dart MaterialApp(builder:).

Source

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

Dart MaterialApp(title:).

Source

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

Dart MaterialApp(onGenerateTitle:).

Source

pub fn theme(self, theme: impl Into<Rc<ThemeData>>) -> MaterialApp

Dart MaterialApp(theme:).

Source

pub fn dark_theme(self, dark_theme: impl Into<Rc<ThemeData>>) -> MaterialApp

Dart MaterialApp(darkTheme:).

Source

pub fn high_contrast_theme( self, high_contrast_theme: impl Into<Rc<ThemeData>>, ) -> MaterialApp

Dart MaterialApp(highContrastTheme:).

Source

pub fn high_contrast_dark_theme( self, high_contrast_dark_theme: impl Into<Rc<ThemeData>>, ) -> MaterialApp

Dart MaterialApp(highContrastDarkTheme:).

Source

pub fn theme_mode(self, theme_mode: ThemeMode) -> MaterialApp

Dart MaterialApp(themeMode:).

Source

pub fn theme_animation_duration( self, theme_animation_duration: Duration, ) -> MaterialApp

Dart MaterialApp(themeAnimationDuration:).

Source

pub fn theme_animation_curve( self, theme_animation_curve: Rc<dyn Curve>, ) -> MaterialApp

Dart MaterialApp(themeAnimationCurve:).

Source

pub fn color(self, color: Color) -> MaterialApp

Dart MaterialApp(color:).

Source

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

Dart MaterialApp(locale:).

Source

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

Dart MaterialApp(localizationsDelegates:).

Source

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

Dart MaterialApp(localeListResolutionCallback:).

Source

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

Dart MaterialApp(localeResolutionCallback:).

Source

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

Dart MaterialApp(supportedLocales:).

Source

pub fn debug_show_material_grid( self, debug_show_material_grid: bool, ) -> MaterialApp

Dart MaterialApp(debugShowMaterialGrid:).

Source

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

Dart MaterialApp(showPerformanceOverlay:).

Source

pub fn checkerboard_raster_cache_images( self, checkerboard_raster_cache_images: bool, ) -> MaterialApp

Dart MaterialApp(checkerboardRasterCacheImages:).

Source

pub fn checkerboard_offscreen_layers( self, checkerboard_offscreen_layers: bool, ) -> MaterialApp

Dart MaterialApp(checkerboardOffscreenLayers:).

Source

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

Dart MaterialApp(showSemanticsDebugger:).

Source

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

Dart MaterialApp(debugShowCheckedModeBanner:).

Source

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

Dart MaterialApp(shortcuts:).

Source

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

Dart MaterialApp(actions:).

Source

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

Dart MaterialApp(restorationScopeId:).

Source

pub fn scroll_behavior(self, scroll_behavior: ScrollBehaviorRef) -> MaterialApp

Dart MaterialApp(scrollBehavior:).

Source

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

Dart MaterialApp(useInheritedMediaQuery:), which is ignored.

Source

pub fn theme_animation_style( self, theme_animation_style: AnimationStyle, ) -> MaterialApp

Dart MaterialApp(themeAnimationStyle:).

Source

pub fn create_material_hero_controller(app: &mut App) -> Ref<HeroController>

The HeroController used for Material page transitions.

Used by the MaterialApp.

Trait Implementations§

Source§

impl Debug for MaterialApp

Source§

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

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

impl Default for MaterialApp

Source§

fn default() -> MaterialApp

Returns the “default value” for a type. Read more
Source§

impl StatefulWidget for MaterialApp

Source§

type State = MaterialAppState

The state this widget creates.
Source§

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

Source§

fn create_state(&self) -> MaterialAppState

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 debug_check_constructor(&self)

Source§

fn as_preferred_size_widget( &self, ) -> Option<&(dyn PreferredSizeWidget + 'static)>

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 MaterialApp

§

impl !Send for MaterialApp

§

impl !Sync for MaterialApp

§

impl !UnwindSafe for MaterialApp

§

impl Forget for MaterialApp

§

impl Freeze for MaterialApp
where *const RcInner<dyn Key> is !null: Freeze, PhantomData<RcInner<dyn Key>>: 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, PhantomData<u8>: 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, &NavigationNotification) -> bool> is !null: Freeze, PhantomData<RcInner<dyn Fn(&mut App, &NavigationNotification) -> bool>>: 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, *const RcInner<ThemeData> is !null: Freeze, PhantomData<RcInner<ThemeData>>: Freeze, *const RcInner<dyn Curve> is !null: Freeze, PhantomData<RcInner<dyn Curve>>: 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, *const RcInner<dyn ScrollBehavior> is !null: Freeze, PhantomData<RcInner<dyn ScrollBehavior>>: Freeze,

§

impl Move for MaterialApp

§

impl Unpin for MaterialApp
where Rc<dyn Key>: 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, &RouteSettings) -> Option<Retained<AnyRoute>>>: Unpin, Rc<dyn Fn(&mut App, &str) -> Vec<Retained<AnyRoute>>>: 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, Rc<ThemeData>: Unpin, Rc<dyn Curve>: 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, Rc<dyn ScrollBehavior>: Unpin,

§

impl UnsafeUnpin for MaterialApp
where *const RcInner<dyn Key> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Key>>: 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, PhantomData<u8>: 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, &NavigationNotification) -> bool> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(&mut App, &NavigationNotification) -> bool>>: 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, *const RcInner<ThemeData> is !null: UnsafeUnpin, PhantomData<RcInner<ThemeData>>: UnsafeUnpin, *const RcInner<dyn Curve> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Curve>>: 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, *const RcInner<dyn ScrollBehavior> is !null: UnsafeUnpin, PhantomData<RcInner<dyn ScrollBehavior>>: 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>