当前位置:网站首页>Flutter | specifies the type of page return value
Flutter | specifies the type of page return value
2022-07-24 00:21:00 【Stars without night】
Navigator.push(context,
MaterialPageRoute(builder: (context) => _Page2()))
.then((value) {
print(' The returned value is ===$value');
});
because push The return value type of method is :Future<dynamic>:

therefore .then there value yes dynamic Type of .
Sometimes we want to take value A property of , This is the time dynamic It's not easy to use .
Solution 1:
Type conversion :
final model = value as String;
Solution 2:
Specify the type of returned value :
Navigator.push<String>
边栏推荐
- Gbase 8C mode visibility query function (I)
- 高数_第2章多元函数微分学__偏导数的几何应用_空间曲线的切线与法平面
- A lot of happiness in learning
- Inode, soft link, hard link
- Jenkins 使用sonarqube构建流水线代码审查项目
- GBase 8c 字符串操作符
- Detectron2 installation based on Anaconda under win10
- 2022年7月23日——mapper文件说明
- Detailed overview of data standards -2022
- 【译】Go RPC 入门:Hello World
猜你喜欢

inode、软链接、硬链接

Comparison of the shortcomings of redis master-slave, sentinel and cluster architectures

Automatic escape processing in JMeter

Docker builds sonarqube, mysql5.7 environment

The universal esp32c3 configures partition tables based on the Arduino ide framework

paypal订阅流程及api请求

Lac automatic dialing experiment of L2TP

iNFTnews | 呵护“雪山精灵”,42VERSE“数字生态保护”公益项目即将盛启

How to improve data quality

Overview of data model design method
随机推荐
Comparison of the shortcomings of redis master-slave, sentinel and cluster architectures
Gbase 8C access authority access function (IV)
Educational Codeforces Round 132 (Rated for Div. 2)(A-D)
Multi knapsack explanation of dynamic programming knapsack problem
Intel Intel realsense realistic depth camera self calibration operation steps explanation D400 series is applicable
L2TP的LAC自动拨号实验
php实现 Stripe订阅
Tencent will close the "magic core". Is there any resistance to the development of digital collections?
Redis分布式锁待续
Redis data structure
Redis cluster hash sharding algorithm (slot location algorithm)
JMeter中的自动转义处理
YOLOv1
GBase 8c 访问权限访问函数(四)
自己喜欢投资
Sum of submatrix
GBase 8c 会话信息函数(二)
[translation] Introduction to go RPC: Hello World
北峰通信亮相中国(厦门)应急展|智能化通信手段强势吸睛!
[low code] limitations of low code development