Repository navigation
Closed as duplicate
Closed as duplicate
Copy link
Labels
P2Important issues not at the top of the work liste: web_canvaskitCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Webe: web_skwasmSkwasm rendering backend for webengineflutter/engine related. See also e: labels.found in release: 3.10Found to occur in 3.10found in release: 3.7Found to occur in 3.7has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyteam-webOwned by Web platform teamtriaged-webTriaged by Web platform team
Description
Is there an existing issue for this?
- I have searched the existing issues
- I have read the guide to filing a bug
Steps to reproduce
Run the example code.
You have to use --web-renderer canvaskit otherwise #44572 will throw an error.
You can observe when modify second rect from Rect.fromLTRB(90, 90, 110, 149) to Rect.fromLTRB(90, 90, 110, 150) the PathOperation.difference operation works properly.
Expected results
It should look like similar to Impeller / Skia renderer
Actual results
Code sample
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Rect Difference Example',
home: Scaffold(
body: CustomPaint(
painter: RectDifferencePainter(),
),
),
);
}
}
class RectDifferencePainter extends CustomPainter {
@override
void paint(Canvas canvas, Size size) {
canvas.drawPath(
Path.combine(
PathOperation.difference,
Path()..addRect(const Rect.fromLTRB(50, 50, 150, 150)),
Path()..addRect(const Rect.fromLTRB(90, 90, 110, 149)),
),
Paint()..color = Colors.blue,
);
}
@override
bool shouldRepaint(RectDifferencePainter oldDelegate) => false;
}Screenshots or Video
No response
Logs
No response
Flutter Doctor output
Doctor output
[√] Flutter (Channel stable, 3.7.8, on Microsoft Windows [Version 10.0.19045.2728], locale hu-HU)
• Flutter version 3.7.8 on channel stable at C:\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 90c64ed42b (3 weeks ago), 2023-03-21 11:27:08 -0500
• Engine revision 9aa7816315
• Dart version 2.19.5
• DevTools version 2.20.1
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
• Android SDK at C:\Users\maRci002\AppData\Local\Android\sdk
• Platform android-33, build-tools 33.0.0
• Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-9505619)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.4.5)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.4.33403.182
• Windows 10 SDK version 10.0.20348.0
[√] Android Studio (version 2022.1)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-9505619)
[√] VS Code (version 1.77.1)
• VS Code at C:\Users\maRci002\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.44.0
[√] Connected device (4 available)
• sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64 • Android 13 (API 33) (emulator)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19045.2728]
• Chrome (web) • chrome • web-javascript • Google Chrome 112.0.5615.50
• Edge (web) • edge • web-javascript • Microsoft Edge 112.0.1722.34
[√] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!Reacted by Ngoc Quoc Huynh, Zlati Pehlivanov, c0pp1ce, Stanislav (Stanley) Modrak, Raşit Ayaz, Damy Wise, Alex Frei, fayax555, Stefan Matthias Aust and Luka Stillingfleet
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work liste: web_canvaskitCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Webe: web_skwasmSkwasm rendering backend for webengineflutter/engine related. See also e: labels.found in release: 3.10Found to occur in 3.10found in release: 3.7Found to occur in 3.7has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyteam-webOwned by Web platform teamtriaged-webTriaged by Web platform team


Activity
darshankawar commentedon Apr 13, 2023
Thanks for the report. Using code sample provided and running with canvaskit, seeing same behavior as reported.
stable, master flutter doctor -v
yjbanov commentedon Apr 13, 2023
AFAIK we don't customize this on the web engine side, so it must be how Skia works. I'm going to accept this to verify that we're consistent with mobile.
maRci002 commentedon Dec 10, 2023
Workaround
JaffaKetchup commentedon Mar 11, 2025
This still occurs in Flutter 3.29 & 30 (current master branch), using WASM or non-WASM. However, for our particular use case (which is co-incidentally the same as the original reporter's :D), the workaround is not quite the same for us.
Given it's P2 and has persisted across many versions, is there any chance this could be looked into?
Path.combineon webPathFillType.evenOddUsing
Path.combineon the web seems to actually change the appearance depending on the position ofPolygons on the canvas?20250311-1828-12.8733577.mp4
github-actions commentedon Nov 21, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.