| Index: pkg/analysis_server/lib/src/services/correction/flutter_util.dart
|
| diff --git a/pkg/analysis_server/lib/src/services/correction/flutter_util.dart b/pkg/analysis_server/lib/src/services/correction/flutter_util.dart
|
| index 469263e4c89616314c03992c09108a549c75b7ce..3f866b107802c28da6299ae14843dbc1ccfe129c 100644
|
| --- a/pkg/analysis_server/lib/src/services/correction/flutter_util.dart
|
| +++ b/pkg/analysis_server/lib/src/services/correction/flutter_util.dart
|
| @@ -7,6 +7,7 @@ library services.src.correction.flutter_util;
|
| import 'package:analyzer/dart/ast/ast.dart';
|
| import 'package:analyzer/dart/element/element.dart';
|
| import 'package:analyzer/dart/element/type.dart';
|
| +import 'package:analyzer/src/generated/source.dart';
|
|
|
| const _FLUTTER_WIDGET_NAME = "Widget";
|
| const _FLUTTER_WIDGET_URI = "package:flutter/src/widgets/framework.dart";
|
| @@ -22,7 +23,6 @@ void convertFlutterChildToChildren(
|
| Function _addInsertEdit,
|
| Function _addRemoveEdit,
|
| Function _addReplaceEdit,
|
| - Function rangeStartLength,
|
| Function rangeNode) {
|
| int childLoc = namedExp.offset + 'child'.length;
|
| _addInsertEdit(childLoc, 'ren');
|
| @@ -44,7 +44,7 @@ void convertFlutterChildToChildren(
|
| String prefix = separator.contains(eol) ? "" : "$eol$indentNew";
|
| if (prefix.isEmpty) {
|
| _addInsertEdit(namedExp.offset + 'child:'.length, ' <Widget>[');
|
| - _addRemoveEdit(rangeStartLength(childArg.offset - 2, 2));
|
| + _addRemoveEdit(new SourceRange(childArg.offset - 2, 2));
|
| } else {
|
| _addInsertEdit(listLoc, '<Widget>[');
|
| }
|
|
|