display_identify_overlay
A Flutter package that displays monitor index numbers as overlays on all connected displays. Perfect for identifying monitors in multi-display setups.
Project Goal
This project aims to provide a lightweight Flutter package that displays temporary, on‑screen identifiers on each connected display (similar to the "Identify displays" feature in OS display settings) for desktop environments.
Why
- Quickly help users and developers identify which physical monitor corresponds to which logical display.
- Useful in multi‑monitor setups during onboarding, configuration, demos, or troubleshooting.
Scope
- Show large, clearly visible numbered labels on all connected displays.
- Basic customization for appearance (color, opacity, font size) and display duration.
- Desktop focus with Windows first; macOS and Linux to follow.
Non‑goals
- Managing display settings (resolution, scaling, arrangement) is out of scope.
- Persistent overlays or window management features are not included.
Status
- Windows overlay implemented; Linux/macOS planned. APIs are stable and safe no‑op on unsupported platforms.
Features
xBasic project structure and API designxPlatform detection and abstractionxMonitor information modelxOverlay styling and positioning optionsxException handlingxWindows implementation (Win32 overlay)Linux implementation (planned)macOS implementation (planned)TestsDocumentation
Getting Started
Prerequisites
- Flutter SDK (>=3.16.0)
- Dart SDK (>=3.8.1)
Installation
Add this to your package's pubspec.yaml file:
dependencies:
display_identify_overlay: ^0.1.0
Usage
import 'package:display_identify_overlay/display_identify_overlay.dart';
// Basic usage (no-op on unsupported platforms like macOS/Linux for now)
await DisplayIdentifyOverlay.show();
// With custom options
await DisplayIdentifyOverlay.show(
OverlayOptions(
duration: Duration(seconds: 5),
style: OverlayStyle(
fontSize: 48,
color: Colors.red,
backgroundColor: Colors.black.withOpacity(0.5),
),
position: OverlayPosition.center,
),
);
// Hide overlays manually
await DisplayIdentifyOverlay.hide();
// Get monitor information (returns [] on unsupported platforms)
final monitors = await DisplayIdentifyOverlay.getMonitors();
API Reference
DisplayIdentifyOverlay
The main class providing static methods for overlay management.
Methods
show([OverlayOptions? options])- Shows monitor identification overlayshide()- Hides all currently displayed overlaysgetMonitors()- Gets information about all connected monitors
Properties
isSupported- Checks if the current platform is supportedplatform- Gets the current platform name
OverlayOptions
Configuration options for the overlay display.
duration- How long to display the overlaystyle- The style configuration for the overlayposition- The position of the overlay on each monitorautoHide- Whether to automatically hide the overlay after the duration
OverlayStyle
Style configuration for the overlay display.
fontSize- The font size for the monitor numbercolor- The text colorbackgroundColor- The background color of the overlayfontWeight- The font weightfontFamily- The font familyshadowColor- The shadow colorshadowOffset- The shadow offsetshadowBlurRadius- The shadow blur radiusborderRadius- The border radius of the overlaypadding- The padding around the text
MonitorInfo
Information about a monitor.
index- The monitor index (0-based)name- The monitor name/identifierx,y- The monitor's top-left corner coordinateswidth,height- The monitor's dimensionsisPrimary- Whether this monitor is the primary displaycenterX,centerY- The monitor's center coordinates
Platform Support
- Windows: Implemented
- Linux: Planned (current behavior is safe no‑op)
- macOS: Planned (current behavior is safe no‑op)
Publishing (pub.dev)
-
Ensure
pubspec.yamlhas name, description, version, homepage/repository, and a validLICENSEfile at the repo root. -
Validate locally:
dart format .flutter analyzedart pub publish --dry-run
- Publish:
dart pub publish
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Inspired by the "Identify displays" feature in operating system display settings
- Built with Flutter for cross-platform desktop support