当前位置:网站首页>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 ()就可以显示数据了
边栏推荐
- 7-2 计算正五边形的面积和周长 (25分)
- 【暑期每日一题】洛谷 P1601 A+B Problem(高精)
- PAT甲级 1154 顶点着色
- A long article --- in-depth understanding of synchronized
- 【暑期每日一题】洛谷 P7760 [COCI2016-2017#5] Tuna
- 【FPGA教程案例42】图像案例2——通过verilog实现图像二值化处理,通过MATLAB进行辅助验证
- Introduction to logback filter
- Halcon installation and testing in vs2017, DLL configuration in vs2017
- Zero technology is deeply involved in the development of privacy computing financial scenario standards of the ICT Institute
- 强连通分量
猜你喜欢
QT专题:基础部件(按钮类,布局类,输出类,输入类,容器类)
Sqlmap(SQL注入自动化工具)
SEGGER 的硬件异常 分析
Scala higher order (10): exception handling in Scala
Use custom annotations to verify the size of the list
Segger's hardware anomaly analysis
How does MySQL convert rows to columns?
STM32 operation w25q256 w25q16 SPI flash
【WPF】通过动态/静态资源实现语言切换
美智光电IPO被终止:年营收9.26亿 何享健为实控人
随机推荐
LevelFilter简介说明
【暑期每日一题】洛谷 P6500 [COCI2010-2011#3] ZBROJ
STM32 operation w25q256 w25q16 SPI flash
【暑期每日一题】洛谷 P1601 A+B Problem(高精)
功能自动化测试实施的原则以及方法有哪些?
Android面试题 | 怎么写一个又好又快的日志库?
Job 7.28 file IO and standard IO
状态机dp(简单版)
Segger's hardware anomaly analysis
Zip gzip tar compression Advanced Edition
PAT甲级 1150 旅行商问题
Access数据库引入datagridview数据后,显示错误
多线程购物
How to establish EDI connection with Scania in Scania?
MySQL 45讲 | 08 事务到底是隔离的还是不隔离的?
halcon的安装以及在vs2017中测试,vs2017中dll的配置
[summer daily question] Luogu p1601 a+b problem (high precision)
[summer daily question] Luogu P6500 [coci2010-2011 3] zbroj
logback 中FileAppender具有什么功能呢?
Description of rollingfileappender attribute in logback