我开始使用颤振。这看起来很不错也很容易,但是在错误方面没有太多资源。无论如何,经过长时间的思考、检查和即兴创作,我开始在网上搜索答案,嗯,没有。所以我想问你们所有人,也许有人能够向我解释为什么我会收到这个错误,它意味着什么以及如何摆脱它。
哦,在我深入探讨之前,我可能应该提到我正在使用 flutter_bloc。
好的,所以我有这样的代码:
class Settings extends StatelessWidget {
final _formKey = GlobalKey<FormState>();
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(
title: new Text("SomeApp",style: TextStyle(color: Colors.white)),
automaticallyImplyLeading: false,
backgroundColor: myBlue.shade50,
actions: <Widget>[
IconButton(
icon: new Icon(FontAwesomeIcons.download,color: Colors.white),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => DownloadView()),
);
},
),
IconButton(
icon: new Icon(FontAwesomeIcons.chevronCircleLeft,color: Colors.white),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => MainWindow()),
);
},
),]
),
body: Container(
padding: EdgeInsets.symmetric(vertical: 16),
alignment: Alignment.center,
child: new BlocBuilder<SettingsBloc, …Run Code Online (Sandbox Code Playgroud)