We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Expected to find ')'."
VScode Copilot repeated error correction is invalid, Cursor repeated error correction is invalid.
MacBook Pro 15" Operating system: macOS Version: 15.1
What code was in the editor, if any, when the failure occurred? You can paste it in below:
String userInfo(String name, {String gender = 'unknown'}, [int age = 0]) { return 'Hi, $name, gender: $gender, age: $age'; }
Did DartPad print anything to the console pane? If so, paste it below:
parameters.dart:1:58: Error: Expected ')' before this. String userInfo(String name, {String gender = 'unknown'}, [int age = 0]) { ^ parameters.dart:2:45: Error: Undefined name 'age'. return 'Hi, $name, gender: $gender, age: $age';
If you were running Flutter code, you can also paste an image of the Flutter output directly into this bug report.
The text was updated successfully, but these errors were encountered:
@ubeing ,in dart ,positional optinal parameters ([]) and named optional parameters ({}) can't be mixed in the same parameter list.
([])
({})
Dart allow two kinds of optional parameters:
Named Optional Parameters: Enclosed in curly braces {} and usually assigned default values. Can be omitted during function calls by name.
Positional Optional Parameters: Enclosed in square brackets [] and ordered. Can be omitted during function calls by position
Sorry, something went wrong.
No branches or pull requests
What happened?
"Expected to find ')'."
Steps to reproduce problem
Additional info
VScode Copilot repeated error correction is invalid, Cursor repeated error correction is invalid.
Machine
MacBook Pro 15"
Operating system:
macOS
Version:
15.1
Your code
What code was in the editor, if any, when the failure occurred? You
can paste it in below:
DartPad's output
Did DartPad print anything to the console pane? If so, paste it below:
If you were running Flutter code, you can also paste an image of the
Flutter output directly into this bug report.
The text was updated successfully, but these errors were encountered: