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 React Native学习之开源组件react-native-camera
React Native学习之开源组件react-native-camera
2
面试:知道你的接口QPS是多少么?
面试:知道你的接口QPS是多少么?
3
设计模式(23)外观模式
设计模式(23)外观模式
4
Spring Cloud 获取注册中心所有服务以及服务下的所有实例
Spring Cloud 获取注册中心所有服务以及服务下的所有实例
5
FreeReflection一个允许你在Android P上使用反射而没有任何限制的库
FreeReflection一个允许你在Android P上使用反射而没有任何限制的库
最新评论
一位WordPress评论者
一位WordPress评论者
2月12日
您好,这是一条评论。若需要审核、编辑或删除评论,请访问仪表盘的评论界面。评论者头像来自 Gravatar。