zoukankan      html  css  js  c++  java
  • wrap

    import 'package:flutter/material.dart';
    
    void main() {
      runApp(MaterialApp(home: new MyApp()));
    }
    
    
    class MyApp extends StatelessWidget {
      var width = 80.0;
      var height = 60.0;
    
      @override
      Widget build(BuildContext context) {
        // TODO: implement build
        return Wrap(
          spacing: 8.0, // 主轴(水平)方向间距
          runSpacing: 4.0, // 纵轴(垂直)方向间距
          alignment: WrapAlignment.center, //沿主轴方向居中
          children: <Widget>[
            Container(height: 50,  50,color: Colors.red,),
            Container(height: 50,  50,color: Colors.white,),
            Container(height: 50,  50,color: Colors.white10,),
            Container(height: 50,  50,color: Colors.redAccent,),
            Container(height: 50,  50,color: Colors.amber,),
            Container(height: 50,  50,color: Colors.amberAccent,),
            Container(height: 50,  50,color: Colors.grey,),
            Container(height: 50,  50,color: Colors.brown,),
            Container(height: 50,  50,color: Colors.black,),
            Container(height: 50,  50,color: Colors.grey,),
            Container(height: 50,  50,color: Colors.green,),
            Container(height: 50,  50,color: Colors.red,),
            Container(height: 50,  50,color: Colors.white10,),
            Container(height: 50,  50,color: Colors.lightBlue,),
            Container(height: 50,  50,color: Colors.redAccent,),
            Container(height: 50,  50,color: Colors.red,),
            Container(height: 50,  50,color: Colors.green,),
            Container(height: 50,  50,color: Colors.grey,),
            Container(height: 50,  50,color: Colors.brown,),
            Container(height: 50,  50,color: Colors.red,),
    
          ],
        );
      }
    }
    

      

  • 相关阅读:
    如何评估自己对外界认知是否正确?
    冒泡排序与两数交换的实现与优化
    数据库和ADO
    JavaScript的中类型转换
    UltraEdit注册机原理简单说明
    别让用户发呆—设计中的防呆策略[转]
    Html 5 版 电子时钟
    SQL 优化总结(三) SQL子句
    SQL 优化总结(二) 索引
    Html 5 简介
  • 原文地址:https://www.cnblogs.com/pythonClub/p/10571026.html
Copyright © 2011-2022 走看看