【发布时间】:2020-08-04 12:07:07
【问题描述】:
我在 Dart 中遇到了这个错误: “缺少“state.build”的具体实现”
第一种方法如下:
class MyHomePage extends StatefulWidget {
// String titleInput;
// String amountInput;
@override
MyHomePageState createState() => MyHomePageState();
}
class MyHomePageState extends State<MyHomePage> {
final List<Transaction> _userTransactions = [
// Transaction(
// id: "t1",
// title: "New Shoes",
// amount: 69.99,
// date: DateTime.now(),
// ),
// Transaction(
// id: "t2",
// title: "Weekly Groceries",
// amount: 16.53,
// date: DateTime.now(),
// ),
];
有谁知道这个错误是什么意思以及如何解决?
谢谢。
【问题讨论】: