I want create view like this, using layers. (like in swift maskLayer
). Can I do somthing in Flutter?
Asked
Active
Viewed 856 times
0

dev-aentgs
- 1,218
- 2
- 9
- 17

esfsef
- 193
- 3
- 11
-
You can use `Stack` widget. – dev-aentgs Jun 26 '20 at 11:26
-
I will change circle radius dynamicly – esfsef Jun 26 '20 at 11:28
-
It will work, `Stack` simply puts the `children` on top of the previous. check [this](https://api.flutter.dev/flutter/widgets/Stack-class.html) reference. – dev-aentgs Jun 26 '20 at 11:33
-
Can you share code? – esfsef Jun 26 '20 at 11:45
-
There are similar questions on stackoverflow, [this is one](https://stackoverflow.com/a/50348804/13625305) of them. – dev-aentgs Jun 26 '20 at 12:24
-
it's not working for me – esfsef Jun 26 '20 at 12:41
-
What is the error you are getting? – dev-aentgs Jun 26 '20 at 13:08
-
Circle not in transparent mode – esfsef Jun 26 '20 at 13:10
1 Answers
1
Note: This is a crude version and might not be the best/efficient way of achieving the result.
I have created a very rough version for the UI code on pastebin.
Used this answer by @Yann39 as a starting point.
Used CustomPainter
for the hole and Stack
for layout.
You will have to refine the code according to your needs.

dev-aentgs
- 1,218
- 2
- 9
- 17