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
31972299
Unverified
Commit
31972299
authored
Nov 05, 2020
by
LongCatIsLooong
Committed by
GitHub
Nov 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix typo in computeMaxIntrinsicWidth implementation (#69812)
parent
b26970b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
chip.dart
packages/flutter/lib/src/material/chip.dart
+1
-1
chip_test.dart
packages/flutter/test/material/chip_test.dart
+12
-0
No files found.
packages/flutter/lib/src/material/chip.dart
View file @
31972299
...
@@ -2488,7 +2488,7 @@ class _RenderChip extends RenderBox {
...
@@ -2488,7 +2488,7 @@ class _RenderChip extends RenderBox {
@override
@override
double
computeMaxIntrinsicWidth
(
double
height
)
{
double
computeMaxIntrinsicWidth
(
double
height
)
{
final
double
overallPadding
=
theme
.
padding
.
vertic
al
+
final
double
overallPadding
=
theme
.
padding
.
horizont
al
+
theme
.
labelPadding
.
horizontal
;
theme
.
labelPadding
.
horizontal
;
return
overallPadding
+
return
overallPadding
+
_maxWidth
(
avatar
,
height
)
+
_maxWidth
(
avatar
,
height
)
+
...
...
packages/flutter/test/material/chip_test.dart
View file @
31972299
...
@@ -2916,6 +2916,18 @@ void main() {
...
@@ -2916,6 +2916,18 @@ void main() {
await
tapGesture
.
up
();
await
tapGesture
.
up
();
});
});
testWidgets
(
'intrinsicHeight implementation meets constraints'
,
(
WidgetTester
tester
)
async
{
// Regression text for https://github.com/flutter/flutter/issues/49478.
await
tester
.
pumpWidget
(
_wrapForChip
(
child:
const
Chip
(
label:
Text
(
'text'
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
20
),
),
));
expect
(
tester
.
takeException
(),
isNull
);
});
}
}
class
_MaterialStateOutlinedBorder
extends
StadiumBorder
implements
MaterialStateOutlinedBorder
{
class
_MaterialStateOutlinedBorder
extends
StadiumBorder
implements
MaterialStateOutlinedBorder
{
...
...
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