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

패키지 상세v7.0.0

app_version_update

로컬 앱이 해당 스토어(플레이 스토어/애플 스토어)와 동일한 버전으로 업데이트되었는지 확인하는 간단하고 빠른 방법입니다.

AndroidiOSmacOSWindowsLinux
30일 다운로드
1.3만
좋아요
160
Pub 점수
145

패키지 설치

flutter pub add app_version_update

패키지 개요

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

app_version_update 패키지는 설치된 앱의 버전이 Google Play 스토어 또는 Apple App Store에 제공되는 최신 버전과 일치하는지 확인하는 과정을 간소화합니다. 개발자가 제3자 서비스에 의존하지 않고 프로그래밍 방식으로 업데이트를 검증할 수 있도록 합니다. 이 패키지는 Android, iOS, macOS, Windows, Linux 등 여러 플랫폼을 지원하여 크로스플랫폼 앱에 이상적입니다. 로컬 버전 코드와 스토어 버전을 비교함으로써 필요 시 사용자에게 업데이트를 유도할 수 있습니다.

사용 사례

  • 시작 시 앱 업데이트 확인
  • 앱 내 대화 상자를 통해 사용자에게 업데이트를 요청합니다
  • 다양한 플랫폼 간의 버전 일관성 확인
  • 백그라운드에서 업데이트 확인을 자동화합니다
  • 다중 플랫폼 앱 지원

주요 기능

  • 크로스 플랫폼 호환성
  • 버전 비교를 위한 간단한 API
  • Google Play 및 Apple App Store와의 통합
  • 경량이며 종속성 없음
  • 실시간 버전 검증

적합한 대상

  • 크로스플랫폼 플러터 앱
  • 자동 업데이트 프롬프트가 필요한 앱
  • 최소 설정을 원하는 개발자
  • Android 및 iOS를 대상으로 하는 프로젝트
  • 버전 동기화 검증이 필요한 앱

고려 사항

  • 스토어 쿼리에 인터넷 연결이 필요합니다
  • 플레이 스토어 및 앱 스토어에 제한됨
  • 대체 앱 배포 지원 없음
  • 버전 코드 형식은 스토어의 기대에 부합해야 합니다
  • 자주 확인할 경우 속도 제한 처리가 필요할 수 있습니다

원본 README

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

Star on GitHub

Retrieve version and url for local app update against store app Android and iOS

Features

Using as reference packages like in_app_update , version_check.

Compares local version with the respective store version for the purpose of detecting user-side version updates.

It also provides widgets like dialog , bottom sheets and pages for you to display the update option to the user.

Getting started

$ flutter pub add app_version_update

or add in your dependencies

dependencies:
  app_version_update: <latest>

to use this app you need to have the app hosted in stores.

To test, you can manually downgrade your pubspec.yaml from your version: , when you run your local version it will be different from the store version

Usage

Internet permission Android: <uses-permission android:name="android.permission.INTERNET" />

Internet permission iOs:

<key>NSAppTransportSecurity</key>  
<dict>  
  <key>NSAllowsArbitraryLoads</key><true/>  
</dict>  
final appleId = '284882215'; // If this value is null, its packagename will be considered
final playStoreId = 'com.facebook.katana'; // If this value is null, its packagename will be considered

await AppVersionUpdate.checkForUpdates(
            appleId: appleId, playStoreId: playStoreId)
        .then((data) async {
            print(data.storeUrl);
            print(data.storeVersion);
            if(data.canUpdate!){
              //showDialog(... your custom widgets view) 
              //or use our widgets
              // AppVersionUpdate.showAlertUpdate
              // AppVersionUpdate.showBottomSheetUpdate
              // AppVersionUpdate.showPageUpdate
              AppVersionUpdate.showAlertUpdate(
              appVersionResult: data, context: context);
            }
         });

Customize the Alert Dialog

// you also have some options to customize our Alert Dialog 
AppUpdateVersion.showAlertUpdate(
    {BuildContext? context,
      AppVersionResult? appVersionResult,
      bool? mandatory = false,
      String? title = 'New version available',
      TextStyle titleTextStyle =
          const TextStyle(fontSize: 24.0, fontWeight: FontWeight.w500),
      String? content = 'Would you like to update your application?',
      TextStyle contentTextStyle =
          const TextStyle(fontSize: 16.0, fontWeight: FontWeight.w400),
      ButtonStyle? cancelButtonStyle = const ButtonStyle(
          backgroundColor: MaterialStatePropertyAll(Colors.redAccent)),
      ButtonStyle? updateButtonStyle = const ButtonStyle(
          backgroundColor: MaterialStatePropertyAll(Colors.green)),
      String? cancelButtonText = 'UPDATE LATER',
      String? updateButtonText = 'UPDATE',
      TextStyle? cancelTextStyle = const TextStyle(color: Colors.white),
      TextStyle? updateTextStyle = const TextStyle(color: Colors.white),
      Color? backgroundColor = Colors.white})

Customize the our bottom sheet

AppUpdateVersion.showBottomSheetUpdate(
      {@required BuildContext? context,
      @required AppVersionResult? appVersionResult,
      bool? mandatory = false,
      String? title = 'New version avaible',
      Widget? content}) async {
    await showModalBottomSheet(
        isDismissible: !mandatory!,
        context: context!,
        builder: (context) => BottomSheetUpdateVersion(
              appVersionResult: appVersionResult,
              mandatory: mandatory,
              content: content,
              title: title,
            ));
  }

Customize the Page

// you also have some options to customize our Page
AppUpdateVersion.showPageUpdate(
    {@required BuildContext? context,
    @required AppVersionResult? appVersionResult,
    bool? mandatory = false,
    Widget? page}) async {
     Navigator.push(
        context!,
        MaterialPageRoute(
            builder: (context) =>
                page ??
                UpdateVersionPage(
                  mandatory: mandatory,
                  appVersionResult: appVersionResult,
                )));
  }
  
 

Additional information

Next Updates status
Mandatory or optional update released
Create TestMode development
Bottom sheet widget released
Page widget released
Handle Exceptions development
New options custom widgets released
Automatic country detection released
Modularize files listed

This project is at an initial level, more functions will be included as

So any suggestion and contribution is welcome.

카테고리

의존성

의존성 목록 4 개

소스 저장소

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