Flutter Widget之Row

Widget:https://flutter.io/docs/development/ui/widgets
Row:https://docs.flutter.io/flutter/widgets/Row-class.html

import 'package:flutter/material.dart';

class RowDemoPage extends StatefulWidget {
  @override
  State<StatefulWidget> createState() => new _RowDemoPageState();
}

class _RowDemoPageState extends State<RowDemoPage> {
  @override
  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(title: new Text('Row Page Demo'),),
      body: Center(
//        child: Row(
//          children: <Widget>[
//            Expanded(
//              child: Text('Deliver features faster', textAlign: TextAlign.center),
//            ),
//            Expanded(
//              child: Text('Craft beautiful UIs', textAlign: TextAlign.center),
//            ),
//            Expanded(
//              child: FittedBox(
//                fit: BoxFit.contain, // otherwise the logo will be tiny
//                child: const FlutterLogo(),
//              ),
//            ),
//          ],
//        )
        child: Row(
          children: <Widget>[
            const FlutterLogo(),
            // const Text('Flutter\'s hot reload helps you quickly and easily experiment, build UIs, add features, and fix bug faster. Experience sub-second reload times, without losing state, on emulators, simulators, and hardware for iOS and Android.'),
            const Expanded(
              child: Text('Flutter\'s hot reload helps you quickly and easily experiment, build UIs, add features, and fix bug faster. Experience sub-second reload times, without losing state, on emulators, simulators, and hardware for iOS and Android.'),
            ),
            const Icon(Icons.sentiment_very_satisfied),
          ],
        )
      ),
    );
  }
}

Flutter Widget Row

上一篇 Flutter Widget之Container
下一篇 Flutter Widget之Column
目录
文章列表
1 Spring Security OAuth2经过负载均衡导致redirect_uri使用http而不是https报redirect_uri mismatch错误
Spring Security OAuth2经过负载均衡导致redirect_uri使用http而不是https报redirect_uri mismatch错误
2
Android Studio 3.x上使用Lombok
Android Studio 3.x上使用Lombok
3
支付宝小程序支付接入
支付宝小程序支付接入
4
Spring Security OAuth2之scopes配置详解
Spring Security OAuth2之scopes配置详解
5
Linux常用命令设置和取消代理
Linux常用命令设置和取消代理
最新评论
一位WordPress评论者
一位WordPress评论者
2月12日
您好,这是一条评论。若需要审核、编辑或删除评论,请访问仪表盘的评论界面。评论者头像来自 Gravatar。