Reputation: 64
I am starting flutter but I cannot figure out how to divide by 2 a column widget and make it fit all the screen as shown in the picture.
Upvotes: 2
Views: 6876
Reputation: 193
There you go
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Column(
children: <Widget>[
Expanded(child: Container(color: Colors.blue)),
Expanded(child: Container(color: Colors.lightBlueAccent))
],
);
}
}
How it is done:
Voila
Screenshot from emulator device
Upvotes: 5