Search packages, repositories and app categories

Package detailsv0.1.2

desktop_lifecycle

Allow your flutter desktop application to perceive whether the window is activated.

macOSWindowsLinux
30-day downloads
2.3K
Likes
28
Pub points
150

Install package

flutter pub add desktop_lifecycle

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The desktop_lifecycle package enables Flutter desktop applications to detect when the application window is activated or deactivated across macOS, Windows, and Linux. It provides a simple API to listen for lifecycle events such as focus gain or loss, allowing developers to respond appropriately—like pausing animations, adjusting audio behavior, or updating UI states based on user interaction. This helps improve responsiveness and resource management in desktop apps.

Use cases

  • Detecting when a user switches to or away from the app window
  • Pausing background processes when the app loses focus
  • Adjusting UI or media playback based on window activation state
  • Enhancing user experience with context-aware behaviors
  • Optimizing performance by reducing activity when inactive

Key features

  • Cross-platform support for macOS, Windows, and Linux
  • Simple event stream for window activation/deactivation
  • Minimal overhead and lightweight integration
  • Real-time feedback on window focus status
  • Easy to integrate with existing Flutter app logic

Suitable for

  • Desktop-first Flutter applications
  • Apps requiring focus-aware behavior
  • Media players or productivity tools needing window state awareness
  • Developers targeting multiple desktop platforms
  • Applications that benefit from responsive window lifecycle handling

Considerations

  • Limited to desktop platforms (not mobile)
  • Requires platform-specific setup for full functionality
  • May need additional handling for edge cases like multiple windows
  • Not applicable for non-desktop Flutter use cases
  • Depends on underlying OS-level window event detection

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

flutter-plugins

This repo contains the source code for Flutter plugins which used in Mixin Messenger Desktop. Check the packages directory for all plugins.

Any questions join the Mixin Flutter group

Plugins

Plugin Pub Likes Platforms
desktop_drop pub package likes Windows, Linux, macOS, web
desktop_lifecycle pub package likes Windows, Linux, macOS
ogg_opus_player pub package likes Windows, Linux, macOS, iOS
pasteboard pub package likes Windows, Linux, macOS, web
win_toast pub package likes Windows
desktop_webview_window pub package likes Windows, Linux, macOS
fts5_simple pub package likes Windows, Linux, macOS
desktop_multi_window pub package likes Windows, Linux, macOS
mixin_logger pub package likes All Platforms
mixin_markdown_widget pub package likes Windows, Linux, macOS
ui_device pub package likes iOS
string_tokenizer Not Published Not Published macOS, iOS

Categories

Source repository

Projects using this package