question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Wrap with widget inserts snippet placeholders on latest Flutter builds

See original GitHub issue

To Reproduce Steps to reproduce the behavior:

  1. Right-click any widget
  2. Choose Wrap with Widget

Expected behavior Widget should be wrapped with another widget

Actual Results

Screenshots

If applicable, add screenshots to help explain your problem.

Versions (please complete the following information):

  • VS Code version:
Version: 1.65.2
Commit: c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1
Date: 2022-03-10T14:42:05.236Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Darwin arm64 21.3.0

Even pre-release version of the plugin reproduces the issue

  • Dart extension version: v3.36.0
  • Dart/Flutter SDK version: v3.36.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
DanTupcommented, Mar 18, 2022

Thanks for the report. This was caused by a recent improvement in the anlaysis server that exposed a bug in the extension. It’s fine in Flutter’s stable channel, but broken on more recent development builds.

The issue is fixed by 84fc046e43416ea06ba5a181d4318694cdcb5187. It hasn’t made a stable release yet, but it is in the pre-releases version that you can switch to in VS Code using the buttons shown in the screenshot below (you should change both and keep them to the same channel, though it’s the Dart extension that contains this fix).

Dart/Flutter pre-release versions

Thanks!

1reaction
DanTupcommented, Mar 18, 2022

Great, thanks for confirming! If it keeps coming up, I’ll do a patch release with that fix in. Otherwise releases usually ship at the end/start of the month.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ListView class - widgets library - Flutter - Dart API docs
The ListView.builder constructor takes an IndexedWidgetBuilder, which builds the children on demand. This constructor is appropriate for list views with a ...
Read more >
Flutter — IDE Shortcuts for Faster Development - Medium
Wrap with a Container, Column, Row or any other Widget. You can use the same approach to wrap your widget with a Container...
Read more >
auto_route - Dart API docs - Pub.dev
Declarative Navigation; Working with Paths; Route guards; Wrapping routes ... this inserts a new router scope into the widgets tree body: AutoRouter() );...
Read more >
How do I Set Background image in Flutter? - Stack Overflow
@override Widget build(BuildContext context) { return new Scaffold( body: new Stack( children: <Widget>[ new Container( decoration: new BoxDecoration( ...
Read more >
How to implement GraphQL with Flutter + GraphQL example
git clone -b widget_design https://github.com/JasperEssien2/ ... The build() method will be updated to the code snippet below:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found