ProgressHUD for Flutter App.

Overview

progresshud

一个好用的Hud框架,通过Flutter调用原生代码的方式实现,包含loading(默认),success,error,info等样式。通过一行代码即可在任何地方调出Hud,并控制其隐藏,在示例App中,你可以看到具体如何使用它。

在iOS上使用SVProgressHUD,安卓上使用SVProgressHUD-Android(这个包就是仿写的iOS版本)。ui均来自原生层,所以没有过多的可定义空间,如果需要自定义,可以分别在各个平台上重写框架代码(比较麻烦)。

A useful Hud framework is implemented by calling native code by Flutter. With one line of code, you can call Hud out anywhere and control its hiding. In the example App, you can see how to use it. SVProgress HUD is used on iOS and SVProgress HUD-Android is used on Android (this package is a copy of iOS version). UI comes from the native layer, so there is not too much definition space. If you need to customize, you can rewrite the framework code on each platform separately (more troublesome).

EasyUse ProgressHUD for flutter app.

Install

Add this to your package's pubspec.yaml file: 把如下字段加入你的pubspec.yaml文件:

dependencies:
  flutter:
    sdk: flutter
  // 添加下面这一行
  ovprogresshud: any

然后运行flutter packages get即可

Usage

Progresshud.show();

Show

Progresshud.showWithStatus('myinfo');

Status

Progresshud.showSuccessWithStatus('myinfo');

Success

Progresshud.showInfoWithStatus('myinfo');

Info

Progresshud.showErrorWithStatus('myinfo');

Error

Progresshud.setDefaultMaskTypeBlack();

MaskTypeBlack

Progresshud.setDefaultMaskTypeGradient('myinfo');

MaskTypeGradient

