zoukankan      html  css  js  c++  java
  • Flutter -- iOS -- Container

     1 import 'package:flutter/cupertino.dart';
     2 import 'package:flutter/material.dart';
     3 
     4 void main() =>runApp(
     5   new MaterialApp(
     6     title: 'Container布局容器示例',
     7     home: new LayoutDemo(),
     8   )
     9 );
    10 
    11 class LayoutDemo extends StatelessWidget{
    12   @override
    13   Widget build(BuildContext context) {
    14     // TODO: implement build
    15     Widget container = new Container(
    16       decoration: new BoxDecoration(
    17         color: Colors.grey,
    18       ),
    19       child: new Column(
    20         children: <Widget>[
    21           new Row(
    22             children: <Widget>[
    23               new Expanded(
    24                 child: new Container(
    25                    150.0,
    26                   height: 150,
    27                   decoration: new BoxDecoration(
    28                     border: new Border.all( 10.0,color: Colors.blueGrey),
    29                     borderRadius: const BorderRadius.all(const Radius.circular(8.0)),
    30                   ),
    31                   margin: const EdgeInsets.all(4.0),
    32                   child: new Image.asset('images/750-1334-1.png'),
    33                 ),
    34               ),
    35               new Expanded(
    36                   child: new Container(
    37                      150.0,
    38                     height: 150.0,
    39                     decoration: new BoxDecoration(
    40                       border: new Border.all( 10.0,color: Colors.blueGrey),
    41                       borderRadius: const BorderRadius.all(const Radius.circular(8.0)),
    42                     ),
    43                     margin: const EdgeInsets.all(4.0),
    44                     child: new Image.asset('images/750-1334-2.png'),
    45                   ),
    46               ),
    47             ],
    48           ),
    49           new Row(
    50             children: <Widget>[
    51               new Expanded(
    52                 child: new Container(
    53                    150,
    54                   height: 150,
    55                   decoration: new BoxDecoration(
    56                     border: new Border.all( 10.0,color: Colors.blueGrey),
    57                     borderRadius: const BorderRadius.all(const Radius.circular(8.0)),
    58                   ),
    59                   margin: const EdgeInsets.all(4.0),
    60                   child: new Image.asset('images/750-1334-3.png'),
    61                 ),
    62               ),
    63               new Expanded(
    64                 child: new Container(
    65                    150,
    66                   height: 150,
    67                   decoration: new BoxDecoration(
    68                     border: new Border.all( 10.0,color: Colors.blueGrey),
    69                     borderRadius: const BorderRadius.all(const Radius.circular(8.0)),
    70                   ),
    71                   margin: const EdgeInsets.all(4.0),
    72                   child: new Image.asset('images/750-1334-4.png'),
    73                 ),
    74               ),
    75             ],
    76           ),
    77         ],
    78       ),
    79     );
    80     return new Scaffold(
    81       appBar: new AppBar(
    82         title: new Text('appBar显示'),
    83       ),
    84       body: container,
    85     );
    86   }
    87 }

  • 相关阅读:
    C++ XML解析之TinyXML篇[转]
    TinyXML:一个优秀的C++ XML解析器[转]
    nginx 出现413 Request Entity Too Large问题的解决方法
    redis配置认证密码
    《Discuz安装时候出现乱码 -- 问题解决方法》
    MySQL创建用户与授权
    CentOS 7 安装mysql
    setfacl命令 来自: http://man.linuxde.net/setfacl
    install pip3 for python 3.x
    自己制作ssl证书:自己签发免费ssl证书,为nginx生成自签名ssl证书
  • 原文地址:https://www.cnblogs.com/tom2015010203/p/11940796.html
Copyright © 2011-2022 走看看