2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-07-01 19:30:44 +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:
Ben Hagen
2025-06-24 01:55:01 +02:00
committed by GitHub
parent e9db6532e4
commit 4444884afa
100 changed files with 5332 additions and 5592 deletions

View File

@ -11,7 +11,6 @@ import "package:inventree/widget/progress.dart";
* which is used to process the scanned barcode.
*/
class InvenTreeBarcodeController extends StatefulWidget {
const InvenTreeBarcodeController(this.handler, {Key? key}) : super(key: key);
final BarcodeHandler handler;
@ -20,16 +19,17 @@ class InvenTreeBarcodeController extends StatefulWidget {
State<StatefulWidget> createState() => InvenTreeBarcodeControllerState();
}
/*
* Base state widget for the barcode controller.
* This defines the basic interface for the barcode controller.
*/
class InvenTreeBarcodeControllerState extends State<InvenTreeBarcodeController> {
class InvenTreeBarcodeControllerState
extends State<InvenTreeBarcodeController> {
InvenTreeBarcodeControllerState() : super();
final GlobalKey barcodeControllerKey = GlobalKey(debugLabel: "barcodeController");
final GlobalKey barcodeControllerKey = GlobalKey(
debugLabel: "barcodeController",
);
// Internal state flag to test if we are currently processing a barcode
bool processingBarcode = false;
@ -40,7 +40,6 @@ class InvenTreeBarcodeControllerState extends State<InvenTreeBarcodeController>
* Barcode data should be passed as a string
*/
Future<void> handleBarcodeData(String? data) async {
// Check that the data is valid, and this view is still mounted
if (!mounted || data == null || data.isEmpty) {
return;
@ -66,7 +65,9 @@ class InvenTreeBarcodeControllerState extends State<InvenTreeBarcodeController>
return;
}
int delay = await InvenTreeSettingsManager().getValue(INV_BARCODE_SCAN_DELAY, 500) as int;
int delay =
await InvenTreeSettingsManager().getValue(INV_BARCODE_SCAN_DELAY, 500)
as int;
Future.delayed(Duration(milliseconds: delay), () {
hideLoadingOverlay();
@ -99,5 +100,4 @@ class InvenTreeBarcodeControllerState extends State<InvenTreeBarcodeController>
Widget build(BuildContext context) {
return Container();
}
}
}