flutter icon indicating copy to clipboard operation
flutter copied to clipboard

ClipOval for native view is not working on Android & IOS

Open Nico3652 opened this issue 3 years ago • 3 comments

I'm trying to use the ClipOval to clip in circle my native views from PlatformView which is not working at all on Android and partially on IOS :

ANDROID :

4532c586-d0f8-4dd5-9b67-f619519d7c3b

IOS :

IMG_7626

The native view is on top in the screenshots. The native view (alpha blue color) is the child of a pink container which is Clipped and we can see that for both the render is not correct. For Android the square is full and for IOS partially.

Notice this example use ClipOval but this is also not working with CustomClipper<Path> in circle in flutter. A workaround would be to create the clip itself inside the native code for both which I want to avoid at any cost for performance reasons.

The full example code is ready to be cloned and run

A fix for this would be great!

Thanks everyone

FLUTTER DOCTOR

[✓] Flutter (Channel stable, 3.3.4, on macOS 12.6 21G115 darwin-x64, locale fr-FR)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.0.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] VS Code (version 1.71.2)
[✓] Connected device (2 available)
[✓] HTTP Host Availability

• No issues found!

Nico3652 avatar Oct 08 '22 16:10 Nico3652

Triage report

I can reproduce this issue on Master (3.5.0-5.0.pre.1). Tested on Android 13 emulator (Pixel 5) and iOS 16 simulator (iPhone 14 Pro Max).

exaby73 avatar Oct 10 '22 10:10 exaby73

These are unhandled or partially handled mutator stack items.

The issue on iOS is the same as https://github.com/flutter/flutter/issues/35062 and there is a potential fix linked. cc @jmagman

And the Android mutator stack entry isn't implemented at all. cc @stuartmorgan

chinmaygarde avatar Oct 10 '22 18:10 chinmaygarde

This is unfortunately still the case using flutter 3.7 and impeller

Tom3652 avatar Jan 31 '23 17:01 Tom3652