SystemAlertWindow icon indicating copy to clipboard operation
SystemAlertWindow copied to clipboard

Add option for transparent background (click-through)

Open razfazz opened this issue 3 years ago • 1 comments

It would be nice if there would be an option to make the background transparent and not consuming tap events. that would allow us to show for example only a shape.

Btw. Thank you for that great package

razfazz avatar Jun 17 '22 13:06 razfazz

As of version 1.1.2, I made the background transparent by directly modifing the package file (just one line).

Look into your flutter sdk directory and find the file: flutter\.pub-cache\hosted\pub.dartlang.org\system_alert_window-1.1.2\android\src\main\java\in\jvapps\system_alert_window\services\WindowServiceNew.java.

You should be able to find a function, private void setWindowView(...), and remove/comment the line windowView.setBackgroundColor(Color.WHITE);.

Then in flutter, header, body and/or footer widget(s) should contains a decoration property where you can set the background transparent as well.

fewling avatar Jul 16 '22 02:07 fewling

@razfazz @fewling Use the version v1.2.0 for setting background colors and disabling clicks across the system window

pvsvamsi avatar Oct 17 '22 17:10 pvsvamsi