SHARE
TWEET

Untitled

a guest Nov 19th, 2019 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import 'package:flutter/material.dart';
  2.  
  3. void main() => runApp(MyApp());
  4.  
  5. class MyApp extends StatelessWidget {
  6.   // This widget is the root of your application.
  7.   @override
  8.   Widget build(BuildContext context) {
  9.     return MaterialApp(
  10.       title: 'Flutter Demo',
  11.       theme: ThemeData(
  12.         primarySwatch: Colors.blue,
  13.       ),
  14.       home: MyHomePage(title: 'Flutter Demo Home Page'),
  15.     );
  16.   }
  17. }
  18.  
  19. class MyHomePage extends StatefulWidget {
  20.   MyHomePage({Key key, this.title}) : super(key: key);
  21.  
  22.   final String title;
  23.  
  24.   @override
  25.   _MyHomePageState createState() => _MyHomePageState();
  26. }
  27.  
  28. class _MyHomePageState extends State<MyHomePage> {
  29.   @override
  30.   Widget build(BuildContext context) {
  31.     return Scaffold(
  32.       appBar: AppBar(
  33.         title: Text(widget.title),
  34.       ),
  35.       body: Column(
  36.         children: <Widget>[
  37.           Flexible(
  38.             flex: 1,
  39.             child: Container(
  40.               color: Colors.yellow,
  41.              
  42.             ),
  43.           ),
  44.           Flexible(
  45.             flex: 1,
  46.             child: Container(
  47.               color: Colors.red,
  48.             ),
  49.           ),
  50.           Row(
  51.             children: <Widget>[
  52.               Flexible(
  53.                 flex: 2,
  54.                 child: Container(
  55.                   color: Colors.pink,
  56.                 ),
  57.               ),
  58.               Flexible(
  59.                 flex: 2,
  60.                 child: Container(
  61.                   color: Colors.green,
  62.                 ),
  63.               ),
  64.             ],
  65.           )
  66.         ],
  67.       ),
  68.     );
  69.   }
  70. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top