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

flutter_svprogresshud のカバー
パッケージ詳細v1.1.0

flutter_svprogresshud

Flutterアプリ用のクリーンで軽量なプログレスHUD、SVProgressHUDに基づく。

AndroidiOS
30日間ダウンロード
357
いいね数
52
Pub ポイント
130

パッケージをインストール

flutter pub add flutter_svprogresshud

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

Flutterアプリ用のクリーンで軽量なプログレスHUDで、SVProgressHUDにインスパイアされています。ユーザー体験を妨げることなく、ローディングインジケーター、成功メッセージ、エラーをシンプルで洗練された方法で表示できます。AndroidおよびiOS向けに設計されており、最小限のセットアップで既存のFlutterプロジェクトにスムーズに統合可能です。パッケージはカスタマイズ可能な外観と動作を提供しながら、パフォーマンスと応答性を維持しています。

用途

  • ネットワークリクエスト中にロード状態を表示する
  • アクション後の成功またはエラーメッセージの表示
  • フォーム送信時のUXの向上
  • バックグラウンドタスク中にフィードバックを提供する
  • モバイルアプリにおけるロードUIの簡素化

主な機能

  • 軽量で高速
  • クロスプラットフォーム対応(Android および iOS)
  • カスタマイズ可能な外観
  • HUDの表示/非表示用のシンプルなAPI
  • 複数のメッセージタイプ(成功、エラー、情報)をサポートしています
  • Flutter ウィジェットとの簡単な統合

適している対象

  • 最小限のローディングインジケータを探している開発者
  • 一貫した進捗フィードバックを必要とするアプリ
  • スムーズなUX遷移を重視するプロジェクト
  • ネイティブプラットフォームで SVProgressHUD を使用するチーム
  • 迅速に実装できるHUDコンポーネントを必要とするFlutterアプリ

注意事項

  • 基本的なスタイリングを超えるカスタマイズは限定的
  • 組み込みのアニメーション制御なし
  • ネイティブプラットフォームのレンダリングに依存
  • 複雑なUIフローに対処するための追加処理が必要になる場合があります
  • 高度にカスタマイズされたHUDデザインには適していません

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

🚀 Ship Your App Faster: Try Fastforge - The simplest way to build, package and distribute your Flutter apps.

flutter_svprogresshud

pub version

A clean and lightweight progress HUD for flutter app, based on SVProgressHUD.

The plugin supports almost all of SVProgressHUD APIs, for Android we have almost replicated SVProgressHUD effects (View code).


SVProgressHUD

Quick Start

Installation

Add this to your package's pubspec.yaml file:

dependencies:
  flutter_svprogresshud: ^1.0.1

You can install packages from the command line:

$ flutter pub get
Usage

(see demo in /example)

SVProgressHUD is created as a singleton (i.e. it doesn't need to be explicitly allocated and instantiated; you directly call SVProgressHUD.method()).

Use SVProgressHUD wisely! Only use it if you absolutely need to perform a task before taking the user forward. Bad use case examples: pull to refresh, infinite scrolling, sending message.

Using SVProgressHUD in your app will usually look as simple as this:

SVProgressHUD.show();
Future.delayed(Duration(seconds: 3)).then((value) {
  SVProgressHUD.dismiss();
});
Showing the HUD

You can show the status of indeterminate tasks using one of the following:

SVProgressHUD.show();
SVProgressHUD.show(status: 'Doing Stuff');

If you'd like the HUD to reflect the progress of a task, use one of these:

SVProgressHUD.showProgress(0.91);
SVProgressHUD.showProgress(0.91, status: 'Loading...');
Dismissing the HUD

The HUD can be dismissed using:

SVProgressHUD.dismiss()
SVProgressHUD.dismiss(delay: Duration(milliseconds: 2000));

If you'd like to stack HUDs, you can balance out every show call using:

+ (void)popActivity;

The HUD will get dismissed once the popActivity calls will match the number of show calls.

Or show a confirmation glyph before before getting dismissed a little bit later. The display time depends on minimumDismissTimeInterval and the length of the given string.

SVProgressHUD.showInfo(status: 'Useful Information.');
SVProgressHUD.showSuccess(status: 'Great Success!');
SVProgressHUD.showError(status: 'Failed with Error');
Customization

SVProgressHUD can be customized via the following methods:

void setDefaultStyle(SVProgressHUDStyle style);                 // default is SVProgressHUDStyle.Light
void setDefaultMaskType(SVProgressHUDMaskType maskType);        // default is SVProgressHUDMaskType.None
void setDefaultAnimationType(SVProgressHUDAnimationType type);  // default is SVProgressHUDAnimationType.Flat
void setMinimumSize(Size minimumSize);                          // default is Size.zero, can be used to avoid resizing
void setRingThickness(num width);                               // default is 2 pt
void setRingRadiu(num radius);                                  // default is 18 pt
void setRingNoTextRadius(num radius);                           // default is 24 pt
void setCornerRadius(num cornerRadius);                         // default is 14 pt
void setBorderColor(Color color);                               // default is null
void setBorderWidth(num width);                                 // default is 0
void setForegroundColor(Color color);                           // default is Colors.black, only used for SVProgressHUDStyle.Custom
// void setForegroundImageColor(Color color);                      // default is the same as foregroundColor
void setBackgroundColor(Color color);                           // default is Colors.white, only used for SVProgressHUDStyle.Custom
void setBackgroundLayerColor(Color color);                      // default is [Color colorWithWhite:0 alpha:0.4], only used for SVProgressHUDMaskType.Custom
void setImageViewSize(Size size);                               // default is 28x28 pt
// void setShouldTintImages(bool shouldTintImages);                // default is true
// void setInfoImage(UIImage image);                               // default is the bundled info image provided by Freepik
// void setSuccessImage(UIImage image);                            // default is bundled success image from Freepik
// void setErrorImage(UIImage image);                              // default is bundled error image from Freepik
// void setGraceTimeInterval(num interval);                        // default is 0 seconds
void setMinimumDismissTimeInterval(num interval);               // default is 5.0 seconds
// void setMaximumDismissTimeInterval(num interval);               // default is CGFLOAT_MAX
void setFadeInAnimationDuration(num duration);                  // default is 0.15 seconds
void setFadeOutAnimationDuration(num duration);                 // default is 0.15 seconds
void setHapticsEnabled(bool hapticsEnabled);                    // default is false

Related Links

  • https://github.com/SVProgressHUD/SVProgressHUD

License

MIT

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。