loading_overlay_pro 1.0.0+1 copy "loading_overlay_pro: ^1.0.0+1" to clipboard
loading_overlay_pro: ^1.0.0+1 copied to clipboard

outdated

A new Flutter project with a simple widget wrapper set of loading animations for Flutter projects.

example/lib/main.dart

import 'dart:async';

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

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) => MaterialApp(
        debugShowCheckedModeBanner: false,
        theme: ThemeData(
          primarySwatch: Colors.blue,
        ),
        home: DemoPage(),
      );
}

class DemoPage extends StatefulWidget {
  @override
  _DemoPageState createState() => _DemoPageState();
}

class _DemoPageState extends State<DemoPage> {
  bool _isLoading = false;

  void _submit() {
    setState(() {
      _isLoading = true;
    });

    Future.delayed(Duration(seconds: 2), () {
      setState(() {
        _isLoading = false;
      });
    });
  }

  @override
  Widget build(BuildContext context) => Scaffold(
        appBar: AppBar(
          title: Text('Loading Overlay Pro'),
          backgroundColor: Colors.blue,
        ),
        body: LoadingOverlayPro(
          child: Center(
            child: RaisedButton(
              onPressed: _submit,
              child: Text('Show Loading'),
            ),
          ),
          isLoading: _isLoading,
          progressIndicator: LoadingBouncingLine.circle(
            backgroundColor: Colors.blue,
            size: 150.0,
            duration: Duration(seconds: 2),
            borderColor: Colors.blue,
          ),
        ),
      );
}
33
likes
30
pub points
88%
popularity

Publisher

unverified uploader

A new Flutter project with a simple widget wrapper set of loading animations for Flutter projects.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

cupertino_icons, flutter

More

Packages that depend on loading_overlay_pro