* opt: unused layout

* mod: semantics

* opt: DanmakuMsg type

* opt: avoid cast

* opt: unnecessary_lambdas

* opt: use isEven

* opt: logger

* opt: invalid common page

* tweak

* opt: unify DynController
This commit is contained in:
My-Responsitories
2025-08-27 12:01:53 +08:00
committed by GitHub
parent 56ffc2781f
commit 5f8313901b
83 changed files with 551 additions and 545 deletions

View File

@@ -1,7 +1,7 @@
import 'package:intl/intl.dart' show DateFormat;
class DateUtil {
static final _shortFormat = DateFormat('MM-dd');
static final shortFormat = DateFormat('MM-dd');
static final longFormat = DateFormat('yyyy-MM-dd');
static final _shortFormatD = DateFormat('MM-dd HH:mm');
static final longFormatD = DateFormat('yyyy-MM-dd HH:mm');
@@ -9,8 +9,8 @@ class DateUtil {
static String dateFormat(
int? time, {
DateFormat? shortFormat,
DateFormat? longFormat,
DateFormat? short,
DateFormat? long,
}) {
if (time == null || time == 0) {
return '';
@@ -37,8 +37,8 @@ class DateUtil {
return '$dayDiff天前';
}
final DateFormat sdf = now.year == date.year
? shortFormat ?? _shortFormat
: longFormat ?? DateUtil.longFormat;
? short ?? shortFormat
: long ?? DateUtil.longFormat;
return sdf.format(date);
}