v1.0.0
window_to_front
为了让应用程序在 Mac、Linux 和桌面系统上自动将其自身置于应用程序窗口堆栈的最前面。
19喜欢 56.9万近 30 天下载160Pub 分数
macOSWindowsLinux
适用于 Windows、Linux 和 macOS 的 Flutter 桌面插件,可在基于浏览器的身份验证流程后将您的应用窗口置顶显示。支持 SwiftPM。
{"sdk":"flutter"}{"sdk":"flutter"}^6.0.0以下为英文项目原文快照,最新内容请访问 GitHub。
A Flutter plugin that brings your desktop application window back to the front of the window stack.
After an authentication flow — or any other use case where you hand off to an
external program such as a web browser — the user is often left staring at the
browser window. Ideally the application should return to the front
automatically. window_to_front does exactly that.
| Platform | Supported |
|---|---|
| Windows | ✅ |
| Linux | ✅ |
| macOS | ✅ |
Add the dependency to your pubspec.yaml:
dependencies:
window_to_front: ^0.0.4
Then run:
flutter pub get
import 'package:window_to_front/window_to_front.dart';
// Call this when you want your application window to come to the front,
// for example right after returning from an external browser sign-in flow.
await WindowToFront.activate();
See the example for a complete sample.
Released under the MIT License.