Skip to content

Visibility

Use the invisible utility to hide an element but still maintain its place in the document, affecting the layout of other elements. Flutter maps this to Visibility(visible: false, maintainSize: true).

Style('grid grid-cols-3 gap-4', children: [
Text('01'),
Style('invisible ...', child: Text('02')),
Text('03'),
])

To completely remove an element from the document, use the hidden utility instead (maps to Offstage).

CSS collapse is meaningful only on <table> rows and columns. Flutter has no equivalent table-row collapse semantic, so collapse is aliased to invisible — space is reserved. If you need real row elision in a Flutter Table, omit the TableRow from the children list directly.

Style('grid grid-cols-3 gap-4', children: [
Text('01'),
Style('collapse ...', child: Text('02')),
Text('03'),
])

Use the visible utility to make an element visible. Most useful for undoing invisible at different screen sizes via responsive variants.

Style('grid grid-cols-3 gap-4', children: [
Text('01'),
Style('visible ...', child: Text('02')),
Text('03'),
])
ClassFlutterNotes
visibleVisibility(visible: true, maintainSize: true)Or no wrap when standalone
invisibleVisibility(visible: false, maintainSize: true)Space preserved
collapsealias of invisibleFlutter has no table-row collapse semantic