2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-18 05:05:28 +00:00

Format code

This commit is contained in:
Asterix\Oliver
2025-06-14 10:59:13 +10:00
parent 0349ebb0b3
commit 387dc1eb39
96 changed files with 5478 additions and 7340 deletions

View File

@ -5,7 +5,6 @@ import "package:inventree/widget/refreshable_state.dart";
import "package:flutter_markdown/flutter_markdown.dart";
import "package:inventree/l10.dart";
/*
* A widget for displaying the notes associated with a given model.
* We need to pass in the following parameters:
@ -14,7 +13,6 @@ import "package:inventree/l10.dart";
* - Title for the app bar
*/
class NotesWidget extends StatefulWidget {
const NotesWidget(this.model, {Key? key}) : super(key: key);
final InvenTreeModel model;
@ -23,12 +21,10 @@ class NotesWidget extends StatefulWidget {
_NotesState createState() => _NotesState();
}
/*
* Class representing the state of the NotesWidget
*/
class _NotesState extends RefreshableState<NotesWidget> {
_NotesState();
@override
@ -41,30 +37,21 @@ class _NotesState extends RefreshableState<NotesWidget> {
@override
List<Widget> appBarActions(BuildContext context) {
List<Widget> actions = [];
if (widget.model.canEdit) {
actions.add(
IconButton(
actions.add(IconButton(
icon: Icon(TablerIcons.edit),
tooltip: L10().edit,
onPressed: () {
widget.model.editForm(
context,
L10().editNotes,
fields: {
"notes": {
"multiline": true,
}
},
onSuccess: (data) async {
refresh(context);
widget.model.editForm(context, L10().editNotes, fields: {
"notes": {
"multiline": true,
}
);
}
)
);
}, onSuccess: (data) async {
refresh(context);
});
}));
}
return actions;
@ -77,5 +64,4 @@ class _NotesState extends RefreshableState<NotesWidget> {
data: widget.model.notes,
);
}
}
}