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

new_version 표지
패키지 상세v0.3.1

new_version

사용자가 Flutter 앱의 최신 버전을 가지고 있는지 확인하세요.

AndroidiOSmacOSWindowsLinux
30일 다운로드
456
좋아요
618
Pub 점수
130

패키지 설치

flutter pub add new_version

패키지 개요

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

new_version 패키지는 Flutter 앱이 원격 소스(예: JSON 파일 또는 API 엔드포인트)에 지정된 버전과 비교하여 현재 버전이 최신인지 확인하는 데 도움을 줍니다. Android, iOS, macOS, Windows, Linux 등 여러 플랫폼을 지원합니다. 새 버전이 사용 가능할 때 개발자가 사용자에게 앱을 업데이트하도록 유도할 수 있어 사용자 경험을 향상시키고 최신 기능 및 보안 수정 사항에 접근할 수 있도록 합니다. 가볍고 구성이 최소한으로 필요한 간편한 통합이 가능합니다.

사용 사례

  • 사용자에게 앱 업데이트를 요청합니다
  • 앱 시작 시 업데이트 확인
  • 버전 호환성 확인
  • 새로운 릴리스에 대한 사용자 알림
  • CI/CD 워크플로우와 통합

주요 기능

  • 크로스 플랫폼 지원
  • 간단한 통합
  • 원격 버전 확인
  • 사용자 정의 가능한 업데이트 프롬프트
  • JSON 및 HTTP 엔드포인트를 지원합니다

적합한 대상

  • 버전 제어가 필요한 앱
  • 앱 업데이트를 관리하는 개발자
  • 자주 출시되는 프로젝트
  • 사용자 중심 모바일 애플리케이션
  • 자동 배포를 사용하는 팀

고려 사항

  • 인터넷 연결이 필요합니다
  • 외부 버전 소스에 의존합니다
  • 캐싱 전략이 필요할 수 있습니다
  • 오프라인 우선 앱에는 적합하지 않습니다
  • 버전 비교 로직은 정의되어야 합니다

원본 README

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

Archive Notice

This plugin is relatively stable and feature-complete, but I won't be working on it or accepting pull requests going forward. If anyone is interested in taking over as maintainer, feel free to email me. I'm also happy to link to popular forks that have spun off. Thanks.

New Version Plugin 🎉

A Flutter plugin that makes it possible to:

  • Check if a user has the most recent version of your app installed.
  • Show the user an alert with a link to the appropriate app store page.

See more at the Dart Packages page.

Screenshots

Installation

Add new_version as a dependency in your pubspec.yaml file.

dependencies:
  new_version: ^0.3.0

Usage

In main.dart (or wherever your app is initialized), create an instance of NewVersion.

final newVersion = NewVersion();

The plugin will automatically use your Flutter package identifier to check the app store. If your app has a different identifier in the Google Play Store or Apple App Store, you can overwrite this by providing values for androidId and/or iOSId.

For iOS: If your app is only available outside the U.S. App Store, you will need to set iOSAppStoreCountry to the two-letter country code of the store you want to search. See http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 for a list of ISO Country Codes.

You can then use the plugin in two ways.

Quickstart

Calling showAlertIfNecessary with your app's BuildContext will check if the app can be updated, and will automatically display a platform-specific alert that the user can use to go to the app store.

newVersion.showAlertIfNecessary(context: context);

Advanced 😎

If you want to create a custom alert or use the app version information differently, call getVersionStatus. This will return a Future<VersionStatus> with information about the local and app store versions of the app.

final status = await newVersion.getVersionStatus();
status.canUpdate // (true)
status.localVersion // (1.2.1)
status.storeVersion // (1.2.3)
status.appStoreLink // (https://itunes.apple.com/us/app/google/id284815942?mt=8)

If you want to present a customized dialog, you can pass your VersionStatus to showUpdateDialog().

newVersion.showUpdateDialog(
  context: context, 
  versionStatus: status,
  dialogTitle: 'Custom dialog title',
  dialogText: 'Custom dialog text',
  updateButtonText: 'Custom update button text',
  dismissButtonText: 'Custom dismiss button text',
  dismissAction: () => functionToRunAfterDialogDismissed(),
)

카테고리

의존성

의존성 목록 5 개

소스 저장소

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

아직 데이터가 없습니다.