效果图
代码如下
import 'package:flutter/material.dart';
// 配置main函数
void main() async {
runApp(new MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
// 显示欢迎页
WelcomePage();
return new MaterialApp(
title: 'title',
home: RouteProSample( ),
);
}
}
class RouteProSample extends StatefulWidget {
@override
createState() => _RouteProSampleState();
}
class _RouteProSampleState extends State<RouteProSample> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('导航栏标题->label'),
),
body: new Center(
child: new Text (
'我的text',
style: new TextStyle(
fontSize: 20.0,
color: Colors.red,
fontStyle: FontStyle.italic,
),
),
),
);
}
}
复制代码
系列教程
Flutter入门基础(六)-UITableView(二)添加headerView
- 如有问题可添加QQ群:234812704
- 欢迎各位一块学习,提高逼格!
- 也可以添加洲洲哥的微信公众号
可以来微信公众号(洲洲哥)后台给我留言。 快来扫码关注我们吧!