xs_progress_hud 1.0.2

  • Readme
  • Changelog
  • Example
  • Installing
  • 79

xs_progress_hud #

showcase #

normal hud #

Future<void> showHud() async {
    XsProgressHud.show(context);
    Future.delayed(Duration(milliseconds: 2000)).then((val) {
      XsProgressHud.hide();
    });
  }

message hud #

  Future<void> showMessageHud() async {
    XsProgressHud.showMessage(context, "Flutter app");
  }

custom hud #

  Future<void> showCustomHud() async {
    XsProgressHud hud = XsProgressHud();
    // you can change some property´╝î like  hud.progressColor = Colors.red;
    hud.progressColor = Colors.red;
    Navigator.push(context, hud);
    Future.delayed(hud.delayed).then((val) {
      hud.navigator.pop();
    });
  }

1.0.0 #

  • Initial Release

example/lib/main.dart

import 'package:flutter/material.dart';
import 'dart:async';

import 'package:flutter/services.dart';
import 'package:xs_progress_hud/xs_progress_hud.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  String _platformVersion = '1.0';

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(home: Home());
  }
}

class Home extends StatefulWidget {
  @override
  _HomeState createState() => new _HomeState();
}

class _HomeState extends State<Home> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
          appBar: new AppBar(
            title: new Text('XS Progress HUD Demo'),
          ),
          body: Container(
            height: 500.0,
            child: new Stack(
              children: <Widget>[
                Positioned(
                    child: new FlatButton(
                        onPressed: showHud, child: new Text("Show hud")),
                    top: 30.0,
                    left: 10.0),
                Positioned(
                    child: new FlatButton(
                        onPressed: showMessageHud,
                        child: new Text("Show message hud")),
                    top: 130.0,
                    left: 10.0),
                Positioned(
                    child: new FlatButton(
                        onPressed: showCustomHud,
                        child: new Text("Show custom hud")),
                    top: 230.0,
                    left: 10.0)
              ],
            ),
          )),
    );
  }

  Future<void> showHud() async {
    XsProgressHud.show(context);
    Future.delayed(Duration(milliseconds: 2000)).then((val) {
      XsProgressHud.hide();
    });
  }

  Future<void> showMessageHud() async {
    XsProgressHud.showMessage(context, "Flutter app");
  }

  Future<void> showCustomHud() async {
    XsProgressHud hud = XsProgressHud();
    // you can change some property´╝î like  hud.progressColor = Colors.red;
    hud.progressColor = Colors.red;
    Navigator.push(context, hud);
    Future.delayed(hud.delayed).then((val) {
      hud.navigator.pop();
    });
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  xs_progress_hud: ^1.0.2

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:xs_progress_hud/xs_progress_hud.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
73
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
61
Overall:
Weighted score of the above. [more]
79
Learn more about scoring.

We analyzed this package on Apr 4, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6
  • Flutter: 1.12.13+hotfix.8

Maintenance suggestions

Package is getting outdated. (-26.85 points)

The package was last published 66 weeks ago.

The package description is too short. (-12 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8