Error: The getter 'SystemMouseCursors' isn't defined for the class '_LegendItemState' - flutter

I'm using Flutter to code the frontend interface of my App but I got this problem. I don't get it, can you help me understand the error ?
The error :
../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_core-19.4.56/lib/src/legend/legend.dart:1329:21: Error: The getter 'SystemMouseCursors' isn't defined for the class '_LegendItemState'.
'_LegendItemState' is from 'package:syncfusion_flutter_core/src/legend/legend.dart' ('../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_core-19.4.56/lib/src/legend/legend.dart'). Try correcting the name to the name of an existing getter, or defining a getter or field named 'SystemMouseCursors'. cursor: SystemMouseCursors.click, ^^^^^^^^^^^^^^^^^^
FAILURE: Build failed with an exception.
Where: Script '/Users/macbookpro/Documents/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 991
What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'.
Process 'command '/Users/macbookpro/Documents/flutter/bin/flutter'' finished with non-zero exit value 1
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 20s Exception: Gradle task assembleDebug failed with exit code 1

Related

Flutter Error at runningError in new project Error: Couldn't find constructor 'StandardMessageCodec'

I had these errors didn't upgrade to the new version I even created a new project but I had the same error
^^^^^^^^^^^^^^^^^^^^
: Error: Couldn't find constructor 'StandardMessageCodec'.
../…/services/restoration.dart:326
final ByteData encoded = const StandardMessageCodec().encodeMessage(data)!;
^^^^^^^^^^^^^^^^^^^^
: Error: Couldn't find constructor 'StandardMessageCodec'.
../…/services/restoration.dart:1007
const StandardMessageCodec().encodeMessage(object);
^^^^^^^^^^^^^^^^^^^^
: Error: Couldn't find constructor 'StandardMessageCodec'.
../…/rendering/binding.dart:365
args != null ? const StandardMessageCodec().decodeMessage(args) : null,
^^^^^^^^^^^^^^^^^^^^
2
FAILURE: Build failed with an exception.
Where:
Script '/Users/abdjalildanane/development/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1159
What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
Process 'command '/Users/abdjalildanane/development/flutter/bin/flutter'' finished with non-zero exit value 1
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 21s
Exception: Gradle task assembleDebug failed with exit code 1

Flutter Run : FAILURE Build failed with an exception

Please help me. Since I cloned this project from git I always get the following error message
../../../AppData/Local/Pub/Cache/hosted/pub.dev/flutter_math_fork-0.5.0/lib/src/encoder/tex/functions/frac.dart:113:37: Error: The getter 'optionsDiff' isn't defined for the class 'GreenNode'.
- 'GreenNode' is from 'package:flutter_math_fork/src/ast/syntax_tree.dart' ('../../../AppData/Local/Pub/Cache/hosted/pub.dev/flutter_math_fork-0.5.0/lib/src/ast/syntax_tree.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'optionsDiff'.
final remainingOptions = node.optionsDiff.removeStyle();
^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/flutter_math_fork-0.5.0/lib/src/encoder/tex/functions/frac.dart:138:37: Error: The getter 'optionsDiff' isn't defined for the class 'GreenNode'.
- 'GreenNode' is from 'package:flutter_math_fork/src/ast/syntax_tree.dart' ('../../../AppData/Local/Pub/Cache/hosted/pub.dev/flutter_math_fork-0.5.0/lib/src/ast/syntax_tree.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'optionsDiff'.
final remainingOptions = node.optionsDiff.removeStyle();
^^^^^^^^^^^
Target kernel_snapshot failed: Exception
FAILURE: Build failed with an exception.
* Where:
Script 'C:\SRC\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1151
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDevDebug'.
> Process 'command 'C:\SRC\flutter\bin\flutter.bat'' finished with non-zero exit value 1
* 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 8s
Running Gradle task 'assembleDebug'... 9.6s
Exception: Gradle task assembleDebug failed with exit code 1
I have tried
flutter pub get
flutter clean
But still, get the error message above. I am getting error messages only in this project. if I do flutter run in another project it can run without problem.

Error: The getter 'hellawait' isn't defined for the class 'IOClient'

I created and run a location and weather based app. But when I closed the VS Code and try to reinstall the app, the following error occurred!.
How to remove the error!.
Launching lib\main.dart on Infinix X655C in debug mode...
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.13.4/lib/src/io_client.dart:35:34: Error: Expected ')' before this.
var ioRequest = (hellawait _inner!.openUrl(request.method, request.url))
^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.13.4/lib/src/io_client.dart:35:24: Error: The getter 'hellawait' isn't defined for the class 'IOClient'.
- 'IOClient' is from 'package:http/src/io_client.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.13.4/lib/src/io_client.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'hellawait'.
var ioRequest = (hellawait _inner!.openUrl(request.method, request.url))
^^^^^^^^^
FAILURE: Build failed with an exception.
* Where:
Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1005
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\flutter\bin\flutter.bat'' finished with non-zero exit value 1
* 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 50s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
I know its a bit ago, but
flutter pub cache repair
helped me

how to fix the below error after upgrading my flutter

/C:/Users/Funmi/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/isolate_bloc-1.0.4/lib/src/common/isolate/platform_channel/isolated_platform_channel_middleware.dart:29:25: Error: The method 'setMockMessageHandler' isn't defined for the class 'BinaryMessenger'.
'BinaryMessenger' is from 'package:flutter/src/services/binary_messenger.dart' ('/C:/Users/Funmi/flutter/packages/flutter/lib/src/services/binary_messenger.dart').
Try correcting the name to the name of an existing method, or defining a method named 'setMockMessageHandler'.
platformMessenger.setMockMessageHandler(channel, (message) {
^^^^^^^^^^^^^^^^^^^^^
FAILURE: Build failed with an exception.
Where:
Script 'C:\Users\Funmi\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1052
What went wrong:
Execution failed for task ':app:compileFlutterBuildRelease'.
Process 'command 'C:\Users\Funmi\flutter\bin\flutter.bat'' finished with non-zero exit value 1
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 39s
Running Gradle task 'assembleRelease'... 40.2s
Gradle task assembleRelease failed with exit code 1
Finished with error: Gradle task assembleRelease failed with exit code 1
check this website and apply it by order some values end of the implementation or classpath could be old , search and change compared to depracated.

I got an error named there is no attribute "BoxShadow". I have a code as follows:

179:22: Error: No named parameter with the name '#2'.
BoxShadow(
^^...
/C:/src/flutter/packages/flutter/lib/src/painting/box_shadow.dart:35:9: Context: Found this candidate, but the arguments don't match.
const BoxShadow({
^^^^^^^^^
FAILURE: Build failed with an exception.
Where:
Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 896
What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
Process 'command 'C:\src\flutter\bin\flutter.bat'' finished with non-zero exit value 1
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 34s
Exception: Gradle task assembleDebug failed with exit code 1