Skip to content

Support for previews that include calls to unsupported web APIs (e.g., native plugins, dart:io, etc.) #166431

@bkonyi

Description

@bkonyi

Since the widget previewer is a Flutter web application, native plugins and dart:io won't be supported. Since it's still possible to import dart:io and invoke Dart code for native plugins, the widget previewer should catch these classes of exceptions and inform developers that their preview can't be displayed.

Ideally, an error widget will be shown in the place of the user's preview explaining what caused the crash with links to documentation on possible solutions to resolve the issue (e.g., refactoring widgets to separate business logic from UI logic).

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: widget previewsIssues related to the Widget Previewer toolingteam-toolOwned by Flutter Tool teamtriaged-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