Notice: 函数 WP_Scripts::localize 的调用方法不正确$l10n 参数必须是一个数组。若要将任意数据传递给脚本,请改用 wp_add_inline_script() 函数。 请查阅调试 WordPress来获取更多信息。 (这个消息是在 5.7.0 版本添加的。) in /data/www/appblog/wp-includes/functions.php on line 6131

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