screen_capturer
0.2.3, released 2 years ago by leanflutter.org
Allows Flutter desktop apps to take screenshots.
What it does
The plugin enables Flutter desktop applications on Windows, macOS, and Linux to capture screenshots using different modes like region, screen, and window. Captured images can be saved to a specified path or copied directly to the clipboard.
AI-written summary of version 0.2.3, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are building a Flutter desktop application that requires screenshot capabilities.
- You need to capture specific regions, entire screens, or individual windows from your desktop app.
Skip it when
- You are targeting mobile or web platforms exclusively.
- You do not need native desktop screen capture utilities.
Strengths
- Supports multiple desktop platforms (Windows, macOS, Linux).
- Offers flexible capture modes including region, screen, and window.
- Supports copying captured images directly to the clipboard.
Weaknesses
- Requires specific OS-level configuration on macOS for sandbox mode and dependencies like Visual Studio C++ ATL tools on Windows.
- Linux window capture only supports the current window.
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 4
On Windows, ensure Visual Studio is installed with 'C++ ATL for latest v142 build tools (x86 & x64)'. On macOS, entitlements may need to be updated if using sandbox mode.
import 'package:screen_capturer/screen_capturer.dart';
CapturedData? capturedData = await screenCapturer.capture(
mode: CaptureMode.region,
imagePath: '<path>',
copyToClipboard: true,
);Alternatives
Packages that do the same job and could replace screen_capturer.
- tray_manager
Define system tray icons and context menus in Flutter desktop apps.
93Compare - zikzak_inappwebview
A Flutter plugin providing inline WebView, headless WebView, and in-app browser features.
80Compare - desktop_lifecycle
Allows Flutter desktop applications to perceive window activation state.
76Compare - xdg_desktop_portal
A native Dart implementation of portals for Linux desktop applications.
75Compare