AndreHaueisen / flushbar

Custom widget for Flutter
Other
1.01k stars 172 forks source link

Flushbar mainButton with 100% height #164

Open Matej-Hlatky opened 3 years ago

Matej-Hlatky commented 3 years ago

Hello, When trying to make mainButton that occupy 100% Flushbar height, can't do it since it is unbounded and we don't have control over parent Row returned by _generateFlushbar() / _generateInputFlushbar() function.

I came to these possibilities:

  1. Update _generate*Flushbar() functions and wrap Row with IntrinsicHeight according to this SO post or implement different approach, that will allow us to get the size in mainButton.
  2. Provide custom builder as new parameter to build the entire Flushbar UI. So yeah, if defined, it will just ignore the title, message, titleText, messageText and other visual content related attributes.

Other option is to just use GlobalKey on our widgets and set the size in WidgetsBinding.instance.addPostFrameCallback(...), but this is nasty workaround.