搜尋套件、儲存庫與 APP 分類

套件詳情v0.2.3

screen_capturer

此外掛程式允許 Flutter 桌面應用程式擷取螢幕截圖。

macOSWindowsLinux
近 30 天下載
3400
喜歡數
83
Pub 分數
150

安裝套件

flutter pub add screen_capturer

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

screen_capturer 套件讓 Flutter 桌面應用程式能在 macOS、Windows 與 Linux 上擷取螢幕截圖。它提供簡單的 API,可取得全螢幕或特定區域的截圖,非常適合需要視覺文件記錄、除錯工具或螢幕共用功能的應用程式。此外掛直接整合至作業系統的螢幕擷取功能,確保跨平台的穩定效能。專為需要以程式設計方式與螢幕內容互動的桌面優先 Flutter 應用程式開發者所設計。

適用情境

  • 在桌面應用程式中截取螢幕截圖
  • 除錯和測試工具
  • 螢幕錄製工具
  • 視覺文件
  • 使用者介面示範

主要特色

  • 跨平台支援(macOS、Windows、Linux)
  • 簡易截圖 API
  • 區域特定捕獲
  • 原生作業系統整合
  • 輕量且快速

適合對象

  • 桌面應用程式開發者
  • 除錯工具創建者
  • UI自動化測試人員
  • 螢幕共用應用程式

使用建議

  • 需要平台特定權限
  • 僅限桌面平台
  • 可能需要使用者同意才能存取畫面
  • 無行動裝置支援
  • 依賴原生系統 API

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

🚀 Ship Your App Faster: Try Fastforge - The simplest way to build, package and distribute your Flutter apps.

screen_capturer

pub version All Contributors

This plugin allows Flutter desktop apps to take screenshots.


English | 简体中文


Platform Support

Linux macOS Windows
✔️ ✔️ ✔️

Quick Start

Installation

Add this to your package's pubspec.yaml file:

dependencies:
  screen_capturer: ^0.2.3

Or

dependencies:
  screen_capturer:
    git:
      path: packages/screen_capturer
      url: https://github.com/leanflutter/screen_capturer.git
      ref: main
Windows requirements

Be sure to modify your Visual Studio installation and ensure that "C++ ATL for latest v142 build tools (x86 & x64)" is installed!

Usage
macOS

Change the file macos/Runner/DebugProfile.entitlements or macos/Runner/Release.entitlements as follows:

Required only for sandbox mode.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>com.apple.security.app-sandbox</key>
	<true/>
+	<key>com.apple.security.temporary-exception.mach-register.global-name</key>
+	<string>com.apple.screencapture.interactive</string>
</dict>
</plist>
import 'package:screen_capturer/screen_capturer.dart';

CapturedData? capturedData = await screenCapturer.capture(
  mode: CaptureMode.region, // screen, window
  imagePath: '<path>',
  copyToClipboard: true,
);

Please see the example app of this plugin for a full example.

Platform Differences

CaptureMode
Name Description Linux macOS Windows
region Drag the cursor around an object to form a rectangle. ✔️ ✔️ ✔️
screen Capture the entire screen. ✔️ ✔️ ✔️
window Select a window, that you want to capture. (linux capture only the current window) ➖ ✔️ ✔️

Who's using it?

Contributors

LiJianying
LiJianying

💻
Amit Mondal
Amit Mondal

💻
lightrabbit
lightrabbit

💻
liuyuxin
liuyuxin

💻
kalykun
kalykun

📖
Add your contributions

License

MIT

所屬分類

依賴

依賴清單 4 項

  • screen_capturer_linux^0.2.3
  • screen_capturer_macos^0.2.2
  • screen_capturer_platform_interface^0.2.2
  • screen_capturer_windows^0.2.2

原始碼儲存庫

使用此套件的專案

暫無相關資料。