-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Closed
Copy link
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testsc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team
Description
Use case
The paints..arc() is missing the ability to test start and end arc angles. You can test total arc rect but cannot test where the arc begins and ends. Testing arc drawn path is crucial. As a workaround, golden tests can be used to capture the arc start and end path visually.
flutter/packages/flutter_test/lib/src/mock_canvas.dart
Lines 968 to 987 in 9e273d5
| @override | |
| void arc({ | |
| Rect? rect, | |
| Color? color, | |
| double? strokeWidth, | |
| bool? hasMaskFilter, | |
| PaintingStyle? style, | |
| StrokeCap? strokeCap, | |
| }) { | |
| _predicates.add( | |
| _ArcPaintPredicate( | |
| rect: rect, | |
| color: color, | |
| strokeWidth: strokeWidth, | |
| hasMaskFilter: hasMaskFilter, | |
| style: style, | |
| strokeCap: strokeCap, | |
| ), | |
| ); | |
| } |
See the arc API for angles parameters :
Proposal
Add ability to test arc start and end angles in paints..arc()
Shreemanarjun, justinmc and ksokolovskyi
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testsc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team