Stack即层叠布局控件,能够将子控件层叠排列。
Stack控件的每一个子控件都是定位或不定位,定位的子控件是被Positioned控件包裹的。Stack控件本身包含所有不定位的子控件,其根据alignment定位(默认为左上角)。然后根据定位的子控件的top、right、bottom和left属性将它们放置在Stack控件上。
import 'package:flutter/material.dart'; class LayoutDemo extends StatelessWidget { @override Widget build(BuildContext context) { return new Scaffold( appBar: new AppBar( title: new Text('层叠定位布局'), ), body:new Center( child: new Stack( children:[ new Image.network('http://img2.*c*xtu*ku.com/00/13/12/s97783873391.jpg'), new Positioned( left: 35.0, right: 35.0, top: 45.0, child: new Text( 'Whatever is worth doing is worth doing well. ๑•ิ.•ั๑', style: new TextStyle( fontSize: 20.0, fontFamily: 'serif', ), ), ), ] ), ), ); } } void main() { runApp( new MaterialApp( title: 'Flutter教程', home: new LayoutDemo(), ), ); }
恋爱进行时九游版
恋爱进行时九游版是一款以模拟恋爱玩法为核心的角色扮演手游,精
皇室对决fr(Null’s Royale)
皇室对决fr,即皇室战争的私服变态版本,在该版本中玩家能够拥
养了个猫联机版游戏
养了个猫小游戏一个猫咪主题的模拟经营类型的手游,在游戏中我那
模拟山羊收获日小米版
模拟山羊收获日小米版是一个极其魔性的手机游戏,在游戏中玩家将
女配逆袭之素衣
女配逆袭之素衣是一款恋爱养成冒险的一款游戏,可以角色扮演,在