【发布时间】:2018-11-09 22:02:18
【问题描述】:
flutter 应用名称由包名显示,AppBar标题显示在首页的AppBar ,那么标题MaterialApp(title: 'Rectangle App',);在哪里用在flutter项目中。
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Rectangle App',
home: Scaffold(
appBar: AppBar(
title: Text('Rectangle App Home Page'),
),
body: HelloRectangle(),
),
);
}
}
【问题讨论】: