mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 03:26:24 +00:00
Display part notes and stock notes
This commit is contained in:
parent
b0aaccb9e3
commit
90664bfe14
10 changed files with 118 additions and 20 deletions
39
lib/widget/part_notes.dart
Normal file
39
lib/widget/part_notes.dart
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
|
||||
|
||||
|
||||
import 'package:InvenTree/inventree/part.dart';
|
||||
import 'package:InvenTree/widget/refreshable_state.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter_markdown/flutter_markdown.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
|
||||
class PartNotesWidget extends StatefulWidget {
|
||||
|
||||
final InvenTreePart part;
|
||||
|
||||
PartNotesWidget(this.part, {Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_PartNotesState createState() => _PartNotesState(part);
|
||||
}
|
||||
|
||||
|
||||
class _PartNotesState extends RefreshableState<PartNotesWidget> {
|
||||
|
||||
final InvenTreePart part;
|
||||
|
||||
_PartNotesState(this.part);
|
||||
|
||||
@override
|
||||
String getAppBarTitle(BuildContext context) => I18N.of(context).partNotes;
|
||||
|
||||
@override
|
||||
Widget getBody(BuildContext context) {
|
||||
return Markdown(
|
||||
selectable: false,
|
||||
data: part.notes,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue