0

I have error when i try to run flutter app using Get:

Running Gradle task 'assembleDebug'...
../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/get-4.6.1/lib/get_navigation/src/root/get_cupertino_app.dart:252:17: Error: No named parameter with the name 'useInheritedMediaQuery'.
                useInheritedMediaQuery: useInheritedMediaQuery,
                ^^^^^^^^^^^^^^^^^^^^^^
/E:/fluttersdk/flutter/packages/flutter/lib/src/cupertino/app.dart:188:9: Context: Found this candidate, but the arguments don't match.
  const CupertinoApp.router({
        ^^^^^^^^^^^^^^^^^^^
../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/get-4.6.1/lib/get_navigation/src/root/get_cupertino_app.dart:292:17: Error: No named parameter with the name 'useInheritedMediaQuery'.
                useInheritedMediaQuery: useInheritedMediaQuery,
                ^^^^^^^^^^^^^^^^^^^^^^
E:/fluttersdk/flutter/packages/flutter/lib/src/cupertino/app.dart:144:9: Context: Found this candidate, but the arguments don't match.
  const CupertinoApp({
        ^^^^^^^^^^^^
../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/get-4.6.1/lib/get_navigation/src/root/get_material_app.dart:275:17: Error: No named parameter with the name 'useInheritedMediaQuery'.
                useInheritedMediaQuery: useInheritedMediaQuery,
                ^^^^^^^^^^^^^^^^^^^^^^
/E:/fluttersdk/flutter/packages/flutter/lib/src/material/app.dart:219:9: Context: Found this candidate, but the arguments don't match.
  const MaterialApp.router({
        ^^^^^^^^^^^^^^^^^^
../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/get-4.6.1/lib/get_navigation/src/root/get_material_app.dart:322:17: Error: No named parameter with the name 'useInheritedMediaQuery'.
                useInheritedMediaQuery: useInheritedMediaQuery,
                ^^^^^^^^^^^^^^^^^^^^^^
/E:/fluttersdk/flutter/packages/flutter/lib/src/material/app.dart:168:9: Context: Found this candidate, but the arguments don't match.
  const MaterialApp({
        ^^^^^^^^^^^


FAILURE: Build failed with an exception.

* Where:
Script 'E:\fluttersdk\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1052

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'E:\fluttersdk\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 12s
Exception: Gradle task assembleDebug failed with exit code 1

Does anyone know how to fix this? I looked at similar topics and tried the tips from them - nothing helped. Main widget wrap with GetMaterialApp:

void main() => runApp(GetMaterialApp(home: MainScreen()));
2
  • Did you change your MaterialApp to GetMaterialApp? Commented Feb 1, 2022 at 12:44
  • please provide your MaterialWidget code snippet. Commented Feb 1, 2022 at 12:46

2 Answers 2

1

I hv same issue. I solved by reducing GetX version into :

#In pubspec.yaml use get package like below :

get: 4.5.1

Others try solution use this way: (But This doesn't work for me)

#In pubspec.yaml use get package like below :

get: 4.6.1
#remove ^ symbol
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks! version reduction to 4.5.1 helped me
0

Use Getx Latest Version :

dependencies:
  get: ^4.6.1

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.