Skip to content

Previous drawing isn't cleared after navigating and switching back to Draw mode #391

Description

@sushma-acme

Version

3.2.0

Library

feedback

Flutter channel

stable

Flutter version

3.44.4

Platform

Android

Details

When using FeedbackMode.navigate, a user can draw on the screenshot, switch to Navigate mode, move to a different screen in the app, then switch back to Draw mode. The drawing from the previous screen is still there, overlaid on the new screenshot.

This happens because PainterController (the object that stores drawn strokes) is only ever cleared in two places, both private to FeedbackWidgetState: the "Clear" button and the onSubmit callback in FeedbackBottomSheet after a successful submit. There's no public hook on FeedbackController (the object exposed via BetterFeedback.of(context)) that lets a host app clear the drawing itself, for example when the user switches away from Draw mode or when the underlying screen changes.

This also means a host app has no way to know whether the user has drawn anything at all (e.g. to conditionally enable a Submit button); the drawing state is fully opaque outside the package.

Related to #14 (also asked for a reset hook, never resolved).

Steps to reproduce

  • Open the feedback overlay in navigate mode (BetterFeedback(mode: FeedbackMode.navigate, ...))
  • Navigate to any screen, e.g. Settings
  • Tap "Draw" and draw an annotation on the screenshot
  • Tap "Navigate" and move to a different screen
  • Tap "Draw" again on the newly navigated screen
  • Observe: the previous annotation from the first screen is still shown, overlaid on the new screen's screenshot

Output of flutter doctor -v

[√] Flutter (Channel stable, 3.44.4, on Microsoft Windows [Version 10.0.26200.8875], locale en-US) [635ms]
    • Flutter version 3.44.4 on channel stable
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ad70ec4617 (7 weeks ago), 2026-06-24 11:07:06 -0700
    • Engine revision a10d8ac38d
    • Dart version 3.12.2
    • DevTools version 2.57.0

[√] Windows Version (Windows 11 or higher, 25H2, 2009) [1,495ms]

[√] Chrome - develop for the web [348ms]
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Connected device (4 available) [409ms]
    • sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64    • Android 16 (API 36) (emulator)
    • Windows (desktop)            • windows       • windows-x64    • Microsoft Windows [Version 10.0.26200.8875]
    • Chrome (web)                 • chrome        • web-javascript • Google Chrome 151.0.7922.77
    • Edge (web)                   • edge          • web-javascript • Microsoft Edge 151.0.4129.78

[√] Network resources [737ms]
    • All expected network resources are available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions