alexmercerind / flutter_acrylic

Flutter library for window acrylic, mica & transparency effects.
MIT License
595 stars 53 forks source link

macOS broken #64

Closed lucasjinreal closed 1 year ago

lucasjinreal commented 1 year ago
image

aera effect not work any more...

Please maintain this good repo, please post workable code before release, many users depends on this!!

damywise commented 1 year ago

Upgrade to Flutter 3.7

damywise commented 1 year ago

https://github.com/Adrian-Samoticha/macos_window_utils.dart/issues/12 https://github.com/flutter/flutter/issues/119132

lucasjinreal commented 1 year ago

@damywise AM using flutter 3.7.5

Adrian-Samoticha commented 1 year ago

This issue was caused by a change in Flutter 3.7 and was fixed in macos_window_utils 1.0.2. flutter_acrylic currently depends on macos_window_utils ^1.0.0, meaning that technically the package manager should be able to choose 1.0.2 if it wanted to, but apparently it didn't in your case. I assume if you were to run

rm pubspec.lock && flutter pub get

Flutter would install the latest version of macos_window_utils and it would work fine.

Alternatively, you can just install macos_window_utils 1.0.2 (both packages can be installed simultaneously):

flutter pub add macos_window_utils

That said, maybe I should just update the macos_window_dependency to 1.0.2 in flutter_acrylic. I originally chose not to do so since it would make flutter_acrylic incompatible with Flutter versions below 3.7, but it's been over a month since it came out, so I suppose most people would have upgraded by now.

Adrian-Samoticha commented 1 year ago

Done. Simply upgrading to flutter_acrylic 1.1.1 should fix the problem.

Adrian-Samoticha commented 1 year ago

Apparently static analysis failed on pub.dev. I have run flutter analyze lib/window.dart using lints_core and couldn't reproduce the issue. I'll see what I can do later.

lucasjinreal commented 1 year ago

Oh,

lucasjinreal commented 1 year ago

@Adrian-Samoticha windows failed build

图片

lucasjinreal commented 1 year ago

remove macos_windows_utils depdency on windows? it's not properly to using macos api on windows.

Adrian-Samoticha commented 1 year ago

The issue isn't Windows-related. I was able to reproduce it on macOS as well. I am currently still investigating it.

EDIT: I believe the issue is now fixed. It was caused by a faulty macos_window_utils version which I have now retracted and hotfixed. If you still experience it on your end, please try running rm pubspec.lock && flutter pub get to make sure that you are running the correct version of macos_window_utils.