progress_indicator_overlay 0.0.1 copy "progress_indicator_overlay: ^0.0.1" to clipboard
progress_indicator_overlay: ^0.0.1 copied to clipboard

discontinued

Make a progress indicator overlay

example/lib/main.dart

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();
              });
            },
          ),
        ),
      ),
    );
  }
}
0
likes
30
pub points
0%
popularity

Publisher

unverified uploader

Make a progress indicator overlay

Repository (GitHub)
View/report issues

License

BSD-2-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on progress_indicator_overlay