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 }

  • 相关阅读:
    Cmake Make makefile GNU autotools
    第三方库的安装:Pangolin
    ./configure, make, sudo make install 的含义
    [Eigen]C++开源线代库
    术语解释
    KDevelop使用笔记【中文教程】
    Python-Day1
    找不到或无法加载主类
    仅仅测试Word2016发布博客
    First Day!
  • 原文地址:https://www.cnblogs.com/tom2015010203/p/11943783.html
Copyright © 2011-2022 走看看