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

OverlayEntry error #271

Closed
Seferi opened this issue Sep 14, 2022 · 9 comments
Closed

OverlayEntry error #271

Seferi opened this issue Sep 14, 2022 · 9 comments

Comments

@Seferi
Copy link

Seferi commented Sep 14, 2022

Hi there, thanks for the great package first of all. I really appreciate it. I'm using it on a contacts page, one of the speedDialChild removes a contact and rebuilds the page. I'm getting this error upon clicking delete contact SpeedDialChild:

An OverlayEntry must first be removed from the Overlay before dispose is called.

I appreciate if you could help. thanks in advance.

@AndreHaueisen
Copy link

It happens if a route gets dismissed while the button is open.

Screen Shot 2022-09-17 at 10 21 30

@AndreHaueisen
Copy link

Sorry I don't have time to open a PR, but if we add
overlayEntry?.remove() on line 222 we fix the problem.

Screen Shot 2022-09-17 at 10 28 16

@Seferi
Copy link
Author

Seferi commented Sep 18, 2022

Thanks mate. @darioielardi Can we add this or should I do a PR ?

@prateekmedia
Copy link
Collaborator

@Seferi Already done.
@luca-colazzo Can you do a new release?

@Seferi
Copy link
Author

Seferi commented Oct 6, 2022

Still getting the same exception after the latest update..

@Grrravity
Copy link

Grrravity commented Oct 6, 2022

@Seferi have you tried flutter pub cache repair?
You may have cache issue cause it seems like the fix worked out for me ^^

@kreativityapps
Copy link

For me with the new version the overlayEntry?.remove(); part throws because _overlay is null inside remove().
In my case I'm closing the page where the SpeedDial is, maybe that causes it.
I think inside the remove() method instead of the assert if (_overlay == null) return; would be more forgiving.

@mkieres
Copy link

mkieres commented Oct 8, 2022

I've noticed similar problem when popping a route, even after dismissing/closing the dial/overlay. I'm getting the following error:

════════ Exception caught by widgets library ═══════════════════════════════════
'package:flutter/src/widgets/overlay.dart': Failed assertion: line 147 pos 12: '_overlay != null': is not true.
package:flutter/…/widgets/overlay.dart:147
════════════════════════════════════════════════════════════════════════════════

flutter_speed_dial: ^6.1.0+1
flutter: 3.0.5

EDIT: Downgrade to version 6.0.0 fixes the issue

@ffamar
Copy link

ffamar commented Oct 11, 2022

I have the same issue with version ^6.1.0+1 and flutter 3.0.5 when I push a route.

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

7 participants