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
6294dd59
Unverified
Commit
6294dd59
authored
May 18, 2020
by
Andre
Committed by
GitHub
May 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make _RenderButtonBarRow.constraints null aware (#57261)
parent
f2c12d7e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
button_bar.dart
packages/flutter/lib/src/material/button_bar.dart
+1
-1
button_bar_test.dart
packages/flutter/test/material/button_bar_test.dart
+14
-0
No files found.
packages/flutter/lib/src/material/button_bar.dart
View file @
6294dd59
...
...
@@ -334,7 +334,7 @@ class _RenderButtonBarRow extends RenderFlex {
BoxConstraints
get
constraints
{
if
(
_hasCheckedLayoutWidth
)
return
super
.
constraints
;
return
super
.
constraints
.
copyWith
(
maxWidth:
double
.
infinity
);
return
super
.
constraints
?
.
copyWith
(
maxWidth:
double
.
infinity
);
}
@override
...
...
packages/flutter/test/material/button_bar_test.dart
View file @
6294dd59
...
...
@@ -627,4 +627,18 @@ void main() {
},
);
});
testWidgets
(
'_RenderButtonBarRow.constraints works before layout'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
const
MaterialApp
(
home:
ButtonBar
()),
Duration
.
zero
,
EnginePhase
.
build
,
);
final
Finder
buttonBar
=
find
.
byWidgetPredicate
((
Widget
w
)
=>
'
${w.runtimeType}
'
==
'_ButtonBarRow'
);
final
RenderBox
renderButtonBar
=
tester
.
renderObject
(
buttonBar
)
as
RenderBox
;
expect
(
renderButtonBar
.
debugNeedsLayout
,
isTrue
);
expect
(
renderButtonBar
.
constraints
,
isNull
);
});
}
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