Skip to content

Fix typo in learning path#13413

Closed
rpitting wants to merge 1 commit into
flutter:mainfrom
rpitting:patch-1
Closed

Fix typo in learning path#13413
rpitting wants to merge 1 commit into
flutter:mainfrom
rpitting:patch-1

Conversation

@rpitting
Copy link
Copy Markdown

Fix typo in step 2 code sample

@rpitting rpitting requested review from a team and sfshaza2 as code owners May 20, 2026 12:24
@google-cla
Copy link
Copy Markdown

google-cla Bot commented May 20, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates a Dart code snippet in the navigation tutorial documentation. A syntax error was introduced by replacing a comma with a semicolon in a constructor call, and the reviewer has provided a suggestion to fix it.

title: list.title,
builder: (context) => ContactListsPage(listId: list.id),
),
);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Replacing the comma with a semicolon here introduces a syntax error in the Dart code snippet. The CupertinoPageRoute constructor is being passed as an argument to the push method, so it should be followed by a comma (or nothing if it's the last argument), not a semicolon.

Suggested change
);
),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems correct. It's not the end of a statement so it can't be a semicolon (;).

Copy link
Copy Markdown
Member

@parlough parlough left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! However, it seems the original code being a comma seems correct. Changing it to a semicolon will result in an error.

Could you provide some details on what issue you were hitting that prompted this change? Thanks!

title: list.title,
builder: (context) => ContactListsPage(listId: list.id),
),
);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems correct. It's not the end of a statement so it can't be a semicolon (;).

@rpitting
Copy link
Copy Markdown
Author

Could you provide some details on what issue you were hitting that prompted this change? Thanks!

The app won't compile:

flutter run -d chrome
Launching lib/main.dart on Chrome in debug mode...
lib/screens/contact_groups.dart:18:9: Error: Expected ';' after this.
        ),
        ^
lib/screens/contact_groups.dart:18:10: Error: Expected an identifier, but got ','.
Try inserting an identifier before ','.
        ),
         ^
lib/screens/contact_groups.dart:18:10: Error: Unexpected token ';'.
        ),
         ^
Waiting for connection from debug service on Chrome...              5,3s
Failed to compile application.

When I change it to a semicolon it works just fine.

Using the followin setup:

Flutter 3.41.7 • channel stable • https://github.com/flutter/flutter.git
Framework • revision cc0734ac71 (vor 6 Wochen) • 2026-04-15 21:21:08 -0700
Engine • hash 7a53c052bc4b472cf780b199087e1368e4a9aa8c (revision 59aa584fdf) (1 months ago) • 2026-04-16 02:32:16.000Z
Tools • Dart 3.11.5 • DevTools 2.54.2

@sfshaza2
Copy link
Copy Markdown
Contributor

Closing PR.

@sfshaza2 sfshaza2 closed this May 28, 2026
@rpitting
Copy link
Copy Markdown
Author

Closing PR.

Can you tell me a reason why you closed the PR? I provided more details and the compile error with the sample code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants