Linter: fix prefer_is_empty suggestions and change it to warning
This commit is contained in:
parent
586bb42458
commit
15b50f53d3
3 changed files with 5 additions and 4 deletions
|
@ -31,6 +31,7 @@ analyzer:
|
|||
avoid_empty_else: error
|
||||
exhaustive_cases: error
|
||||
unused_import: warning
|
||||
prefer_is_empty: warning
|
||||
use_rethrow_when_possible: info
|
||||
|
||||
prefer_const_constructors: ignore # too many warnings
|
||||
|
|
|
@ -146,7 +146,7 @@ class _LazyLoadingGalleryState extends State<LazyLoadingGallery> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (_files.length == 0) {
|
||||
if (_files.isEmpty) {
|
||||
return Container();
|
||||
}
|
||||
return Padding(
|
||||
|
|
|
@ -65,7 +65,7 @@ class _SharedCollectionGalleryState extends State<SharedCollectionGallery>
|
|||
final c =
|
||||
CollectionsService.instance.getCollectionByID(file.collectionID);
|
||||
if (c.owner.id == Configuration.instance.getUserID()) {
|
||||
if (c.sharees.length > 0) {
|
||||
if (c.sharees.isNotEmpty) {
|
||||
outgoing.add(
|
||||
CollectionWithThumbnail(
|
||||
c,
|
||||
|
@ -114,7 +114,7 @@ class _SharedCollectionGalleryState extends State<SharedCollectionGallery>
|
|||
Padding(padding: EdgeInsets.all(6)),
|
||||
SectionTitle("incoming"),
|
||||
Padding(padding: EdgeInsets.all(16)),
|
||||
collections.incoming.length > 0
|
||||
collections.incoming.isNotEmpty
|
||||
? GridView.builder(
|
||||
shrinkWrap: true,
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
|
@ -133,7 +133,7 @@ class _SharedCollectionGalleryState extends State<SharedCollectionGallery>
|
|||
Padding(padding: EdgeInsets.all(14)),
|
||||
SectionTitle("outgoing"),
|
||||
Padding(padding: EdgeInsets.all(16)),
|
||||
collections.outgoing.length > 0
|
||||
collections.outgoing.isNotEmpty
|
||||
? Padding(
|
||||
padding: const EdgeInsets.fromLTRB(12, 0, 0, 0),
|
||||
child: ListView.builder(
|
||||
|
|
Loading…
Add table
Reference in a new issue