progress_hud10 1.1.2

  • Readme
  • Changelog
  • Example
  • Installing
  • 50

progress_hud10 #

progress_hud10是个简单的加载动画。

使用步骤 #

1、添加依赖

dependencies: dio: ^1.1.2

2、示例

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

class _MyAppState extends State<MyApp> {

  final key = GlobalKey<ProgressHudState>();

  @override
  void initState() {
    super.initState();
    
    Future.delayed(const Duration(seconds:30), (){
        this.key.currentState.updateLoad(false);
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          backgroundColor: Colors.red,
          title: const Text('星星编程'),
        ),
        body: ProgressHud(key:this.key,loading: true ,color: Colors.red,width: 160,height: 160, child: Center(
        child: Text("加载动画简单示例"),
      ),
      ),
    )
    );
  }
}

3、效果图

ProgressHud.png

4、参数说明

  • loading loading=false结束动画。loading=true开始动画。
  • child 加载内容显示子组件。
  • height 加载动画框的高度。
  • width 加载动画框的宽度。
  • color 加载动画框的颜色。
  • bgColor 遮罩层的背景色。
  • count 加载动画圆点的个数。
  • speed 加载动画旋转的速度。
  • opacity 遮罩层的透明度。

5、关注微信公众号交流学习

关注公众号.jpg

1.1.2 #

  • library

1.1.1 #

  • 修复一些细节问题

0.1.1 #

  • 按照谷歌命名规范做了一些修改

0.0.2 #

  • 优化动画旋转

0.0.1 #

  • 第一次提交progress_hud10

example/README.md

progress_hud10_example #

Demonstrates how to use the progress_hud10 plugin.

Getting Started #

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

class _MyAppState extends State<MyApp> {

  final key = GlobalKey<ProgressHudState>();

  @override
  void initState() {
    super.initState();
    
    Future.delayed(const Duration(seconds:30), (){
        this.key.currentState.updateLoad(false);
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          backgroundColor: Colors.red,
          title: const Text('星星编程'),
        ),
        body: ProgressHud(key:this.key,loading: true ,color: Colors.red,width: 160,height: 160, child: Center(
        child: Text("加载动画简单示例"),
      ),
      ),
    )
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  progress_hud10: ^1.1.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:progress_hud10/progress_hud10.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
50
Learn more about scoring.

We analyzed this package on Oct 18, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Format lib/progress_hud10.dart.

Run flutter format to format lib/progress_hud10.dart.

Format lib/round_painter.dart.

Run flutter format to format lib/round_painter.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test