Skip to content
pubscout

screen_retriever

0.4.0, released 8 days ago by leanflutter.dev

Read desktop screen size, work area, scale factor and cursor position on Windows, macOS and Linux.

$ flutter pub add screen_retriever
Source repository

What it does

Provides a synchronous API to query primary and all displays, their geometry, scale, orientation and other properties. It also streams display add/remove/change events and cursor location.

AI-written summary of version 0.4.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to adapt UI layout to multiple monitors or high‑DPI screens
  • You need to know the cursor position for custom pointer handling
  • You want to react to display configuration changes at runtime

Skip it when

  • You target mobile platforms only
  • You need a cross‑platform solution that also works on web

Strengths

  • Works on all three desktop platforms with a single API
  • No native code required in your app – uses nativeapi under the hood
  • Synchronous calls make it easy to use in init code
  • Provides live updates via listeners

Weaknesses

  • Only supports desktop, no mobile or web
  • Relies on nativeapi version compatibility

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
3

Add dependency, ensure GTK3/X11/Xi dev packages on Linux; requires Flutter 3.50+

import 'package:screen_retriever/screen_retriever.dart';
final dm = DisplayManager.instance;
final primary = dm.getPrimary();
print('Primary ${primary?.name} size ${primary?.size.toSize()}');
final cursor = dm.getCursorPosition();
print('Cursor at ${cursor.toOffset()}');

Alternatives

Packages that do the same job and could replace screen_retriever.

  • win32

    Direct Windows API access for display info without extra plugin

  • gtk

    Low‑level GTK bindings for Linux display handling

Works with

Packages commonly used together with screen_retriever: ones it builds on, ones built on it, and its own family.