mod: lint

mod: tweaks

opt: publish page

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-05-04 11:37:13 +08:00
parent 2cfad80214
commit caa58e9d7d
313 changed files with 2751 additions and 2789 deletions

View File

@@ -1,5 +1,3 @@
// final _loggerFactory =
import 'dart:io';
import 'package:flutter/material.dart';
@@ -17,7 +15,7 @@ class PiliLogger extends Logger {
PiliLogger() : super();
@override
void log(Level level, dynamic message,
Future<void> log(Level level, dynamic message,
{Object? error, StackTrace? stackTrace, DateTime? time}) async {
if (level == Level.error || level == Level.fatal) {
// 添加至文件末尾
@@ -35,7 +33,7 @@ Future<File> getLogsPath() async {
String dir = (await getApplicationDocumentsDirectory()).path;
final String filename = p.join(dir, ".pili_logs");
final File file = File(filename);
if (!await file.exists()) {
if (!file.existsSync()) {
await file.create(recursive: true);
}
return file;