Skip to content

Commit 1b7ea44

Browse files
committed
optimize attach feature
1 parent cc22724 commit 1b7ea44

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

lib/src/widget/helper/attach_widget.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,10 @@ class _AttachWidgetState extends State<AttachWidget>
9595
@override
9696
void didChangeMetrics() {
9797
super.didChangeMetrics();
98-
_resetState();
98+
// The latency threshold is approximately 8 milliseconds
99+
Future.delayed(const Duration(milliseconds: 30), (){
100+
_resetState();
101+
});
99102
}
100103

101104
@override

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description:
33
An elegant Flutter Dialog solution,
44
Easily implement Toast, Loading and custom Dialog,
55
Make the use of the dialog easier!
6-
version: 4.9.8+4
6+
version: 4.9.8+5
77
homepage: https://github.com/fluttercandies/flutter_smart_dialog
88
# flutter pub publish --server=https://pub.dartlang.org
99
# flutter build web --release --base-href="/flutter_smart_dialog/web/"

0 commit comments

Comments
 (0)