We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Description When custom painter is used, the rendered output might look wrong.
Widgetbook:
Simulator:
Code for repro:
class MacroDailyLogCard extends StatelessWidget { const MacroDailyLogCard({Key? key, required this.child, this.height = 350}) : super(key: key); final Widget child; final double height; @override Widget build(BuildContext context) { final CmColorScheme scheme = CmTheme.of(context).colorScheme; return Container( height: height, width: 325, decoration: ShapeDecoration( shadows: <BoxShadow>[ BoxShadow( offset: const Offset(0, 5), blurRadius: 15, color: CmColors.shadow.withOpacity(0.1), ), ], color: scheme.gray800, shape: CustomShape(), ), child: child, ); } } class CustomShape extends ShapeBorder { @override EdgeInsetsGeometry get dimensions => EdgeInsetsDirectional.zero; @override Path getInnerPath(Rect rect, {TextDirection? textDirection}) { return Path(); } @override Path getOuterPath(Rect rect, {TextDirection? textDirection}) { return Path() ..moveTo(rect.topLeft.dx, rect.topLeft.dy + 22) ..quadraticBezierTo(rect.topLeft.dx + 3, rect.topLeft.dy + 10, rect.topLeft.dx + 14, rect.top + 8) ..quadraticBezierTo(rect.width / 2, rect.top - 20, rect.topRight.dx - 14, rect.top + 8) ..quadraticBezierTo(rect.topRight.dx - 3, rect.topRight.dy + 10, rect.topRight.dx, rect.top + 22) ..lineTo(rect.bottomRight.dx, rect.bottomRight.dy - 22) ..quadraticBezierTo(rect.bottomRight.dx - 3, rect.bottomRight.dy - 10, rect.bottomRight.dx - 14, rect.bottom - 8) ..quadraticBezierTo(rect.width / 2, rect.bottom + 20, rect.bottomLeft.dx + 14, rect.bottom - 8) ..quadraticBezierTo(rect.bottomLeft.dx + 3, rect.bottomLeft.dy - 10, rect.bottomLeft.dx, rect.bottom - 22) ..close(); } @override void paint(Canvas canvas, Rect rect, {TextDirection? textDirection}) {} @override ShapeBorder scale(double t) { return this; } }
Expected Behavior Render looks like in the simulator.
The text was updated successfully, but these errors were encountered:
Might be related to #164.
Sorry, something went wrong.
jenshor
Successfully merging a pull request may close this issue.
Description
When custom painter is used, the rendered output might look wrong.
Widgetbook:
![image](https://user-images.githubusercontent.com/16862002/169813379-b3ee99f7-28d8-4468-a094-cba4dee6f25e.png)
Simulator:
![image](https://user-images.githubusercontent.com/16862002/169813401-136464d8-0844-4fbe-a604-f8d36f09f300.png)
Code for repro:
Expected Behavior
Render looks like in the simulator.
The text was updated successfully, but these errors were encountered: