# 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
This plugin allows Flutter desktop apps to take screenshots.
---
English | [简体中文](./README-ZH.md)
---
- [screen_capturer](#screen_capturer)
- [Platform Support](#platform-support)
- [Quick Start](#quick-start)
- [Installation](#installation)
- [Windows requirements](#windows-requirements)
- [Usage](#usage)
- [macOS](#macos)
- [Platform Differences](#platform-differences)
- [CaptureMode](#capturemode)
- [Who's using it?](#whos-using-it)
- [License](#license)
## Platform Support
| Linux | macOS | Windows |
| :---: | :---: | :-----: |
| ✔️ | ✔️ | ✔️ |
## Quick Start
### Installation
Add this to your package's pubspec.yaml file:
```yaml
dependencies:
screen_capturer: ^0.2.3
```
Or
```yaml
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.
```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,
);
```
> 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?
- [Biyi (比译)](https://biyidev.com/) - A convenient translation and dictionary app.
## Contributors
## License
[MIT](./LICENSE)