Skip to content

[widget_previews] Intercept prohibited hot reloads and hot restart instead #192697

Description

@navaronbracke

Use case

When using widget previews using flutter widget-preview start and hot reload is prohibited, the widget previewer should try hot restarting instead, since we cannot do it ourselves, since we do not control stdin for the previewer process.

Proposal

Have the widget previewer intercept messages such as

Exception: Const class cannot remove fields: Library:'package:my_project/foo/bar.dart' Class: Bar
Hot reload rejected due to unsupported changes. Try performing a hot restart instead.

log that a hot reload was prevented and that a hot restart will be done instead.

Activity

  1. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    c: proposalA detailed proposal for a change to Flutter
    team-toolOwned by Flutter Tool team
    on Sep 14, 2026
  2. added
    P2Important issues not at the top of the work list
    triaged-toolTriaged by Flutter Tool team
    a: widget previewsIssues related to the Widget Previewer tooling
    on Sep 18, 2026
  3. github-actions commented on Oct 21, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  4. locked as resolved and limited conversation to collaborators on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: widget previewsIssues related to the Widget Previewer toolingc: proposalA detailed proposal for a change to Flutterteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions