row orientation in flutter code example
Example 1: size row to maximum flutter
IntrinsicHeight(
child: Row(crossAxisAlignment: CrossAxisAlignment.stretch, children: [
Expanded(
child: Column(children: [
Container(height: 120.0, color: Colors.yellow),
Container(height: 100.0, color: Colors.cyan),
]),
),
Expanded(child: Container(color: Colors.amber)),
]),
Example 2: flutter display widget based on device orientation
build(BuildContext context) {
final isLandscape = MediaQuery.of(context).orientation ==
Orientation.landscape;
if (!isLandscape) txListWidget,
if (isLandscape)
_ternaryCondition ? _showFirstWidget : _showSecondWidget
}