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

overlay_pop_up 표지
패키지 상세v1.0.6+6

overlay_pop_up

앱이 닫히거나 종료된 상태에서도 Android에서 다른 앱 위에 팝업 또는 화면을 표시할 수 있는 새로운 Flutter 플러그인입니다.

Android
30일 다운로드
21
좋아요
53
Pub 점수
160

패키지 설치

flutter pub add overlay_pop_up

패키지 개요

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

앱이 종료되거나 종료된 상태에서도 안드로이드에서 팝업 또는 오버레이 화면을 표시할 수 있는 플러터 플러그인입니다. 다른 앱 위에 콘텐츠를 표시하기 위해 안드로이드의 시스템 레벨 오버레이 권한을 활용하며, 알림, 빠른 작업 또는 지속적인 UI 요소에 유용합니다. 이 플러그인은 플러터와 원활하게 통합되며 기능을 사용하려면 사용자 허가가 필요합니다. iOS는 지원하지 않으며 안드로이드 전용으로 설계되었습니다. 개발자는 오버레이의 외관과 동작을 프로그래밍 방식으로 사용자 정의할 수 있습니다.

사용 사례

  • 지속적인 알림 표시
  • 플로팅 액션 패널 만들기
  • 앱이 백그라운드로 전환되었을 때 알림 표시
  • 빠른 액세스 도구 구현
  • 다른 앱을 통해 실시간 업데이트 제공

주요 기능

  • 앱이 종료된 상태에서도 작동합니다
  • Android 전용 오버레이 지원
  • 사용자 정의 가능한 오버레이 콘텐츠
  • 시스템 수준의 권한 처리
  • Flutter와의 간단한 통합

적합한 대상

  • 항상 켜진 UI 컴포넌트를 구축하는 개발자
  • 지속적인 오버레이가 필요한 앱
  • 전경 가시성이 필요한 도구
  • 알림 향상된 애플리케이션
  • 플로팅 인터페이스를 갖춘 유틸리티 앱

고려 사항

  • Android 시스템 오버레이 권한이 필요합니다
  • iOS에서 사용할 수 없습니다
  • 기기 제조업체에 의해 제한될 수 있습니다
  • 사용자는 권한을 수동으로 활성화해야 합니다
  • 배터리 및 성능에 영향을 미칠 수 있습니다

원본 README

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

overlay_pop_up

A new Flutter plugin to display pop ups or screens over other apps in Android even when app is closed or killed.

Buy Me A Coffee

Demo

Preview

Android

add this to your AndroidManifest.xml

 <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />

 <application>
        ...
        <service
           android:name="com.requiemz.overlay_pop_up.OverlayService"
           android:exported="false" />
    </application>
Android 14

applications that target SDK 34 and use foreground service should include foregroundServiceType attribute(see documentation).

 <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />

 <application>
        ...
        <service
           android:name="com.requiemz.overlay_pop_up.OverlayService"
           android:exported="false"
           <!-- add this -->
           android:foregroundServiceType="camera, dataSync, location, etc" />
    </application>

Flutter implementation

configure your main.dart entry point a widget to display (make sure to add @pragma('vm:entry-point'))

NOTE: Now you can pass as parameter the dart entry point method name when showOverlay is called

@pragma("vm:entry-point")
void overlayPopUp() {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(const MaterialApp(
    debugShowCheckedModeBanner: false,
    home: Text('Hello Pub.dev!'),
  ));
}

Overlay Methods

returns true when overlay permission is alreary granted if permission is not granted then open app settings

await OverlayPopUp.requestPermission();

returns true or false according to permission status

await OverlayPopUp.checkPermission();

display your overlay and return true if is showed

PARAMS

  • height is not required by default is MATCH_PARENT

  • width is not required by default is MATCH_PARENT

  • verticalAlignment is not required by default is CENTER for more info see: https://developer.android.com/reference/android/view/Gravity

  • horizontalAlignment is not required by default is CENTER for more info see: https://developer.android.com/reference/android/view/Gravity

  • backgroundBehavior by default is focusable flag that is you can take focus inside a overlay for example inside a textfield and [tapThrough] you can tap through the overlay background even if has MATCH_PARENT sizes.

  • screenOrientation by default orientation is portrait.

  • closeWhenTapBackButton by default when user presses back button the overlay no has any action if you pass true then back button will close overlay.

  • isDraggable by default is false therefore the overlay can´t be dragged.

  • entryPointMethodName by default is 'overlayPopUp' if you want you can change it

    await OverlayPopUp.showOverlay();
    

    returns true if overlay closed correctly or already is closed

    await OverlayPopUp.closeOverlay();
    

    returns the overlay status true = open, false = closed

    await OverlayPopUp.isActive();
    

    returns the last overlay position if drag is enabled

    await OverlayPopUp.getOverlayPosition();
    

    share dynamic data to overlay

    await OverlayPopUp.sendToOverlay({'data':'hello!'});
    await OverlayPopUp.sendToOverlay('hello');
    

    receive the data from flutter as stream

    await OverlayPopUp.dataListener();
    

카테고리

의존성

의존성 목록 1 개

  • plugin_platform_interface^2.1.8

소스 저장소

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

아직 데이터가 없습니다.