パッケージ、リポジトリ、アプリカテゴリを検索

GitHub リポジトリd2itechnology/update_notification

通知を更新する

d2itechnology/update_notification open-source repository details.

通知を更新する のプロジェクト画像
スター
4
フォーク
2
最終プッシュ(UTC)
2021/09/22
プロジェクト状態
公開中

元の README

以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。

update_notification

  • This flutter package will alert app users to update the application.
  • With the help of an alert pop-up, users can easily navigate to the respective stores(App Store or play Store) to update the app.

UI

The UI of the alert dialog is simply a card.

Screenshots:

Installation

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

dependencies:
  update_notification: ^1.0.1

Usage

  • In main.dart (or any) file, first create an instance of the UpdateNotification class in your initState() method.

    final UpdateNotification updateNotification = UpdateNotification();

  • Pass the application package name in andoidAppId, iOSAppId.

  • Pass application minimum version value in minimumVersion parameter. This parameter is used to force people to update application, any user having version less than the specified version will be forced to update application

  • Call showAlertDialog method- updateNotification.showAlertDialog(context: context);

  • If updated app version is available on stores, application will get a popup on launch of application and an option to Update. On click of update button user will be directed to the respective stores(App store or play store).

Example

 import 'package:flutter/cupertino.dart';
 import 'package:flutter/material.dart';
 import '/update_notification.dart';

 class Example extends StatefulWidget {
   const Example({Key? key}) : super(key: key);

   @override
   _ExampleState createState() => _ExampleState();
 }

 class _ExampleState extends State<Example> {
   @override
   void initState() {
     super.initState();

     final UpdateNotification updateNotification =
         UpdateNotification(
             iOSAppId: 'com.google.myride',
             androidAppId: 'com.google.rever',
             minimumVersion: '1.0.0');

     showDialog(updateNotification);
   }

   void showDialog(UpdateNotification updateVersion) {
     updateVersion.showAlertDialog(context: context);
   }

   @override
   Widget build(BuildContext context) {
     return Scaffold(
       body: Container(),
     );
   }
 }
D2i Technology GitHub avatar
GitHub 作者

D2i Technology ↗

We convert your raw ideas into informative products, mobile and web applications.

D2i TechnologyNoida公式サイト ↗
言語DartSwiftKotlinObjective-C

このリポジトリが公開するパッケージ

使用している依存関係

依存関係一覧 8 件

プロジェクトに合うリポジトリを選ぶには?

用途で絞り込み、開発状況を比較し、採用前に元のリポジトリで要件を確認しましょう。

  1. 名前・作者・説明で検索し、技術トピックで絞り込みます。
  2. スター、フォーク、最近のプッシュを比較します。スターは関心の目安であり、品質の保証ではありません。
  3. 利用前に GitHub で README、ライセンス、Issues を確認します。

情報源と管理

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