Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:flutter/material.dart';
- void main() {
- runApp(MyApp());
- }
- class MyApp extends StatelessWidget {
- @override
- Widget build(BuildContext context) {
- return MaterialApp(
- debugShowCheckedModeBanner: false,
- home: Builder(
- builder: (context) => Scaffold(
- body: Column(
- children: [
- ConstrainedBox(
- constraints: BoxConstraints(
- maxHeight: MediaQuery.of(context).size.width,
- ),
- child: Expanded(child: Container(color: Colors.red.shade400)),
- ),
- Container(color: Colors.yellow.shade400, height: 100),
- Flexible(
- child: Container(color: Colors.green.shade400),
- ),
- Container(color: Colors.blue.shade400, height: 100),
- ],
- ),
- ),
- ),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement