alexmercerind / flutter_acrylic Goto Github PK
View Code? Open in Web Editor NEWFlutter library for window acrylic, mica & transparency effects.
License: MIT License
Flutter library for window acrylic, mica & transparency effects.
License: MIT License
When building the app that has the code Window.addToolbar()
in it, it fails to build with the following message:
/Users/USR1132/flutter/.pub-cache/git/flutter_acrylic-49776d5078b2c482e552fa090a8db948c66b3ec6/macos/Classes/MainFlutterWindowManipulator.swift:391:26: error: 'init()' is only available in macOS 10.13 or newer
let newToolbar = NSToolbar()
^
let newToolbar = NSToolbar()
^
public static func addToolbar() {
^
public class MainFlutterWindowManipulator {
This can be fixed by wrapping the code within addToolbar()
function with this:
if #available(macOS 10.13, *) {
//...
}
Example (and my own implementation) throws an exception.
Running on openSUSE Tumbleweed.
Exception has occurred.
MissingPluginException (MissingPluginException(No implementation found for method Initialize on channel com.alexmercerind/flutter_acrylic))
bitsdojo can split window, I wanna only left panel to be acrylic, is there a way to this?
(this is because of windows10 didn't support acrylic, the aero effect makes text hard to see)
Allow the window's styleMask
property to be modified.
When the application starts for the first time on Windows, there is a white background color show first then change to acrylic after 1 sec.
How can I prevent this??
I try to set MaterialApp to transparent, but no hope
import 'package:flutter/material.dart';
import 'package:flutter_acrylic/flutter_acrylic.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await Window.initialize();
await Window.setEffect(
effect: WindowEffect.acrylic,
color: const Color(0xCC222222),
);
// await Window.enterFullscreen();
runApp(MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
// This is the theme of your application.
//
// Try running your application with "flutter run". You'll see the
// application has a blue toolbar. Then, without quitting the app, try
// changing the primarySwatch below to Colors.green and then invoke
// "hot reload" (press "r" in the console where you ran "flutter run",
// or simply save your changes to "hot reload" in a Flutter IDE).
// Notice that the counter didn't reset back to zero; the application
// is not restarted.
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
backgroundColor: Colors.transparent
),
home: const MyHomePage(title: 'Flutter Demo Home Page')
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
// This widget is the home page of your application. It is stateful, meaning
// that it has a State object (defined below) that contains fields that affect
// how it looks.
// This class is the configuration for the state. It holds the values (in this
// case the title) provided by the parent (in this case the App widget) and
// used by the build method of the State. Fields in a Widget subclass are
// always marked "final".
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
int _counter = 0;
void _incrementCounter() {
setState(() {
// This call to setState tells the Flutter framework that something has
// changed in this State, which causes it to rerun the build method below
// so that the display can reflect the updated values. If we changed
// _counter without calling setState(), then the build method would not be
// called again, and so nothing would appear to happen.
_counter++;
});
}
@override
Widget build(BuildContext context) {
// This method is rerun every time setState is called, for instance as done
// by the _incrementCounter method above.
//
// The Flutter framework has been optimized to make rerunning build methods
// fast, so that you can just rebuild anything that needs updating rather
// than having to individually change instances of widgets.
return Scaffold(
// appBar: AppBar(
// // Here we take the value from the MyHomePage object that was created by
// // the App.build method, and use it to set our appbar title.
// title: Text(widget.title),
// ),
body: Center(
// Center is a layout widget. It takes a single child and positions it
// in the middle of the parent.
child: Column(
// Column is also a layout widget. It takes a list of children and
// arranges them vertically. By default, it sizes itself to fit its
// children horizontally, and tries to be as tall as its parent.
//
// Invoke "debug painting" (press "p" in the console, choose the
// "Toggle Debug Paint" action from the Flutter Inspector in Android
// Studio, or the "Toggle Debug Paint" command in Visual Studio Code)
// to see the wireframe for each widget.
//
// Column has various properties to control how it sizes itself and
// how it positions its children. Here we use mainAxisAlignment to
// center the children vertically; the main axis here is the vertical
// axis because Columns are vertical (the cross axis would be
// horizontal).
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
const Text(
'You have pushed the button this many times:',
),
Text(
'$_counter',
style: Theme.of(context).textTheme.headline4,
),
],
),
),
floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: const Icon(Icons.add),
),
backgroundColor: Colors.transparent,
);
}
}
First of all: Thanks for the nice package!
I have a little problem. When I use AcrylicEffect.acrylic
, moving the window behaves lagging and with a huge delay. See the video.
I am on latest master channel and I am using the same setup like the one in the example for bitsdojo_window
.
In version 1.1.0 flutter_acrylic has been migrated to macos_window_utils, which has led to the package losing its macOS support badge on pub.dev:
A way to re-enable the macOS support badge while still depending on macos_window_utils needs to be found.
Hi,
When using flutter_acrylic I see a continuous frame creation and a CPU load of ~10% even if no rebuild happens.
The moment I remove flutter_acrylic the issue is gone.
I can also reproduce this with the example app from this repository.
Is this intended / needed / known?
flutter doctor -v
[✓] Flutter (Channel stable, 3.0.0, on macOS 12.3.1 21E258 darwin-arm, locale en-DE)
• Flutter version 3.0.0 at /Users/mlamers/fvm/versions/stable
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision ee4e09cce0 (9 days ago), 2022-05-09 16:45:18 -0700
• Engine revision d1b9a6938a
• Dart version 2.17.0
• DevTools version 2.12.2
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/mlamers/Library/Android/sdk
• Platform android-31, build-tools 31.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.3.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.11.3
[✓] Android Studio (version 2021.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
[✓] IntelliJ IDEA Ultimate Edition (version 2021.3.2)
• IntelliJ at /Users/mlamers/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
[✓] IntelliJ IDEA Ultimate Edition (version 2021.3.2)
• IntelliJ at /Users/mlamers/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/213.6777.52/IntelliJ IDEA.app
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
[✓] IntelliJ IDEA Ultimate Edition (version 2021.3.1)
• IntelliJ at /Users/mlamers/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/213.6461.79/IntelliJ IDEA.app
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
[✓] VS Code (version 1.67.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.40.0
[✓] Connected device (1 available)
• macOS (desktop) • macos • darwin-arm64 • macOS 12.3.1 21E258 darwin-arm
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
PS I had to do flutter pub upgrade
in order to get rid of some problems in the win32 package in combination with Flutter 3
As explained in Microsoft's Docs, in Windows 11 the title bar can be customized to fit the design language of the application. For example, the settings app now does this. It would be nice to have this feature in this plugin so that having a custom window isn't necessary. I can implement it myself if anyone is willing to explain to me how I can edit the windows module with lining(for some reason it doesn't work)
Currently, launching an app that has flutter_acrylic enabled on macOS causes the following warning message to be printed to the console:
2021-11-01 09:43:20.415804+0100 new_flutter_project[64015:19213583] NSWindow warning: adding an unknown subview: <NSVisualEffectView: 0x7fe74ef4d490>. Break on NSLog to debug.
2021-11-01 09:43:20.423862+0100 new_flutter_project[64015:19213583] Call stack:
(
0 AppKit 0x00007ff80b5daa26 -[NSThemeFrame addSubview:] + 112
1 AppKit 0x00007ff80b61d281 -[NSView replaceSubview:with:] + 154
2 flutter_acrylic 0x000000010b5fbc2a $s15flutter_acrylic28MainFlutterWindowManipulatorC11setMaterial8materialySo014NSVisualEffectH0V_tFZ + 1322
3 flutter_acrylic 0x000000010b5fbdf5 $s15flutter_acrylic28MainFlutterWindowManipulatorC9setEffect8materialySo08NSVisualH8MaterialV_tFZ + 37
4 flutter_acrylic 0x000000010b5fcb1a $s15flutter_acrylic20FlutterAcrylicPluginC6handle_6resultySo0C10MethodCallC_yypSgctF + 1050
5 flutter_acrylic 0x000000010b5fd9b6 $s15flutter_acrylic20FlutterAcrylicPluginC6handle_6resultySo0C10MethodCallC_yypSgctFTo + 118
6 FlutterMacOS 0x000000010e4190ad __56-[FlutterEngineRegistrar addMethodCallDelegate:channel:]_block_invoke + 45
7 FlutterMacOS 0x000000010f006a97 __45-[FlutterMethodChannel setMethodCallHandler:]_block_invoke + 119
8 FlutterMacOS 0x000000010e41b6a1 -[FlutterEngine engineCallbackOnPlatformMessage:] + 289
9 FlutterMacOS 0x000000010e419eac _ZL17OnPlatformMessagePK22FlutterPlatformMessageP13FlutterEngine + 44
10 FlutterMacOS 0x000000010ec52fbd _ZNSt3__110__function6__funcIZ23FlutterEngineInitializeE4$_49NS_9allocatorIS2_EEFvNS_10unique_ptrIN7flutter15PlatformMessageENS_14default_deleteIS7_EEEEEEclEOSA_ + 141
11 FlutterMacOS 0x000000010ec6420a _ZN7flutter20PlatformViewEmbedder21HandlePlatformMessageENSt3__110unique_ptrINS_15PlatformMessageENS1_14default_deleteIS3_EEEE + 74
12 FlutterMacOS 0x000000010e9beb84 _ZNSt3__110__function6__funcIN3fml8internal14CopyableLambdaIZN7flutter5Shell29OnEngineHandlePlatformMessageENS_10unique_ptrINS5_15PlatformMessageENS_14default_deleteIS8_EEEEE4$_16EENS_9allocatorISD_EEFvvEEclEv + 132
13 FlutterMacOS 0x000000010ec61522 _ZN7flutter18EmbedderTaskRunner8PostTaskEy + 738
14 FlutterMacOS 0x000000010ec4957c FlutterEngineRunTask + 44
15 FlutterMacOS 0x000000010e41c807 __60-[FlutterEngine postMainThreadTask:targetTimeInNanoseconds:]_block_invoke + 71
16 libdispatch.dylib 0x000000010bb29634 _dispatch_call_block_and_release + 12
17 libdispatch.dylib 0x000000010bb2a874 _dispatch_client_callout + 8
18 libdispatch.dylib 0x000000010bb3aea9 _dispatch_main_queue_callback_4CF + 1129
19 CoreFoundation 0x00007ff808ca13b8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
20 CoreFoundation 0x00007ff808c629a6 __CFRunLoopRun + 2760
21 CoreFoundation 0x00007ff808c61809 CFRunLoopRunSpecific + 567
22 HIToolbox 0x00007ff811cce3e1 RunCurrentEventLoopInMode + 292
23 HIToolbox 0x00007ff811cce137 ReceiveNextEventCommon + 587
24 HIToolbox 0x00007ff811ccded5 _BlockUntilNextEventMatchingListInModeWithFilter + 70
25 AppKit 0x00007ff80b5b38f0 _DPSNextEvent + 886
26 AppKit 0x00007ff80b5b1f5c -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1411
27 AppKit 0x00007ff80b5a4359 -[NSApplication run] + 586
28 AppKit 0x00007ff80b5781f8 NSApplicationMain + 816
29 new_flutter_project 0x0000000102f016f9 main + 9
30 dyld 0x00000002030da4fe start + 462
31 ??? 0x0000000000000003 0x0 + 3
The warning is harmless, however, it indicates that messing around with the window's contentView
is not recommended. Additionally, according to this post, it also affects the window's resize handle cursors, thus making the window harder to resize, which I can confirm.
The post I linked above also outlines a way to fix this issue, which is why I am opening this issue.
Flutter 2.10.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 7e9793dee1 (13 days ago) • 2022-03-02 11:23:12 -0600
Engine • revision bd539267b4
Tools • Dart 2.16.1 • DevTools 2.9.2
Any advice? Thanks
Since flutter_acrylic is slowly getting bloated with macOS-related features which are not directly related to flutter_acrylic's primary purpose (which is to make windows transparent), I have developed a new package called macos_window_utils. The plan is to ultimately depend on that package, instead.
Hi, I have a same logic like this:
if (brightness == InterfaceBrightness.dark) {
brightness = InterfaceBrightness.light;
} else if (brightness == InterfaceBrightness.light) {
brightness = InterfaceBrightness.dark;
} else {
brightness = InterfaceBrightness.dark;
}
bool v = brightness == InterfaceBrightness.dark;
// aboutBloc.setForceDark(v);
if (v) {
Get.changeTheme(themeDataDark);
} else {
Get.changeTheme(themeData);
}
print('[brightness] crt brightness: ${brightness}');
this.setWindowEffect(WindowEffect.acrylic,
brightness == InterfaceBrightness.dark);
...
void setWindowEffect(WindowEffect value, bool dark) {
Window.setEffect(
effect: value,
color: this.color,
dark: dark,
);
if (Platform.isMacOS) {
if (brightness != InterfaceBrightness.auto) {
Window.overrideMacOSBrightness(
dark: brightness == InterfaceBrightness.dark);
}
}
this.setState(() => this.effect = value);
}
the printed out brightness is dark and light when switch.
But the setWindowEffect
can not make window to bright. While same code on macOS is ok.
what'sthe problem here?
An extension to #4, support MacOS
Mouse events cannot be passed to the window beneath especially in the transparent window mode, it just view the elements but prevent interaction.
I double-click exe but no window is displayed,do I need to install flutter on my computer to run flutter_acrylic_example.exe
?
Hi there.
First of all, thank you for tackling on the issue of translucent windows in desktop apps.
As stated in the title, I get really poor and weird performance when dragging my window: it is very laggy and depending on the effect, it behaves erratically.
I have tested Windows only for now.
Using the following effects:
Obviously I tried in profile & release mode but there is no effect. My computer is now slow:
Does anyone get that issue ?
Is possible to have use it on Linux ?
Kde and picom compositor have blur background on Linux.
Thanks
Calling Window.makeWindowFullyTransparent()
(introduced in #48) is supposed to make the window fully transparent (with only flutter-drawn widgets, the title, and the traffic light buttons remaining visible), however, a thin, white line, which is supposed to represent a highlight on top of the window, still remains visible:
Since this is unintended, it is currently considered a bug. Ideally, there would be methods called Window.enableHighlight()
and Window.disableHighlight()
which could be called by Window.makeWindowFullyTransparent()
to remove the line, however, I could not find a way to achieve this.
For this reason, I am opening this issue with a “help wanted” label. If anybody knows of a way to disable the highlight of an NSWindow
within Swift, please reach out to me.
Instead of applying the effect on the app's window, can it be used as the background color of a Container?
Switching to XAML islands on Windows can be a great step towards:
I'll be trying to do this in future & switch away from SetWindowCompositionAttribute
.
Hello, I tried to run the example app and I get this errors:
/E:/flutter/.pub-cache/hosted/pub.dartlang.org/bitsdojo_window_windows-0.1.0/lib/src/window.dart(72,36): error GF1577525: 'Size' is imported from both 'dart:ffi' and 'dart:ui'. [E:\Playground\Flutter\flutter_acrylic\example\build\windows\flutter\flutter_assemble.vcxproj]
/E:/flutter/.pub-cache/hosted/pub.dartlang.org/bitsdojo_window_windows-0.1.0/lib/src/window.dart(84,12): error GF1577525: 'Size' is imported from both 'dart:ffi' and 'dart:ui'. [E:\Playground\Flutter\flutter_acrylic\example\build\windows\flutter\flutter_assemble.vcxproj]
/E:/flutter/.pub-cache/hosted/pub.dartlang.org/bitsdojo_window_windows-0.1.0/lib/src/window.dart(126,12): error GF1577525: 'Size' is imported from both 'dart:ffi' and 'dart:ui'. [E:\Playground\Flutter\flutter_acrylic\example\build\windows\flutter\flutter_assemble.vcxproj]
/E:/flutter/.pub-cache/hosted/pub.dartlang.org/bitsdojo_window_windows-0.1.0/lib/src/window.dart(133,12): error GF1577525: 'Size' is imported from both 'dart:ffi' and 'dart:ui'. [E:\Playground\Flutter\flutter_acrylic\example\build\windows\flutter\flutter_assemble.vcxproj]
/E:/flutter/.pub-cache/hosted/pub.dartlang.org/bitsdojo_window_windows-0.1.0/lib/src/window.dart(140,12): error GF1577525: 'Size' is imported from both 'dart:ffi' and 'dart:ui'. [E:\Playground\Flutter\flutter_acrylic\example\build\windows\flutter\flutter_assemble.vcxproj]
/E:/flutter/.pub-cache/hosted/pub.dartlang.org/bitsdojo_window_windows-0.1.0/lib/src/window.dart(199,22): error GF1577525: 'Size' is imported from both 'dart:ffi' and 'dart:ui'. [E:\Playground\Flutter\flutter_acrylic\example\build\windows\flutter\flutter_assemble.vcxproj]
What am I suppose to do? I have flutter 3.0. I don't think I am suppose to modify library code to make it run.
cd example
flutter pub get
flutter build windows -v
[ +23 ms] Build process failed.
[ +3 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 _runBuild (package:flutter_tools/src/windows/build_windows.dart:299:5)
<asynchronous suspension>
#2 buildWindows (package:flutter_tools/src/windows/build_windows.dart:78:5)
<asynchronous suspension>
#3 BuildWindowsCommand.runCommand (package:flutter_tools/src/commands/build_windows.dart:55:5)
<asynchronous suspension>
#4 FlutterCommand.run.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command.dart:1102:27)
<asynchronous suspension>
#5 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#6 CommandRunner.runCommand (package:args/command_runner.dart:196:13)
<asynchronous suspension>
#7 FlutterCommandRunner.runCommand.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command_runner.dart:284:9)
<asynchronous suspension>
#8 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#9 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:232:5)
<asynchronous suspension>
#10 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
<asynchronous suspension>
#11 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#12 main (package:flutter_tools/executable.dart:91:3)
<asynchronous suspension>
[ +22 ms] Running shutdown hooks
[ +2 ms] Shutdown hooks complete
[ +2 ms] exiting with code 1
I remove folders 'example\windows' and 'example\build'
and run
cd example
flutter create .
flutter build windows
The build went well, but the flutter window got additional frames.
[√] Flutter (Channel dev, 2.3.0-16.0.pre, on Microsoft Windows [Version 10.0.18363.535], locale en-US)
• Flutter version 2.3.0-16.0.pre at C:\Users\ilopX\fvm\default
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision fa5883b78e (5 weeks ago), 2021-05-21 13:04:03 -0700
• Engine revision 2f067fc4c5
• Dart version 2.14.0 (build 2.14.0-136.0.dev)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at C:\Users\ilopX\AppData\Local\Android\sdk
• Platform android-30, build-tools 30.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop for Windows (Visual Studio Enterprise 2019 16.4.2)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise
• Visual Studio Enterprise 2019 version 16.4.29613.14
• Windows 10 SDK version 10.0.18362.0
[√] Android Studio (version 4.1.0)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[√] IntelliJ IDEA Ultimate Edition (version 2021.1)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2021.1
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
[√] VS Code (version 1.56.0)
• VS Code at C:\Users\ilopX\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.22.0
[√] VS Code, 64-bit edition (version 1.49.0)
• VS Code at C:\Program Files\Microsoft VS Code
• Flutter extension version 3.22.0
[√] Connected device (2 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.18363.535]
• Chrome (web) • chrome • web-javascript • Google Chrome 91.0.4472.106
• No issues found!
I rewrote the example with the window_manager library (because bitsdojo_window doesn't work on these systems) and ran it on virtual machines with Windows 7 and 8.1. And it looks... weird.
(I also ran an example from fluent_ui library.)
In Windows 8.1 (and in Windows 8, I guess) the effect is the same as in the video
Seems like the macos effects are only available when the window focused. Is there some way around this? The Mac Terminal Silver Aero does this kind of...
(I was hoping for a see-thru window)
how to split tile bar half translucent and half not? Just like macOS style?
Hello, I using this to dynamic set window effect, but have no reasponse:
DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
void getWindowEffect() async {
if (Platform.isWindows) {
var sysProductName = await deviceInfo.windowsInfo;
var pn = sysProductName.productName;
print("--- windows information:::: ${pn}");
if (pn.contains("Windows 10")) {
setState(() {
this.effect = WindowEffect.disabled;
});
print("effect set to: ${this.effect}");
} else {
this.effect = WindowEffect.acrylic;
}
} else {
this.effect = WindowEffect.acrylic;
}
}
Am using Windowefffect.acrylic as default, but this should change if on windows 10, since it has bug when mouse dragging on window.
How should I do properly? thanks
Add support for modifying the window's toolbar
and toolbarStyle
properties.
This would make it possible to e.g. recreate the “large toolbar” window style that can be seen in the example project of the macos_ui package:
Allow the window's level
property to be changed.
See leanflutter/window_manager#108.
I also tried not to use any window manager, this also appear. I think this maybe a bug.
I'm making an app which has an option to choose whether to apply mica effect or not.
Setting WindowEffect.disabled right away causes no issues, but setting WindowEffect.mica and changing back to WindowEffect.disabled will remove rounded corners (Win 11) and window borders, which will come back when changing again to WindowEffect.mica
Hello, this lib works like a charm on macOS and windows, but not for linux, is there a way to make linux also have same experience?
An extension to #5. The transparency effects are now fully supported on macOS, but the following extra functions are not:
Enter fullscreen.
Window.enterFullscreen();
Exit fullscreen.
Window.exitFullscreen();
Hide controls.
Window.hideWindowControls();
Show controls.
Window.showWindowControls();
Will you add windows 7 support? Right now any app that uses this plugin can not be even launched on this windows version due to bitsdojo incompatibility but if you get rid of it and try to launch example app without it - any mode will show a black screen
Is this the intended behavior, or how do I make it not do that?
Windows 11 22000 ISO downloaded directly from the Microsoft page using VMWare
Hi, I'm using flutter_acrylic together with window_manager. My main()
function writes as shown below.
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await Window.initialize();
await windowManager.ensureInitialized();
const windowOptions = WindowOptions(
title: _appName,
size: Size(800, 600),
center: true,
// titleBarStyle: TitleBarStyle.hidden, // <- this line is the case
);
await windowManager.waitUntilReadyToShow(windowOptions, () async {
await windowManager.show();
await windowManager.focus();
});
runApp(const GalleryApp());
}
And in my app widget's initState()
:
@override
void initState() {
super.initState();
Window.setEffect(
effect: WindowEffect.mica,
dark: FluffApp.dark,
);
}
With titleBarStyle: TitleBarStyle.normal
(the default value), mica works perfectly and turns solid properly when the window is blurred (losing focus).
However after I set titleBarStyle: TitleBarStyle.hidden
, the mica background does not react to focus changes any more.
Please help to look into this problem, and let me know if I'm doing anything wrong. Thanks in advance.
Hi, my project not fully using nullsafety. when intergate to my project, the window appear a second and crash, error:
flutter_acrylic/FlutterAcrylicPlugin.swift:471: Fatal error: Unexpectedly found nil while unwrapping an Optional value
do u know why?
I have init it:
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await Window.initialize();
if (Platform.isWindows) {
await Window.hideWindowControls();
}
initializeDateFormatting().then((_) => runApp(MyApp()));
if (Platform.isWindows) {
doWhenWindowReady(() {
appWindow
..minSize = Size(640, 360)
..size = Size(720, 540)
..alignment = Alignment.center
..show();
});
}
}
the rest of the thing are exactly same on example app, the example app I can run it sucess.
The latest release is nearly a year old. Would it be possible for the contributors to release a new version to pub.dev since there have been some changes which would really justify a new version?
I have found two bugs:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.