loader_container 0.0.6 icon indicating copy to clipboard operation
loader_container: ^0.0.6 copied to clipboard

A Simple Loader Widget for Flutter! Easily show loading widgets when your page is doing tasks in the background!

loader_container #

A Simple Loader Widget for Flutter! Easily show loading widgets when your page is doing tasks in the background!

💾 Installation #

In the dependencies: section of your pubspec.yaml, add the following line:

dependencies:
  loader_container: <latest version>

📦 Usage #

Import this class #

import 'package:loader_container/loader_container.dart';

Define a LoaderController #

// The bool value determines the initial state of loading.
LoaderController _controller = LoaderController(true);

Basic structure #

  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: LoaderContainer(
          controller: _controller,
          loadingWidget: Center(
              child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                CircularProgressIndicator(),
                RaisedButton(
                  onPressed: () {
                    _controller.value = false;
                  },
                  child: Center(
                    child: Text("Dismiss Loading!"),
                  ),
                )
              ],
            ),
          ),
          child: MyHomePage(title: 'Flutter Demo Home Page')),
    );
  }

Getting Started #

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

For help on editing package code, view the documentation.

2
likes
40
pub points
9%
popularity

Publisher

unverified uploader

A Simple Loader Widget for Flutter! Easily show loading widgets when your page is doing tasks in the background!

Repository (GitHub)

License

Icon for licenses.MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on loader_container