custom_loading_indicator 0.0.2 copy "custom_loading_indicator: ^0.0.2" to clipboard
custom_loading_indicator: ^0.0.2 copied to clipboard

outdated

A Flutter package to customise the loading indicator for your organisation.

example/lib/main.dart

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

void main() {
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

// CHECK LINES 49 AND 53 FOR THE SAMPLE IMPLEMENTATIONS
class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        routes: {
          '/CustomCircularExample': (BuildContext context) =>
              CustomCircularExample(),
          '/CustomFadeExample': (BuildContext context) => CustomFadeExample()
        },
        home: Builder(
          builder: (context) => Container(
              child: Column(
            children: <Widget>[
              RaisedButton(
                onPressed: () {
                  Navigator.pushNamed(context, '/CustomCircularExample');
                },
                child: Text("Custom Loading Indicator",
                    overflow: TextOverflow.clip),
              ),
              RaisedButton(
                onPressed: () {
                  Navigator.pushNamed(context, '/CustomFadeExample');
                },
                child: Text("Custom Fading Indicator",
                    overflow: TextOverflow.clip),
              )
            ],
          )),
        ));
  }
}

// EXAMPLE - USING THE CUSTOM CIRCULAR LOADING INDICATOR
class CustomCircularExample extends StatefulWidget {
  @override
  _CustomCircularExampleState createState() => _CustomCircularExampleState();
}

class _CustomCircularExampleState extends State<CustomCircularExample> {
  @override
  Widget build(BuildContext context) {
    return Container(
      child: CustomCircularLoadingIndicator(imagePath: 'images/tooth.png'),
    );
  }
}

// EXAMPLE - USING THE CUSTOM FADE LOADING INDICATOR
class CustomFadeExample extends StatefulWidget {
  @override
  _CustomFadeExampleState createState() => _CustomFadeExampleState();
}

class _CustomFadeExampleState extends State<CustomFadeExample> {
  @override
  Widget build(BuildContext context) {
    return Container(
      child: CustomFadeLoadingIndicator(imagePath: 'images/tooth.png'),
    );
  }
}
7
likes
0
pub points
0%
popularity

Publisher

unverified uploader

A Flutter package to customise the loading indicator for your organisation.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on custom_loading_indicator