Skip to content
New issue

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

Error: The method 'FlushbarRoute.install' has more required arguments than those of overridden method 'OverlayRoute.install'. #117

Closed
anasmuhamad98 opened this issue Mar 20, 2020 · 8 comments

Comments

@anasmuhamad98
Copy link

flutter run
Using hardware rendering with device sdk gphone x86. If you get graphics artifacts, consider enabling software rendering with "--enable-software-rendering".
Launching lib\main.dart on sdk gphone x86 in debug mode...
Running Gradle task 'assembleDebug'...

Compiler message:

../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/flushbar-1.9.1/lib/flushbar_route.dart:273:8: Error: The method 'FlushbarRoute.install' has more required
arguments than those of overridden method 'OverlayRoute.install'.

void install(OverlayEntry insertionPoint) {

   ^

/C:/flutter/packages/flutter/lib/src/widgets/routes.dart:40:8: Context: This is the overridden method ('install').

void install() {

   ^

../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/flushbar-1.9.1/lib/flushbar_route.dart:281:18: Error: Too many positional arguments: 0 allowed, but 1 found.

Try removing the extra positional arguments.

super.install(insertionPoint);

             ^

FAILURE: Build failed with an exception.

  • What went wrong:

A problem was found with the configuration of task ':app:compileFlutterBuildDebug'.

Cannot write to file 'C:\Users\anasmuhamad98\AndroidStudioProjects\umtouch' specified for property 'outputFiles' as it is a directory.

  • 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.

BUILD FAILED in 45s
Running Gradle task 'assembleDebug'... 48.7s
Exception: Gradle task assembleDebug failed with exit code 1

@motrieux-thomas
Copy link

Hi, this is a recent issue that appeared with the latest version of flutter.
The signature of the install method has been changed.

SOLUTION :
Downgrade your version (stable ?)
OR
Edit the flushbar's files : "flushbar-1.9.1/lib/flushbar_route.dart"

Line 273
void install() {

Line 281
super.install();

Have a nice day :)

@aburcheri
Copy link

Have the same problem, will it be fixed or what has to be done? With

flushbar:
git:
url: https://github.com/AndreHaueisen/flushbar.git
ref: 13c55a8
it works on Android but not on IOS

@jakobkuehne
Copy link

jakobkuehne commented Mar 22, 2020

On any device with the current Flutter Beta (required for Flutter Web?) the error occurs. Not with the latest Flutter Stable version. I hope it will be fixed soon.

Thank you thomasmot for the temporary fix. Works perfectly, but of course can't be a solution forever.

@crtl
Copy link

crtl commented Mar 24, 2020

# pubspec.yaml
flushbar:
    git:
      url: https://github.com/AndreHaueisen/flushbar
      ref: master

works.

@IFang5
Copy link

IFang5 commented Mar 27, 2020

In my case the suggested edit to pubspec.yaml caused a version collision with one of the dependencies.
I just added a reference to a stable old version of flushbar in the dependencies section in pubspec.yaml

dependencies:
flushbar: 1.9.1

@anasmuhamad98
Copy link
Author

Thank you all

@omar-khaium
Copy link

try flushbar: 1.6.0
It workes for me. Also, check the changelogs for the compatible version for you.

@biklas7
Copy link

biklas7 commented Mar 30, 2020

try flushbar: 1.6.0
It workes for me. Also, check the changelogs for the compatible version for you.

This was fixed on the latest version 1.10.0. Check the changelog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants