Unverified Commit 97d191de authored by LongCatIsLooong's avatar LongCatIsLooong Committed by GitHub

Fix CupertinoActivityIndicator radius (#41892)

parent d85d6eb4
......@@ -105,11 +105,11 @@ class _CupertinoActivityIndicatorPainter extends CustomPainter {
double radius,
}) : tickFundamentalRRect = RRect.fromLTRBXY(
-radius,
1.0 * radius / _kDefaultIndicatorRadius,
radius / _kDefaultIndicatorRadius,
-radius / 2.0,
-1.0 * radius / _kDefaultIndicatorRadius,
1.0,
1.0,
-radius / _kDefaultIndicatorRadius,
radius / _kDefaultIndicatorRadius,
radius / _kDefaultIndicatorRadius,
),
super(repaint: position);
......
......@@ -45,6 +45,18 @@ void main() {
expect(find.byType(CupertinoActivityIndicator), paints..rrect(color: const Color(0x99EBEBF5)));
});
// Regression test for https://github.com/flutter/flutter/issues/41345.
testWidgets('has the correct corner radius', (WidgetTester tester) async {
await tester.pumpWidget(
const CupertinoActivityIndicator(animating: false, radius: 100),
);
expect(
find.byType(CupertinoActivityIndicator),
paints..rrect(rrect: const RRect.fromLTRBXY(-100, 10, -50, -10, 10, 10)),
);
});
}
Widget buildCupertinoActivityIndicator([ bool animating ]) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment