I had my flutter app working fine but for some reason started getting multiple errors on compile. I then tired a new project with boiler plate code but it also throws the same bunch of errors. Any help would be great. I have tired upgrading and cleaning the project with no success.
flutter: The following _CompileTimeError was thrown building AppBar(dirty, state: _AppBarState#61196): flutter: 'package:flutter/src/material/app_bar.dart': error: line 399 pos 29: flutter: file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/app_bar.dart:399:29: flutter: Error: Too few positional arguments: 1 required, 0 given. flutter: leading = IconButton( flutter: ^ flutter: leading = IconButton( flutter: ^ flutter: Screen shot...
I am also getting this error form time to time:
Compiler message: file:///Users/UserName/Developer/flutter/packages/flutter/lib/src/material/icon_button.dart:87:20: Error: Duplicated parameter name 'icon'. @required this.icon, ^^^^ file:///Users/UserName/Developer/flutter/packages/flutter/lib/src/material/icon_button.dart:82:25: Context: Other parameter named 'icon'. const IconButton(Icon icon, { ^^^^ file:///Users/UserName/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:23: Error: Duplicated parameter name 'text'. Row(Text text, Text text, { ^^^^ file:///Users/UserName/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:12: Context: Other parameter named 'text'. .......

Could you try running the Dart: Capture Logs command from the VS Code command palette, make sure Flutter Run and Debugger (Observatory) are ticked, and then reproduce this issue. Then click Stop Logging and provide the log?
Thanks!
@bradmuzza Very strange - do you see this if you run from the terminal with flutter run too?
Could you try attaching the following files for me to review?
flutter run is much the same, this is the error :
Compiler message:
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/icon_button.dart:87:20:
Error: Duplicated parameter name 'icon'.
@required this.icon,
^^^^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/icon_button.dart:82:25:
Context: Other parameter named 'icon'.
const IconButton(Icon icon, {
^^^^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:23:
Error: Duplicated parameter name 'text'.
Row(Text text, Text text, {
^^^^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:12:
Context: Other parameter named 'text'.
Row(Text text, Text text, {
^^^^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/about.dart:288:10:
Error: Too few positional arguments: 2 required, 0 given.
Row(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:3:
Context: Found this candidate, but the arguments don't match.
Row(Text text, Text text, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/app_bar.dart:399:29:
Error: Too few positional arguments: 1 required, 0 given.
leading = IconButton(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/icon_button.dart:82:9:
Context: Found this candidate, but the arguments don't match.
const IconButton(Icon icon, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/app_bar.dart:441:20:
Error: Too few positional arguments: 2 required, 0 given.
actions = Row(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:3:
Context: Found this candidate, but the arguments don't match.
Row(Text text, Text text, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/app_bar.dart:447:27:
Error: Too few positional arguments: 1 required, 0 given.
actions = IconButton(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/icon_button.dart:82:9:
Context: Found this candidate, but the arguments don't match.
const IconButton(Icon icon, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/back_button.dart:86:22:
Error: Too few positional arguments: 1 required, 0 given.
return IconButton(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/icon_button.dart:82:9:
Context: Found this candidate, but the arguments don't match.
const IconButton(Icon icon, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/back_button.dart:120:22
: Error: Too few positional arguments: 1 required, 0 given.
return IconButton(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/icon_button.dart:82:9:
Context: Found this candidate, but the arguments don't match.
const IconButton(Icon icon, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.d
art:547:17: Error: Too few positional arguments: 2 required, 0 given.
child: Row(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:3:
Context: Found this candidate, but the arguments don't match.
Row(Text text, Text text, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/button_bar.dart:57:29:
Error: Too few positional arguments: 2 required, 0 given.
final Widget child = Row(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:3:
Context: Found this candidate, but the arguments don't match.
Row(Text text, Text text, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/data_table.dart:409:18:
Error: Too few positional arguments: 2 required, 0 given.
label = Row(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:3:
Context: Found this candidate, but the arguments don't match.
Row(Text text, Text text, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/data_table.dart:462:18:
Error: Too few positional arguments: 2 required, 0 given.
label = Row(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:3:
Context: Found this candidate, but the arguments don't match.
Row(Text text, Text text, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/date_picker.dart:684:34
: Error: Too few positional arguments: 1 required, 0 given.
child: IconButton(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/icon_button.dart:82:9:
Context: Found this candidate, but the arguments don't match.
const IconButton(Icon icon, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/date_picker.dart:699:34
: Error: Too few positional arguments: 1 required, 0 given.
child: IconButton(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/icon_button.dart:82:9:
Context: Found this candidate, but the arguments don't match.
const IconButton(Icon icon, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/date_picker.dart:1003:2
7: Error: Too few positional arguments: 2 required, 0 given.
child: Row(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:3:
Context: Found this candidate, but the arguments don't match.
Row(Text text, Text text, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/dropdown.dart:723:19:
Error: Too few positional arguments: 2 required, 0 given.
child: Row(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:3:
Context: Found this candidate, but the arguments don't match.
Row(Text text, Text text, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/expand_icon.dart:117:24
: Error: Too few positional arguments: 1 required, 0 given.
child: IconButton(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/icon_button.dart:82:9:
Context: Found this candidate, but the arguments don't match.
const IconButton(Icon icon, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/expansion_panel.dart:25
9:29: Error: Too few positional arguments: 2 required, 0 given.
final Row header = Row(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:3:
Context: Found this candidate, but the arguments don't match.
Row(Text text, Text text, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/flat_button.dart:201:20
: Error: Too few positional arguments: 2 required, 0 given.
child: Row(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:3:
Context: Found this candidate, but the arguments don't match.
Row(Text text, Text text, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/floating_action_button.
dart:113:21: Error: Too few positional arguments: 2 required, 0 given.
child: Row(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:3:
Context: Found this candidate, but the arguments don't match.
Row(Text text, Text text, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/grid_tile_bar.dart:127:
21: Error: Too few positional arguments: 2 required, 0 given.
child: Row(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:3:
Context: Found this candidate, but the arguments don't match.
Row(Text text, Text text, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/outline_button.dart:226
:20: Error: Too few positional arguments: 2 required, 0 given.
child: Row(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:3:
Context: Found this candidate, but the arguments don't match.
Row(Text text, Text text, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/paginated_data_table.da
rt:368:17: Error: Too few positional arguments: 1 required, 0 given.
IconButton(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/icon_button.dart:82:9:
Context: Found this candidate, but the arguments don't match.
const IconButton(Icon icon, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/paginated_data_table.da
rt:375:17: Error: Too few positional arguments: 1 required, 0 given.
IconButton(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/icon_button.dart:82:9:
Context: Found this candidate, but the arguments don't match.
const IconButton(Icon icon, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/paginated_data_table.da
rt:408:33: Error: Too few positional arguments: 2 required, 0 given.
child: Row(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:3:
Context: Found this candidate, but the arguments don't match.
Row(Text text, Text text, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/paginated_data_table.da
rt:440:29: Error: Too few positional arguments: 2 required, 0 given.
child: Row(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:3:
Context: Found this candidate, but the arguments don't match.
Row(Text text, Text text, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/popup_menu.dart:938:19:
Error: Too few positional arguments: 1 required, 0 given.
: IconButton(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/icon_button.dart:82:9:
Context: Found this candidate, but the arguments don't match.
const IconButton(Icon icon, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/raised_button.dart:220:
20: Error: Too few positional arguments: 2 required, 0 given.
child: Row(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:3:
Context: Found this candidate, but the arguments don't match.
Row(Text text, Text text, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/reorderable_list.dart:3
16:19: Error: Too few positional arguments: 2 required, 0 given.
return Row(children: children);
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:3:
Context: Found this candidate, but the arguments don't match.
Row(Text text, Text text, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/snack_bar.dart:238:17:
Error: Too few positional arguments: 2 required, 0 given.
child: Row(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:3:
Context: Found this candidate, but the arguments don't match.
Row(Text text, Text text, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/stepper.dart:401:19:
Error: Too few positional arguments: 2 required, 0 given.
child: Row(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:3:
Context: Found this candidate, but the arguments don't match.
Row(Text text, Text text, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/stepper.dart:502:17:
Error: Too few positional arguments: 2 required, 0 given.
child: Row(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:3:
Context: Found this candidate, but the arguments don't match.
Row(Text text, Text text, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/stepper.dart:611:21:
Error: Too few positional arguments: 2 required, 0 given.
child: Row(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:3:
Context: Found this candidate, but the arguments don't match.
Row(Text text, Text text, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/stepper.dart:647:23:
Error: Too few positional arguments: 2 required, 0 given.
child: Row(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:3:
Context: Found this candidate, but the arguments don't match.
Row(Text text, Text text, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/tabs.dart:1335:21:
Error: Too few positional arguments: 2 required, 0 given.
child: Row(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:3:
Context: Found this candidate, but the arguments don't match.
Row(Text text, Text text, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/text_selection.dart:54:
19: Error: Too few positional arguments: 2 required, 0 given.
child: Row(mainAxisSize: MainAxisSize.min, children: items)
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:3:
Context: Found this candidate, but the arguments don't match.
Row(Text text, Text text, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/time_picker.dart:1616:2
7: Error: Too few positional arguments: 2 required, 0 given.
child: Row(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:3:
Context: Found this candidate, but the arguments don't match.
Row(Text text, Text text, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/material/user_accounts_drawer_he
ader.dart:35:21: Error: Too few positional arguments: 2 required, 0 given.
child: Row(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:3:
Context: Found this candidate, but the arguments don't match.
Row(Text text, Text text, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/cupertino/bottom_tab_bar.dart:13
6:25: Error: Too few positional arguments: 2 required, 0 given.
child: Row(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:3:
Context: Found this candidate, but the arguments don't match.
Row(Text text, Text text, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/cupertino/date_picker.dart:1308:
19: Error: Too few positional arguments: 2 required, 0 given.
picker = Row(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:3:
Context: Found this candidate, but the arguments don't match.
Row(Text text, Text text, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/cupertino/date_picker.dart:1315:
19: Error: Too few positional arguments: 2 required, 0 given.
picker = Row(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:3:
Context: Found this candidate, but the arguments don't match.
Row(Text text, Text text, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/cupertino/date_picker.dart:1322:
19: Error: Too few positional arguments: 2 required, 0 given.
picker = Row(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:3:
Context: Found this candidate, but the arguments don't match.
Row(Text text, Text text, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/cupertino/nav_bar.dart:1238:23:
Error: Too few positional arguments: 2 required, 0 given.
child: Row(
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:3:
Context: Found this candidate, but the arguments don't match.
Row(Text text, Text text, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/cupertino/text_field.dart:631:19
: Error: Too few positional arguments: 2 required, 0 given.
return Row(children: rowChildren);
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:3:
Context: Found this candidate, but the arguments don't match.
Row(Text text, Text text, {
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/cupertino/text_selection.dart:11
9:23: Error: Too few positional arguments: 2 required, 0 given.
child: Row(mainAxisSize: MainAxisSize.min, children: items),
^
file:///Users/bradmurray/Developer/flutter/packages/flutter/lib/src/widgets/basic.dart:3726:3:
Context: Found this candidate, but the arguments don't match.
Row(Text text, Text text, {
^
Compiler failed on /Users/bradmurray/Desktop/Flutter OTB/orange_travel_buddv2/lib/main.dart
Error launching application on iPhone XR.
@bradmuzza There appears to be something wrong in your icon_button.dart file:

The left file is the one you attached - the IconButton class has a required icon parameter - but that doesn't exist in the v1.0 tagged version of flutter - as far as I can tell, the code hasn't ever looked like that. It seems like your local Flutter files may have somehow been modified.
How did you install Flutter? If you run git status in it or open in a Git client, does it show the file as modified? I think if you can revert your Flutter install I think it'll resolve the issues.
I followed these instructions-->https://flutter.io/docs/get-started/install/macos. It was working fine for a bit. It seem you are right because I get this:
On branch dev
Your branch is up to date with 'origin/dev'.
Changes not staged for commit:
(use "git add
(use "git checkout --
modified: packages/flutter/lib/src/material/icon_button.dart
modified: packages/flutter/lib/src/widgets/basic.dart
modified: packages/flutter/lib/src/widgets/text.dart
no changes added to commit (use "git add" and/or "git commit -a")
how do I rolled these changes back? Im very new to git
I believe git checkout -- . should revert you to the commit you're on. It's mentioned in the message you pasted, but it has ... because you can provide filenames. Be sure to run this only in the Flutter checkout, not your own project - you don't want to revert changes in your own code!
Please let me know if this solves the issue. Thanks!
Awesome, that worked. God knows how that happened. I had be going around in circles for days. Thank you very much
but now I'm getting this error.. any ideas
Error running Gradle:
ProcessException: Process "/Users/bradmurray/Developer/Flutter Projects/orangetravelbuddyflutter/android/gradlew" exited abnormally:
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
FAILURE: Build failed with an exception.
Could not resolve all artifacts for configuration ':classpath'.
rror running Gradle:
ProcessException: Process "/Users/bradmurray/Developer/Flutter Projects/orangetravelbuddyflutter/android/gradlew" exited abnormally:
FAILURE: Build failed with an exception.
Could not resolve all artifacts for configuration ':classpath'.
Could not find com.google.gms:google-services:3.2.1.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/google/gms/google-services/3.2.1/google-services-3.2.1.pom
- https://dl.google.com/dl/android/maven2/com/google/gms/google-services/3.2.1/google-services-3.2.1.jar
- https://jcenter.bintray.com/com/google/gms/google-services/3.2.1/google-services-3.2.1.pom
- https://jcenter.bintray.com/com/google/gms/google-services/3.2.1/google-services-3.2.1.jar
Required by:
project :
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 4s
Command: /Users/bradmurray/Developer/Flutter Projects/orangetravelbuddyflutter/android/gradlew app:properties
Please review your Gradle project setup in the android/ folder.
Awesome, that worked. God knows how that happened. I had be going around in circles for days.
Glad to hear! I'm not sure how it happened either, but if you see things like this again, do feel free to open issues so we can figure it out. Even if it was something you did - we should try to make it harder to end up in that situation.
I'm not sure about the Gradle issue - it's not something I know much about (since the Flutter tool handles all that). I would first try flutter clean and then rebooting (to ensure there are no old daemons hanging around) and if it persists, see if it happens in a brand new project (created with flutter create). If it does, open an issue in the Flutter issue tracker (or see if one already exists), and if it's fine in the new project, try diffing it's folder against yours to see if there's any obvious difference. If you haven't modified them, you may also want to try (after taking a copy!) deleting the ios and android folders from your project and run flutter create . from inside the folder to recreate them.
I think I worked out why this happen. When VScode uses intellisense and asks me to add the required parameters when they are missing from a widget. It is adding these parameters to my files on the SD not in my project. Not sure why or how to fix but thought it may be helpful for you to know
It is adding these parameters to my files on the SD not in my project.
Not sure what "the SD" is, but do you mean it's showing a quick-fix that goes and edits the Flutter source code?
Sorry Dan. That was a typo. “The SDK” the flutter SDK
@bradmuzza Thanks, seems obvious now! :-)
This seems like a server issue so I've opened https://github.com/dart-lang/sdk/issues/35402 about this. Thanks for the report!
Most helpful comment
I believe
git checkout -- .should revert you to the commit you're on. It's mentioned in the message you pasted, but it has...because you can provide filenames. Be sure to run this only in the Flutter checkout, not your own project - you don't want to revert changes in your own code!Please let me know if this solves the issue. Thanks!