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
04ce9d28
Unverified
Commit
04ce9d28
authored
Jun 22, 2020
by
Jonah Williams
Committed by
GitHub
Jun 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Fix outline button solid path when BorderSize.width is used (#51581)" (#60000)
This reverts commit
59956617
.
parent
59956617
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
38 deletions
+3
-38
outline_button.dart
packages/flutter/lib/src/material/outline_button.dart
+1
-1
outline_button_test.dart
packages/flutter/test/material/outline_button_test.dart
+0
-33
mock_canvas.dart
packages/flutter/test/rendering/mock_canvas.dart
+2
-4
No files found.
packages/flutter/lib/src/material/outline_button.dart
View file @
04ce9d28
...
...
@@ -561,7 +561,7 @@ class _OutlineBorder extends ShapeBorder implements MaterialStateProperty<ShapeB
case
BorderStyle
.
none
:
break
;
case
BorderStyle
.
solid
:
canvas
.
drawPath
(
shape
.
getOuterPath
(
rect
.
deflate
(
side
.
width
/
2.0
)
,
textDirection:
textDirection
),
side
.
toPaint
());
canvas
.
drawPath
(
shape
.
getOuterPath
(
rect
,
textDirection:
textDirection
),
side
.
toPaint
());
}
}
...
...
packages/flutter/test/material/outline_button_test.dart
View file @
04ce9d28
...
...
@@ -867,39 +867,6 @@ void main() {
);
});
testWidgets
(
'OutlineButton uses borderSide width to paint'
,
(
WidgetTester
tester
)
async
{
final
GlobalKey
buttonKey
=
GlobalKey
();
const
double
thickness
=
12.5
;
await
tester
.
pumpWidget
(
Directionality
(
textDirection:
TextDirection
.
ltr
,
child:
Material
(
child:
Align
(
alignment:
Alignment
.
topLeft
,
child:
OutlineButton
(
key:
buttonKey
,
borderSide:
const
BorderSide
(
color:
Colors
.
black12
,
width:
thickness
),
onPressed:
()
{},
child:
const
SizedBox
(
width:
120
,
height:
50
,
child:
Text
(
'ABC'
),
),
),
),
),
),
);
final
Finder
outlineButton
=
find
.
byType
(
OutlineButton
);
expect
(
outlineButton
,
paints
..
path
(
includes:
const
<
Offset
>[
Offset
(
60
,
thickness
/
2.0
)],
excludes:
const
<
Offset
>[
Offset
(
60
,
thickness
/
3.0
)],
));
});
testWidgets
(
'OutlineButton contributes semantics'
,
(
WidgetTester
tester
)
async
{
final
SemanticsTester
semantics
=
SemanticsTester
(
tester
);
await
tester
.
pumpWidget
(
...
...
packages/flutter/test/rendering/mock_canvas.dart
View file @
04ce9d28
...
...
@@ -1163,15 +1163,13 @@ class _PathPaintPredicate extends _DrawCommandPaintPredicate {
if
(
includes
!=
null
)
{
for
(
final
Offset
offset
in
includes
)
{
if
(!
pathArgument
.
contains
(
offset
))
throw
'It called
$methodName
with a path that unexpectedly did not '
'contain
$offset
. Path bounds =
${pathArgument.getBounds()}
'
;
throw
'It called
$methodName
with a path that unexpectedly did not contain
$offset
.'
;
}
}
if
(
excludes
!=
null
)
{
for
(
final
Offset
offset
in
excludes
)
{
if
(
pathArgument
.
contains
(
offset
))
throw
'It called
$methodName
with a path that unexpectedly '
'contained
$offset
. . Path bounds =
${pathArgument.getBounds()}
'
;
throw
'It called
$methodName
with a path that unexpectedly contained
$offset
.'
;
}
}
}
...
...
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