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

updater 표지
패키지 상세v0.2.5

updater

Flutter용 사용자 지정 앱 내 업데이트를 확인하기 위한 패키지입니다.

Android
30일 다운로드
144
좋아요
41
Pub 점수
150

패키지 설치

flutter pub add updater

패키지 개요

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

업데이트 패키지는 플러터 앱이 사용자 정의 내부 앱 업데이트를 확인할 수 있도록 하여 개발자가 버전 제어를 관리하고 사용자에게 앱 내에서 직접 업데이트를 유도할 수 있게 해줍니다. 안드로이드 전용으로 설계되어 사용자가 정의한 소스에서 업데이트 정보를 가져와 기존 워크플로우에 원활하게 통합됩니다. 이는 앱 품질을 유지하고 앱 스토어 업데이트에만 의존하지 않고 사용자가 최신 버전을 사용하도록 보장합니다. 이 패키지는 가볍고 구성이 최소한으로 필요한 간단한 구현이 가능합니다.

사용 사례

  • 앱 내 업데이트 알림
  • 사용자 정의 업데이트 로직
  • 사용자 중심의 업데이트 프롬프트
  • 버전 호환성 검사
  • 앱 유지보수
  • 오프라인 업데이트 감지

주요 기능

  • 사용자 정의 업데이트 원본 지원
  • 안드로이드 전용 플랫폼 대상
  • 간단한 통합
  • 경량 설계
  • 사용자 정의 가능한 업데이트 확인
  • 외부 종속성 없음

적합한 대상

  • 앱 버전을 관리하는 개발자
  • 제어된 업데이트 롤아웃이 필요한 앱
  • 자주 출시되는 프로젝트
  • 내부 또는 개인 업데이트 서버를 사용하는 팀
  • Android용 Flutter 앱

고려 사항

  • 안드로이드 플랫폼에 제한됨
  • 수동으로 메타데이터 설정을 업데이트해야 합니다
  • iOS 지원 없음
  • 업데이트 정보는 외부 서버에 의존합니다
  • 공개 앱 스토어 업데이트에 적합하지 않습니다
  • 업데이트 엔드포인트를 위해 안전한 연결이 필요합니다

원본 README

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

Version

A package to check for the custom in-app updates for Flutter.

⭐ Installing

dependencies:
    updater: ^0.2.5

⚡ Import

import 'package:updater/updater.dart';
Android IOS
Supported ✔️ ❌
alt text

Properties

context → BuildContext
url → String
titleText → String
contentText → String
confirmText → String
cancelText → String
elevation → double
rootNavigator → bool
allowSkip → bool
backgroundDownload → bool
callBack → Function(String, int, String, int String)
controller → UpdaterController
delay → Duration
enableResume → bool

UpdateStatus

UpdateStatus.Checking
UpdateStatus.Pending
UpdateStatus.Available
UpdateStatus.Dowloading
UpdateStatus.Paused
UpdateStatus.Resume
UpdateStatus.Cancelled
UpdateStatus.Completed
UpdateStatus.DialogDismissed
UpdateStatus.Failed

Json Structure

versionCode → int
versionName → String
minSupport → int
contentText → String
url → String 
{
  "versionCode":3,
  "versionName":"1.0.0",
  "contentText":"Please update your app",
  "minSupport":2,
  "url":"/*App Download Url*/"
}
versionCode:   //Specify new version code
versionName:   //specify version name
minSuppor:     //specify minimum supported version to force update
contentText:   //specify content text, if contentText is not defined in app then this will be use
url:          //App file download link

⚙ Setup

Android
  • Add REQUEST_INSTALL_PACKAGES permission to open and install apk file
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />

📙 How To Use

Inside pubspec.yaml file

# Specify version code using +VersionCode
version: 1.0.0+1  #Like here the VersionCode is 1
    //Controller
    UpdaterController controller = UpdaterController(
        listener: (UpdateStatus status) {
            print('Listener: $status');
        },
        onChecked: (bool isAvailable) {
            print(isAvailable);
        },
        progress: (current, total) {
            print('Progress: $current -- $total');
        },
        onError: (status) {
            print('Error: $status');
        },
    );


    Updater updater = Updater(
        context: context,
        controller: controller,
        url: 'JSON_FILE_URL',
        titleText: 'Update available',
        // backgroundDownload: false,
        // allowSkip: false,
        contentText:
            'Update your app to the latest version to enjoy new feature.',
        callBack: (UpdateModel model) {

          print(model.versionName);
          print(model.versionCode);
          print(model.contentText);
          
        },
        
        enableResume: false,
    );
    updater.check();
    
    
    //To cancel the download
    //controller.cancel();


    //To pause the download
    //controller.pause();

    //To resume the download
    //controller.resume();

    
    

카테고리

의존성

의존성 목록 4 개

소스 저장소

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

아직 데이터가 없습니다.