Currently, if no date is given, a SizedBox is rendered. Instead, a Text with an empty string should be rendered.
The difference is that an empty SizedBox has a height of 0 whereas the empty Text height corresponds to the line height of the text. This is a better suited placeholder as the height will always stay the same if there is or isn't a value present.
This fixes issues with the display of e.g. hintText when no label is given as it would otherwise result in different field sizes or when using outlined fields, the hintText would be misplaced.
Changed how empty values are displayed.
Currently, if no date is given, a
SizedBox
is rendered. Instead, aText
with an empty string should be rendered. The difference is that an emptySizedBox
has a height of 0 whereas the emptyText
height corresponds to the line height of the text. This is a better suited placeholder as the height will always stay the same if there is or isn't a value present.This fixes issues with the display of e.g.
hintText
when no label is given as it would otherwise result in different field sizes or when using outlined fields, the hintText would be misplaced.Before:
After: