标签:pop xtend 堆栈 extends route ISE 设置 end state
RaisedButton(
child: Text(‘跳转到分类‘),
onPressed: () {
Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => SearchPage(title: ‘来了a‘) // import导入的页面, title是传值
)
);
}
)
传值接收的组件要设置
class SearchPage extends StatelessWidget{
String title = ‘‘;
SearchPage({this.title});
@override
Widget build(BuildContext context) {
// TODO: implement build
return Scaffold(
appBar: AppBar(
title: Text(‘搜索页面‘),
),
body: Text(this.title),
);
}
}
标签:pop xtend 堆栈 extends route ISE 设置 end state
原文地址:https://www.cnblogs.com/zhaofeis/p/12337451.html