当前位置:网站首页>flutter只要是数据,都会判空的
flutter只要是数据,都会判空的
2022-07-29 07:36:00 【氤氲息】
flutter只要是数据都会判空,如果是空的就会报错,所以我们在调用网络请求数据时,在获取数据的时候要判空。
replyList!就是replyList不能为空,如果是空就会出现错误
int getBirthday (){
int bi = 0;
if(replyList!=null){
if(replyList!.otherInfo!=null){
if(replyList!.otherInfo!.birthday!=null){
bi = replyList!.otherInfo!.birthday!;
}
}
}
return bi;
}
最后调用getBirthday ()就可以显示数据了
边栏推荐
- 状态机dp三维
- gin abort不能阻止后续代码的问题
- 《nlp入门+实战:第五章:使用pytorch中的API实现线性回归》
- Female graduate students do "mind mapping" and quarrel with their boyfriend! Netizen: the "king of infighting" in the quarrel
- ef core 读取text类型慢_ef core读取大字符串字段慢
- 【暑期每日一题】洛谷 P4414 [COCI2006-2007#2] ABC
- halcon的安装以及在vs2017中测试,vs2017中dll的配置
- logback简介及引入方法
- [summer daily question] Luogu p4413 [coci2006-2007 2] R2
- 蓝桥杯A组选数异或
猜你喜欢
随机推荐
Job 7.28 file IO and standard IO
UPC little C's King Canyon
【暑期每日一题】洛谷 P4414 [COCI2006-2007#2] ABC
QT topic: basic components (button class, layout class, output class, input class, container class)
SEGGER 的硬件异常 分析
ef core 读取text类型慢_ef core读取大字符串字段慢
[summer daily question] Luogu p7760 [coci2016-2017 5] tuna
How can electronic component trading enterprises solve warehouse management problems with ERP system?
5-integrate swagger2
【暑期每日一题】洛谷 P6320 [COCI2006-2007#4] SIBICE
7-2 计算正五边形的面积和周长 (25分)
The beauty of do end usage
《nlp入门+实战:第五章:使用pytorch中的API实现线性回归》
Can the subset of the array accumulate K
2022年深圳杯A题破除“尖叫效应”与“回声室效应”走出“信息茧房”
Halcon installation and testing in vs2017, DLL configuration in vs2017
树莓派的启动流程
使用自定义注解校验list的大小
CFdiv1+2-Bash and a Tough Math Puzzle-(线段树单点区间维护gcd+总结)
PAT甲级 1154 顶点着色








