Skip to content

Commit 1d5c2c2

Browse files
scheglovCommit Queue
authored andcommitted
Elements. Migrate FlutterWrapStreamBuilder.
Change-Id: I8109a541efdadaa14372101ecf9f5118ff3e0b0a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/389580 Reviewed-by: Phil Quitslund <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]>
1 parent 19707bd commit 1d5c2c2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pkg/analysis_server/analyzer_use_new_elements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@ lib/src/services/correction/dart/flutter_swap_with_child.dart
326326
lib/src/services/correction/dart/flutter_swap_with_parent.dart
327327
lib/src/services/correction/dart/flutter_wrap_builder.dart
328328
lib/src/services/correction/dart/flutter_wrap_generic.dart
329+
lib/src/services/correction/dart/flutter_wrap_stream_builder.dart
329330
lib/src/services/correction/dart/ignore_diagnostic.dart
330331
lib/src/services/correction/dart/import_add_show.dart
331332
lib/src/services/correction/dart/inline_invocation.dart

pkg/analysis_server/lib/src/services/correction/dart/flutter_wrap_stream_builder.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ class FlutterWrapStreamBuilder extends ResolvedCorrectionProducer {
3333
var widgetSrc = utils.getNodeText(widgetExpr);
3434

3535
var streamBuilderElement =
36-
await sessionHelper.getFlutterClass('StreamBuilder');
36+
await sessionHelper.getFlutterClass2('StreamBuilder');
3737
if (streamBuilderElement == null) {
3838
return;
3939
}
4040

4141
await builder.addDartFileEdit(file, (builder) {
4242
builder.addReplacement(range.node(widgetExpr), (builder) {
43-
builder.writeReference(streamBuilderElement);
43+
builder.writeReference2(streamBuilderElement);
4444

4545
builder.write('<');
4646
builder.addSimpleLinkedEdit('type', 'Object');

0 commit comments

Comments
 (0)