fix null-safety error

hmxc
小赖 3 years ago
parent 305e443909
commit e5888eb860

@ -36,7 +36,7 @@ class SelectPay {
class _LifePayPageState extends State<LifePayPage> {
EasyRefreshController? _controller;
List<int> _selectYears = [];
List<LifePayModel> _models = [];
List<LifePayModel?> _models = [];
List<SelectPay> _selectPay = [];
double _totalCost = 0;
int _count = 0;
@ -237,7 +237,7 @@ class _LifePayPageState extends State<LifePayPage> {
),
),
],
body: BeeListView(
body: BeeListView<LifePayModel>(
path: API.manager.dailyPaymentList,
controller: _controller,
extraParams: {'estateId': appProvider.selectedHouse!.estateId},
@ -253,7 +253,7 @@ class _LifePayPageState extends State<LifePayPage> {
return lifePayModels;
},
builder: (items) {
_models = items as List<LifePayModel>;
if (items != null) _models = items as List<LifePayModel?>;
return Column(
children: [
_buildHouseCard(),

@ -120,8 +120,8 @@ class _SignInPageState extends State<SignInPage> {
else if (TextUtil.isEmpty(_code.text))
BotToast.showText(text: '验证码不能为空');
else {
bool result = await (_showLoginVerify() as FutureOr<bool>);
_parseLogin(result);
bool? result = await _showLoginVerify();
if (result != null) _parseLogin(result);
}
},
height: 89.w,

@ -50,7 +50,7 @@ class BeeListView<T> extends StatefulWidget {
final List<T> Function(BaseListModel model) convert;
///
final Widget Function(List<T> items) builder;
final Widget Function(dynamic items) builder;
///
final int size;

@ -147,7 +147,7 @@ class _AdviceDetailPageState extends State<AdviceDetailPage> {
),
..._model.appAdviceDetailVo!.appAdviceContentVos!
.map((e) => _buildAdviceContent(e))
.toList() as Iterable<Widget>,
.toList(),
],
);
}

Loading…
Cancel
Save