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

Using with map view #5

Closed
morad00 opened this issue Jul 30, 2018 · 6 comments
Closed

Using with map view #5

morad00 opened this issue Jul 30, 2018 · 6 comments

Comments

@morad00
Copy link

morad00 commented Jul 30, 2018

How can I use it with map_view ?
I need to show a flushbar always while the marker is moving (like google maps) ?

@AndreHaueisen
Copy link
Owner

Hi @morad00
Flushbar is not made for that use case. It is made for simple user notifications or inputs.
I recommend that you use the backdrop widget. Read this post to learn how to use it.

@morad00
Copy link
Author

morad00 commented Jul 30, 2018

I understand you but all I need only a basic Flushbar to show location address only, I don't need that backdrop one + I couldn't implement it inside map_view so I searching for anything to show this adderss

@AndreHaueisen
Copy link
Owner

AndreHaueisen commented Jul 31, 2018

Well @morad00 , I gave a superficial look at the map_view code. Looks like you could create an indefinite flushbar setting duration = null and update the text using a listener. Something like

mapView.onAnnotationDragEnd.listen((markerMap) {
      var marker = markerMap.keys.first;
      var location = markerMap[marker]; // The actual position of the marker after finishing the dragging.
      setState( () {
        flushbar.message = location;
      });
      
      print("Annotation ${marker.id} dragging ended");
    });

@morad00
Copy link
Author

morad00 commented Aug 1, 2018

@AndreHaueisen That's absolutely true, but unfortunately the main problem is that MapView.show() brings up an entire overlay screen, thus, Any Android/IOS view can't be as part of the flutter widget hierarchy. so the flushbar seems to be shown behind the map

@AndreHaueisen
Copy link
Owner

The way flushbar works is that it pushes a new route on top of everything when you call show(). The same way a Dialog works. It should be displayed on top of the MapView. I have no clue why it is not working.

@AndreHaueisen
Copy link
Owner

@morad00
Did you figure out a solution to the problem?

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

2 participants