global_loader

Last updated:

0 purchases

global_loader Image
global_loader Images
Add to Cart

Description:

global loader

global_loader #
A Flutter Package which will start Global Loader from any where in your code.
Screenshots #

Usage #
Example
To use this package:

add the dependency to your pubspec.yaml file.

dependencies:
flutter:
sdk: flutter
global_loader: ^0.0.1
copied to clipboard
How to use #

class HomePage extends StatefulWidget {
const HomePage({Key? key}) : super(key: key);

@override
_HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
GlobalLoader globalLoader = new GlobalLoader();



@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
InkWell(
onTap: () {
// This code helps fancy loader.
globalLoader.startFancyLoader(60,60);


},
child: Container(
alignment: Alignment.center,
height: 50,
width: 150,
decoration: BoxDecoration(
color: Colors.blue,
borderRadius: BorderRadius.circular(20)),
child: Text(
"Start",
style: TextStyle(
color: Colors.white,
fontSize: 18,
fontWeight: FontWeight.bold),
))),
InkWell(
onTap: () {
// this line will stop your current loader.
globalLoader.stop();
},
child: Container(
alignment: Alignment.center,
height: 50,
width: 150,
decoration: BoxDecoration(
color: Colors.blue,
borderRadius: BorderRadius.circular(20)),
child: Text(
"Stop",
style: TextStyle(
color: Colors.white,
fontSize: 18,
fontWeight: FontWeight.bold),
)))
],
),
),
);
}
}

copied to clipboard
Getting Started #
This project is a starting point for a Dart
package,
a library module containing code that can be shared easily across
multiple Flutter or Dart projects.
For help getting started with Flutter, view our
online documentation, which offers tutorials,
samples, guidance on mobile development, and a full API reference.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.