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
e7705f20
Unverified
Commit
e7705f20
authored
Jun 28, 2021
by
Hans Muller
Committed by
GitHub
Jun 28, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace uses of ButtonBar in doc/samples with Overflowbar (#85358)
parent
93ca2b5a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
60 deletions
+59
-60
app_bar.dart
packages/flutter/lib/src/material/app_bar.dart
+52
-46
dialog.dart
packages/flutter/lib/src/material/dialog.dart
+7
-14
No files found.
packages/flutter/lib/src/material/app_bar.dart
View file @
e7705f20
...
...
@@ -1355,52 +1355,58 @@ class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate {
/// ],
/// ),
/// bottomNavigationBar: BottomAppBar(
/// child: ButtonBar(
/// alignment: MainAxisAlignment.spaceEvenly,
/// children: <Widget>[
/// Row(
/// children: <Widget>[
/// const Text('pinned'),
/// Switch(
/// onChanged: (bool val) {
/// setState(() {
/// _pinned = val;
/// });
/// },
/// value: _pinned,
/// ),
/// ],
/// ),
/// Row(
/// children: <Widget>[
/// const Text('snap'),
/// Switch(
/// onChanged: (bool val) {
/// setState(() {
/// _snap = val;
/// // Snapping only applies when the app bar is floating.
/// _floating = _floating || _snap;
/// });
/// },
/// value: _snap,
/// ),
/// ],
/// ),
/// Row(
/// children: <Widget>[
/// const Text('floating'),
/// Switch(
/// onChanged: (bool val) {
/// setState(() {
/// _floating = val;
/// _snap = _snap && _floating;
/// });
/// },
/// value: _floating,
/// ),
/// ],
/// ),
/// ],
/// child: Padding(
/// padding: const EdgeInsets.all(8),
/// child: OverflowBar(
/// alignment: MainAxisAlignment.spaceEvenly,
/// children: <Widget>[
/// Row(
/// mainAxisSize: MainAxisSize.min,
/// children: <Widget>[
/// const Text('pinned'),
/// Switch(
/// onChanged: (bool val) {
/// setState(() {
/// _pinned = val;
/// });
/// },
/// value: _pinned,
/// ),
/// ],
/// ),
/// Row(
/// mainAxisSize: MainAxisSize.min,
/// children: <Widget>[
/// const Text('snap'),
/// Switch(
/// onChanged: (bool val) {
/// setState(() {
/// _snap = val;
/// // Snapping only applies when the app bar is floating.
/// _floating = _floating || _snap;
/// });
/// },
/// value: _snap,
/// ),
/// ],
/// ),
/// Row(
/// mainAxisSize: MainAxisSize.min,
/// children: <Widget>[
/// const Text('floating'),
/// Switch(
/// onChanged: (bool val) {
/// setState(() {
/// _floating = val;
/// _snap = _snap && _floating;
/// });
/// },
/// value: _floating,
/// ),
/// ],
/// ),
/// ],
/// ),
/// ),
/// ),
/// );
...
...
packages/flutter/lib/src/material/dialog.dart
View file @
e7705f20
...
...
@@ -6,7 +6,6 @@ import 'dart:ui';
import
'package:flutter/widgets.dart'
;
import
'button_bar.dart'
;
import
'colors.dart'
;
import
'debug.dart'
;
import
'dialog_theme.dart'
;
...
...
@@ -339,18 +338,15 @@ class AlertDialog extends StatelessWidget {
final
TextStyle
?
contentTextStyle
;
/// The (optional) set of actions that are displayed at the bottom of the
/// dialog.
/// dialog
with an [OverflowBar]
.
///
/// Typically this is a list of [TextButton] widgets. It is recommended to
/// set the [Text.textAlign] to [TextAlign.end] for the [Text] within the
/// [TextButton], so that buttons whose labels wrap to an extra line align
/// with the overall [ButtonBar]'s alignment within the dialog.
///
/// These widgets will be wrapped in a [ButtonBar], which introduces 8 pixels
/// of padding on each side.
/// with the overall [OverflowBar]'s alignment within the dialog.
///
/// If the [title] is not null but the [content] _is_ null, then an extra 20
/// pixels of padding is added above the [
Button
Bar] to separate the [title]
/// pixels of padding is added above the [
Overflow
Bar] to separate the [title]
/// from the [actions].
final
List
<
Widget
>?
actions
;
...
...
@@ -381,7 +377,7 @@ class AlertDialog extends StatelessWidget {
///
/// See also:
///
/// * [
Button
Bar], which [actions] configures to lay itself out.
/// * [
Overflow
Bar], which [actions] configures to lay itself out.
final
EdgeInsetsGeometry
actionsPadding
;
/// Defines the horizontal layout of the [actions] according to the same
...
...
@@ -404,16 +400,13 @@ class AlertDialog extends StatelessWidget {
/// property is set to [VerticalDirection.up], since it "starts" at the
/// bottom and "ends" at the top.
///
/// If null then it will use the surrounding
/// [ButtonBarThemeData.overflowDirection]. If that is null, it will
/// default to [VerticalDirection.down].
///
/// See also:
///
/// * [
Button
Bar], which [actions] configures to lay itself out.
/// * [
Overflow
Bar], which [actions] configures to lay itself out.
final
VerticalDirection
?
actionsOverflowDirection
;
/// The spacing between [actions] when the button bar overflows.
/// The spacing between [actions] when the [OverflowBar] switches
/// to a column layout because the actions don't fit horizontally.
///
/// If the widgets in [actions] do not fit into a single row, they are
/// arranged into a column. This parameter provides additional
...
...
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