flutter initState中获取context对象
有时候我们想在flutter initState中获取context对象,这个时候可以使用this.context。
flutter initState中获取context对象完整实例:
void initState() {
super.initState();
var context=this.context;
this._attrBottomSheet(context);
}
更多关于flutter initState中获取context对象 的实战系列教程也可以访问 https://www.itying.com/category-92-b0.html