Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-01-22 15:51:22 +08:00
parent 92e5fae29c
commit b9b54ce4f7
34 changed files with 627 additions and 665 deletions

View File

@@ -59,10 +59,12 @@ class _AboutPageState extends State<AboutPage> {
super.dispose();
}
Future<void> getCacheSize() async {
cacheSize.value = CacheManager.formatSize(
await CacheManager.loadApplicationCache(),
);
void getCacheSize() {
CacheManager.loadApplicationCache().then((res) {
if (mounted) {
cacheSize.value = CacheManager.formatSize(res);
}
});
}
void _showDialog() => showDialog(
@@ -103,20 +105,18 @@ class _AboutPageState extends State<AboutPage> {
children: [
GestureDetector(
onTap: () {
_pressCount++;
if (_pressCount == 5) {
if (++_pressCount == 5) {
_pressCount = 0;
_showDialog();
}
},
onSecondaryTap: PlatformUtils.isDesktop ? _showDialog : null,
child: ExcludeSemantics(
child: Image.asset(
width: 150,
height: 150,
cacheWidth: 150.cacheSize(context),
'assets/images/logo/logo.png',
),
child: Image.asset(
width: 150,
height: 150,
excludeFromSemantics: true,
cacheWidth: 150.cacheSize(context),
'assets/images/logo/logo.png',
),
),
ListTile(