Home > Back-end >  Flutter running problem Error: No named parameter with the name 'anchorPoint'
Flutter running problem Error: No named parameter with the name 'anchorPoint'

Time:06-07

I am facing issue when I try to run app on emulator or during creating apk file on flutter project. I tried to delete project, pub get, pub cache clean, deleted flutter folder and installed again. Nothing helps, it gives below error always.

/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_form_builder-7.2.1/lib/src/fields/form_builder_date_time_picker.dart:355:7: Error: No named parameter with the name 'anchorPoint'.
      anchorPoint: widget.anchorPoint,
      ^^^^^^^^^^^
/C:/src/flutter/packages/flutter/lib/src/material/date_picker.dart:133:19: Context: Found this candidate, but the arguments don't match.
Future<DateTime?> showDatePicker({
                  ^^^^^^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_form_builder-7.2.1/lib/src/fields/form_builder_date_time_picker.dart:373:7: Error: No named parameter with the name 'anchorPoint'.
      anchorPoint: widget.anchorPoint,
      ^^^^^^^^^^^
/C:/src/flutter/packages/flutter/lib/src/material/time_picker.dart:2413:20: Context: Found this candidate, but the arguments don't match.
Future<TimeOfDay?> showTimePicker({
                   ^^^^^^^^^^^^^^


FAILURE: Build failed with an exception.

* Where:
Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1102

* What went wrong:
Execution failed for task ':app:compileFlutterBuildAusgleichDebug'.
> Process 'command 'C:\src\flutter\bin\flutter.bat'' finished with non-zero exit value 1

my flutter doctor result

[√] Flutter (Channel stable, 2.10.0, on Microsoft Windows [Version 10.0.22000.675], locale de-DE)
[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[√] Chrome - develop for the web
[X] Visual Studio - develop for Windows
    X Visual Studio not installed; this is necessary for Windows development.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C  " workload, including all of its default components
[√] Android Studio (version 2021.1)
[!] Android Studio (version 2021.2)
    X Unable to determine bundled Java version.
[√] VS Code (version 1.63.0)
[√] Connected device (4 available)
[√] HTTP Host Availability

CodePudding user response:

you need to add jdk to JAVAHOME path in your environment varible you can add it from here https://mkyong.com/java/how-to-set-java_home-environment-variable-on-mac-os-x/#what-is-usrlibexecjava-home

and you can find the solution for you issue here Unable to find bundled Java version on Flutter

CodePudding user response:

Solved problem like this. I commented all anchorPoint in this widget. /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_form_builder-7.2.1/lib/src/fields/form_builder_date_time_picker.dart. It worked for me.

  • Related