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 }

  • 相关阅读:
    springboot接口测试
    谷粒学院_day08_课程管理_添加课程之课程发布(后端开发)
    谷粒学院_day03_vue组件
    谷粒学院_day03_vue固定代码抽取
    vue自定义事件
    vue插槽slot
    vue基本语法
    Vue之axios异步通信
    无归岛[HNOI2009]
    仓库建设[ZJOI2007]
  • 原文地址:https://www.cnblogs.com/tom2015010203/p/11943783.html
Copyright © 2011-2022 走看看