alexmercerind / flutter_acrylic

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

Not working on macOS 12.3.1 (21E258) and flutter 3.7.11 #76

Open jctaoo opened 1 year ago

jctaoo commented 1 year ago
截屏2023-04-18 19 42 16

This is result of the example project.

Result of flutter --version:

Flutter 3.7.11 • channel stable • https://github.com/flutter/flutter.git
Framework • revision f72efea43c (7 days ago) • 2023-04-11 11:57:21 -0700
Engine • revision 1a65d409c7
Tools • Dart 2.19.6 • DevTools 2.20.1

Result of flutter doctor:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.7.11, on macOS 12.3.1 21E258 darwin-x64, locale zh-Hans-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✓] Xcode - develop for iOS and macOS (Xcode 13.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] Android Studio (version 4.1)
[✓] VS Code (version 1.77.3)
[✓] Connected device (2 available)
jctaoo commented 1 year ago

Same likes a upstream (macos_window_utils) related issue, macos_window_utils not work and drawing nothing too.

Adrian-Samoticha commented 1 year ago

Interesting. This issue seems to be similar to https://github.com/alexmercerind/flutter_acrylic/issues/75#issuecomment-1512472751, but I also cannot reproduce it. Do you experience the same issue on macos_window_utils 1.1.1? Also, does the same issue occur with Flutter 3.7.10?

jctaoo commented 1 year ago

I checkout to flutter 3.7.10 and macos_windows_utils 1.1.1 , my app's view appears on window but acrylic effect not apply and hot reload not work.

截屏2023-04-18 23 40 33

Using macos_windows_utils 1.1.2 and flutter 3.7.10, the error in #75 not appears but my view lost like:

截屏2023-04-18 19 42 16

I run my app in xcode and it seems that we lost FlutterView?

截屏2023-04-18 20 04 49
Adrian-Samoticha commented 1 year ago

Did you modify your MainFlutterWindow.swift file as described here? If you didn’t, then that explains why version 1.1.1 didn’t work for you. Version 1.1.2 no longer requires this modification, though if you didn’t do it, could you perhaps do it anyway and see if that changes anything?

EDIT: More importantly, does the macos_window_utils example project work correctly on your end? Or does the issue only arise in your app?

dennismuench commented 1 year ago

Did you modify your MainFlutterWindow.swift file as described here? If you didn’t, then that explains why version 1.1.1 didn’t work for you. Version 1.1.2 no longer requires this modification, though if you didn’t do it, could you perhaps do it anyway and see if that changes anything?

EDIT: More importantly, does the macos_window_utils example project work correctly on your end? Or does the issue only arise in your app?

Thanks. Thats it. Looks like this step is still necessary for flutter_acrylic: ^1.1.2

Adrian-Samoticha commented 1 year ago

Did you modify your MainFlutterWindow.swift file as described here? If you didn’t, then that explains why version 1.1.1 didn’t work for you. Version 1.1.2 no longer requires this modification, though if you didn’t do it, could you perhaps do it anyway and see if that changes anything? EDIT: More importantly, does the macos_window_utils example project work correctly on your end? Or does the issue only arise in your app?

Thanks. Thats it. Looks like this step is still necessary for flutter_acrylic: ^1.1.2

It shouldn’t, though. Are you using any other plugins that could cause some interference, perhaps? 1.1.2 uses NSApp.windows.first to find the Flutter window. Is it possible that some other plugin might mess with NSApp.windows?

Lampadina17 commented 1 year ago

while developing my minecraft launcher (https://morpheuslauncher.it), i noticed this issue, to workaround and reproduce the issue you need to follow these steps:

1) build your flutter acrylic app through intellij 2) close application 3) back to step 1 4) now app is totally black! 5) to workaround this you need to run cleanmymac to clean caches and application back to work correctly again

in addition. if you always build using xcode instead intellij the app work always if you follow the step 5

Adrian-Samoticha commented 1 year ago

while developing my minecraft launcher (https://morpheuslauncher.it), i noticed this issue, to workaround and reproduce the issue you need to follow these steps:

  1. build your flutter acrylic app through intellij
  2. close application
  3. back to step 1
  4. now app is totally black!
  5. to workaround this you need to run cleanmymac to clean caches and application back to work correctly again

in addition. if you always build using xcode instead intellij the app work always if you follow the step 5

79 likely already fixed this on master. I will publish an update to pub.dev soon.

EDIT: Done.