Files
FlutterUnit/lib/views/widgets/ProxyWidget/DefaultTextStyle/node1_base.dart
2020-05-03 23:05:53 +08:00

36 lines
949 B
Dart
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import 'package:flutter/material.dart';
/// create by 张风捷特烈 on 2020-04-12
/// contact me by email 1981462002@qq.com
/// 说明:
// {
// "widgetId": 324,
// "name": 'DefaultTextStyle使用',
// "priority": 1,
// "subtitle":
// "各属性同Text详见之。\n"
// "其功能是: 设置默认的文字样式应用于【后代组件】,注意后代组件也可以指定自身的样式",
// }
class DefaultTextStyleDemo extends StatelessWidget {
@override
Widget build(BuildContext context) {
return DefaultTextStyle(
style: TextStyle(
fontSize: 18,
color: Colors.blue,
decoration: TextDecoration.underline),
child: Wrap(
spacing: 5,
children: <Widget>[
Text("Hello,",),
FlutterLogo(),
Text("Flutter",style: TextStyle(color: Colors.red),),
Text("Unit."),
],
),
);
}
}