cmdrootaccess / another-flushbar

A flexible widget for user notification. Customize your text, button, duration, animations and much more. For Android devs, it is made to replace Snackbars and Toasts.
https://pub.dev/packages/another_flushbar
MIT License
145 stars 90 forks source link

iOS Flushbar does not stay grounded at bottom of screen, even with "FlushbarStyle.GROUNDED". There is blank space where the iOS dismiss bar is located. #22

Closed mjacobsca closed 3 years ago

mjacobsca commented 3 years ago

iOS Flushbar does not stay grounded at bottom of screen, even with "FlushbarStyle.GROUNDED". There is blank space where the iOS dismiss bar is located. This only happens when I use "containers" as the widget instead of a Text widget.

NOTE: USING VERSION 1.10.11 BECAUSE WE ARE WAITING ON SOME OTHER PACKAGES TO BECOME NULL SAFE BEFORE UPGRADING OUR DART VERSION.

cmdrootaccess commented 3 years ago

will look at

mjacobsca commented 3 years ago

Awesome. Here's a preview of what happens.

image

mjacobsca commented 3 years ago

Here's on more. This one is WAY off. It works perfectly on Android.

flushbar_example_extra_spacing2

mjacobsca commented 3 years ago

Doing some more experimenting. I think what is happening is that the "safe area" (the dismiss bar area) is showing up below the widget as it pops up. I'd rather the widget have the option of grounding into the safe area. I can set the backgroundColor, but it's not great for all of my widgets to have a solid color at the bottom. For now, I'll choose black as the color. But the ideal solution is that FlushbarStyle.GROUNDED attaches the dialog to bottom (or top) of the screen regardless of safe area.

mjacobsca commented 3 years ago

Hello again. Not much response here. But what I ended up doing was making the safe area optional like below (it's what i needed for a clean experience - i'll leave it up to the widget to account for the bottom safe zone):

Material(... child: widget.messageText is Text ? SafeArea(...) : _getFlushbar()

I think possibly a better way to do this would be to add a "respectSafeArea" parameter. Then the code above would be: Material(... child: widget.respectSafeArea ? SafeArea(...) : _getFlushbar()