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之Icon

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

import 'package:flutter/material.dart';

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

class _IconDemoPagePageState extends State<IconDemoPage> {
  double _volume = 0.0;

  @override
  void initState() {
    super.initState();
  }

  Widget build(BuildContext context) {
    return Scaffold(
        appBar: new AppBar(
          title: new Text('Icon Demo'),
        ),
        body: SingleChildScrollView(
            child: Column(
              children: <Widget>[
                // IconButton
                IconButton(
                  icon: Icon(Icons.volume_up),
                  tooltip: 'Increase volume by 10%',
                  onPressed: () {
                    setState(() {
                      _volume *= 1.1;
                    });
                  },
                ),
                // IconTheme
                // ImageIcon
              ],
            )
        )
    );
  }
}

Flutter Widget Icon

上一篇 Flutter Widget之Image
下一篇 Flutter Widget之Buton