rows_columns.dart

import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', theme: ThemeData( primarySwatch: Colors.blue, ), home: Scaffold( appBar: AppBar(title: Text('Rows & Columns')), body: RowsAndColumns(), ), ); } } class RowsAndColumns extends StatelessWidget { @override Widget build(BuildContext context) { return Padding( padding: const EdgeInsets.only(top: 100.0), child: 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)), ]), ), ); } }
Using rows and columns to create an asymmetric grid-like layout

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.