simple_loading_view 0.1.1

loading_view_example #

A sample flutter plugin for wrap the widgrt with indicator.

Demo #

Demo

See example for details

Usage #

Add the package to your pubspec.yml file.

dependencies:
  simple_loading_view: ^0.0.1

Next, import the library into your widget.

import 'package:simple_loading_view/simple_loading_view.dart';

How to implement LoadingView ?

...
bool _isLoading = false
...

@override
Widget build(BuildContext context) {
  return Scaffold(
     body: LoadingView(
              isLoading: isLoading,
              // you can use your own widget here, more example please refer example project.
              progressIndicator: IndicatorMap[Indicator.defaultIndicator],
              // Current page UI implement here as child, Here i'm implemented a button for showing the indicator.
              child: OutlineButton(
                       child: const Text('Default', semanticsLabel: 'Default'),
                       onPressed: () {
                         indicatorWidget = IndicatorMap[Indicator.defaultIndicator];
                           setState(() {
                             isLoading = true;
                           });
                           // For testing Purpose i used a function for Hiding the Indicator.
                           closeIndicator();
                           },
                           )),
  );
}

Options in the Indicator view #

The parameters are customizable

LoadingOverlay({
    @required this.isLoading,
    @required this.child,
    this.opacity = 0.7,
    this.progressIndicator = IndicatorMap[Indicator.defaultIndicator],
});

Issues and feedback #

Please file issues to send feedback or report a bug. Thank you!

0.1.1 #

  • TODO: Describe initial release.

example/README.md

loading_view_example #

how to use the loading_view plugin.

Example usage @override Widget build(BuildContext context) { return Scaffold( body: LoadingView( isLoading: isLoading, progressIndicator: IndicatorMap[Indicator.defaultIndicator], child: OutlineButton( child: const Text('Default', semanticsLabel: 'Default'), onPressed: () { indicatorWidget = IndicatorMap[Indicator.defaultIndicator]; // Perform some action setState(() { isLoading = true; }); closeIndicator(); }, )), ); }

Getting Started #

This project is a sample for simple loading indicator.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  simple_loading_view: ^0.1.1

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:simple_loading_view/simple_loading_view.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
98
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
49
Learn more about scoring.

We analyzed this package on Jul 17, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.4.0
  • pana: 0.12.19
  • Flutter: 1.7.8+hotfix.3

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Fix lib/simple_loading_view.dart. (-1.99 points)

Analysis of lib/simple_loading_view.dart reported 4 hints:

line 41 col 28: Set literals weren't supported until version 2.2, but this code must be able to run on earlier versions.

line 42 col 13: Avoid using unnecessary statements.

line 45 col 28: Set literals weren't supported until version 2.2, but this code must be able to run on earlier versions.

line 46 col 13: Avoid using unnecessary statements.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test

Admin