Skip to content

Commit

Permalink
optimize attach feature
Browse files Browse the repository at this point in the history
  • Loading branch information
xdd666t committed Nov 9, 2024
1 parent cc22724 commit ce3af28
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/src/widget/helper/attach_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ class _AttachWidgetState extends State<AttachWidget>
@override
void didChangeMetrics() {
super.didChangeMetrics();
_resetState();
// The latency threshold is approximately 8 milliseconds
Future.delayed(const Duration(milliseconds: 30), () {
_resetState();
});
}

@override
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description:
An elegant Flutter Dialog solution,
Easily implement Toast, Loading and custom Dialog,
Make the use of the dialog easier!
version: 4.9.8+4
version: 4.9.8+5
homepage: https://github.com/fluttercandies/flutter_smart_dialog
# flutter pub publish --server=https://pub.dartlang.org
# flutter build web --release --base-href="/flutter_smart_dialog/web/"
Expand Down

0 comments on commit ce3af28

Please sign in to comment.