mirror of
https://github.com/inventree/inventree-app.git
synced 2025-04-28 21:46:46 +00:00
* Catch state error in homepage widget * Add flutter_overlay_loader lib - Displays an overlay screen to indicate blocking operation * Wrap blocking widget transitions in a loading overlay - Prevents user from doing other things while loading - Shows the user that something is happening * Linting fixes * Show overlay when uploading attachment file * Show overlay when downloading file also * Show overlay when loading or submitting API forms - Major improvements to usability "feel" * UI improvements for stock item test results widget * Fix API_FORM bug - onSuccess function was not being called
28 lines
470 B
Dart
28 lines
470 B
Dart
|
|
|
|
import "package:flutter/material.dart";
|
|
import "package:flutter_overlay_loader/flutter_overlay_loader.dart";
|
|
|
|
/*
|
|
* Construct a circular progress indicator
|
|
*/
|
|
Widget progressIndicator() {
|
|
|
|
return Center(
|
|
child: CircularProgressIndicator()
|
|
);
|
|
}
|
|
|
|
|
|
void showLoadingOverlay(BuildContext context) {
|
|
Loader.show(
|
|
context,
|
|
themeData: Theme.of(context).copyWith(colorScheme: ColorScheme.fromSwatch())
|
|
);
|
|
}
|
|
|
|
|
|
void hideLoadingOverlay() {
|
|
Loader.hide();
|
|
}
|