Comments
  • 打包时,报资源文件出错

    打包时,报资源文件出错

    • 开发环境:
    [✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.15.2 19C57, locale en-CN)
    [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    [✓] Xcode - develop for iOS and macOS (Xcode 11.3)
    [✓] Android Studio (version 3.5)
    [✓] VS Code (version 1.41.0)
    [✓] Connected device (2 available)
    
    • 错误信息:
    [        ] FAILURE: Build failed with an exception.
    [        ] * What went wrong:
    [        ] Execution failed for task ':ovprogresshud:verifyReleaseResources'.
    [        ] > java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
    [        ]   /Users/wml/Development/workspace@Flutter/mobile_design_studio/build/ovprogresshud/intermediates/res/merged/release/values/values.xml:265: error:
    resource android:attr/fontVariationSettings not found.
    [        ]   /Users/wml/Development/workspace@Flutter/mobile_design_studio/build/ovprogresshud/intermediates/res/merged/release/values/values.xml:266: error:
    resource android:attr/ttcIndex not found.
    [        ]   error: failed linking references.
    [        ] * Try:
    [        ] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
    [        ] * Get more help at https://help.gradle.org
    [        ] BUILD FAILED in 2m 31s
    

    我搜索到其它一些插件也有类似问题,这个情况应该是升级 flutter 到 v1.12.13 版本后出现的。希望开发者能修复一下~

    opened by w4mxl 7
  • About Progresshud.set***() in Android

    About Progresshud.set***() in Android

    For example, when calling Progresshud.setDefaultMaskTypeBlack(); . HUD should not appear, but it will appear on Android. But there is no problem on iOS.

    Please check the problem. Thank you.

    opened by w4mxl 2
  • Not able to Build apk

    Not able to Build apk

    Execution failed for task ':ovprogresshud:verifyReleaseResources'.

    1 exception was raised by workers: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed

    invalid 
    opened by Ravikumawat1990 1
  • On iOS works fine, but on Android is not working

    On iOS works fine, but on Android is not working

    It's fine on iOS, but it's does not work on Android.

    On Android, it stops at code: await Progresshud.showWithStatus('Login ...'); // blocked here the following code not excuting Anyone has the same problem.

    bug 
    opened by wahello 1
  • Bugs showSuccessWithStatus on next call

    Bugs showSuccessWithStatus on next call

    Calling Progresshud.show()/dismiss() works fine, but when calling showSuccess or Info or Error make the screen blocked since the progresshud does not dismiss for the second time it's called.

    Progresshud.showSuccessWithStatus("Please wait...");
    //Do something a bit long 2 - 3 seconds
    await Progresshud.dismiss();
    
    bug 
    opened by iambudi 1
  • Update existing message and close

    Update existing message and close

    When one calls showLoading() and showSuccess(), it closes the first dialog then shows the 2nd one

    would be nice to have a way to have an extra parameter to note close the current dialog and just change the dialog content, and then closing it like when showSuccess() is called.

    invalid 
    opened by chitgoks 0
  • Can't update progress from an isolate

    Can't update progress from an isolate

    https://stackoverflow.com/questions/59170836/calling-a-ui-method-from-isolate-listen-method-in-flutter-throws-exception

    I tried to use ovprogresshud (https://pub.dev/packages/ovprogresshud) to show download progress. I used flutter_downloader (https://pub.dev/packages/flutter_downloader) for download.

    I try to update progress via an Isolate, but receive errors. (If I call Progresshud.showWithStatusdirectly in my code, say before download, it works)

    My code:

    ReceivePort _port = ReceivePort();
    ...
    
    IsolateNameServer.registerPortWithName(
            _port.sendPort, 'downloader_send_port');
    _port.listen(
          (dynamic data) {
            String id = data[0];
            DownloadTaskStatus status = data[1];
            int progress = data[2];
            if (status == DownloadTaskStatus.complete) {
            } else if (status == DownloadTaskStatus.running) {
              Progresshud.showWithStatus("%$progress Downloaded");
            }
          },
          onDone: () {
            checkIfDictionaryUnzipped(DBFilePath);
          },
          onError: (error) {},
        );
    

    The error I receive:

    Unhandled Exception: PlatformException(error, Attempt to invoke virtual method 'android.view.ViewParent android.view.ViewGroup.getParent()' on a null object reference, null)
    E/flutter (29114): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569:7)
    E/flutter (29114): #1      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:321:33)
    E/flutter (29114): <asynchronous suspension>
    E/flutter (29114): #2      Progresshud.showWithStatus (package:ovprogresshud/progresshud.dart:18:27)
    E/flutter (29114): <asynchronous suspension>
    ....
    
    invalid 
    opened by a-v-ebrahimi 0
  • Feature Request

    Feature Request

    Allow to change hud background and foreground colour. Icon can also be change to something else, but still configurable to use out own child property so can use loading animation widget.

    enhancement invalid 
    opened by iambudi 0
Owner
null
Taxi App Client App - Taxi Rouge App With Flutter

taxi_rouge_app A new Flutter application. Getting Started This project is a star

Bouchida Youssef 3 Jun 11, 2022
Book app - Book app UI with dark mode enabled, also this app created using the Flutter 2.5 skeleton template

BOOK APP Book app UI with dark mode enabled, also this app created using the Flu

Gülsen Keskin 5 Nov 9, 2022
A Flutter app to show how to implement in-app purchase using the in-app-purchase package

Flutter in-app purchase A Flutter project to show to implement in-app purchase using the in_app_purchase package Simple UI but it's okay ?? ?? WhatsAp

António Nicolau 5 Jul 26, 2022
This is a MVP our app's. The app get the song's list on firebase and display then you can be listen App features.

music_app Requirements: flutter version 3.0.3 Dart 2.17.5 Firebase CLI 11.1.0 flutter sdk: >= 2.15.1 < 3.0.0 flutter dependentcies: http: 0.13.4 mvvm:

Lê Hồng Minh 3 Aug 2, 2022
This is a JazzCash UI clone ( Modern Wallet App in Pakistan), implementing modern app bar animmation. One can take a concept of making app bar with animation.

jazzcash_ui This is a JazzCash UI clone ( Modern Wallet App in Pakistan), implementing modern app bar animmation. One can take a concept of making app

null 9 Nov 27, 2022
🆙🚀 Flutter application upgrade/ Flutter App Upgrade /Flutter App Update/Flutter Update / download Plug-in

???? Flutter application upgrade/ Flutter App Upgrade /Flutter App Update/Flutter Update / download Plug-in (with notice bar progress), supports full upgrade, hot update and incremental upgrade

PengHui Li 344 Dec 30, 2022
This is a Flutter app which shows how to use the PageView Class in your Flutter App

page_view_class A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started

Shehzaan Mansuri 1 Oct 25, 2021
Sibyl App written with Dart/Flutter. (My first experience in writing a real android app in flutter).

sibyl_app A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if thi

ALi.w 3 Feb 17, 2022
WooCommerce App template that uses Flutter. Integrated to work with WooCommerce stores, connect and create an IOS and Android app from Flutter for IOS and Android

WooCommerce App: Label StoreMax Label StoreMax - v5.3.1 Official WooSignal WooCommerce App About Label StoreMax Label StoreMax is an App Template for

WooSignal 314 Jan 9, 2023
Recipes app in flutter using API to get data. Amazing Recipes app UI in Flutter using dart with simple widgets.

Food Recipe App In Flutter Using API'S Recipe App in Flutter Subscribe Our YouTube Channel. Visit Website Demo OutPut Images ## ?? Links Getting Start

Habib ullah 2 Dec 26, 2022
flutter web app with given code and example. Step by step teaching how to build a flutter web app with backend

flutter_web A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if t

dbestech 20 Oct 26, 2022
Flutter-for-Wordpress-App - Cross platform wordpress news app built with Flutter and WP REST API

Flutter for Wordpress A flutter app for a wordpress websites with clean and elegant design. This app is available in free and pro version. You can cho

Madhav Poudel 243 Dec 23, 2022
Flutter-Wordpress-App - Cross platform wordpress news app built with Flutter

Flutter for Wordpress A flutter app for a wordpress websites with clean and elegant design. This app is available in free and pro version. You can cho

Madhav Poudel 243 Dec 23, 2022
Flutter-app-food-ordering - Flutter App Food Ordering

Food Ordering App Preview video: https://youtu.be/h1Cw7IoJByU My Twitter My Patr

SANGVALEAP VANNY 121 Dec 29, 2022
Flutter-Tasky-App - A Task App Designed With Flutter With Registration & Login Page

Flutter-Tasky-App- A task app designed with flutter with registration & login pa

Yakubu Lute 12 Dec 23, 2022
Music-App-Flutter - This is a flutter app which has some songs displayed in the form of a list and user can play any of them by clicking on the name of the song.

music_player_app A music player app made by me in flutter About the App This is a music player which i made to play audio files which we have passed i

Harsh Kumar Khatri 3 Apr 1, 2021
Flutter-watchtips - Flutter App (Embedded Watch Kit app with iOS version)

watchtips Update Version 2.2 The Watch tips project has been updated again, The interface has been tidied up and a seperate value for the tip cost has

Steve Rogers 137 Dec 31, 2022