# screen_capturer **Repository Path**: leanflutter/screen_capturer ## Basic Information - **Project Name**: screen_capturer - **Description**: 这个插件允许 Flutter 桌面应用程序进行屏幕截图。 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-12-05 - **Last Updated**: 2024-10-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # screen_capturer [![pub version][pub-image]][pub-url] [![][discord-image]][discord-url] [![All Contributors][all-contributors-image]](#contributors) [pub-image]: https://img.shields.io/pub/v/screen_capturer.svg [pub-url]: https://pub.dev/packages/screen_capturer [discord-image]: https://img.shields.io/discord/884679008049037342.svg [discord-url]: https://discord.gg/zPa6EZ2jqb [all-contributors-image]: https://img.shields.io/github/all-contributors/leanflutter/screen_capturer?color=ee8449 这个插件允许 Flutter 桌面应用程序进行屏幕截图。 --- [English](./README.md) | 简体中文 --- - [screen_capturer](#screen_capturer) - [平台支持](#平台支持) - [快速开始](#快速开始) - [安装](#安装) - [Windows requirements](#windows-requirements) - [用法](#用法) - [macOS](#macos) - [平台差异](#平台差异) - [CaptureMode](#capturemode) - [谁在用使用它?](#谁在用使用它) - [许可证](#许可证) ## 平台支持 | Linux | macOS | Windows | | :---: | :---: | :-----: | | ✔️ | ✔️ | ✔️ | ## 快速开始 ### 安装 将此添加到你的软件包的 pubspec.yaml 文件: ```yaml dependencies: screen_capturer: ^0.2.3 ``` 或 ```yaml dependencies: screen_capturer: git: path: packages/screen_capturer url: https://github.com/leanflutter/screen_capturer.git ref: main ``` #### Windows requirements 请务必修改你的 Visual Studio 安装,并确保 **"C++ ATL for latest v142 build tools (x86 & x64)"** 已安装 ### 用法 ### macOS 更改文件 `macos/Runner/DebugProfile.entitlements` 或 `macos/Runner/Release.entitlements` 如下: > 仅在沙盒模式下需要。 ```diff com.apple.security.app-sandbox + com.apple.security.temporary-exception.mach-register.global-name + com.apple.screencapture.interactive ``` ```dart import 'package:screen_capturer/screen_capturer.dart'; CapturedData? capturedData = await screenCapturer.capture( mode: CaptureMode.region, // screen, window imagePath: '', copyToClipboard: true, ); ``` > 请看这个插件的示例应用,以了解完整的例子。 ## 平台差异 ### CaptureMode | Name | Description | Linux | macOS | Windows | | -------- | ------------------------------------------ | ----- | ----- | ------- | | `region` | 在对象周围拖动光标以形成一个矩形。 | ✔️ | ✔️ | ✔️ | | `screen` | 捕获整个屏幕。 | ✔️ | ✔️ | ✔️ | | `window` | 选择要捕获的窗口。(linux 只捕获当前窗口) | ➖ | ✔️ | ✔️ | ## 谁在用使用它? - [Biyi (比译)](https://biyidev.com/) - 一个便捷的翻译和词典应用程序。 ## 贡献者
LiJianying
LiJianying

💻
Amit Mondal
Amit Mondal

💻
lightrabbit
lightrabbit

💻
liuyuxin
liuyuxin

💻
kalykun
kalykun

📖
Add your contributions
## 许可证 [MIT](./LICENSE)