From ed2523c3c57b4430482638cf04f366a74f7707b5 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 6 Jul 2022 21:29:26 +1000 Subject: [PATCH] Linting fixes --- lib/widget/attachment_widget.dart | 12 ++++++------ lib/widget/back.dart | 7 +++---- lib/widget/bom_list.dart | 3 --- lib/widget/paginator.dart | 2 -- 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/lib/widget/attachment_widget.dart b/lib/widget/attachment_widget.dart index 8437ae7a..0a95d0fb 100644 --- a/lib/widget/attachment_widget.dart +++ b/lib/widget/attachment_widget.dart @@ -1,9 +1,3 @@ -/* - * A generic widget for displaying a list of attachments. - * - * To allow use with different "types" of attachments, - * we pass a subclassed instance of the InvenTreeAttachment model. - */ import "dart:io"; @@ -17,6 +11,12 @@ import "package:inventree/widget/refreshable_state.dart"; import "package:inventree/l10.dart"; import "package:url_launcher/url_launcher.dart"; +/* + * A generic widget for displaying a list of attachments. + * + * To allow use with different "types" of attachments, + * we pass a subclassed instance of the InvenTreeAttachment model. + */ class AttachmentWidget extends StatefulWidget { const AttachmentWidget(this.attachment, this.referenceId, this.hasUploadPermission) : super(); diff --git a/lib/widget/back.dart b/lib/widget/back.dart index 9797e4b7..27a9c23a 100644 --- a/lib/widget/back.dart +++ b/lib/widget/back.dart @@ -1,11 +1,10 @@ +import "package:flutter/material.dart"; + /* - * A custom implementation of a "Back" button for display in the app drawer + * Construct a custom back button with special feature! * * Long-pressing on this will return the user to the home screen */ - -import "package:flutter/material.dart"; - Widget backButton(BuildContext context, GlobalKey key) { return GestureDetector( diff --git a/lib/widget/bom_list.dart b/lib/widget/bom_list.dart index 14cd4906..3014fb02 100644 --- a/lib/widget/bom_list.dart +++ b/lib/widget/bom_list.dart @@ -1,9 +1,7 @@ import "package:flutter/material.dart"; -import "package:font_awesome_flutter/font_awesome_flutter.dart"; import "package:inventree/api.dart"; -import "package:inventree/api_form.dart"; import "package:inventree/helpers.dart"; import "package:inventree/inventree/bom.dart"; import "package:inventree/l10.dart"; @@ -95,7 +93,6 @@ class _PaginatedBomListState extends PaginatedSearchState { InvenTreePart? subPart = bomItem.subPart; String title = subPart?.fullname ?? "error - no name"; - String description = subPart?.description ?? "error - no description"; return ListTile( title: Text(title), diff --git a/lib/widget/paginator.dart b/lib/widget/paginator.dart index 7b6f8034..91ba215e 100644 --- a/lib/widget/paginator.dart +++ b/lib/widget/paginator.dart @@ -24,8 +24,6 @@ class PaginatedSearchState extends State with BaseW PaginatedSearchState(this.filters); - final _key = GlobalKey(); - final Map filters; static const _pageSize = 25;