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
4d78435a
Unverified
Commit
4d78435a
authored
Feb 18, 2021
by
Hans Muller
Committed by
GitHub
Feb 18, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed ButtonBar from the Scaffold and About widgets (#76246)
parent
23e41734
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
12 deletions
+29
-12
about.dart
packages/flutter/lib/src/material/about.dart
+9
-6
scaffold.dart
packages/flutter/lib/src/material/scaffold.dart
+11
-4
scaffold_test.dart
packages/flutter/test/material/scaffold_test.dart
+9
-2
No files found.
packages/flutter/lib/src/material/about.dart
View file @
4d78435a
...
@@ -11,7 +11,6 @@ import 'package:flutter/widgets.dart' hide Flow;
...
@@ -11,7 +11,6 @@ import 'package:flutter/widgets.dart' hide Flow;
import
'app_bar.dart'
;
import
'app_bar.dart'
;
import
'back_button.dart'
;
import
'back_button.dart'
;
import
'button_bar.dart'
;
import
'card.dart'
;
import
'card.dart'
;
import
'constants.dart'
;
import
'constants.dart'
;
import
'debug.dart'
;
import
'debug.dart'
;
...
@@ -1534,13 +1533,17 @@ class _MasterDetailScaffoldState extends State<_MasterDetailScaffold>
...
@@ -1534,13 +1533,17 @@ class _MasterDetailScaffoldState extends State<_MasterDetailScaffold>
mainAxisAlignment:
MainAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
<
Widget
>[
children:
<
Widget
>[
ConstrainedBox
(
ConstrainedBox
(
constraints:
constraints:
BoxConstraints
.
tightFor
(
width:
masterViewWidth
),
BoxConstraints
.
tightFor
(
width:
masterViewWidth
),
child:
IconTheme
(
child:
IconTheme
(
data:
Theme
.
of
(
context
).
primaryIconTheme
,
data:
Theme
.
of
(
context
).
primaryIconTheme
,
child:
ButtonBar
(
child:
Container
(
children:
alignment:
AlignmentDirectional
.
centerEnd
,
widget
.
actionBuilder
!(
context
,
_ActionLevel
.
view
),
padding:
const
EdgeInsets
.
all
(
8
),
child:
OverflowBar
(
spacing:
8
,
overflowAlignment:
OverflowBarAlignment
.
end
,
children:
widget
.
actionBuilder
!(
context
,
_ActionLevel
.
view
),
),
),
),
),
),
)
)
...
...
packages/flutter/lib/src/material/scaffold.dart
View file @
4d78435a
...
@@ -13,7 +13,6 @@ import 'package:flutter/gestures.dart' show DragStartBehavior;
...
@@ -13,7 +13,6 @@ import 'package:flutter/gestures.dart' show DragStartBehavior;
import
'app_bar.dart'
;
import
'app_bar.dart'
;
import
'bottom_sheet.dart'
;
import
'bottom_sheet.dart'
;
import
'button_bar.dart'
;
import
'colors.dart'
;
import
'colors.dart'
;
import
'curves.dart'
;
import
'curves.dart'
;
import
'debug.dart'
;
import
'debug.dart'
;
...
@@ -1555,7 +1554,7 @@ class Scaffold extends StatefulWidget {
...
@@ -1555,7 +1554,7 @@ class Scaffold extends StatefulWidget {
/// Typically this is a list of [TextButton] widgets. These buttons are
/// Typically this is a list of [TextButton] widgets. These buttons are
/// persistently visible, even if the [body] of the scaffold scrolls.
/// persistently visible, even if the [body] of the scaffold scrolls.
///
///
/// These widgets will be wrapped in a
[Button
Bar].
/// These widgets will be wrapped in a
n [Overflow
Bar].
///
///
/// The [persistentFooterButtons] are rendered above the
/// The [persistentFooterButtons] are rendered above the
/// [bottomNavigationBar] but below the [body].
/// [bottomNavigationBar] but below the [body].
...
@@ -3114,11 +3113,19 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin, Resto
...
@@ -3114,11 +3113,19 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin, Resto
),
),
child:
SafeArea
(
child:
SafeArea
(
top:
false
,
top:
false
,
child:
ButtonBar
(
child:
IntrinsicHeight
(
child:
Container
(
alignment:
AlignmentDirectional
.
centerEnd
,
padding:
const
EdgeInsets
.
all
(
8
),
child:
OverflowBar
(
spacing:
8
,
overflowAlignment:
OverflowBarAlignment
.
end
,
children:
widget
.
persistentFooterButtons
!,
children:
widget
.
persistentFooterButtons
!,
),
),
),
),
),
),
),
),
_ScaffoldSlot
.
persistentFooter
,
_ScaffoldSlot
.
persistentFooter
,
removeLeftPadding:
false
,
removeLeftPadding:
false
,
removeTopPadding:
true
,
removeTopPadding:
true
,
...
...
packages/flutter/test/material/scaffold_test.dart
View file @
4d78435a
...
@@ -492,8 +492,8 @@ void main() {
...
@@ -492,8 +492,8 @@ void main() {
),
),
),
),
);
);
expect
(
tester
.
getBottomLeft
(
find
.
byType
(
ButtonBar
)),
const
Offset
(
10.0
,
560.0
));
expect
(
tester
.
getBottomLeft
(
_findButtonBar
(
)),
const
Offset
(
10.0
,
560.0
));
expect
(
tester
.
getBottomRight
(
find
.
byType
(
ButtonBar
)),
const
Offset
(
770.0
,
560.0
));
expect
(
tester
.
getBottomRight
(
_findButtonBar
(
)),
const
Offset
(
770.0
,
560.0
));
});
});
testWidgets
(
'Persistent bottom buttons bottom padding is not consumed by viewInsets'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Persistent bottom buttons bottom padding is not consumed by viewInsets'
,
(
WidgetTester
tester
)
async
{
...
@@ -2293,3 +2293,10 @@ class _CustomPageRoute<T> extends PageRoute<T> {
...
@@ -2293,3 +2293,10 @@ class _CustomPageRoute<T> extends PageRoute<T> {
return
child
;
return
child
;
}
}
}
}
// What was the Scaffold's ButtonBar when many of these tests were written,
// is now a Container with an OverflowBar child. The Container's size and location
// match the original ButtonBar's size and location.
Finder
_findButtonBar
(
)
{
return
find
.
ancestor
(
of:
find
.
byType
(
OverflowBar
),
matching:
find
.
byType
(
Container
)).
first
;
}
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