Getting Started

For help getting started with Flutter, view our online documentation.

For help on editing package code, view the documentation. image

##How to use ?

  1. Depend on it
  progress_image: "^0.0.1"
  1. Install it
$ flutter packages get
  1. Import it
import 'package:progress_image/progress_image.dart';


  • width 宽度
  • height: 高度(影响水波纹大小)
  • builder: 返回显示的内容
  • initProgress: 默认进度,-1代表默认不显示阴影遮罩,0代表显示遮罩


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

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

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  Widget build(BuildContext context) {
    return new MaterialApp(
      title: 'Flutter Demo',
      theme: new ThemeData(
      home: new MyHomePage(title: 'Flutter Demo Home Page'),

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  _MyHomePageState createState() => new _MyHomePageState();

class _MyHomePageState extends State<MyHomePage> {
  GlobalKey<ProgressImageState> progressImageKey =
      new GlobalKey<ProgressImageState>();

  void _incrementCounter() {

  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(
        title: new Text(widget.title),
      body: new Center(
        child: new Column(
          children: <Widget>[
            new ProgressImage(
                key: progressImageKey,
                builder: (BuildContext context, Size size) {
                  return new
                    width: size.width,
                    fit: BoxFit.fill,
                    height: size.height,
      floatingActionButton: new FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: new Icon(Icons.add),
      ), // This trailing comma makes auto-formatting nicer for build methods.