Sometimes, I need to get the Widget? type but at the moment the Obx function must return a Widget type then when I want a Widget? type, I need to return an empty SizedBox widget or Wrap the Widget? with a Container widget.
Sometimes, the custom widget has a property with Widget? type. If the Obx function returns with an empty SizedBox widget (not null value). This custom widget will do something with this (like add space) and make this widget seem to have space.
Sometimes, I need to get the
Widget?
type but at the moment theObx
function must return aWidget
type then when I want aWidget?
type, I need to return an emptySizedBox
widget or Wrap theWidget?
with aContainer
widget.For example:
That is what I suggest.
Sometimes, the custom widget has a property with
Widget?
type. If theObx
function returns with an emptySizedBox
widget (notnull
value). This custom widget will do something with this (like add space) and make this widget seem to have space.