progress_indicator_overlay 0.0.1
progress_indicator_overlay: ^0.0.1

Flutter Android iOS web

Make a progress indicator overlay

Progress Indicator Overlay #

Make a progress indicator overlay

Example #

import 'dart:async';

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

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

class MyApp extends StatelessWidget {
  const MyApp({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Example Progress Indicator Overlay widget',
      home: MyPage(),
    );
  }
}

class MyPage extends StatefulWidget {
  @override
  _MyPageState createState() => _MyPageState();
}

class _MyPageState extends State<MyPage> {
  final GlobalKey<ProgressIndicatorOverlayState> _loadingKey = GlobalKey<ProgressIndicatorOverlayState>();

  @override
  Widget build(BuildContext context) {
    return ProgressIndicatorOverlay(
      key: _loadingKey,
      child: Scaffold(
        appBar: AppBar(
          centerTitle: true,
          title: Text('Example widget Progress Indicator Overlay'),
        ),
        body: Center(
          child: RaisedButton(
            child: Text('Show Loading'),
            onPressed: () {
              final loading = _loadingKey.currentState;
              loading.show();
              Timer(const Duration(seconds: 2), () {
                loading.hide();
              });
            },
          ),
        ),
      ),
    );
  }
}

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

0
likes
90
pub points
60%
popularity

Make a progress indicator overlay

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

mualipsuhal@gmail.com

License

BSD (LICENSE)

Dependencies

flutter

More

Packages that depend on progress_indicator_overlay