1. import 'package:flutter/material.dart';
  2.  
  3. void main() {
  4. runApp(MaterialApp(home: new MyApp()));
  5. }
  6.  
  7. class MyApp extends StatelessWidget {
  8. var width = 80.0;
  9. var height = 60.0;
  10.  
  11. @override
  12. Widget build(BuildContext context) {
  13. // TODO: implement build
  14. return Wrap(
  15. spacing: 8.0, // 主轴(水平)方向间距
  16. runSpacing: 4.0, // 纵轴(垂直)方向间距
  17. alignment: WrapAlignment.center, //沿主轴方向居中
  18. children: <Widget>[
  19. Container(height: 50, width: 50,color: Colors.red,),
  20. Container(height: 50, width: 50,color: Colors.white,),
  21. Container(height: 50, width: 50,color: Colors.white10,),
  22. Container(height: 50, width: 50,color: Colors.redAccent,),
  23. Container(height: 50, width: 50,color: Colors.amber,),
  24. Container(height: 50, width: 50,color: Colors.amberAccent,),
  25. Container(height: 50, width: 50,color: Colors.grey,),
  26. Container(height: 50, width: 50,color: Colors.brown,),
  27. Container(height: 50, width: 50,color: Colors.black,),
  28. Container(height: 50, width: 50,color: Colors.grey,),
  29. Container(height: 50, width: 50,color: Colors.green,),
  30. Container(height: 50, width: 50,color: Colors.red,),
  31. Container(height: 50, width: 50,color: Colors.white10,),
  32. Container(height: 50, width: 50,color: Colors.lightBlue,),
  33. Container(height: 50, width: 50,color: Colors.redAccent,),
  34. Container(height: 50, width: 50,color: Colors.red,),
  35. Container(height: 50, width: 50,color: Colors.green,),
  36. Container(height: 50, width: 50,color: Colors.grey,),
  37. Container(height: 50, width: 50,color: Colors.brown,),
  38. Container(height: 50, width: 50,color: Colors.red,),
  39.  
  40. ],
  41. );
  42. }
  43. }

  

wrap的更多相关文章

  1. jQuery之常用且重要方法梳理(siblings,nextAll,end,wrap,apply,call,each)-(二)

    1.siblings() siblings() 获得匹配集合中每个元素的同胞,通过选择器进行筛选是可选的. <body> <div><span>Hello</ ...

  2. [转载]jQuery中wrap、wrapAll和wrapInner用法以及区别

    原文地址:jQuery中wrap.wrapAll和wrapInner用法以及区别作者:伊少君 原文: <ul>   <li title='苹果'>苹果</li>   ...

  3. 【golang】go语言,进行并发请求的wrap变参封装

    package main import ( "fmt" "sync" "time" ) type WaitGroupWrapper stru ...

  4. jquery之wrap(),wrap(),unwrap()方法详解

    [注]wrap():为每个匹配元素外面添加指定的HTML结构, wrapAll(): 为所有匹配元素(作为一个整体)外面添加一个指定的HTML结构 原文地址:http://www.365mini.co ...

  5. jQuery中 wrap() wrapAll() 与 wrapInner()的区别

    今晚看书的时候发现jQuery有三个包裹节点的方法,百度了一下jQuery wrap() / wrapAll() / wrapInner(),果然搜索结果 W3School的文档说明是排第一的. 可是 ...

  6. wrap device

    刚刚看见了,wrap device && reference device 区别在这里 https://msdn.microsoft.com/en-us/library/windows ...

  7. word wrap 解惑

    源起 我们经常需要“修复”一个老生常谈的“bug”,那就是文本的自动换行问题.在专业术语上,这种期望得到的渲染现象被称作“word wrap”,即文本处理器有能力把超出页边的整个词自动传到下一行. 在 ...

  8. 《WPF程序设计指南》读书笔记——第5章 Stack与Wrap

    1.StackPanel面板 using System; using System.Windows; using System.Windows.Input; using System.Windows. ...

  9. Oracle wrap 测试的一些细节问题

    今天在做 wrap 的测试实验的时候,出现一个很奇怪的现象,就是加密不成功.具体表现为:1.加密后的文件大小为0kb. 2.加密后的文件仍然可视. 具体测试步骤如下: D:\Just4work\som ...

  10. Sublime Text 2 自动开启换行 Word Wrap

    首先当然要夸一下神器 Sublime Text 2,自从第一次用我就彻底把神马 Notepad++ 和 TextMate 打入冷宫,用来开发 WEB 项目从此 IDE 都不需要了! 下面讲讲如何自动开 ...

随机推荐

  1. 133、 Android 自动化测试(转载)

    Android 自动化测试--要点概括http://blog.csdn.net/vshuang/article/details/40595233 A/B测试与灰度发布http://blog.csdn. ...

  2. create database link

    如果本地的tnsnames.ora中未建立数据库连接,那么就是用1,否则就是用2 1:create database link geelyin96 connect to geelyin identif ...

  3. 8、路由 router

    路由:router 用户功能 /user ----> index.html /user/login ----> login.html /user/reg ----> reg.html ...

  4. python特殊函数__str__、__repr__和__len__

    1.__str__ 首先介绍__str__ class Students(object): def __init__(self, *args): self.names = args # def __s ...

  5. PHP(Dom操作)

    jsDOM操作组成: ECMAscript:语法核心 BOM:浏览器对象模型 window:窗口 open close 定时器 dingsh history:历史记录 go back location ...

  6. sql 2005性能调优

    转自:http://www.cnblogs.com/MR_ke/archive/2010/08/25/1807856.html SQL Server在运行一段时间,随着数据的积累,SQL运行效率会逐步 ...

  7. HotSpot虚拟机

    注:如其中有不懂的名词,下面有名词解释 1.对象的创建(限于普通Java对象,不包括数组和Class对象等) (1)检查这个指令的参数能否在常量池中定位到一个类的符号引用,并检查这个符号引用代表的类是 ...

  8. 从session中获取当前用户的工具类

    package cn.crmx.crm.util; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.Ht ...

  9. Coroutines declared with async/await syntax is the preferred way of writing asyncio applications. For example, the following snippet of code (requires Python 3.7+) prints “hello”, waits 1 second, and

    小结: 1.异步io  协程 Coroutines and Tasks — Python 3.7.3 documentation https://docs.python.org/3/library/a ...

  10. c->log技巧

    介绍: 在C代码里,有时会加入一些打印信息方便分析问题,可用如下代码替代打印函数,更加方便. // // Created by lady on 18-12-10. // #include <st ...