pwa_install 패키지는 Flutter 애플리케이션에서 모바일 웹 사용자에게 프로그레시브 웹 앱(PWA)으로 앱을 설치하도록 유도할 수 있도록 합니다. 이 패키지는 사용자가 모바일 기기의 웹 브라우저를 통해 앱에 접근하고 있는지 감지하고, 네이티브 설치 프롬프트를 트리거하여 사용자 참여도와 유지율을 향상시킵니다. 이 패키지는 Flutter의 웹 플랫폼과 원활하게 통합되며, 안드로이드, iOS, macOS, Windows, 리눅스 등 여러 운영 체제를 지원합니다. 브라우저 수준의 PWA 기능을 활용하여 부드러운 설치 경험을 제공합니다.
사용 사례
웹 사용자에게 PWA 설치를 유도하기
모바일 브라우저에서 앱 참여도 증가
웹 기반의 Flutter 앱에 대한 유지율 향상
PWA를 통한 오프라인 액세스 활성화
크로스 플랫폼 배포 간소화
하이브리드 앱 배포 지원
주요 기능
모바일 웹 액세스를 감지합니다
네이티브 PWA 설치 프롬프트를 트리거합니다
다중 플랫폼에서 작동합니다
필요한 설정 최소화
Flutter Web과의 통합
브라우저 PWA API 활용
적합한 대상
웹 중심 플러터 앱을 개발하는 개발자
모바일 웹 사용자를 대상으로 하는 팀
PWA 채택을 목표로 하는 앱
저마찰 설치가 필요한 프로젝트
크로스 플랫폼 웹 애플리케이션
하이브리드 앱 전략
고려 사항
PWA 기능을 사용하려면 HTTPS가 필요합니다
PWA 설치 프롬프트를 지원하는 브라우저에 한정
모든 모바일 장치에서 트리거되지 않을 수 있습니다
사용자 권한 설정에 따라 다릅니다
웹 플랫폼이 아닌 경우 적용되지 않음
설치 동작은 브라우저에 따라 다릅니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
PWA Install
A small Flutter package that allows you to prompt mobile web users to install your Flutter app as a progressive web application (PWA) on demand.
A very basic example can be found here: PWA Install
The contents of this package are based on this article by Pete LePage (@petele)
Out-of-the-Box
As of release 1.20, all Flutter apps can be installed as PWAs. Combine this with the fact that all Chromium based browsers support PWAs and it becomes clear that designing your Flutter application for a mobile browser can be the most effective way of reaching a large audience.
When a Flutter app is opened in a supported browser, the user will see an install prompt like this:
Mobile Prompt
Web Prompt
This is awesome, but there's a caveat. The browser will only show the install prompt to users the first time they open your app. If the user refreshes the page or returns to the app while it's still in their browser history, the prompt will not be shown.
The PWA Install Package
With this package, you can prompt the user to install your app as a PWA on demand (e.g, on a button click). This package works by capturing the beforeinstallprompt event web browsers use to install PWAs. The event is captured when your app is launched and can be called anytime thereafter.
Setup
1. Update index.html
Add the following <script> tag to the body of web/index.html:
The following method can be called in main.dart before calling runApp(). PWAInstall() is instantiated as a singleton so you can use the class directly.