mirror of
https://github.com/inventree/inventree-app.git
synced 2025-07-01 11:20:41 +00:00
Format Code and Add Format Checks to CI (#643)
* Remove unused lib/generated/i18n.dart * Use `fvm dart format .` * Add contributing guidelines * Enforce dart format * Add `dart format off` directive to generated files
This commit is contained in:
@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
import "dart:io";
|
||||
|
||||
import "package:flutter/material.dart";
|
||||
@ -7,17 +5,11 @@ import "package:flutter_overlay_loader/flutter_overlay_loader.dart";
|
||||
import "package:inventree/app_colors.dart";
|
||||
import "package:one_context/one_context.dart";
|
||||
|
||||
|
||||
/*
|
||||
* A simplified linear progress bar widget,
|
||||
* with standardized color depiction
|
||||
*/
|
||||
Widget ProgressBar(
|
||||
double value,
|
||||
{
|
||||
double maximum = 1.0
|
||||
}) {
|
||||
|
||||
Widget ProgressBar(double value, {double maximum = 1.0}) {
|
||||
double v = 0;
|
||||
|
||||
if (value <= 0 || maximum <= 0) {
|
||||
@ -33,20 +25,14 @@ Widget ProgressBar(
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Construct a circular progress indicator
|
||||
*/
|
||||
Widget progressIndicator() {
|
||||
|
||||
return Center(
|
||||
child: CircularProgressIndicator()
|
||||
);
|
||||
return Center(child: CircularProgressIndicator());
|
||||
}
|
||||
|
||||
|
||||
void showLoadingOverlay() {
|
||||
|
||||
// Do not show overlay if running unit tests
|
||||
if (Platform.environment.containsKey("FLUTTER_TEST")) {
|
||||
return;
|
||||
@ -60,11 +46,12 @@ void showLoadingOverlay() {
|
||||
|
||||
Loader.show(
|
||||
context,
|
||||
themeData: Theme.of(context).copyWith(colorScheme: ColorScheme.fromSwatch())
|
||||
themeData: Theme.of(
|
||||
context,
|
||||
).copyWith(colorScheme: ColorScheme.fromSwatch()),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
void hideLoadingOverlay() {
|
||||
if (Loader.isShown) {
|
||||
Loader.hide();
|
||||
|
Reference in New Issue
Block a user