feedback
feedback copied to clipboard
Close quickly when pressing the send button
Version
2.4.1
Library
feedback
Flutter channel
stable
Flutter version
2.10.4
Platform
Android, iOS
Details
After pressing the submit button, the feedback widget should close. Because the user may think that the submit button is not working and press it once again. After pressing the send button, it should be closed directly and the screenshot should be sent to the callback in the background. Because when we click the close button after pressing the send button, it is closed immediately and the callback is triggered.
Steps to reproduce
BetterFeedback widget delay time is too long.
Output of flutter doctor -v
[✓] Flutter (Channel stable, 2.10.4, on macOS 12.1 21C52 darwin-x64, locale en)
• Flutter version 2.10.4 at /Users/xxx/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision c860cba910 (5 weeks ago), 2022-03-25 00:23:12 -0500
• Engine revision 57d3bac3dd
• Dart version 2.16.2
• DevTools version 2.9.2
[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
• Android SDK at /Users/xxx/Library/Android/sdk
• Platform android-31, build-tools 32.0.0
• ANDROID_SDK_ROOT = /Users/xxx/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.11.3
[✓] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
[✓] VS Code (version 1.66.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.38.1
[✓] Connected device (2 available)
• Redmi Note 8 Pro (mobile) • fyau4t49n7hy8toz • android-arm64 • Android 11 (API 30)
• macOS (desktop) • macos • darwin-x64 • macOS 12.1 21C52 darwin-x64
[✓] HTTP Host Availability
• All required HTTP hosts are available
FWIW what I do in my app is provide a custom feedback form and replace the submit button with a circular progress indicator while the content is being submitted. This way, if there are any issues and the submit crashes, it's easier for the user to retry.
In the _sendFeedback() method, please put the close feedback mode code inside an if condition. the condition can be passed by the developer. If true(by default) then close the feedback window. If false, let the developer decide when to close the window. Thanks
@caseycrogers How did you do that? Can you show a minimal example code to check if the content is being submitted and display a loading indicator?