【发布时间】:2021-06-03 17:16:13
【问题描述】:
在我的班级Tabelle我交出了一个头衔。现在我想在_TabelleState 类中输出一个Text(this.title)。但我收到错误“没有为类型 _TabelleState 定义 getter 标题”
如何在 _TabelleState 类中使用 this.title?
class Tabelle extends StatefulWidget {
Tabelle({Key key, this.title}) : super(key: key);
final String title;
@override
_TabelleState createState() => _TabelleState();
}
class _TabelleState extends State<Tabelle> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(this.title),
【问题讨论】:
标签: flutter class title getter