【发布时间】:2021-06-06 23:04:53
【问题描述】:
对不起,伙计们,我正在尝试构建一个新页面,但其中包含变量“nextcode”。所以在新页面中,它将显示下一个代码文本
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => Lemari(nextcode)));
},
但在“Widget build(String Kode) {”行中必须是这样的“Widget build(BuildContext context) {”
class Lemari extends StatelessWidget {
@override
Widget build(String Kode) {
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.blue[900],
title: Text('this is th next page'),
),
backgroundColor: Colors.white,
body: Center(
child: Column(
children: [
Container(height: 100, width: 100, color: Colors.red, child: Text('hhe'),),
]
),
),
);
}
}
那么有谁能帮助我吗?请:(
【问题讨论】:
标签: android flutter dart statelesswidget