feedback
feedback copied to clipboard
App shifts horizontally and vertically after closing feedback screen
Version
2.2.0
Library
feedback_sentry
Flutter channel
stable
Flutter version
2.8.1
Platform
Android
Details
After closing the feedback screen, the whole app seems to be offset in position by a small random X and Y amount of pixels.
See the gray border on the top of this screenshot:
The position changes from time to time, I've also had the whole app shifting both vertically and horizontally.
Steps to reproduce
- Add BetterFeedback to my app
- Trigger an exception
- Press the "x" to close the feedback screen
Output of flutter doctor -v
[✓] Flutter (Channel stable, 2.8.1, on Ubuntu 21.10 5.13.0-25-generic, locale en_US.UTF-8)
• Flutter version 2.8.1 at /home/lasse/snap/flutter/common/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 77d935af4d (5 weeks ago), 2021-12-16 08:37:33 -0800
• Engine revision 890a5fca2e
• Dart version 2.15.1
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /home/lasse/Android/Sdk
✗ cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/linux#android-setup for more details.
[✗] Chrome - develop for the web (Cannot find Chrome executable at /snap/chromium/1827/usr/lib/chromium-browser/chrome)
! /snap/chromium/1827/usr/lib/chromium-browser/chrome is not executable.
[✓] Android Studio (version 2020.3)
• Android Studio at /snap/android-studio/115/android-studio
• Flutter plugin version 60.1.2
• Dart plugin version 203.8292
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
[✓] VS Code
• VS Code at /snap/code/current
• Flutter extension version 3.32.0
[✓] Connected device (1 available)
• sdk gphone x86 arm (mobile) • emulator-5554 • android-x86 • Android 11 (API 30) (emulator)
! Doctor found issues in 2 categories.
I guess this relates to https://github.com/ueman/feedback/issues/166
I found this issue, well a workaround for it anyway. You need to increase the wait duration of the sendfeedback function here:
static Future<void> _sendFeedback(
BuildContext context,
OnFeedbackCallback onFeedbackSubmitted,
ScreenshotController controller,
String feedback,
double pixelRatio, {
Duration delay = const Duration(milliseconds: 2000), //iI increased this to 2 seconds. Not sure what the minumim value is to get it working.
bool showKeyboard = false,
Map<String, dynamic>? extras,
}) async {
// Your logic here
if (!showKeyboard) {
_hideKeyboard(context);
}
await sendFeedback(
onFeedbackSubmitted,
controller,
feedback,
pixelRatio,
delay: delay,
extras: extras,
);
// Close feedback mode
// ignore: use_build_context_synchronously
BetterFeedback.of(context).hide();
}
static void _hideKeyboard(BuildContext context) {
FocusScope.of(context).requestFocus(FocusNode());
}
}
Edit: This isnt the fix. For some reason now its not working. There is something else funny going on. Cant pinpoint it. Maybe this is a hint towards the fix so il leave this comment here.
any update?