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 building with flutter 1.14.6 #113

Closed
ahmaducg opened this issue Feb 6, 2020 · 26 comments
Closed

Error building with flutter 1.14.6 #113

ahmaducg opened this issue Feb 6, 2020 · 26 comments

Comments

@ahmaducg
Copy link

ahmaducg commented Feb 6, 2020

Compiler message:
../../Flutter_SDK/.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) {
       ^
../../Flutter_SDK/packages/flutter/lib/src/widgets/routes.dart:40:8: Context: This is the overridden method ('install').
  void install() {
       ^
../../Flutter_SDK/.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);
                 ^
@thevinou
Copy link

thevinou commented Feb 6, 2020

Same error here, after flutter upgrade.

A fix would be very welcome.

Thanks

@FabioWolfen
Copy link

Edit
flushbar-1.9.1/lib/flushbar_route.dart

Line 273
void install() {

And line 281
super.install();

@ThinkDigitalSoftware
Copy link

This is happening because the newest flutter version changed the function signature for the OverlayRoute.install method.

 @override
  void install() {
    assert(_overlayEntries.isEmpty);
    _overlayEntries.addAll(createOverlayEntries());
    super.install();

@MarioMoraes
Copy link

Find the file flushbar-1.9.1/lib/flushbar_route.dart??

@Promise4235
Copy link

Greeting all,

I'm having the same issue, does anyone have a working solution.

Thanks.

@ThinkDigitalSoftware
Copy link

ThinkDigitalSoftware commented Feb 17, 2020 via email

@Giuliano-Stravini
Copy link

Giuliano-Stravini commented Feb 17, 2020

If you don't want downgrade, just edit flushbar_route.dart like @FabioWolfen commented above

Edit
flushbar-1.9.1/lib/flushbar_route.dart

Line 273
void install() {

And line 281
super.install();

This file is inside of your flutter path
"%YOURFLUTTERPATH% .pub-cache\hosted\pub.dartlang.org\flushbar-1.9.1\lib\flushbar_route.dart"

Works fine to me, while don't have update in the package

@Giuliano-Stravini
Copy link

I was browsing the issues and i found this #110 . It's the same problem.

@valterh4ck3r did a fork of package with this "correction".
To use it, just put in your pubspec.yaml

  flushbar:
    git:
      url: git://github.com/valterh4ck3r/flushbar
      ref: master

By the way, already have merged in master this change in this package, but wasn't released a version (PR #111 )

@sjghose
Copy link

sjghose commented Mar 15, 2020

Is broken on Flutter 1.15..22-pre.24 used the git referenced version and compiled like a charm. Thank you.

@djpnewton
Copy link

fix is committed but not released, try importing like so:

flushbar:
   git:
     url: https://github.com/AndreHaueisen/flushbar.git
     ref: 13c55a8

@Kav47
Copy link

Kav47 commented Mar 19, 2020

fix is committed but not released, try importing like so:

flushbar:
   git:
     url: https://github.com/AndreHaueisen/flushbar.git
     ref: 13c55a8

Thank you! This works.
getting the same error on beta channel, 1.15.17.

@MarcoNPZ
Copy link

fix is committed but not released, try importing like so:

flushbar:
   git:
     url: https://github.com/AndreHaueisen/flushbar.git
     ref: 13c55a8

This doesn't work for me, unfortunately. I added it exactly like this to the end of pubspec.yaml :(

@Kav47
Copy link

Kav47 commented Mar 19, 2020

try flutter clean, then pub get.

@Kav47
Copy link

Kav47 commented Mar 19, 2020

Okay, so I guess the 'stable' channel have some issues with this. Switching to 'beta' or 'dev' solves this problem.

flutter channel dev at the moment beta have some issue with the dropdownButton.
flutter upgrade

then

flushbar:
   git:
     url: https://github.com/AndreHaueisen/flushbar.git
     ref: 13c55a8

copy the above bit in your pubspec.yaml instead of flushbar: xxxxx

@Selecao
Copy link

Selecao commented Mar 26, 2020

Okay, so I guess the 'stable' channel have some issues with this. Switching to 'beta' or 'dev' solves this problem.

flutter channel dev at the moment beta have some issue with the dropdownButton.
flutter upgrade

then

flushbar:
   git:
     url: https://github.com/AndreHaueisen/flushbar.git
     ref: 13c55a8

copy the above bit in your pubspec.yaml instead of flushbar: xxxxx

Absolutely working. 'stable' channel still have issues, but 'dev' work perfect.

@Faiyyaz
Copy link

Faiyyaz commented Mar 28, 2020

Even i am getting the same error with flushbar: ^1.10.0 this version on flutter v1.12.13

@AndreHaueisen
Copy link
Owner

Fix was release in version 1.10.
Please, read the changelog before using this version.

@vedantrathore
Copy link

@AndreHaueisen I have version 1.10 of the flushbar library as mentioned in my pubspec.yaml file

dependencies:
  flutter:
    sdk: flutter
  provider: ^4.0.4
  flushbar: ^1.10.0

I'm still getting this error while running the build

Compiler message:
../../../tools/flutter/.pub-cache/hosted/pub.dartlang.org/flushbar-1.10.0/lib/flushbar_route.dart:303:8: Error: The method 'FlushbarRoute.install' has fewer positional arguments than those of overridden method 'OverlayRoute.install'.
  void install() {
       ^
../../../tools/flutter/packages/flutter/lib/src/widgets/routes.dart:41:8: Context: This is the overridden method ('install').
  void install(OverlayEntry insertionPoint) {
       ^
../../../tools/flutter/.pub-cache/hosted/pub.dartlang.org/flushbar-1.10.0/lib/flushbar_route.dart:311:18: Error: Too few positional arguments: 1 required, 0 given.
    super.install();
                 ^
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
Failed to build bundle.
Error launching application on iPhone 11 Pro Max

Any specific reason why this it's still giving me an error after the fix has been incorporated in the v1.10? Do correct me if I'm missing something here.

@AndreHaueisen
Copy link
Owner

You are using flutter stable version. Use the beta one or go to flushbar 1.9. I explained it in the changelog

@guihackmann
Copy link

I tried both beta version and 1.9m ,and still have the issue.

Also, I don't understand one of the suggested things (below). What is to be edited (from what to what)?

"flushbar-1.9.1/lib/flushbar_route.dart

Line 273
void install() {

And line 281
super.install();"

@jogapps
Copy link

jogapps commented Apr 11, 2020

The package is still not working. I've tried both github, and pub.dev package. Its yet to work. Fix this package please, a lot of projects depend on this package

@tusharchetan
Copy link

Same problem with me since the day I changed my flutter channel from stable to beta and then master. It worked for me when i again changed my channel to stable and then used "Flutter Upgrade".
Hope this works for you too

@jogapps
Copy link

jogapps commented Apr 12, 2020

It finally worked. I used 1.9.1 without the caret sign ^

@rafiqulislam21
Copy link

This works for me:
#110 (comment)

@lordzyx
Copy link

lordzyx commented May 8, 2020

This works for me:
#110 (comment)

YES! You saved me.

Remove ^ from ^1.9.1 -
Only 1.9.1 it's working for me

@iPatel007
Copy link

Found the solution.

In the project you ,

External Libraries -> Dart Packages -> flushbar-version -> flushbar_route.dart

There is line at 316

@override
  void install() {....

change

@override
  void install(OverlayEntry insertionPoint) { .....

and before end the function at the line 326

  super.install();
}

change

  super.install(insertionPoint);
}

That's it!

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