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

     1 import 'package:flutter/material.dart';
     2 
     3 class LayoutDemo extends StatelessWidget{
     4   @override
     5   Widget build(BuildContext context) {
     6     // TODO: implement build
     7     return new Scaffold(
     8       appBar: new AppBar(
     9         title: new Text('Align对齐布局'),
    10       ),
    11       body: new Stack(
    12         children: <Widget>[
    13           new Align(
    14             alignment: new FractionalOffset(0.0, 0.0),
    15             child: new Image.asset('images/750-1334-1.png', 128.0,height: 128.0),
    16           ),
    17           new Align(
    18             alignment: FractionalOffset(1.0, 0.0),
    19             child: new Image.asset('images/750-1334-2.png', 128.0,height: 128.0),
    20           ),
    21           new Align(
    22             alignment: FractionalOffset.center,
    23             child: new Image.asset('images/750-1334-3.png', 128.0,height: 128.0),
    24           ),
    25           new Align(
    26             alignment:  FractionalOffset.bottomLeft,
    27             child: new Image.asset('images/750-1334-4.png', 128.0,height: 128.0),
    28           ),
    29           new Align(
    30             alignment: FractionalOffset.bottomRight,
    31             child: new Image.asset('images/750-1334-5.png', 128.0,height: 128.0),
    32           ),
    33         ],
    34       ),
    35     );
    36   }
    37 }
    38 
    39 void main(){
    40   runApp(
    41     new MaterialApp(
    42       title: 'Align对齐',
    43       home: new LayoutDemo(),
    44     ),
    45   );
    46 }

  • 相关阅读:
    jQuery中.bind() .live() .delegate() .on()的区别
    jq中Deferred对象的使用
    事件捕获和事件冒泡
    exec与match方法的区别
    json的转换操作
    iframe内容自适应高度
    Html:upload
    小米盒子
    APUE读书笔记:关于sigsuspend
    我的C笔记
  • 原文地址:https://www.cnblogs.com/tom2015010203/p/11943783.html
Copyright © 2011-2022 走看看