Skip to content

This plugin allows Flutter desktop apps to Retrieve information about screen size, displays, cursor position, etc.

License

Notifications You must be signed in to change notification settings

lukasz-lukasz-lukasz/screen_retriever

 
 

Repository files navigation

screen_retriever

pub version

This plugin allows Flutter desktop apps to Retrieve information about screen size, displays, cursor position, etc.


English | 简体中文


Platform Support

Linux macOS Windows
✔️ ✔️ ✔️

Quick Start

Installation

Add this to your package's pubspec.yaml file:

dependencies:
  screen_retriever: ^0.1.6

Or

dependencies:
  screen_retriever:
    git:
      url: https://github.com/leanflutter/screen_retriever.git
      ref: main

Usage

Display? _primaryDisplay;
List<Display> _displayList = [];

void _init() async {
  _primaryDisplay = await screenRetriever.getPrimaryDisplay();
  _displayList = await screenRetriever.getAllDisplays();
  setState(() {});
}

Please see the example app of this plugin for a full example.

Who's using it?

API

ScreenRetriever

Method Description Linux macOS Windows
getCursorScreenPoint Returns Offset - The current absolute position of the mouse pointer. ✔️ ✔️ ✔️
getPrimaryDisplay Returns Display - The primary display. ✔️ ✔️ ✔️
getAllDisplays Returns List<Display> - An array of displays that are currently available. ✔️ ✔️ ✔️

License

MIT

About

This plugin allows Flutter desktop apps to Retrieve information about screen size, displays, cursor position, etc.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 51.0%
  • CMake 21.7%
  • Dart 15.8%
  • Swift 5.6%
  • C 3.3%
  • Ruby 2.6%