패키지, 저장소 및 앱 카테고리 검색

패키지 상세v0.3.1

screen_retriever

이 플러그인을 사용하면 Flutter 데스크톱 앱에서 화면 크기, 디스플레이, 커서 위치 등의 정보를 검색할 수 있습니다.

macOSWindowsLinux
30일 다운로드
116만
좋아요
74
Pub 점수
160

패키지 설치

flutter pub add screen_retriever

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

screen_retriever 패키지는 Flutter 데스크톱 애플리케이션에서 연결된 디스플레이에 대한 세부 정보(화면 크기, 해상도, 주 화면 정보 등)에 접근할 수 있도록 합니다. 또한 다중 모니터를 통해 실시간 커서 위치 추적 기능을 제공합니다. macOS, Windows, Linux용으로 설계되어, 사용자 정의 UI, 생산성 도구 또는 정확한 화면 레이아웃 처리가 필요한 미디어 플레이어와 같은 멀티 스크린 인식 앱을 개발하는 개발자에게 가벼운 솔루션을 제공합니다. 이 플러그인은 Flutter의 데스크톱 생태계와 원활하게 통합됩니다.

사용 사례

  • 다중 모니터 애플리케이션 레이아웃
  • 커서 위치 추적
  • 디스플레이 해상도 감지
  • 데스크톱 UI 사용자 정의
  • 화면 인식 미디어 재생
  • 윈도우 위치 조정 도구

주요 기능

  • 크로스 플랫폼 桌면 지원
  • 실시간 커서 추적
  • 메타데이터 검색 표시
  • 경량이고 효율적
  • 간단한 API 통합
  • 다중 화면 지원

적합한 대상

  • 데스크톱 앱 개발자
  • 다중 화면 UI 디자이너
  • 생산성 도구 제작자
  • 미디어 플레이어 개발자
  • 사용자 정의 창 관리자

고려 사항

  • 데스크톱 플랫폼 대상 지정 필요
  • macOS, Windows 및 Linux에 한정
  • 모바일 또는 웹 지원 없음
  • 일부 시스템에서는 권한 처리가 필요할 수 있습니다
  • 고주파 업데이트에서의 성능 영향

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

⚠️ Migration Notice: This plugin is being migrated to libnativeapi/nativeapi-flutter

The new version is based on a unified C++ core library (libnativeapi/nativeapi), providing more complete and consistent cross-platform native API support. r

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
✔️ ✔️ ✔️

Documentation

Quick Start

Installation

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

dependencies:
  screen_retriever: ^0.2.0

Or

dependencies:
  screen_retriever:
    git:
      url: https://github.com/leanflutter/screen_retriever.git
      path: packages/screen_retriever
      ref: main
Usage
Display? _primaryDisplay;
List<Display> _displayList = [];

void _init() async {
  _primaryDisplay = await screenRetriever.getPrimaryDisplay();
  _displayList = await screenRetriever.getAllDisplays();
  setState(() {});
}
Listening events
class HomePage extends StatefulWidget {
  const HomePage({Key? key}) : super(key: key);

  @override
  State<HomePage> createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> with ScreenListener {
  @override
  void initState() {
    screenRetriever.addListener(this);
    super.initState();
  }

  @override
  void dispose() {
    screenRetriever.removeListener(this);
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    // ...
  }

  @override
  void onScreenEvent(String eventName) {
    String log = 'Event received: $eventName)';
    print(log);
  }
}

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

Who's using it?

  • Biyi (比译) - A convenient translation and dictionary app.
  • FastForge - An efficient tool for rapid application development and prototyping.

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. ✔️ ✔️ ✔️

Contributors ✨

Thanks goes to these wonderful people (emoji key):

LiJianying
LiJianying

💻
Christian Padilla
Christian Padilla

💻
J-P Nurmi
J-P Nurmi

💻
Kingtous
Kingtous

💻
fufesou
fufesou

💻
lukasz-lukasz-lukasz
lukasz-lukasz-lukasz

💻
Add your contributions

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MIT

카테고리

의존성

의존성 목록 3 개

소스 저장소

이 패키지를 사용하는 프로젝트