Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 7dfcde1

Browse files
author
Clement Skau
authored
[Fix] Replaces call to deprecated method Name.name. (#21241)
1 parent faeff0a commit 7dfcde1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

flutter_frontend_server/lib/server.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ class ToStringVisitor extends RecursiveVisitor<void> {
224224
@override
225225
void visitProcedure(Procedure node) {
226226
if (
227-
node.name.name == 'toString' &&
227+
node.name.text == 'toString' &&
228228
node.enclosingClass != null &&
229229
node.enclosingLibrary != null &&
230230
!node.isStatic &&

flutter_frontend_server/test/to_string_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ void main(List<String> args) async {
194194
final ReturnStatement replacement = verify(body.replaceWith(captureAny)).captured.single as ReturnStatement;
195195
expect(replacement.expression, isA<SuperMethodInvocation>());
196196
final SuperMethodInvocation superMethodInvocation = replacement.expression as SuperMethodInvocation;
197-
expect(superMethodInvocation.name.name, 'toString');
197+
expect(superMethodInvocation.name.text, 'toString');
198198
}
199199

200200
test('ToStringVisitor replaces toString in specified libraries (dart:ui)', () {

0 commit comments

Comments
 (0)