我是Flutter + Dart的新手,正在尝试增加字体大小,但很难理解文档并实现我的工作。这是文件。我该如何解决我的问题?
import 'package:flutter/material.dart';
void main() => runApp(NewApp());
class NewApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
home: new Scaffold(
appBar: new AppBar(
title: new Text('App Header'),
),
body: new Column(
children: [
new Container(
margin: new EdgeInsets.all(10.0),
child: new Card(
child: new Column(
children: <Widget>[
new Container(
padding: new EdgeInsets.all(10.0),
child: new Text('Hello Macaw'),
),
],
),
),
)
],
),
),
);
}
}
在乞讨中难以理解和实施。但是一旦您了解了您就会爱上Flutter框架。这是解决方案:
new Text('Hello Macaw',style: TextStyle(fontSize: 16.0,fontWeight: FontWeight.bold),),
之后,格式化代码。而已。让我知道是否有效。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句