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 {
...
@@ -1355,52 +1355,58 @@ class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate {
/// ],
/// ],
/// ),
/// ),
/// bottomNavigationBar: BottomAppBar(
/// bottomNavigationBar: BottomAppBar(
/// child: ButtonBar(
/// child: Padding(
/// alignment: MainAxisAlignment.spaceEvenly,
/// padding: const EdgeInsets.all(8),
/// children: <Widget>[
/// child: OverflowBar(
/// Row(
/// alignment: MainAxisAlignment.spaceEvenly,
/// children: <Widget>[
/// children: <Widget>[
/// const Text('pinned'),
/// Row(
/// Switch(
/// mainAxisSize: MainAxisSize.min,
/// onChanged: (bool val) {
/// children: <Widget>[
/// setState(() {
/// const Text('pinned'),
/// _pinned = val;
/// Switch(
/// });
/// onChanged: (bool val) {
/// },
/// setState(() {
/// value: _pinned,
/// _pinned = val;
/// ),
/// });
/// ],
/// },
/// ),
/// value: _pinned,
/// Row(
/// ),
/// children: <Widget>[
/// ],
/// const Text('snap'),
/// ),
/// Switch(
/// Row(
/// onChanged: (bool val) {
/// mainAxisSize: MainAxisSize.min,
/// setState(() {
/// children: <Widget>[
/// _snap = val;
/// const Text('snap'),
/// // Snapping only applies when the app bar is floating.
/// Switch(
/// _floating = _floating || _snap;
/// onChanged: (bool val) {
/// });
/// setState(() {
/// },
/// _snap = val;
/// value: _snap,
/// // Snapping only applies when the app bar is floating.
/// ),
/// _floating = _floating || _snap;
/// ],
/// });
/// ),
/// },
/// Row(
/// value: _snap,
/// children: <Widget>[
/// ),
/// const Text('floating'),
/// ],
/// Switch(
/// ),
/// onChanged: (bool val) {
/// Row(
/// setState(() {
/// mainAxisSize: MainAxisSize.min,
/// _floating = val;
/// children: <Widget>[
/// _snap = _snap && _floating;
/// const Text('floating'),
/// });
/// Switch(
/// },
/// onChanged: (bool val) {
/// value: _floating,
/// 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';
...
@@ -6,7 +6,6 @@ import 'dart:ui';
import
'package:flutter/widgets.dart'
;
import
'package:flutter/widgets.dart'
;
import
'button_bar.dart'
;
import
'colors.dart'
;
import
'colors.dart'
;
import
'debug.dart'
;
import
'debug.dart'
;
import
'dialog_theme.dart'
;
import
'dialog_theme.dart'
;
...
@@ -339,18 +338,15 @@ class AlertDialog extends StatelessWidget {
...
@@ -339,18 +338,15 @@ class AlertDialog extends StatelessWidget {
final
TextStyle
?
contentTextStyle
;
final
TextStyle
?
contentTextStyle
;
/// The (optional) set of actions that are displayed at the bottom of the
/// 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
/// Typically this is a list of [TextButton] widgets. It is recommended to
/// set the [Text.textAlign] to [TextAlign.end] for the [Text] within the
/// set the [Text.textAlign] to [TextAlign.end] for the [Text] within the
/// [TextButton], so that buttons whose labels wrap to an extra line align
/// [TextButton], so that buttons whose labels wrap to an extra line align
/// with the overall [ButtonBar]'s alignment within the dialog.
/// with the overall [OverflowBar]'s alignment within the dialog.
///
/// These widgets will be wrapped in a [ButtonBar], which introduces 8 pixels
/// of padding on each side.
///
///
/// If the [title] is not null but the [content] _is_ null, then an extra 20
/// 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].
/// from the [actions].
final
List
<
Widget
>?
actions
;
final
List
<
Widget
>?
actions
;
...
@@ -381,7 +377,7 @@ class AlertDialog extends StatelessWidget {
...
@@ -381,7 +377,7 @@ class AlertDialog extends StatelessWidget {
///
///
/// See also:
/// See also:
///
///
/// * [
Button
Bar], which [actions] configures to lay itself out.
/// * [
Overflow
Bar], which [actions] configures to lay itself out.
final
EdgeInsetsGeometry
actionsPadding
;
final
EdgeInsetsGeometry
actionsPadding
;
/// Defines the horizontal layout of the [actions] according to the same
/// Defines the horizontal layout of the [actions] according to the same
...
@@ -404,16 +400,13 @@ class AlertDialog extends StatelessWidget {
...
@@ -404,16 +400,13 @@ class AlertDialog extends StatelessWidget {
/// property is set to [VerticalDirection.up], since it "starts" at the
/// property is set to [VerticalDirection.up], since it "starts" at the
/// bottom and "ends" at the top.
/// 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:
/// See also:
///
///
/// * [
Button
Bar], which [actions] configures to lay itself out.
/// * [
Overflow
Bar], which [actions] configures to lay itself out.
final
VerticalDirection
?
actionsOverflowDirection
;
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
/// If the widgets in [actions] do not fit into a single row, they are
/// arranged into a column. This parameter provides additional
/// 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