Migration to flutter_acrylic/macos_window_utils and breaking change #322
Replies: 2 comments 8 replies
-
I am currently in the process of migrating flutter_acrylic's macOS-related functionality into a new package called macos_window_utils. Therefore, if I were to do this, I would migrate to that, instead. Also, macos_window_utils is already on pub.dev, so no need to wait in that case. |
Beta Was this translation helpful? Give feedback.
-
Hi, @Adrian-Samoticha! Thank you for starting this discussion and for your excellent work on this issue so far. It is certainly okay to introduce breaking changes to A question, if you don't mind: I noticed that in the gifs you provided of your work that the Toolbar color seems off. Can your improvements be applied there? |
Beta Was this translation helpful? Give feedback.
-
Hello,
I have recently stumbled upon issue #315 and decided to try and address it. Here's the result so far:
Screen.Recording.2022-11-27.at.15.09.08.mov
I did this by making certain backgrounds transparent (plus setting their background blend mode to
clear
) and using flutter_acrylic to add multipleNSVisualEffectView
s to the window (full disclosure; I am the maintainer of the macOS port of flutter_acrylic).Migrating to flutter_acrylic also has other benefits. For instance, a visual (and performance-related) bug that was present in the original version is now resolved:
This is what it looks like when a window using macos_ui is minimized with Stage Manager enabled:
Screen.Recording.2022-11-27.at.15.50.55.mov
As you can see, the shadow goes missing during the animation and the animation is quite laggy.
This is what it looks like after the migration to flutter_acrylic:
Screen.Recording.2022-11-27.at.15.51.12.mov
The shadow stays and the animation is silky smooth.
Yet another benefit is that the window's brightness can be changed independently of the system theme. That means the sidebar can remain transparent even when the window brightness differs from the system's brightness setting:
Screen.Recording.2022-11-27.at.15.58.19.mov
However, there are two catches. For one, support for adding Visual Effect Subviews in flutter_acrylic is relatively new and has (as far as I am aware) not yet been published to pub.dev, which makes it impossible to publish packages that depend on that functionality. If we were to depend on it, we would have to wait for it to be published first.
Additionally, it would be necessary to introduce breaking changes to macos_ui (which would be necessary to address #315 either way, even if it was done without depending on flutter_acrylic). This is the main reason why I am starting this discussion.
Is it okay to introduce breaking changes? Are there any issues that should be addressed before tackling those that require breaking changes? I would, of course, be happy to give them precedence, in case such issues exist.
Cheers, Adrian.
Beta Was this translation helpful? Give feedback.
All reactions