pub struct AppBar {Show 34 fields
pub key: Option<KeyRef>,
pub leading: Option<WidgetRef>,
pub automatically_imply_leading: bool,
pub title: Option<WidgetRef>,
pub actions: Option<Vec<WidgetRef>>,
pub automatically_imply_actions: bool,
pub flexible_space: Option<WidgetRef>,
pub bottom: Option<PreferredSizeWidgetRef>,
pub elevation: Option<f64>,
pub scrolled_under_elevation: Option<f64>,
pub notification_predicate: ScrollNotificationPredicate,
pub shadow_color: Option<Color>,
pub surface_tint_color: Option<Color>,
pub shape: Option<ShapeBorderRef>,
pub background_color: Option<AnyColor>,
pub foreground_color: Option<Color>,
pub icon_theme: Option<IconThemeData>,
pub actions_icon_theme: Option<IconThemeData>,
pub primary: bool,
pub center_title: Option<bool>,
pub exclude_header_semantics: bool,
pub title_spacing: Option<f64>,
pub toolbar_opacity: f64,
pub bottom_opacity: f64,
pub toolbar_height: Option<f64>,
pub leading_width: Option<f64>,
pub toolbar_text_style: Option<TextStyle>,
pub title_text_style: Option<TextStyle>,
pub system_overlay_style: Option<SystemUiOverlayStyle>,
pub force_material_transparency: bool,
pub use_default_semantics_order: bool,
pub clip_behavior: Option<Clip>,
pub actions_padding: Option<EdgeInsetsGeometry>,
pub animate_color: bool,
}Expand description
A Material Design app bar.
An app bar consists of a toolbar and potentially other widgets, such as a
TabBar and a FlexibleSpaceBar. App bars typically expose one or more
common actions with IconButtons which are optionally followed by a
PopupMenuButton for less common operations (sometimes called the “overflow
menu”).
App bars are typically used in the Scaffold::app_bar property, which places
the app bar as a fixed-height widget at the top of the screen. For a scrollable
app bar, see SliverAppBar, which embeds an AppBar in a sliver for use in
a CustomScrollView.
The AppBar displays the toolbar widgets, leading, title,
and actions, above the bottom (if any). The bottom
is usually used for a TabBar. If a flexible_space widget is
specified then it is stacked behind the toolbar and the bottom widget. When the writing
language is left-to-right (e.g. English), the leading widget is in the top left, the
actions are in the top right, the title is between them, the bottom is at the bottom, and
the flexible space is behind all of them.
If the leading widget is omitted, but the AppBar is in a Scaffold
with a Drawer, then a button will be inserted to open the drawer. Otherwise, if
the nearest Navigator has any previous routes, a BackButton is inserted
instead. This behavior can be turned off by setting the
automatically_imply_leading to false. In that case a
null leading widget will result in the middle/title widget stretching to start.
If the actions widget list is omitted or empty, but the AppBar is in a
Scaffold with an end Drawer, then a button will be inserted to open the end drawer.
This behavior can be turned off by setting the
automatically_imply_actions to false.
The AppBar insets its content based on the ambient MediaQuery’s padding,
to avoid system UI intrusions. It’s taken care of by Scaffold when used in
the Scaffold::app_bar property. When animating an AppBar, unexpected
MediaQuery changes (as is common in Hero animations) may cause the content
to suddenly jump. Wrap the AppBar in a MediaQuery widget, and adjust its
padding such that the animation is smooth.
§Troubleshooting
§Why don’t my TextButton actions appear?
If the app bar’s actions contains TextButtons, they will not
be visible if their foreground (text) color is the same as the
app bar’s background color.
In Material v2 (i.e., when ThemeData::use_material3 is false),
the default app bar background_color is the overall theme’s
ColorScheme::primary if the overall theme’s brightness is
Brightness::Light. Unfortunately this is the same as the default
ButtonStyle::foreground_color for TextButton for light themes.
In this case a preferable text button foreground color is
ColorScheme::on_primary, a color that contrasts nicely with
ColorScheme::primary. To remedy the problem, override
TextButton::style.
See also:
Scaffold, which displays theAppBarin itsScaffold::app_barslot.SliverAppBar, which usesAppBarto provide a flexible app bar that can be used in aCustomScrollView.TabBar, which is typically placed in thebottomslot of theAppBarif the screen has multiple pages arranged in tabs.IconButton, which is used withactionsto show buttons on the app bar.PopupMenuButton, to show a popup menu on the app bar, viaactions.FlexibleSpaceBar, which is used withflexible_spacewhen the app bar can expand and collapse.- https://material.io/design/components/app-bars-top.html
- https://m3.material.io/components/top-app-bar
- Cookbook: Place a floating app bar above a list
Fields§
§key: Option<KeyRef>§leading: Option<WidgetRef>A widget to display before the toolbar’s title.
Typically the leading widget is an Icon or an IconButton.
Becomes the leading component of the NavigationToolbar built
by this widget. The leading widget’s width and height are constrained
to be no bigger than leading_width and
toolbar_height respectively.
If this is null and automatically_imply_leading is
set to true, the AppBar will imply an appropriate widget. For example, if the
AppBar is in a Scaffold that also has a Drawer, the Scaffold will fill this
widget with an IconButton that opens the drawer (using Icons::menu). If
there’s no Drawer and the parent Navigator can go back, the AppBar
will use a BackButton that calls Navigator::maybe_pop.
See also:
Scaffold::app_bar, in which anAppBaris usually placed.Scaffold::drawer, in which theDraweris usually placed.
automatically_imply_leading: boolControls whether we should try to imply the leading widget if null.
If true and AppBar::leading is null, automatically try to deduce what the leading
widget should be. If false and AppBar::leading is null, leading space is given to
AppBar::title. If leading widget is not null, this parameter has no effect.
title: Option<WidgetRef>The primary widget displayed in the app bar.
Becomes the middle component of the NavigationToolbar built by this widget.
Typically a Text widget that contains a description of the current
contents of the app.
The title’s width is constrained to fit within the remaining space
between the toolbar’s leading and actions widgets.
Its height is not constrained. The title is vertically centered and
clipped to fit within the toolbar, whose height is toolbar_height.
Typically this isn’t noticeable because a simple Text title will fit
within the toolbar by default. On the other hand, it is noticeable when a
widget with an intrinsic height that is greater than toolbar_height
is used as the title. For example, when the height of an Image used
as the title exceeds toolbar_height, it will be
centered and clipped (top and bottom), which may be undesirable. In cases like this
the height of the title widget can be constrained.
actions: Option<Vec<WidgetRef>>A list of Widgets to display in a row after the title widget.
Typically these widgets are IconButtons representing common operations.
For less common operations, consider using a PopupMenuButton as the
last action.
The actions become the trailing component of the NavigationToolbar
built by this widget. The height of each action is constrained to be no bigger
than the toolbar_height.
To avoid having the last action covered by the debug banner, you may want
to set the MaterialApp::debug_show_checked_mode_banner to false.
If this is null or empty and automatically_imply_actions
is set to true, the AppBar will imply an appropriate widget. For example, if the
AppBar is in a Scaffold that also has an end Drawer, the Scaffold will fill
this widget with an IconButton that opens the end drawer (using Icons::menu).
automatically_imply_actions: boolControls whether we should try to imply the actions widget if null.
If true and AppBar::actions is null or empty, automatically try to deduce what the
actions widget should be. If false and AppBar::actions is null or empty, the actions
widget list is kept empty. If AppBar::actions is not null, this parameter has no
effect.
flexible_space: Option<WidgetRef>This widget is stacked behind the toolbar and the tab bar. Its height will be the same as the app bar’s overall height.
A flexible space isn’t actually flexible unless the AppBar’s container
changes the AppBar’s size. A SliverAppBar in a CustomScrollView
changes the AppBar’s height when scrolled.
Typically a FlexibleSpaceBar. See FlexibleSpaceBar for details.
bottom: Option<PreferredSizeWidgetRef>This widget appears across the bottom of the app bar.
Typically a TabBar. Only widgets that implement PreferredSizeWidget can
be used at the bottom of an app bar.
See also:
PreferredSize, which can be used to give an arbitrary widget a preferred size.
elevation: Option<f64>The z-coordinate at which to place this app bar relative to its parent.
This property controls the size of the shadow below the app bar if
shadow_color is not null.
If surface_tint_color is not null then it will apply a
surface tint overlay to the background color (see Material::surface_tint_color for
more detail).
The value must be non-negative.
If this property is null, then the ambient AppBarThemeData::elevation
is used. If that is also null, the default value is 4.
See also:
scrolled_under_elevation, which will be used when the app bar has something scrolled underneath it.shadow_color, which is the color of the shadow below the app bar.surface_tint_color, which determines the elevation overlay that will be applied to the background of the app bar.shape, which defines the shape of the app bar’sMaterialand its shadow.
scrolled_under_elevation: Option<f64>The elevation that will be used if this app bar has something scrolled underneath it.
If this property is null, then the ambient
AppBarThemeData::scrolled_under_elevation is used. If that is also null then
elevation is used.
The value must be non-negative.
notification_predicate: ScrollNotificationPredicateA check that specifies which child’s ScrollNotifications should be
listened to.
By default, checks whether notification.depth == 0. Set it to something
else for more complicated layouts.
shadow_color: Option<Color>The color of the shadow below the app bar.
If this property is null, then the ambient AppBarThemeData::shadow_color
is used. If that is also null, the default value is fully opaque black.
surface_tint_color: Option<Color>The color of the surface tint overlay applied to the app bar’s background color to indicate elevation.
If null no overlay will be applied.
shape: Option<ShapeBorderRef>The shape of the app bar’s Material as well as its shadow.
If this property is null, then the ambient AppBarThemeData::shape
is used. Both properties default to null.
If both properties are null then the shape of the app bar’s Material
is just a simple rectangle.
A shadow is only displayed if the elevation is greater than
zero.
background_color: Option<AnyColor>The fill color to use for an app bar’s Material.
If null, then the AppBarTheme background color is used. If that value is also
null:
In Material v2 (i.e., when ThemeData::use_material3 is false),
then AppBar uses the overall theme’s ColorScheme::primary if the
overall theme’s brightness is Brightness::Light, and ColorScheme::surface
if the overall theme’s brightness is Brightness::Dark.
In Material v3 (i.e., when ThemeData::use_material3 is true),
then AppBar uses the overall theme’s ColorScheme::surface
If this color is a WidgetStateColor it will be resolved against
WidgetState::ScrolledUnder when the content of the app’s
primary scrollable overlaps the app bar.
foreground_color: Option<Color>The default color for Text and Icons within the app bar.
If null, then the AppBarTheme foreground color is used. If that
value is also null:
In Material v2 (i.e., when ThemeData::use_material3 is false),
then AppBar uses the overall theme’s ColorScheme::on_primary if the
overall theme’s brightness is Brightness::Light, and ColorScheme::on_surface
if the overall theme’s brightness is Brightness::Dark.
In Material v3 (i.e., when ThemeData::use_material3 is true),
then AppBar uses the overall theme’s ColorScheme::on_surface.
This color is used to configure DefaultTextStyle that contains
the toolbar’s children, and the default IconTheme widgets that
are created if icon_theme and
actions_icon_theme are null.
icon_theme: Option<IconThemeData>The color, opacity, and size to use for toolbar icons.
If this property is null, then a copy of ThemeData::icon_theme
is used, with the IconThemeData::color set to the
app bar’s foreground_color.
See also:
actions_icon_theme, which defines the appearance of icons in theactionslist.
actions_icon_theme: Option<IconThemeData>The color, opacity, and size to use for the icons that appear in the app
bar’s actions.
This property should only be used when the actions should be
themed differently than the icon that appears in the app bar’s leading
widget.
If this property is null, then the ambient AppBarThemeData::actions_icon_theme
is used. If that is also null, then the value of icon_theme is used.
See also:
icon_theme, which defines the appearance of all of the toolbar icons.
primary: boolWhether this app bar is being displayed at the top of the screen.
If true, the app bar’s toolbar elements and bottom widget will be
padded on top by the height of the system status bar. The layout
of the flexible_space is not affected by the
primary property.
center_title: Option<bool>Whether the title should be centered.
If this property is null, then AppBarThemeData::center_title of
ThemeData::app_bar_theme is used. If that is also null, then value is
adapted to the current TargetPlatform.
exclude_header_semantics: boolWhether the title should be wrapped with header Semantics.
If false, the title will be used as SemanticsProperties::names_route
for Android, Fuchsia, Linux, and Windows platform. This means the title is
announced by screen reader when transition to this route.
The accessibility behavior is platform adaptive, based on the device’s
actual platform rather than the theme’s platform setting. This ensures that
assistive technologies like VoiceOver on iOS and macOS receive the correct
names_route semantic information, even when the app’s theme is configured
to mimic a different platform’s appearance.
Defaults to false.
title_spacing: Option<f64>The spacing around title content on the horizontal axis. This spacing
is applied even if there is no leading content or
actions. If you want title to take all the space
available, set this value to 0.0.
If this property is null, then AppBarThemeData::title_spacing of
ThemeData::app_bar_theme is used. If that is also null, then the
default value is NavigationToolbar::K_MIDDLE_SPACING.
toolbar_opacity: f64How opaque the toolbar part of the app bar is.
A value of 1.0 is fully opaque, and a value of 0.0 is fully transparent.
Typically, this value is not changed from its default value (1.0). It is
used by SliverAppBar to animate the opacity of the toolbar when the app
bar is scrolled.
bottom_opacity: f64How opaque the bottom part of the app bar is.
A value of 1.0 is fully opaque, and a value of 0.0 is fully transparent.
Typically, this value is not changed from its default value (1.0). It is
used by SliverAppBar to animate the opacity of the toolbar when the app
bar is scrolled.
toolbar_height: Option<f64>Defines the height of the toolbar component of an AppBar.
By default, the value of toolbar_height is K_TOOLBAR_HEIGHT.
leading_width: Option<f64>Defines the width of AppBar::leading widget.
By default, the value of AppBar::leading_width is 56.0.
toolbar_text_style: Option<TextStyle>The default text style for the AppBar’s leading, and
actions widgets, but not its title.
If this property is null, then AppBarThemeData::toolbar_text_style of
ThemeData::app_bar_theme is used. If that is also null, the default
value is a copy of the overall theme’s TextTheme::body_medium
TextStyle, with color set to the app bar’s foreground_color.
See also:
title_text_style, which overrides the default text style for thetitle.DefaultTextStyle, which overrides the default text style for all of the widgets in a subtree.
title_text_style: Option<TextStyle>The default text style for the AppBar’s title widget.
If this property is null, then AppBarThemeData::title_text_style of
ThemeData::app_bar_theme is used. If that is also null, the default
value is a copy of the overall theme’s TextTheme::title_large
TextStyle, with color set to the app bar’s foreground_color.
See also:
toolbar_text_style, which is the default text style for the AppBar’stitle,leading, andactionswidgets, also known as the AppBar’s “toolbar”.DefaultTextStyle, which overrides the default text style for all of the widgets in a subtree.
system_overlay_style: Option<SystemUiOverlayStyle>Specifies the style to use for the system overlays (e.g. the status bar on Android or iOS, the system navigation bar on Android).
If this property is null, then AppBarThemeData::system_overlay_style of
ThemeData::app_bar_theme is used. If that is also null, an appropriate
SystemUiOverlayStyle is calculated based on the
background_color.
The AppBar’s descendants are built within a
AnnotatedRegion<SystemUiOverlayStyle> widget, which causes
SystemChrome::set_system_ui_overlay_style to be called
automatically. Apps should not enclose an AppBar with their
own AnnotatedRegion.
See also:
AnnotatedRegion, for placingSystemUiOverlayStylein the layer tree.SystemChrome::set_system_ui_overlay_style, the imperative API for setting system overlays style.
force_material_transparency: boolForces the AppBar’s Material widget type to be MaterialType::Transparency
(instead of Material’s default type).
This will remove the visual display of background_color and
elevation, and affect other characteristics of the AppBar’s
Material widget.
Provided for cases where the app bar is to be transparent, and gestures
must pass through the app bar to widgets beneath the app bar (i.e. with
Scaffold::extend_body_behind_app_bar set to true).
Defaults to false.
use_default_semantics_order: boolWhether to use the default semantic ordering for the app bar’s children for accessibility traversal order.
If this is set to true, the app bar will use the default semantic ordering, which places the flexible space after the main content in the semantics tree. This affects how screen readers and other assistive technologies navigate the app bar’s content.
Set this to false if you want to customize semantics traversal order in the app bar.
You can then assign SemanticsSortKeys to app bar’s children to control the order.
Defaults to true.
clip_behavior: Option<Clip>The content will be clipped (or not) according to this option.
See the enum Clip for details of all possible options and their common use cases.
actions_padding: Option<EdgeInsetsGeometry>The padding between the actions and the end of the AppBar.
Defaults to zero.
animate_color: boolWhether the color should be animated.
Implementations§
Source§impl AppBar
impl AppBar
Sourcepub fn new() -> AppBar
pub fn new() -> AppBar
Creates a Material Design app bar.
If elevation is specified, it must be non-negative.
Typically used in the Scaffold::app_bar property.
Sourcepub fn leading<K>(self, leading: impl IntoWidget<K>) -> AppBar
pub fn leading<K>(self, leading: impl IntoWidget<K>) -> AppBar
Dart AppBar(leading:).
Sourcepub fn automatically_imply_leading(
self,
automatically_imply_leading: bool,
) -> AppBar
pub fn automatically_imply_leading( self, automatically_imply_leading: bool, ) -> AppBar
Dart AppBar(automaticallyImplyLeading:).
Sourcepub fn title<K>(self, title: impl IntoWidget<K>) -> AppBar
pub fn title<K>(self, title: impl IntoWidget<K>) -> AppBar
Dart AppBar(title:).
Sourcepub fn automatically_imply_actions(
self,
automatically_imply_actions: bool,
) -> AppBar
pub fn automatically_imply_actions( self, automatically_imply_actions: bool, ) -> AppBar
Dart AppBar(automaticallyImplyActions:).
Sourcepub fn flexible_space<K>(self, flexible_space: impl IntoWidget<K>) -> AppBar
pub fn flexible_space<K>(self, flexible_space: impl IntoWidget<K>) -> AppBar
Dart AppBar(flexibleSpace:).
Sourcepub fn bottom(self, bottom: PreferredSizeWidgetRef) -> AppBar
pub fn bottom(self, bottom: PreferredSizeWidgetRef) -> AppBar
Dart AppBar(bottom:).
Sourcepub fn scrolled_under_elevation(self, scrolled_under_elevation: f64) -> AppBar
pub fn scrolled_under_elevation(self, scrolled_under_elevation: f64) -> AppBar
Dart AppBar(scrolledUnderElevation:).
Sourcepub fn notification_predicate(
self,
notification_predicate: ScrollNotificationPredicate,
) -> AppBar
pub fn notification_predicate( self, notification_predicate: ScrollNotificationPredicate, ) -> AppBar
Dart AppBar(notificationPredicate:).
Sourcepub fn shadow_color(self, shadow_color: Color) -> AppBar
pub fn shadow_color(self, shadow_color: Color) -> AppBar
Dart AppBar(shadowColor:).
Sourcepub fn surface_tint_color(self, surface_tint_color: Color) -> AppBar
pub fn surface_tint_color(self, surface_tint_color: Color) -> AppBar
Dart AppBar(surfaceTintColor:).
Sourcepub fn shape(self, shape: impl Into<ShapeBorderRef>) -> AppBar
pub fn shape(self, shape: impl Into<ShapeBorderRef>) -> AppBar
Dart AppBar(shape:).
Sourcepub fn background_color(self, background_color: impl Into<AnyColor>) -> AppBar
pub fn background_color(self, background_color: impl Into<AnyColor>) -> AppBar
Dart AppBar(backgroundColor:).
Sourcepub fn foreground_color(self, foreground_color: Color) -> AppBar
pub fn foreground_color(self, foreground_color: Color) -> AppBar
Dart AppBar(foregroundColor:).
Sourcepub fn icon_theme(self, icon_theme: IconThemeData) -> AppBar
pub fn icon_theme(self, icon_theme: IconThemeData) -> AppBar
Dart AppBar(iconTheme:).
Sourcepub fn actions_icon_theme(self, actions_icon_theme: IconThemeData) -> AppBar
pub fn actions_icon_theme(self, actions_icon_theme: IconThemeData) -> AppBar
Dart AppBar(actionsIconTheme:).
Sourcepub fn center_title(self, center_title: bool) -> AppBar
pub fn center_title(self, center_title: bool) -> AppBar
Dart AppBar(centerTitle:).
Sourcepub fn exclude_header_semantics(self, exclude_header_semantics: bool) -> AppBar
pub fn exclude_header_semantics(self, exclude_header_semantics: bool) -> AppBar
Dart AppBar(excludeHeaderSemantics:).
Sourcepub fn title_spacing(self, title_spacing: f64) -> AppBar
pub fn title_spacing(self, title_spacing: f64) -> AppBar
Dart AppBar(titleSpacing:).
Sourcepub fn toolbar_opacity(self, toolbar_opacity: f64) -> AppBar
pub fn toolbar_opacity(self, toolbar_opacity: f64) -> AppBar
Dart AppBar(toolbarOpacity:).
Sourcepub fn bottom_opacity(self, bottom_opacity: f64) -> AppBar
pub fn bottom_opacity(self, bottom_opacity: f64) -> AppBar
Dart AppBar(bottomOpacity:).
Sourcepub fn toolbar_height(self, toolbar_height: f64) -> AppBar
pub fn toolbar_height(self, toolbar_height: f64) -> AppBar
Dart AppBar(toolbarHeight:).
Sourcepub fn leading_width(self, leading_width: f64) -> AppBar
pub fn leading_width(self, leading_width: f64) -> AppBar
Dart AppBar(leadingWidth:).
Sourcepub fn toolbar_text_style(self, toolbar_text_style: TextStyle) -> AppBar
pub fn toolbar_text_style(self, toolbar_text_style: TextStyle) -> AppBar
Dart AppBar(toolbarTextStyle:).
Sourcepub fn title_text_style(self, title_text_style: TextStyle) -> AppBar
pub fn title_text_style(self, title_text_style: TextStyle) -> AppBar
Dart AppBar(titleTextStyle:).
Sourcepub fn system_overlay_style(
self,
system_overlay_style: SystemUiOverlayStyle,
) -> AppBar
pub fn system_overlay_style( self, system_overlay_style: SystemUiOverlayStyle, ) -> AppBar
Dart AppBar(systemOverlayStyle:).
Sourcepub fn force_material_transparency(
self,
force_material_transparency: bool,
) -> AppBar
pub fn force_material_transparency( self, force_material_transparency: bool, ) -> AppBar
Dart AppBar(forceMaterialTransparency:).
Sourcepub fn use_default_semantics_order(
self,
use_default_semantics_order: bool,
) -> AppBar
pub fn use_default_semantics_order( self, use_default_semantics_order: bool, ) -> AppBar
Dart AppBar(useDefaultSemanticsOrder:).
Sourcepub fn clip_behavior(self, clip_behavior: Clip) -> AppBar
pub fn clip_behavior(self, clip_behavior: Clip) -> AppBar
Dart AppBar(clipBehavior:).
Sourcepub fn actions_padding(
self,
actions_padding: impl Into<EdgeInsetsGeometry>,
) -> AppBar
pub fn actions_padding( self, actions_padding: impl Into<EdgeInsetsGeometry>, ) -> AppBar
Dart AppBar(actionsPadding:).
Sourcepub fn animate_color(self, animate_color: bool) -> AppBar
pub fn animate_color(self, animate_color: bool) -> AppBar
Dart AppBar(animateColor:).
Sourcepub fn preferred_height_for(
app: &mut App,
context: BuildContext,
preferred_size: &AnySize,
) -> f64
pub fn preferred_height_for( app: &mut App, context: BuildContext, preferred_size: &AnySize, ) -> f64
Used by Scaffold to compute its AppBar’s overall height. The returned value is
the same preferred_size.height unless AppBar::toolbar_height was null and
AppBarTheme::of(context).toolbar_height is non-null. In that case the
return value is the sum of the theme’s toolbar height and the height of
the app bar’s AppBar::bottom widget.
Trait Implementations§
Source§impl PreferredSizeWidget for AppBar
impl PreferredSizeWidget for AppBar
Source§fn preferred_size(&self) -> AnySize
fn preferred_size(&self) -> AnySize
A size whose height is the sum of toolbar_height and the
bottom widget’s preferred height.
Scaffold uses this size to set its app bar’s height.
Dart fills this field in the constructor; a fluent chain has no such point, so it is worked out from the fields when it is read.
Source§impl StatefulWidget for AppBar
impl StatefulWidget for AppBar
Source§type State = AppBarState
type State = AppBarState
Source§fn as_preferred_size_widget(&self) -> Option<&dyn PreferredSizeWidget>
fn as_preferred_size_widget(&self) -> Option<&dyn PreferredSizeWidget>
Source§fn create_state(&self) -> AppBarState
fn create_state(&self) -> AppBarState
Source§fn debug_fill_properties(
&self,
_app: &App,
properties: &mut DiagnosticPropertiesBuilder,
)
fn debug_fill_properties( &self, _app: &App, properties: &mut DiagnosticPropertiesBuilder, )
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 type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
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 AppBar
impl !Send for AppBar
impl !Sync for AppBar
impl !UnwindSafe for AppBar
impl Forget for AppBar
impl Freeze for AppBarwhere
*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<Rc<dyn Widget>>: Freeze,
*const RcInner<dyn Fn(&(dyn ScrollNotification + 'static)) -> bool> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&(dyn ScrollNotification + 'static)) -> bool>>: Freeze,
*const RcInner<dyn ShapeBorder> is !null: Freeze,
PhantomData<RcInner<dyn ShapeBorder>>: Freeze,
&'static dyn ColorExtension: Freeze,
*const RcInner<dyn ColorExtension> is !null: Freeze,
PhantomData<RcInner<dyn ColorExtension>>: Freeze,
PhantomData<Shadow>: Freeze,
*const RcInner<dyn Fn(&IconThemeData, &mut App, AnyElement) -> IconThemeData> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&IconThemeData, &mut App, AnyElement) -> IconThemeData>>: Freeze,
PhantomData<u8>: Freeze,
PhantomData<String>: Freeze,
*const RcInner<Paint> is !null: Freeze,
PhantomData<RcInner<Paint>>: Freeze,
PhantomData<FontFeature>: Freeze,
PhantomData<FontVariation>: Freeze,
impl Move for AppBar
impl Unpin for AppBarwhere
Rc<dyn Key>: Unpin,
Rc<dyn Widget>: Unpin,
*const u8 is !null: Unpin,
Rc<dyn Fn(&(dyn ScrollNotification + 'static)) -> bool>: Unpin,
Rc<dyn ShapeBorder>: Unpin,
&'static dyn ColorExtension: Unpin,
Rc<dyn ColorExtension>: Unpin,
Rc<dyn Fn(&IconThemeData, &mut App, AnyElement) -> IconThemeData>: Unpin,
Rc<Paint>: Unpin,
impl UnsafeUnpin for AppBarwhere
*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<Rc<dyn Widget>>: UnsafeUnpin,
*const RcInner<dyn Fn(&(dyn ScrollNotification + 'static)) -> bool> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&(dyn ScrollNotification + 'static)) -> bool>>: UnsafeUnpin,
*const RcInner<dyn ShapeBorder> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn ShapeBorder>>: UnsafeUnpin,
&'static dyn ColorExtension: UnsafeUnpin,
*const RcInner<dyn ColorExtension> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn ColorExtension>>: UnsafeUnpin,
PhantomData<Shadow>: UnsafeUnpin,
*const RcInner<dyn Fn(&IconThemeData, &mut App, AnyElement) -> IconThemeData> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&IconThemeData, &mut App, AnyElement) -> IconThemeData>>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
*const RcInner<Paint> is !null: UnsafeUnpin,
PhantomData<RcInner<Paint>>: UnsafeUnpin,
PhantomData<FontFeature>: UnsafeUnpin,
PhantomData<FontVariation>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<W> IntoWidget<StatefulKind> for Wwhere
W: StatefulWidget,
impl<W> IntoWidget<StatefulKind> for Wwhere
W: StatefulWidget,
Source§fn into_widget(self) -> Rc<dyn Widget>
fn into_widget(self) -> Rc<dyn Widget>
creation_location.