You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

github.com/leanflutter/screen_capturer

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/leanflutter/screen_capturer

v0.2.3
Source
Go
Version published
Created
Source

screen_capturer

pub version All Contributors

This plugin allows Flutter desktop apps to take screenshots.

English | 简体中文

Platform Support

LinuxmacOSWindows
✔️✔️✔️

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

NameDescriptionLinuxmacOSWindows
regionDrag the cursor around an object to form a rectangle.✔️✔️✔️
screenCapture the entire screen.✔️✔️✔️
windowSelect 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

FAQs

Package last updated on 29 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.