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,19 +11,15 @@ import "package:inventree/widget/snacks.dart";
import "package:inventree/l10.dart";
class PartImageWidget extends StatefulWidget {
const PartImageWidget(this.part, {Key? key}) : super(key: key);
final InvenTreePart part;
@override
_PartImageState createState() => _PartImageState(part);
}
class _PartImageState extends RefreshableState<PartImageWidget> {
_PartImageState(this.part);
final InvenTreePart part;
@ -38,17 +34,14 @@ class _PartImageState extends RefreshableState<PartImageWidget> {
@override
List<Widget> appBarActions(BuildContext context) {
List<Widget> actions = [];
if (part.canEdit) {
// File upload
actions.add(
IconButton(
icon: Icon(TablerIcons.file_upload),
onPressed: () async {
FilePickerDialog.pickFile(
onPicked: (File file) async {
final result = await part.uploadImage(file);
@ -58,11 +51,10 @@ class _PartImageState extends RefreshableState<PartImageWidget> {
}
refresh(context);
}
},
);
},
)
),
);
}
@ -73,5 +65,4 @@ class _PartImageState extends RefreshableState<PartImageWidget> {
Widget getBody(BuildContext context) {
return InvenTreeAPI().getImage(part.image);
}
}
}