Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
bf4cde74
Unverified
Commit
bf4cde74
authored
Jan 31, 2020
by
Hans Muller
Committed by
GitHub
Jan 31, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarified AppBar toolbar layout API docs (#49583)
parent
e03f4391
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
3 deletions
+38
-3
app_bar.dart
packages/flutter/lib/src/material/app_bar.dart
+38
-3
No files found.
packages/flutter/lib/src/material/app_bar.dart
View file @
bf4cde74
...
...
@@ -207,6 +207,12 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
/// A widget to display before the [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 toolbar's height, which is [kToolbarHeight].
///
/// If this is null and [automaticallyImplyLeading] 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
...
...
@@ -255,15 +261,44 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
/// The primary widget displayed in the app bar.
///
/// Typically a [Text] widget containing a description of the current contents
/// of the app.
/// Typically a [Text] widget that contains a description of the current
/// contents of the app.
///
/// Becomes the middle component of the [NavigationToolBar] built by this widget.
/// 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 [kToolbarHeight]. 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 [kToolbarHeight]
/// is used as the [title]. For example, when the height of an Image used
/// as the [title] exceeds [kToolbarHeight], 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. For example:
///
/// ```dart
/// MaterialApp(
/// home: Scaffold(
/// appBar: AppBar(
/// title: SizedBox(
/// height: kToolbarHeight,
/// child: child: Image.asset(logoAsset),
/// ),
/// ),
/// )
/// ```
final
Widget
title
;
/// Widgets to display after the [title] widget.
/// Widgets to display
in a row
after the [title] widget.
///
/// Typically these widgets are [IconButton]s 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 the height of each action is constrained to be no bigger
/// than the toolbar's height, which is [kToolbarHeight].
final
List
<
Widget
>
actions
;
/// This widget is stacked behind the toolbar and the tab bar. It's height will
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment