GithubHelp home page GithubHelp logo

raj457036 / screen_capturer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from leanflutter/screen_capturer

0.0 2.0 0.0 225 KB

This plugin allows Flutter desktop apps to capture screenshots.

License: MIT License

Ruby 3.06% C++ 44.51% C 3.83% Dart 20.23% Swift 3.92% CMake 24.45%

screen_capturer's Introduction

screen_capturer

pub version

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.1.2

Or

dependencies:
  screen_capturer:
    git:
      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 ios/Runner/DebugProfile.entitlements or ios/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>',
);

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?

License

MIT

screen_capturer's People

Contributors

lijy91 avatar raj457036 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.