From 44e7513872429bf0f4ff437612c2fb4ec801361d Mon Sep 17 00:00:00 2001 From: Edgiest05 Date: Sun, 1 Dec 2024 15:24:59 +0100 Subject: [PATCH] Fix linting warnings --- lib/components/home/sort_button.dart | 7 ++++--- lib/pages/home/browse.dart | 4 +--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/components/home/sort_button.dart b/lib/components/home/sort_button.dart index dc20ac48b..f6d10e44b 100644 --- a/lib/components/home/sort_button.dart +++ b/lib/components/home/sort_button.dart @@ -1,5 +1,4 @@ import 'dart:io'; -import 'dart:math'; import 'package:flutter/material.dart'; import 'package:saber/data/file_manager/file_manager.dart'; @@ -58,7 +57,8 @@ class SortNotes { static DateTime _getDirLastModified(Directory dir) { assert(dir.existsSync()); DateTime out = dir.statSync().modified; - for (FileSystemEntity entity in dir.listSync(recursive: true, followLinks: false)) { + for (FileSystemEntity entity + in dir.listSync(recursive: true, followLinks: false)) { if (entity is File && entity.absolute.path.endsWith(Editor.extension)) { final DateTime curFileModified = entity.lastModifiedSync(); if (curFileModified.isAfter(out)) out = curFileModified; @@ -86,7 +86,8 @@ class SortNotes { static int _getDirSize(Directory dir) { assert(dir.existsSync()); int out = 0; - for (FileSystemEntity entity in dir.listSync(recursive: true, followLinks: false)) { + for (FileSystemEntity entity + in dir.listSync(recursive: true, followLinks: false)) { if (entity is File && entity.absolute.path.endsWith(Editor.extension)) { final int curFileSize = entity.lengthSync(); out += curFileSize; diff --git a/lib/pages/home/browse.dart b/lib/pages/home/browse.dart index 680763a40..830a72692 100644 --- a/lib/pages/home/browse.dart +++ b/lib/pages/home/browse.dart @@ -188,9 +188,7 @@ class _BrowsePageState extends State { await FileManager.deleteDirectory(folderPath); findChildrenOfPath(); }, - folders: folders - .map((e) => e.split('/').last) - .toList(), + folders: folders.map((e) => e.split('/').last).toList(), ), if (children == null) ...[ // loading