headup_loading

Last updated:

0 purchases

headup_loading Image
headup_loading Images
Add to Cart

Description:

headup loading

blue_thermal_printer #
https://pub.dev/packages/headup_loading
A Flutter plugin for heads up display progress indicator
Getting Started #

Depend on it

Add this to your package's pubspec.yaml file:
dependencies:
headup_loading: ^any
copied to clipboard

Install it

You can install packages from the command line:
with Flutter:
$ flutter packages get
copied to clipboard
Alternatively, your editor might support flutter packages get. Check the docs for your editor to learn more.
3. Import it
Now in your Dart code, you can use:
import 'package:headup_loading/headup_loading.dart';
copied to clipboard
EXAMPLE:
import 'package:flutter/material.dart';
import 'dart:async';
import 'package:headup_loading/headup_loading.dart';

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

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

class _MyAppState extends State<MyApp> {

@override
Widget build(BuildContext context) {
return MaterialApp(home: Home());
}
}

class Home extends StatefulWidget {
@override
_HomeState createState() => new _HomeState();
}

class _HomeState extends State<Home> {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: new AppBar(
title: new Text('HeadUp Loading Demo'),
),
body: ListView(
shrinkWrap: true,
children: <Widget>[
RaisedButton(
onPressed: showLoading, child: new Text("Show Loading")),
RaisedButton(
onPressed: showLoadingCupertino, child: new Text("Show Loading Cupertino"))
],
)),
);
}

Future<void> showLoading() async {
HeadUpLoading.show(context);
Future.delayed(Duration(seconds: 2)).then((val) {
HeadUpLoading.hide();
});
}

Future<void> showLoadingCupertino() async {
CupertinoHeadUpLoading.show(context);
Future.delayed(Duration(seconds: 2)).then((val) {
CupertinoHeadUpLoading.hide();
});
}
}
copied to clipboard
If you like my content, please consider buying me a coffee. Thank you for your support!

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.