FLUTTER ECOSYSTEM

leanflutter/screen_capturer

Este plugin permite que aplicativos Flutter para desktop capturem capturas de tela.

Capa do projeto captura de tela
Stars
103
Forks
40
Último push (UTC)
23 de mar. de 2025
Status do projeto
Ativo
LeanFlutter GitHub avatar
GITHUB Organization

LeanFlutter ↗

To make the flutter even simpler

LinguagensC++DartCMakeSwiftCRubyHTML

Tópicos técnicos

Pacotes publicados por este repositório

Dependências usadas

Lista de dependências 1 itens
  • melosDesenvolvimento^6.1.0

README original

Texto original em inglês. Visite o GitHub para a versão atual.

Expandir / recolher README

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

screen_capturer

pub version https://img.shields.io/discord/884679008049037342.svg 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

📖
https://raw.githubusercontent.com/all-contributors/all-contributors-cli/1b8533af435da9854653492b1327a23a4dbd0a10/assets/logo-small.svg Add your contributions

License

MIT