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

패키지 상세v0.0.8

device_screenshot

전체 장치의 스크린샷을 찍는 데 도움이 되는 플러터 플러그인입니다.

Android
30일 다운로드
61
좋아요
9
Pub 점수
150

패키지 설치

flutter pub add device_screenshot

패키지 개요

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

device_screenshot 패키지는 Android에서 전체 디바이스 화면의 스크린샷을 캡처하기 위해 설계된 플러터 플러그인입니다. 개발자가 프로그래밍 방식으로 전체 장치 스크린샷을 찍을 수 있게 해주며, 테스트, 디버깅 또는 시각적 보고서 생성에 유용합니다. 이 플러그인은 플러터 애플리케이션과 원활하게 통합되며, 표준 구성 외에 추가적인 네이티브 코드 설정이 필요하지 않습니다. Android 플랫폼을 지원하며, 시각적 검증이나 자동 스크린샷 생성이 필요한 상황에 적합합니다.

사용 사례

  • 자동화된 UI 테스트
  • 시각적 문제 디버깅
  • 앱 미리보기 생성
  • 시각 문서화 만들기
  • 녹음 앱 상태

주요 기능

  • 전체 디바이스 화면 캡처
  • Android 전용 지원
  • 간단한 API 통합
  • 네이티브 코드가 필요하지 않습니다
  • 백그라운드에서 작동

적합한 대상

  • 테스트 자동화 엔지니어
  • UI/UX 개발자
  • 앱 디버거
  • 문서 작성자
  • 품질 보증 팀

고려 사항

  • Android 플랫폼에 한정
  • 런타임 권한이 필요합니다
  • 모든 기기에서 작동하지 않을 수 있습니다
  • 캡처 중 성능에 미치는 잠재적 영향
  • iOS 개발에 적합하지 않습니다

원본 README

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

Device Screenshot Banner

Device Screenshot

💡 Overview

A Flutter plugin that can helps you to take screenshot your overall device using media projection and foreground service.

The plugin currently supports Android only and doesn't support IOS because the feature of media projection is not available there

💻 Usage

First, add device_screenshot as a dependency in your pubspec.yaml file.

dependencies:
  flutter:
    sdk: flutter

  device_screenshot: ^update_version

Don't forget to flutter pub get.

🔧 Setup

Set the minimum SDK version to 21 or higher in your android/app/build.gradle file:

android {
    defaultConfig {
        ...
        minSdkVersion 21 // Set this to 21 or higher
        ...
    }
}
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="...">
  ...

  <application
        ...
        ...>

        <activity
            ...
            ...>

        <!--Add this-->
        <service
            android:name="com.flutter.device_screenshot.src.MediaProjectionService"
            android:enabled="true"
            android:exported="false"
            android:foregroundServiceType="mediaProjection"
            android:permission="TODO"
            android:stopWithTask="false"
            />
        <!--end-->

        ...
  ...
  </application>
</manifest>

Import the package:

import 'package:device_screenshot/device_screenshot.dart';

Use the singleton instance of DeviceScreenshot to access all the available methods, for example:

DeviceScreenshot.instance.checkMediaProjectionService()

📱 To take screenshot

At first you need to run foreground service and for this

DeviceScreenshot.instance.requestMediaProjection()

Now you are ready to take your Device Screenshot.

Uri? uri = await DeviceScreenshot.instance.takeScreenshot()

카테고리

의존성

의존성 목록 1 개

  • plugin_platform_interface^2.0.2

소스 저장소

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

아직 데이터가 없습니다.