Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-02-27 10:30:04 +08:00
parent 7276cde48a
commit cf44036589
3 changed files with 5 additions and 5 deletions

View File

@@ -2,6 +2,7 @@
import 'dart:developer';
import 'package:flutter/foundation.dart' show kDebugMode;
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
import 'package:flutter_cache_manager/flutter_cache_manager.dart';
@@ -131,7 +132,7 @@ class _CachedNetworkSVGImageState extends State<CachedNetworkSVGImage> {
_setState();
} catch (e) {
log('CachedNetworkSVGImage: $e');
if (kDebugMode) log('CachedNetworkSVGImage: $e');
_isError = true;
_isLoading = false;

View File

@@ -138,9 +138,10 @@ abstract class CommonPublishPageState<T extends CommonPublishPage>
}
}
Future<void> hidePanel() async {
Future<void> hidePanel([_]) async {
if (focusNode.hasFocus) {
await Future.delayed(const Duration(milliseconds: 100));
if (!mounted) return;
focusNode.unfocus();
}
updateInputView(isReadOnly: false);

View File

@@ -123,9 +123,7 @@ class _WhisperDetailPageState
children: [
Expanded(
child: Listener(
onPointerDown: (event) {
hidePanel();
},
onPointerDown: hidePanel,
behavior: HitTestBehavior.opaque,
child: Align(
alignment: Alignment.topCenter,