Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leanflutter/screen_capturer
This plugin allows Flutter desktop apps to capture screenshots.
https://github.com/leanflutter/screen_capturer
screenshot
Last synced: 4 days ago
JSON representation
This plugin allows Flutter desktop apps to capture screenshots.
- Host: GitHub
- URL: https://github.com/leanflutter/screen_capturer
- Owner: leanflutter
- License: mit
- Created: 2021-11-21T00:32:56.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-29T13:30:03.000Z (4 months ago)
- Last Synced: 2024-12-22T03:06:26.341Z (12 days ago)
- Topics: screenshot
- Language: C++
- Homepage:
- Size: 471 KB
- Stars: 85
- Watchers: 4
- Forks: 34
- Open Issues: 11
-
Metadata Files:
- Readme: README-ZH.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-flutter-desktop - screen_capturer - This plugin allows Flutter desktop apps to capture screenshots. (Packages)
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
💻
Amit Mondal
💻
lightrabbit
💻
liuyuxin
💻
kalykun
📖
Add your contributions
## 许可证
[MIT](./LICENSE)