如图:flutter run后第一次切换到另一个页面时,会报错。。。。
怎么解决啊,呜呜呜呜呜
代码是这样:
Center(
child: Button.normal(
context: context,
onPressed: () {},
bgColor: PrivilegeWidget.getStatusBgColor(
context, _approvalProcessInfo.approvalStatus),
height: 32.sp,
borderRadius: BorderRadius.circular(18.sp),
child: PrivilegeWidget.fifthText(context,
PrivilegeWidget.getStatusText(
context,_approvalProcessInfo.approvalStatus,
name: _approvalProcessInfo.curApprovalName),
color: PrivilegeWidget.getStatusColor(context,
_approvalProcessInfo.approvalStatus))),
),
DEBUG CONSOLE打印出信息:
The getter 'approvalStatus' was called on null.
Receiver: null
Tried calling: approvalStatus
问题描述
问题出现的环境背景及自己尝试过哪些方法
相关代码
粘贴代码文本(请勿用截图)