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
1160c8fd
Unverified
Commit
1160c8fd
authored
Nov 25, 2019
by
Kate Lovett
Committed by
GitHub
Nov 25, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-Staged: Fixing ContinuousRectangleBorder bottom radius (#45304)
parent
c64d91a0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
94 additions
and
7 deletions
+94
-7
continuous_rectangle_border.dart
...flutter/lib/src/painting/continuous_rectangle_border.dart
+4
-4
continous_rectangle_border_test.dart
...lutter/test/painting/continous_rectangle_border_test.dart
+90
-3
No files found.
packages/flutter/lib/src/painting/continuous_rectangle_border.dart
View file @
1160c8fd
...
@@ -115,10 +115,10 @@ class ContinuousRectangleBorder extends ShapeBorder {
...
@@ -115,10 +115,10 @@ class ContinuousRectangleBorder extends ShapeBorder {
..
cubicTo
(
left
,
top
,
left
,
top
,
left
+
tlRadiusY
,
top
)
..
cubicTo
(
left
,
top
,
left
,
top
,
left
+
tlRadiusY
,
top
)
..
lineTo
(
right
-
trRadiusX
,
top
)
..
lineTo
(
right
-
trRadiusX
,
top
)
..
cubicTo
(
right
,
top
,
right
,
top
,
right
,
top
+
trRadiusY
)
..
cubicTo
(
right
,
top
,
right
,
top
,
right
,
top
+
trRadiusY
)
..
lineTo
(
right
,
bottom
-
b
l
RadiusX
)
..
lineTo
(
right
,
bottom
-
b
r
RadiusX
)
..
cubicTo
(
right
,
bottom
,
right
,
bottom
,
right
-
b
l
RadiusY
,
bottom
)
..
cubicTo
(
right
,
bottom
,
right
,
bottom
,
right
-
b
r
RadiusY
,
bottom
)
..
lineTo
(
left
+
b
r
RadiusX
,
bottom
)
..
lineTo
(
left
+
b
l
RadiusX
,
bottom
)
..
cubicTo
(
left
,
bottom
,
left
,
bottom
,
left
,
bottom
-
b
r
RadiusY
)
..
cubicTo
(
left
,
bottom
,
left
,
bottom
,
left
,
bottom
-
b
l
RadiusY
)
..
close
();
..
close
();
}
}
...
...
packages/flutter/test/painting/continous_rectangle_border_test.dart
View file @
1160c8fd
...
@@ -78,11 +78,13 @@ void main() {
...
@@ -78,11 +78,13 @@ void main() {
testWidgets
(
'Golden test varying radii'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Golden test varying radii'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
RepaintBoundary
(
await
tester
.
pumpWidget
(
RepaintBoundary
(
child:
Material
(
child:
Material
(
color:
Colors
.
green
Accent
[
4
00
],
color:
Colors
.
green
[
1
00
],
shape:
const
ContinuousRectangleBorder
(
shape:
const
ContinuousRectangleBorder
(
borderRadius:
BorderRadius
.
only
(
borderRadius:
BorderRadius
.
only
(
topLeft:
Radius
.
circular
(
28.0
),
topLeft:
Radius
.
elliptical
(
100.0
,
200.0
),
bottomRight:
Radius
.
circular
(
14.0
),
topRight:
Radius
.
circular
(
350.0
),
bottomLeft:
Radius
.
elliptical
(
2000.0
,
100.0
),
bottomRight:
Radius
.
circular
(
700.0
),
),
),
),
),
),
),
...
@@ -94,6 +96,91 @@ void main() {
...
@@ -94,6 +96,91 @@ void main() {
find
.
byType
(
RepaintBoundary
),
find
.
byType
(
RepaintBoundary
),
matchesGoldenFile
(
'continuous_rectangle_border.golden_test_varying_radii.png'
),
matchesGoldenFile
(
'continuous_rectangle_border.golden_test_varying_radii.png'
),
);
);
// TODO(Piinks): Remove skip once web goldens are supported, https://github.com/flutter/flutter/issues/40297
},
skip:
isBrowser
);
testWidgets
(
'Golden test topLeft radii'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
RepaintBoundary
(
child:
Material
(
color:
Colors
.
green
[
200
],
shape:
const
ContinuousRectangleBorder
(
borderRadius:
BorderRadius
.
only
(
topLeft:
Radius
.
elliptical
(
100.0
,
200.0
),
),
),
),
));
await
tester
.
pumpAndSettle
();
await
expectLater
(
find
.
byType
(
RepaintBoundary
),
matchesGoldenFile
(
'continuous_rectangle_border.golden_test_topLeft_radii.png'
),
);
// TODO(Piinks): Remove skip once web goldens are supported, https://github.com/flutter/flutter/issues/40297
},
skip:
isBrowser
);
testWidgets
(
'Golden test topRight radii'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
RepaintBoundary
(
child:
Material
(
color:
Colors
.
green
[
300
],
shape:
const
ContinuousRectangleBorder
(
borderRadius:
BorderRadius
.
only
(
topRight:
Radius
.
circular
(
350.0
),
),
),
),
));
await
tester
.
pumpAndSettle
();
await
expectLater
(
find
.
byType
(
RepaintBoundary
),
matchesGoldenFile
(
'continuous_rectangle_border.golden_test_topRight_radii.png'
),
);
// TODO(Piinks): Remove skip once web goldens are supported, https://github.com/flutter/flutter/issues/40297
},
skip:
isBrowser
);
testWidgets
(
'Golden test bottomLeft radii'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
RepaintBoundary
(
child:
Material
(
color:
Colors
.
green
[
400
],
shape:
const
ContinuousRectangleBorder
(
borderRadius:
BorderRadius
.
only
(
bottomLeft:
Radius
.
elliptical
(
2000.0
,
100.0
),
),
),
),
));
await
tester
.
pumpAndSettle
();
await
expectLater
(
find
.
byType
(
RepaintBoundary
),
matchesGoldenFile
(
'continuous_rectangle_border.golden_test_bottomLeft_radii.png'
),
);
// TODO(Piinks): Remove skip once web goldens are supported, https://github.com/flutter/flutter/issues/40297
},
skip:
isBrowser
);
testWidgets
(
'Golden test bottomRight radii'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
RepaintBoundary
(
child:
Material
(
color:
Colors
.
green
[
500
],
shape:
const
ContinuousRectangleBorder
(
borderRadius:
BorderRadius
.
only
(
bottomRight:
Radius
.
circular
(
700.0
),
),
),
),
));
await
tester
.
pumpAndSettle
();
await
expectLater
(
find
.
byType
(
RepaintBoundary
),
matchesGoldenFile
(
'continuous_rectangle_border.golden_test_bottomRight_radii.png'
),
);
// TODO(Piinks): Remove skip once web goldens are supported, https://github.com/flutter/flutter/issues/40297
},
skip:
isBrowser
);
},
skip:
isBrowser
);
testWidgets
(
'Golden test large radii'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Golden test large radii'
,
(
WidgetTester
tester
)
async
{
...
...
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