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

版权声明:
作者:Joe.Ye
链接:https://www.appblog.cn/index.php/2023/03/16/flutter-widget-row/
来源:APP全栈技术分享
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
打赏
海报
Flutter Widget之Row
Widget:https://flutter.io/docs/development/ui/widgets Row:https://docs.flutter.io/flutter/widgets/Row-class.html import 'package:flutter/mat……
<<上一篇
下一篇>>
文章目录
关闭
目 录