simple_loading_view 0.1.1 simple_loading_view: ^0.1.1 copied to clipboard
This project is a sample for simple loading indicator. We can implement indicator simply, also use our custom widgets as indicator. Please check the Example for more details.
loading_view_example #
A sample flutter plugin for wrap the widgrt with indicator.
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!