Repository navigation
Wrap with widget not working #4036
Description
Describe the bug
Wrap with widget feature is returning template
To Reproduce
Steps to reproduce the behavior:
- Place the cursor on the Widget
- Click on lightbulb or ctrl + .
- Click on Wrap with widget
Expected behavior
Wrap the children widget with Widget generic
Screenshots
If applicable, add screenshots to help explain your problem.
** Logs**
!! PLEASE REVIEW THIS LOG FOR SENSITIVE INFORMATION BEFORE SHARING !!
Dart Code extension: 3.43.20220628
Flutter extension: 3.43.20220621 (activated)App: Visual Studio Code
Version: 1.68.1
Platform: winWorkspace type: Flutter
Analyzer type: LSP
Multi-root?: falseDart SDK:
Loc: D:\flutter\bin\cache\dart-sdk
Ver: 2.16.2
Flutter SDK:
Loc: D:\flutter
Ver: 2.10.5HTTP_PROXY: undefined
NO_PROXY: undefinedLogging Categories:
General, Analyzer, CommandProcessesWed Jun 29 2022 [09:57:10 GMT-0500 (hora estándar de Colombia)] Log file started
[9:57:28 a. m.] [Analyzer] [Info] ==> Content-Length: 216
[9:57:28 a. m.] [Analyzer] [Info] ==> {"jsonrpc":"2.0","id":10,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///e%3A/projects/test_application/lib/main.dart"},"position":{"line":68,"character":69}},"clientRequestTime":1656514648372}
[9:57:28 a. m.] [Analyzer] [Info] <== Content-Length: 39
Content-Type: application/vscode-jsonrpc; charset=utf-8{"id":10,"jsonrpc":"2.0","result":null}
[9:57:31 a. m.] [Analyzer] [Info] ==> Content-Length: 216
[9:57:31 a. m.] [Analyzer] [Info] ==> {"jsonrpc":"2.0","id":11,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///e%3A/projects/test_application/lib/main.dart"},"position":{"line":77,"character":15}},"clientRequestTime":1656514651032}
[9:57:31 a. m.] [Analyzer] [Info] <== Content-Length: 366
Content-Type: application/vscode-jsonrpc; charset=utf-8
[9:57:31 a. m.] [Analyzer] [Info] <== {"id":11,"jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"dart\n(new) Center Center({\n Key? key,\n double? widthFactor,\n double? heightFactor,\n Widget? child,\n})\n\npackage:flutter/src/widgets/basic.dart\n\n---\nCreates a widget that centers its child."},"range":{"start":{"line":77,"character":12},"end":{"line":77,"character":18}}}}
[9:57:31 a. m.] [Analyzer] [Info] ==> Content-Length: 228
[9:57:31 a. m.] [Analyzer] [Info] ==> {"jsonrpc":"2.0","id":12,"method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///e%3A/projects/test_application/lib/main.dart"},"position":{"line":77,"character":16}},"clientRequestTime":1656514651117}
[9:57:31 a. m.] [Analyzer] [Info] <== Content-Length: 116
Content-Type: application/vscode-jsonrpc; charset=utf-8
[9:57:31 a. m.] [Analyzer] [Info] <== {"id":12,"jsonrpc":"2.0","result":[{"range":{"start":{"line":77,"character":12},"end":{"line":77,"character":18}}}]}
[9:57:31 a. m.] [Analyzer] [Info] ==> Content-Length: 306
[9:57:31 a. m.] [Analyzer] [Info] ==> {"jsonrpc":"2.0","id":13,"method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///e%3A/projects/test_application/lib/main.dart"},"range":{"start":{"line":77,"character":16},"end":{"line":77,"character":16}},"context":{"diagnostics":[],"triggerKind":2}},"clientRequestTime":1656514651372}
[9:57:31 a. m.] [Analyzer] [Info] <== Content-Length: 21856
Content-Type: application/vscode-jsonrpc; charset=utf-8
[9:57:31 a. m.] [Analyzer] [Info] <== {"id":13,"jsonrpc":"2.0","result":[{"title":"Sort Members","kind":"source.sortMembers","command":{"title":"Sort Members","command":"edit.sortMembers","arguments":["e:\projects\test_application\lib\main.dart"]}},{"title":"Organize Imports","kind":"source.organizeImports","command":{"title":"Organize Imports","command":"edit.organizeImports","arguments":["e:\projects\test_application\lib\main.dart"]}},{"title":"Fix All","kind":"source.fixAll","command":{"title":"Fix All","command":"edit.fixAll","arguments":["e:\projects\test_application\lib\main.dart"]}},{"title":"Wrap with widget...","kind":"refactor.flutter.wrap.generic","diagnostics":[],"edit":{"documentChanges":[{"textDocument":{"version":1,"uri":"file:///e:/projects/test_application/lib/main.dart"},"edits":[{"insertTextFormat":2,"range":{"start":{"line":77,"character":12},"end":{"line":106,"character":7}},"newText":"${0:widget}(\r\n child: Center(\r\n // Center is a layout widget. It takes a single child and positions it\r\n // in the middle of the parent.\r\n child: Column(\r\n // Column is also a layout widget. It takes a list of children and\r\n // arranges them vertically. By default, it sizes itself to fit its\r\n // children horizontally, and tries to be as tall as its parent.\r\n //\r\n // Invoke "debug painting" (press "p" in the console, choose the\r\n // "Toggle Debug Paint" action from the Flutter Inspector in Android\r\n // Studio, or the "Toggle Debug Paint" command in Visual Studio Code)\r\n // to see the wireframe for each widget.\r\n //\r\n // Column has various properties to control how it sizes itself and\r\n // how it positions its children. Here we use mainAxisAlignment to\r\n // center the children vertically; the main axis here is the vertical\r\n // axis because Columns are vertical (the cross…
[9:57:32 a. m.] [Analyzer] [Info] ==> Content-Length: 215
[9:57:32 a. m.] [Analyzer] [Info] ==> {"jsonrpc":"2.0","id":14,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///e%3A/projects/test_application/lib/main.dart"},"position":{"line":77,"character":2}},"clientRequestTime":1656514652322}
[9:57:32 a. m.] [Analyzer] [Info] <== Content-Length: 39
Content-Type: application/vscode-jsonrpc; charset=utf-8
[9:57:32 a. m.] [Analyzer] [Info] <== {"id":14,"jsonrpc":"2.0","result":null}
[9:57:33 a. m.] [Analyzer] [Info] ==> Content-Length: 3892
[9:57:33 a. m.] [Analyzer] [Info] ==> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///e%3A/projects/test_application/lib/main.dart","version":2},"contentChanges":[{"range":{"start":{"line":104,"character":11},"end":{"line":104,"character":11}},"rangeLength":0,"text":",\r\n )"},{"range":{"start":{"line":104,"character":10},"end":{"line":104,"character":10}},"rangeLength":0,"text":" "},{"range":{"start":{"line":103,"character":12},"end":{"line":103,"character":12}},"rangeLength":0,"text":" "},{"range":{"start":{"line":102,"character":14},"end":{"line":102,"character":14}},"rangeLength":0,"text":" "},{"range":{"start":{"line":101,"character":15},"end":{"line":101,"character":15}},"rangeLength":0,"text":"\"},{"range":{"start":{"line":101,"character":14},"end":{"line":101,"character":14}},"rangeLength":0,"text":" "},{"range":{"start":{"line":100,"character":12},"end":{"line":100,"character":12}},"rangeLength":0,"text":" "},{"range":{"start":{"line":100,"character":0},"end":{"line":100,"character":0}},"rangeLength":0,"text":" "},{"range":{"start":{"line":99,"character":12},"end":{"line":99,"character":12}},"rangeLength":0,"text":" "},{"range":{"start":{"line":98,"character":0},"end":{"line":98,"character":0}},"rangeLength":0,"text":" "},{"range":{"start":{"line":97,"character":12},"end":{"line":97,"character":12}},"rangeLength":0,"text":" "},{"range":{"start":{"line":97,"character":0},"end":{"line":97,"character":0}},"rangeLength":0,"text":" "},{"range":{"start":{"line":96,"character":10},"end":{"line":96,"character":10}},"rangeLength":0,"text":" "},{"range":{"start":{"line":95,"character":0},"end":{"line":95,"character":0}},"rangeLength":0,"text":" "},{"range":{"start":{"line":94,"character":10},"end":{"line":94,"character":10}},"rangeLength":0,"text":" "},{"range":{"start":{"line":94,"character":0},"end":{"line":94,"character":0}},"rangeLength":0,"text":" "},{"range":{"start":{"line":93,"character":10},"end":{"line":93,"character":10}},"range…
[9:57:33 a. m.] [Analyzer] [Info] ==> Content-Length: 306
[9:57:33 a. m.] [Analyzer] [Info] ==> {"jsonrpc":"2.0","id":15,"method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///e%3A/projects/test_application/lib/main.dart"},"range":{"start":{"line":78,"character":19},"end":{"line":78,"character":19}},"context":{"diagnostics":[],"triggerKind":2}},"clientRequestTime":1656514653770}
[9:57:33 a. m.] [Analyzer] [Info] <== Content-Length: 97
Content-Type: application/vscode-jsonrpc; charset=utf-8
[9:57:33 a. m.] [Analyzer] [Info] <== {"id":4,"method":"window/workDoneProgress/create","params":{"token":"ANALYZING"},"jsonrpc":"2.0"}
[9:57:33 a. m.] [Analyzer] [Info] ==> Content-Length: 72
[9:57:33 a. m.] [Analyzer] [Info] ==> {"jsonrpc":"2.0","id":4,"result":null,"clientRequestTime":1656514653792}
[9:57:33 a. m.] [Analyzer] [Info] <== Content-Length: 118
Content-Type: application/vscode-jsonrpc; charset=utf-8
[9:57:33 a. m.] [Analyzer] [Info] <== {"method":"$/progress","params":{"token":"ANALYZING","value":{"kind":"begin","title":"Analyzing…"}},"jsonrpc":"2.0"}
[9:57:33 a. m.] [Analyzer] [Info] <== Content-Length: 1974
Content-Type: application/vscode-jsonrpc; charset=utf-8
[9:57:33 a. m.] [Analyzer] [Info] <== {"method":"textDocument/publishDiagnostics","params":{"uri":"file:///e:/projects/test_application/lib/main.dart","diagnostics":[{"range":{"start":{"line":77,"character":12},"end":{"line":77,"character":13}},"severity":1,"code":"undefined_identifier","codeDescription":{"href":"https://dart.dev/diagnostics/undefined_identifier"},"source":"dart","message":"Undefined name '$'.\nTry correcting the name to one that is defined, or defining the name."},{"range":{"start":{"line":77,"character":13},"end":{"line":108,"character":7}},"severity":1,"code":"positional_after_named_argument","source":"dart","message":"Positional arguments must occur before named arguments.\nTry moving all of the positional arguments before the named arguments."},{"range":{"start":{"line":77,"character":13},"end":{"line":77,"character":14}},"severity":1,"code":"expected_token","source":"dart","message":"Expected to find ','."},{"range":{"start":{"line":50,"character":6},"end":{"line":50,"character":14}},"severity":3,"code":"unused_field","codeDescription":{"href":"https://dart.dev/diagnostics/unused_field"},"source":"dart","message":"The value of the field '_counter' isn't used.\nTry removing the field, or using it."},{"range":{"start":{"line":77,"character":13},"end":{"line":108,"character":7}},"severity":1,"code":"extra_positional_arguments_could_be_named","codeDescription":{"href":"https://dart.dev/diagnostics/extra_positional_arguments_could_be_named"},"source":"dart","message":"Too many positional arguments: 0 expected, but 1 found.\nTry removing the extra positional arguments, or specifying the name for named arguments."},{"range":{"start":{"line":77,"character":13},"end":{"line":77,"character":23}},"severity":1,"code":"invocation_of_non_function_expression","codeDescription":{"href":"https://dart.dev/diagnostics/invocation_of_non_function_expression"},"source":"dart","message":"The expression doesn't evaluate to a function, so it can't be invoked."}]},"jsonrpc":"2.0"}
[9:57:33 a. m.] [Analyzer] [Info] <== Content-Length: 1145
Content-Type: application/vscode-jsonrpc; charset=utf-8{"method":"dart/textDocument/publishClosingLabels","params":{"uri":"file:///e:/projects/test_application/lib/main.dart","labels":[{"range":{"start":{"line":12,"character":11},"end":{"line":27,"character":5}},"label":"MaterialApp"},{"range":{"start":{"line":14,"character":13},"end":{"line":25,"character":7}},"label":"ThemeData"},{"range":{"start":{"line":71,"character":11},"end":{"line":114,"character":5}},"label":"Scaffold"},{"range":{"start":{"line":72,"character":14},"end":{"line":76,"character":7}},"label":"AppBar"},{"range":{"start":{"line":78,"character":15},"end":{"line":107,"character":9}},"label":"Center"},{"range":{"start":{"line":81,"character":17},"end":{"line":106,"character":11}},"label":"Column"},{"range":{"start":{"line":97,"character":22},"end":{"line":105,"character":13}},"label":"[]"},{"range":{"start":{"line":98,"character":14},"end":{"line":100,"character":15}},"label":"Text"},{"range":{"start":{"line":101,"character":14},"end":{"line":104,"character":15}},"label":"Text"},{"range":{"start":{"line":109,"character":28},"end":{"line":113,"character":7}},"label":"FloatingActionButton"}]},"jsonrpc":"2.0"}Content-Length: 8043
Content-Type: application/vscode-jsonrpc; charset=utf-8{"method":"dart/textDocument/publishOutline","params":{"uri":"file:///e:/projects/test_application/lib/main.dart","outline":{"element":{"range":{"start":{"line":0,"character":0},"end":{"line":117,"character":0}},"name":"","kind":"COMPILATION_UNIT"},"range":{"start":{"line":0,"character":0},"end":{"line":117,"character":0}},"codeRange":{"start":{"line":0,"character":0},"end":{"line":117,"character":0}},"children":[{"element":{"range":{"start":{"line":2,"character":5},"end":{"line":2,"character":9}},"name":"main","kind":"FUNCTION","parameters":"()","returnType":"void"},"range":{"start":{"line":2,"character":0},"end":{"line":4,"character":1}},"codeRange":{"start":{"line":2,"cha…
[9:57:33 a. m.] [Analyzer] [Info] <== Content-Length: 93
Content-Type: application/vscode-jsonrpc; charset=utf-8
[9:57:33 a. m.] [Analyzer] [Info] <== {"method":"$/progress","params":{"token":"ANALYZING","value":{"kind":"end"}},"jsonrpc":"2.0"}
[9:57:33 a. m.] [Analyzer] [Info] <== Content-Length: 18805
Content-Type: application/vscode-jsonrpc; charset=utf-8{"id":15,"jsonrpc":"2.0","result":[{"title":"Sort Members","kind":"source.sortMembers","command":{"title":"Sort Members","command":"edit.sortMembers","arguments":["e:\projects\test_application\lib\main.dart"]}},{"title":"Organize Imports","kind":"source.organizeImports","command":{"title":"Organize Imports","command":"edit.organizeImports","arguments":["e:\projects\test_application\lib\main.dart"]}},{"title":"Fix All","kind":"source.fixAll","command":{"title":"Fix All","command":"edit.fixAll","arguments":["e:\projects\test_application\lib\main.dart"]}},{"title":"Wrap with widget...","kind":"refactor.flutter.wrap.generic","diagnostics":[],"edit":{"documentChanges":[{"textDocument":{"version":2,"uri":"file:///e:/projects/test_application/lib/main.dart"},"edits":[{"insertTextFormat":2,"range":{"start":{"line":78,"character":15},"end":{"line":107,"character":9}},"newText":"${0:widget}(\r\n child: Center(\r\n // Center is a layout widget. It takes a single child and positions it\r\n // in the middle of the parent.\r\n child: Column(\r\n // Column is also a layout widget. It takes a list of children and\r\n // arranges them vertically. By default, it sizes itself to fit its\r\n // children horizontally, and tries to be as tall as its parent.\r\n //\r\n // Invoke "debug painting" (press "p" in the console, choose the\r\n // "Toggle Debug Paint" action from the Flutter Inspector in Android\r\n // Studio, or the "Toggle Debug Paint" command in Visual Studio Code)\r\n // to see the wireframe for each widget.\r\n //\r\n // Column has various properties to control how it sizes itself and\r\n // how it positions its children. Here we use mainAxisAlignment to\r\n // center the chil…
[9:57:34 a. m.] [Analyzer] [Info] ==> Content-Length: 216
[9:57:34 a. m.] [Analyzer] [Info] ==> {"jsonrpc":"2.0","id":16,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///e%3A/projects/test_application/lib/main.dart"},"position":{"line":79,"character":19}},"clientRequestTime":1656514654095}
[9:57:34 a. m.] [Analyzer] [Info] <== Content-Length: 39
Content-Type: application/vscode-jsonrpc; charset=utf-8
[9:57:34 a. m.] [Analyzer] [Info] <== {"id":16,"jsonrpc":"2.0","result":null}
[9:57:34 a. m.] [Analyzer] [Info] ==> Content-Length: 1004
[9:57:34 a. m.] [Analyzer] [Info] ==> {"jsonrpc":"2.0","id":17,"method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///e%3A/projects/test_application/lib/main.dart"},"range":{"start":{"line":78,"character":19},"end":{"line":78,"character":19}},"context":{"diagnostics":[{"range":{"start":{"line":77,"character":13},"end":{"line":108,"character":7}},"message":"Positional arguments must occur before named arguments.\nTry moving all of the positional arguments before the named arguments.","code":"positional_after_named_argument","severity":1,"source":"dart"},{"range":{"start":{"line":77,"character":13},"end":{"line":108,"character":7}},"message":"Too many positional arguments: 0 expected, but 1 found.\nTry removing the extra positional arguments, or specifying the name for named arguments.","code":"extra_positional_arguments_could_be_named","codeDescription":{"href":"file:///diagnostics/extra_positional_arguments_could_be_named"},"severity":1,"source":"dart"}],"triggerKind":2}},"clientRequestTime":1656514654130}
[9:57:34 a. m.] [Analyzer] [Info] <== Content-Length: 18805
Content-Type: application/vscode-jsonrpc; charset=utf-8
[9:57:34 a. m.] [Analyzer] [Info] <== {"id":17,"jsonrpc":"2.0","result":[{"title":"Sort Members","kind":"source.sortMembers","command":{"title":"Sort Members","command":"edit.sortMembers","arguments":["e:\projects\test_application\lib\main.dart"]}},{"title":"Organize Imports","kind":"source.organizeImports","command":{"title":"Organize Imports","command":"edit.organizeImports","arguments":["e:\projects\test_application\lib\main.dart"]}},{"title":"Fix All","kind":"source.fixAll","command":{"title":"Fix All","command":"edit.fixAll","arguments":["e:\projects\test_application\lib\main.dart"]}},{"title":"Wrap with widget...","kind":"refactor.flutter.wrap.generic","diagnostics":[],"edit":{"documentChanges":[{"textDocument":{"version":2,"uri":"file:///e:/projects/test_application/lib/main.dart"},"edits":[{"insertTextFormat":2,"range":{"start":{"line":78,"character":15},"end":{"line":107,"character":9}},"newText":"${0:widget}(\r\n child: Center(\r\n // Center is a layout widget. It takes a single child and positions it\r\n // in the middle of the parent.\r\n child: Column(\r\n // Column is also a layout widget. It takes a list of children and\r\n // arranges them vertically. By default, it sizes itself to fit its\r\n // children horizontally, and tries to be as tall as its parent.\r\n //\r\n // Invoke "debug painting" (press "p" in the console, choose the\r\n // "Toggle Debug Paint" action from the Flutter Inspector in Android\r\n // Studio, or the "Toggle Debug Paint" command in Visual Studio Code)\r\n // to see the wireframe for each widget.\r\n //\r\n // Column has various properties to control how it sizes itself and\r\n // how it positions its children. Here we use mainAxisAlignment to\r\n // center the children vertically; the main axis here is the vertical\r\n // axis becau…
[9:57:34 a. m.] [Analyzer] [Info] ==> Content-Length: 1829
[9:57:34 a. m.] [Analyzer] [Info] ==> {"jsonrpc":"2.0","id":18,"method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///e%3A/projects/test_application/lib/main.dart"},"range":{"start":{"line":77,"character":13},"end":{"line":108,"character":7}},"context":{"diagnostics":[{"range":{"start":{"line":77,"character":12},"end":{"line":77,"character":13}},"message":"Undefined name '$'.\nTry correcting the name to one that is defined, or defining the name.","code":"undefined_identifier","codeDescription":{"href":"file:///diagnostics/undefined_identifier"},"severity":1,"source":"dart"},{"range":{"start":{"line":77,"character":13},"end":{"line":108,"character":7}},"message":"Positional arguments must occur before named arguments.\nTry moving all of the positional arguments before the named arguments.","code":"positional_after_named_argument","severity":1,"source":"dart"},{"range":{"start":{"line":77,"character":13},"end":{"line":77,"character":14}},"message":"Expected to find ','.","code":"expected_token","severity":1,"source":"dart"},{"range":{"start":{"line":77,"character":13},"end":{"line":108,"character":7}},"message":"Too many positional arguments: 0 expected, but 1 found.\nTry removing the extra positional arguments, or specifying the name for named arguments.","code":"extra_positional_arguments_could_be_named","codeDescription":{"href":"file:///diagnostics/extra_positional_arguments_could_be_named"},"severity":1,"source":"dart"},{"range":{"start":{"line":77,"character":13},"end":{"line":77,"character":23}},"message":"The expression doesn't evaluate to a function, so it can't be invoked.","code":"invocation_of_non_function_expression","codeDescription":{"href":"file:///diagnostics/invocation_of_non_function_expression"},"severity":1,"source":"dart"}],"only":["quickfix"],"triggerKind":1}},"clientRequestTime":1656514654249}
[9:57:35 a. m.] [Analyzer] [Info] <== Content-Length: 3926
Content-Type: application/vscode-jsonrpc; charset=utf-8
[9:57:35 a. m.] [Analyzer] [Info] <== {"id":18,"jsonrpc":"2.0","result":[{"title":"Create class '$'","kind":"quickfix.create.class","diagnostics":[{"range":{"start":{"line":77,"character":12},"end":{"line":77,"character":13}},"severity":1,"code":"undefined_identifier","codeDescription":{"href":"https://dart.dev/diagnostics/undefined_identifier"},"source":"dart","message":"Undefined name '$'.\nTry correcting the name to one that is defined, or defining the name."}],"edit":{"documentChanges":[{"textDocument":{"version":2,"uri":"file:///e:/projects/test_application/lib/main.dart"},"edits":[{"range":{"start":{"line":116,"character":1},"end":{"line":116,"character":1}},"newText":"\r\n\r\nclass $ {\r\n}"}]}]}},{"title":"Create getter '$'","kind":"quickfix.create.getter","diagnostics":[{"range":{"start":{"line":77,"character":12},"end":{"line":77,"character":13}},"severity":1,"code":"undefined_identifier","codeDescription":{"href":"https://dart.dev/diagnostics/undefined_identifier"},"source":"dart","message":"Undefined name '$'.\nTry correcting the name to one that is defined, or defining the name."}],"edit":{"documentChanges":[{"textDocument":{"version":2,"uri":"file:///e:/projects/test_application/lib/main.dart"},"edits":[{"range":{"start":{"line":50,"character":19},"end":{"line":50,"character":19}},"newText":"\r\n\r\n get $ => null;"}]}]}},{"title":"Create local variable '$'","kind":"quickfix.create.localVariable","diagnostics":[{"range":{"start":{"line":77,"character":12},"end":{"line":77,"character":13}},"severity":1,"code":"undefined_identifier","codeDescription":{"href":"https://dart.dev/diagnostics/undefined_identifier"},"source":"dart","message":"Undefined name '$'.\nTry correcting the name to one that is defined, or defining the name."}],"edit":{"documentChanges":[{"textDocument":{"version":2,"uri":"file:///e:/projects/test_application/lib/main.dart"},"edits":[{"range":{"start":{"line":71,"character":4},"end":{"line":71,"character":4}},"newText":"var $;\r\n "}]}]}},{"title":"Create mixin '$'"…
[9:57:35 a. m.] [Analyzer] [Info] ==> Content-Length: 192
[9:57:35 a. m.] [Analyzer] [Info] ==> {"jsonrpc":"2.0","id":19,"method":"textDocument/semanticTokens/full","params":{"textDocument":{"uri":"file:///e%3A/projects/test_application/lib/main.dart"}},"clientRequestTime":1656514655644}
[9:57:35 a. m.] [Analyzer] [Info] <== Content-Length: 1917
Content-Type: application/vscode-jsonrpc; charset=utf-8
[9:57:35 a. m.] [Analyzer] [Info] <== {"id":19,"jsonrpc":"2.0","result":{"data":[0,0,6,1,0,0,7,31,15,0,2,0,4,1,1024,0,5,4,16,20,1,2,6,16,0,0,7,5,1,0,0,6,5,2,2,3,0,5,1,0,0,6,5,2,0,0,6,7,1,0,0,8,15,2,0,1,8,5,2,0,0,7,3,2,0,0,5,3,6,4,0,8,5,1,0,0,6,3,6,256,0,5,3,6,0,2,2,47,3,0,1,2,1,0,0,0,1,8,11,64,1,2,6,2,0,0,7,5,4,4,0,6,12,2,0,0,13,7,6,4,1,4,6,1,128,0,7,11,2,2,1,6,5,6,256,0,7,14,15,0,1,6,5,6,256,0,7,9,2,2,1,8,41,3,0,1,8,2,3,0,1,8,66,3,0,1,8,70,3,0,1,8,67,3,0,1,8,70,3,0,1,8,65,3,0,1,8,69,3,0,1,8,20,3,0,1,8,13,6,256,0,15,6,2,0,0,7,4,11,16,2,6,4,6,256,0,6,5,1,0,0,6,10,2,2,0,11,5,6,256,0,7,24,15,0,5,0,5,1,0,0,6,10,2,0,0,11,7,1,0,0,8,14,2,0,1,8,10,2,0,0,12,3,2,0,0,5,3,6,4,0,5,8,1,0,0,14,5,11,0,0,10,5,1,0,0,6,3,6,256,0,5,3,6,0,2,2,76,3,0,1,2,78,3,0,1,2,16,3,0,2,2,78,3,0,1,2,75,3,0,1,2,73,3,0,1,2,25,3,0,2,2,5,1,0,0,6,6,2,0,0,7,5,11,4,2,2,1,0,0,0,1,8,11,64,1,2,5,2,0,0,6,10,2,0,0,12,11,4,4,0,17,16,2,2,3,0,5,1,0,0,6,16,2,0,0,17,7,1,0,0,8,5,2,0,0,6,10,2,0,1,2,3,2,0,0,4,8,11,4,0,11,1,14,0,2,2,4,1,1024,0,5,17,4,4,1,4,8,4,0,1,6,71,3,0,1,6,73,3,0,1,6,68,3,0,1,6,74,3,0,1,6,55,3,0,1,6,8,11,0,4,2,1,0,0,0,1,8,11,64,1,2,6,2,0,0,7,5,4,4,0,6,12,2,0,0,13,7,6,4,1,4,75,3,0,1,4,41,3,0,1,4,2,3,0,1,4,75,3,0,1,4,73,3,0,1,4,59,3,0,1,4,6,1,128,0,7,8,2,2,1,6,6,6,256,0,8,6,2,2,1,8,72,3,0,1,8,60,3,0,1,8,5,6,256,0,7,4,2,2,0,5,6,11,0,0,7,5,11,0,2,6,4,6,256,0,6,1,10,0,0,2,1,14,0,0,2,6,11,0,1,8,5,10,0,0,7,6,2,2,1,10,70,3,0,1,10,31,3,0,1,10,5,6,256,0,7,6,2,2,1,12,66,3,0,1,12,67,3,0,1,12,64,3,0,1,12,2,3,0,1,12,64,3,0,1,12,68,3,0,1,12,69,3,0,1,12,40,3,0,1,12,2,3,0,1,12,67,3,0,1,12,66,3,0,1,12,69,3,0,1,12,61,3,0,1,12,15,3,0,1,12,17,6,256,0,19,17,7,0,0,18,6,8,0,1,12,8,6,256,0,11,6,2,0,1,14,5,1,0,0,6,4,2,2,1,16,45,15,0,2,14,4,2,2,1,16,1,15,0,0,1,2,15,32,0,2,9,15,0,1,16,5,6,256,0,7,5,2,0,0,6,2,4,16,0,3,7,6,0,0,9,9,11,0,0,10,9,11,0,6,6,20,6,256,0,22,20,2,2,1,8,9,6,256,0,11,17,4,0,1,8,7,6,256,0,9,11,15,0,1,8,5,6,256,0,7,5,1,0,0,6,4,2,2,0,5,5,2,0,0,6,3,11,16,1,9,69,3,0]}}
[9:57:35 a. m.] [Analyzer] [Info] ==> Content-Length: 216
[9:57:35 a. m.] [Analyzer] [Info] ==> {"jsonrpc":"2.0","id":20,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///e%3A/projects/test_application/lib/main.dart"},"position":{"line":79,"character":19}},"clientRequestTime":1656514655816}
[9:57:35 a. m.] [Analyzer] [Info] <== Content-Length: 39
Content-Type: application/vscode-jsonrpc; charset=utf-8
[9:57:35 a. m.] [Analyzer] [Info] <== {"id":20,"jsonrpc":"2.0","result":null}
[9:57:35 a. m.] [Analyzer] [Info] ==> Content-Length: 1829
[9:57:35 a. m.] [Analyzer] [Info] ==> {"jsonrpc":"2.0","id":21,"method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///e%3A/projects/test_application/lib/main.dart"},"range":{"start":{"line":77,"character":13},"end":{"line":108,"character":7}},"context":{"diagnostics":[{"range":{"start":{"line":77,"character":12},"end":{"line":77,"character":13}},"message":"Undefined name '$'.\nTry correcting the name to one that is defined, or defining the name.","code":"undefined_identifier","codeDescription":{"href":"file:///diagnostics/undefined_identifier"},"severity":1,"source":"dart"},{"range":{"start":{"line":77,"character":13},"end":{"line":108,"character":7}},"message":"Positional arguments must occur before named arguments.\nTry moving all of the positional arguments before the named arguments.","code":"positional_after_named_argument","severity":1,"source":"dart"},{"range":{"start":{"line":77,"character":13},"end":{"line":77,"character":14}},"message":"Expected to find ','.","code":"expected_token","severity":1,"source":"dart"},{"range":{"start":{"line":77,"character":13},"end":{"line":108,"character":7}},"message":"Too many positional arguments: 0 expected, but 1 found.\nTry removing the extra positional arguments, or specifying the name for named arguments.","code":"extra_positional_arguments_could_be_named","codeDescription":{"href":"file:///diagnostics/extra_positional_arguments_could_be_named"},"severity":1,"source":"dart"},{"range":{"start":{"line":77,"character":13},"end":{"line":77,"character":23}},"message":"The expression doesn't evaluate to a function, so it can't be invoked.","code":"invocation_of_non_function_expression","codeDescription":{"href":"file:///diagnostics/invocation_of_non_function_expression"},"severity":1,"source":"dart"}],"only":["quickfix"],"triggerKind":1}},"clientRequestTime":1656514655975}
[9:57:36 a. m.] [Analyzer] [Info] ==> Content-Length: 185
[9:57:36 a. m.] [Analyzer] [Info] ==> {"jsonrpc":"2.0","id":22,"method":"textDocument/foldingRange","params":{"textDocument":{"uri":"file:///e%3A/projects/test_application/lib/main.dart"}},"clientRequestTime":1656514656143}
[9:57:36 a. m.] [Analyzer] [Info] <== Content-Length: 3926
Content-Type: application/vscode-jsonrpc; charset=utf-8
[9:57:36 a. m.] [Analyzer] [Info] <== {"id":21,"jsonrpc":"2.0","result":[{"title":"Create class '$'","kind":"quickfix.create.class","diagnostics":[{"range":{"start":{"line":77,"character":12},"end":{"line":77,"character":13}},"severity":1,"code":"undefined_identifier","codeDescription":{"href":"https://dart.dev/diagnostics/undefined_identifier"},"source":"dart","message":"Undefined name '$'.\nTry correcting the name to one that is defined, or defining the name."}],"edit":{"documentChanges":[{"textDocument":{"version":2,"uri":"file:///e:/projects/test_application/lib/main.dart"},"edits":[{"range":{"start":{"line":116,"character":1},"end":{"line":116,"character":1}},"newText":"\r\n\r\nclass $ {\r\n}"}]}]}},{"title":"Create getter '$'","kind":"quickfix.create.getter","diagnostics":[{"range":{"start":{"line":77,"character":12},"end":{"line":77,"character":13}},"severity":1,"code":"undefined_identifier","codeDescription":{"href":"https://dart.dev/diagnostics/undefined_identifier"},"source":"dart","message":"Undefined name '$'.\nTry correcting the name to one that is defined, or defining the name."}],"edit":{"documentChanges":[{"textDocument":{"version":2,"uri":"file:///e:/projects/test_application/lib/main.dart"},"edits":[{"range":{"start":{"line":50,"character":19},"end":{"line":50,"character":19}},"newText":"\r\n\r\n get $ => null;"}]}]}},{"title":"Create local variable '$'","kind":"quickfix.create.localVariable","diagnostics":[{"range":{"start":{"line":77,"character":12},"end":{"line":77,"character":13}},"severity":1,"code":"undefined_identifier","codeDescription":{"href":"https://dart.dev/diagnostics/undefined_identifier"},"source":"dart","message":"Undefined name '$'.\nTry correcting the name to one that is defined, or defining the name."}],"edit":{"documentChanges":[{"textDocument":{"version":2,"uri":"file:///e:/projects/test_application/lib/main.dart"},"edits":[{"range":{"start":{"line":71,"character":4},"end":{"line":71,"character":4}},"newText":"var $;\r\n "}]}]}},{"title":"Create mixin '$'"…
[9:57:36 a. m.] [Analyzer] [Info] <== Content-Length: 2069
Content-Type: application/vscode-jsonrpc; charset=utf-8{"id":22,"jsonrpc":"2.0","result":[{"startLine":2,"startCharacter":13,"endLine":4,"endCharacter":0},{"startLine":6,"startCharacter":37,"endLine":29,"endCharacter":0},{"startLine":11,"startCharacter":38,"endLine":28,"endCharacter":2},{"startLine":12,"startCharacter":23,"endLine":27,"endCharacter":4},{"startLine":14,"startCharacter":23,"endLine":25,"endCharacter":6},{"startLine":31,"startCharacter":41,"endLine":47,"endCharacter":0},{"startLine":49,"startCharacter":50,"endLine":116,"endCharacter":0},{"startLine":52,"startCharacter":28,"endLine":61,"endCharacter":2},{"startLine":53,"startCharacter":13,"endLine":60,"endCharacter":5},{"startLine":53,"startCharacter":17,"endLine":60,"endCharacter":4},{"startLine":64,"startCharacter":38,"endLine":115,"endCharacter":2},{"startLine":71,"startCharacter":20,"endLine":114,"endCharacter":4},{"startLine":72,"startCharacter":21,"endLine":76,"endCharacter":6},{"startLine":77,"startCharacter":24,"endLine":108,"endCharacter":6},{"startLine":78,"startCharacter":22,"endLine":107,"endCharacter":8},{"startLine":81,"startCharacter":24,"endLine":106,"endCharacter":10},{"startLine":97,"startCharacter":31,"endLine":105,"endCharacter":12},{"startLine":98,"startCharacter":25,"endLine":100,"endCharacter":14},{"startLine":101,"startCharacter":19,"endLine":104,"endCharacter":14},{"startLine":109,"startCharacter":49,"endLine":113,"endCharacter":6},{"startLine":15,"startCharacter":49,"endLine":23,"endCharacter":28,"kind":"comment"},{"startLine":34,"startCharacter":78,"endLine":36,"endCharacter":18,"kind":"comment"},{"startLine":38,"startCharacter":80,"endLine":41,"endCharacter":27,"kind":"comment"},{"startLine":54,"startCharacter":77,"endLine":58,"endCharacter":61,"kind":"comment"},{"startLine":65,"startCharacter":79,"endLine":70,"endCharacter":63,"kind":"comment"},{"startLine":73,"startCharacter":80,"endLine":74,"endCharacter":68,"kind":"comment"},{"startLine":79,"…
[9:57:36 a. m.] [Analyzer] [Info] ==> Content-Length: 186
[9:57:36 a. m.] [Analyzer] [Info] ==> {"jsonrpc":"2.0","id":23,"method":"textDocument/documentColor","params":{"textDocument":{"uri":"file:///e%3A/projects/test_application/lib/main.dart"}},"clientRequestTime":1656514656332}
[9:57:36 a. m.] [Analyzer] [Info] ==> Content-Length: 187
[9:57:36 a. m.] [Analyzer] [Info] ==> {"jsonrpc":"2.0","id":24,"method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///e%3A/projects/test_application/lib/main.dart"}},"clientRequestTime":1656514656332}
[9:57:36 a. m.] [Analyzer] [Info] <== Content-Length: 217
Content-Type: application/vscode-jsonrpc; charset=utf-8
[9:57:36 a. m.] [Analyzer] [Info] <== {"id":23,"jsonrpc":"2.0","result":[{"range":{"start":{"line":24,"character":23},"end":{"line":24,"character":34}},"color":{"red":0.12941176470588237,"green":0.5882352941176471,"blue":0.9529411764705882,"alpha":1.0}}]}
[9:57:36 a. m.] [Analyzer] [Info] <== Content-Length: 2778
Content-Type: application/vscode-jsonrpc; charset=utf-8{"id":24,"jsonrpc":"2.0","result":[{"name":"main","detail":"()","kind":12,"deprecated":false,"range":{"start":{"line":2,"character":0},"end":{"line":4,"character":1}},"selectionRange":{"start":{"line":2,"character":5},"end":{"line":2,"character":9}}},{"name":"MyApp","kind":5,"deprecated":false,"range":{"start":{"line":6,"character":0},"end":{"line":29,"character":1}},"selectionRange":{"start":{"line":6,"character":6},"end":{"line":6,"character":11}},"children":[{"name":"MyApp","detail":"({Key? key})","kind":9,"deprecated":false,"range":{"start":{"line":7,"character":2},"end":{"line":7,"character":44}},"selectionRange":{"start":{"line":7,"character":8},"end":{"line":7,"character":13}}},{"name":"build","detail":"(BuildContext context)","kind":6,"deprecated":false,"range":{"start":{"line":11,"character":2},"end":{"line":28,"character":3}},"selectionRange":{"start":{"line":11,"character":9},"end":{"line":11,"character":14}}}]},{"name":"MyHomePage","kind":5,"deprecated":false,"range":{"start":{"line":31,"character":0},"end":{"line":47,"character":1}},"selectionRange":{"start":{"line":31,"character":6},"end":{"line":31,"character":16}},"children":[{"name":"MyHomePage","detail":"({Key? key, required this.title})","kind":9,"deprecated":false,"range":{"start":{"line":32,"character":2},"end":{"line":32,"character":70}},"selectionRange":{"start":{"line":32,"character":8},"end":{"line":32,"character":18}}},{"name":"title","kind":8,"deprecated":false,"range":{"start":{"line":43,"character":15},"end":{"line":43,"character":20}},"selectionRange":{"start":{"line":43,"character":15},"end":{"line":43,"character":20}}},{"name":"createState","detail":"()","kind":6,"deprecated":false,"range":{"start":{"line":46,"character":2},"end":{"line":46,"character":56}},"selectionRange":{"start":{"line":46,"character":20},"end":{"line":46,"character":31}}}]},{"name":"_MyHomePageState","kind":5,"deprecated":false,"…
[9:57:36 a. m.] [Analyzer] [Info] ==> Content-Length: 216
[9:57:36 a. m.] [Analyzer] [Info] ==> {"jsonrpc":"2.0","id":25,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///e%3A/projects/test_application/lib/main.dart"},"position":{"line":79,"character":19}},"clientRequestTime":1656514656495}
[9:57:36 a. m.] [Analyzer] [Info] <== Content-Length: 39
Content-Type: application/vscode-jsonrpc; charset=utf-8
[9:57:36 a. m.] [Analyzer] [Info] <== {"id":25,"jsonrpc":"2.0","result":null}
[9:57:36 a. m.] [Analyzer] [Info] ==> Content-Length: 1829
[9:57:36 a. m.] [Analyzer] [Info] ==> {"jsonrpc":"2.0","id":26,"method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///e%3A/projects/test_application/lib/main.dart"},"range":{"start":{"line":77,"character":13},"end":{"line":108,"character":7}},"context":{"diagnostics":[{"range":{"start":{"line":77,"character":12},"end":{"line":77,"character":13}},"message":"Undefined name '$'.\nTry correcting the name to one that is defined, or defining the name.","code":"undefined_identifier","codeDescription":{"href":"file:///diagnostics/undefined_identifier"},"severity":1,"source":"dart"},{"range":{"start":{"line":77,"character":13},"end":{"line":108,"character":7}},"message":"Positional arguments must occur before named arguments.\nTry moving all of the positional arguments before the named arguments.","code":"positional_after_named_argument","severity":1,"source":"dart"},{"range":{"start":{"line":77,"character":13},"end":{"line":77,"character":14}},"message":"Expected to find ','.","code":"expected_token","severity":1,"source":"dart"},{"range":{"start":{"line":77,"character":13},"end":{"line":108,"character":7}},"message":"Too many positional arguments: 0 expected, but 1 found.\nTry removing the extra positional arguments, or specifying the name for named arguments.","code":"extra_positional_arguments_could_be_named","codeDescription":{"href":"file:///diagnostics/extra_positional_arguments_could_be_named"},"severity":1,"source":"dart"},{"range":{"start":{"line":77,"character":13},"end":{"line":77,"character":23}},"message":"The expression doesn't evaluate to a function, so it can't be invoked.","code":"invocation_of_non_function_expression","codeDescription":{"href":"file:///diagnostics/invocation_of_non_function_expression"},"severity":1,"source":"dart"}],"only":["quickfix"],"triggerKind":1}},"clientRequestTime":1656514656665}
[9:57:36 a. m.] [Analyzer] [Info] <== Content-Length: 3926
Content-Type: application/vscode-jsonrpc; charset=utf-8
[9:57:36 a. m.] [Analyzer] [Info] <== {"id":26,"jsonrpc":"2.0","result":[{"title":"Create class '$'","kind":"quickfix.create.class","diagnostics":[{"range":{"start":{"line":77,"character":12},"end":{"line":77,"character":13}},"severity":1,"code":"undefined_identifier","codeDescription":{"href":"https://dart.dev/diagnostics/undefined_identifier"},"source":"dart","message":"Undefined name '$'.\nTry correcting the name to one that is defined, or defining the name."}],"edit":{"documentChanges":[{"textDocument":{"version":2,"uri":"file:///e:/projects/test_application/lib/main.dart"},"edits":[{"range":{"start":{"line":116,"character":1},"end":{"line":116,"character":1}},"newText":"\r\n\r\nclass $ {\r\n}"}]}]}},{"title":"Create getter '$'","kind":"quickfix.create.getter","diagnostics":[{"range":{"start":{"line":77,"character":12},"end":{"line":77,"character":13}},"severity":1,"code":"undefined_identifier","codeDescription":{"href":"https://dart.dev/diagnostics/undefined_identifier"},"source":"dart","message":"Undefined name '$'.\nTry correcting the name to one that is defined, or defining the name."}],"edit":{"documentChanges":[{"textDocument":{"version":2,"uri":"file:///e:/projects/test_application/lib/main.dart"},"edits":[{"range":{"start":{"line":50,"character":19},"end":{"line":50,"character":19}},"newText":"\r\n\r\n get $ => null;"}]}]}},{"title":"Create local variable '$'","kind":"quickfix.create.localVariable","diagnostics":[{"range":{"start":{"line":77,"character":12},"end":{"line":77,"character":13}},"severity":1,"code":"undefined_identifier","codeDescription":{"href":"https://dart.dev/diagnostics/undefined_identifier"},"source":"dart","message":"Undefined name '$'.\nTry correcting the name to one that is defined, or defining the name."}],"edit":{"documentChanges":[{"textDocument":{"version":2,"uri":"file:///e:/projects/test_application/lib/main.dart"},"edits":[{"range":{"start":{"line":71,"character":4},"end":{"line":71,"character":4}},"newText":"var $;\r\n "}]}]}},{"title":"Create mixin '$'"…
Wed Jun 29 2022 [09:57:40 GMT-0500 (hora estándar de Colombia)] Log file ended

Activity
[-]Wrap with widget [/-][+]Wrap with widget not working[/+]DanTup commentedon Jun 29, 2022
@jonorozcoc thanks for the log. It wasn't very revealing. Is it possible you could install this build of the extension which contains some additional logging?
.vsix.zipto just.vsix(GitHub won't let me attach.vsixextensions)F1)Then perform the same steps in #3956 (comment) to capture a log. This time it should include some additional info confirming the snippet rewriting is occurring.
Thanks!
jonatandorozco commentedon Jun 29, 2022
Yes. I'll do it real quick
jonatandorozco commentedon Jun 29, 2022
jonatandorozco commentedon Jun 29, 2022
let me know if I can help with something else @DanTup
DanTup commentedon Jun 29, 2022
@jonorozcoc thanks! That got me a little closer, I think I know where the issue is, but still not clear why. When you have a moment is it possible you could do the same with this one? It adds some additional logging that will hopefully give me enough info to either understand the issue or reproduce it locally.
dart-code-3.44.0-alpha.2.vsix.zip
Thanks!
jonatandorozco commentedon Jun 29, 2022
Yes, give me a second to do it
jonatandorozco commentedon Jun 29, 2022
DanTup commentedon Jun 29, 2022
@jonorozcoc thanks! I think I have an idea what's up now (and I think it's Windows-specific, relating to mismatched casing of drive letters).
Could you possibly capture one more log so I can confirm, then I can work on a fix. Thanks :)
dart-code-3.44.0-alpha.3.vsix.zip
jonatandorozco commentedon Jun 29, 2022
No issue. Give me a second
jonatandorozco commentedon Jun 29, 2022
DanTup commentedon Jun 29, 2022
@jonorozcoc thank you! I was able to track down the issue.. It was with the encoding of the colons in a
file:///c:/fooURI on Windows which caused a mismatch (and it didn't show up on macOS because there are no drive letters).I've fixed it and pushed a new pre-release version (v3.43.20220629 - note the
29on the end, yesterdays release ended28). It might take a little while to show up in VS Code (there's a lot of caching), but if you could try switching back from the debug builds to that (you may need to uninstall and reinstall, I'm not sure if VS Code makes it easy to switch from a local vsix to the marketplace version). Once you have, be sure to set both back to the Pre-Release versions:I only published the Dart extension, so the Flutter pre-release one will be an older version number, that's fine.
Please let me know if you still see the issue after installing Dart extension v3.43.20220629 and reloading VS Code.
Thanks!
jonatandorozco commentedon Jun 29, 2022
Will do! @DanTup thanks for your help
I'll let you know if I can download the latest release and if the issue gets fixed in the new one
jonatandorozco commentedon Jun 29, 2022
Fixed @DanTup 🥳 🎉
DanTup commentedon Jun 29, 2022
Excellent - thank you for your patience and help tracking it down!
Fix path mismatch parsing Snippets on Windows due to escaped colon in…