存档

11月 2021

显示总共32条中的前3条

showSnackBar' is deprecated and shouldn't be used. Use ScaffoldMessenger.showSnackBar.
发布者 : 粮油菜大市场 发布时间 : 24 Nov 2021 00:58:20

 

"message": "'showSnackBar' is deprecated and shouldn't be used. Use ScaffoldMessenger.showSnackBar. This feature was deprecated after v1.23.0-14.0.pre..\nTry replacing the use of the deprecated member with the replacement.",

https://stackoverflow.com/questions/65906662/showsnackbar-is-deprecated-and-shouldnt-be-used/65906839

使用ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: Text("Login failed")));代替原来的代码就可以了

Tried to use Provider with a subtype of Listenable/Stream (MerchantUserProfileProvider).
发布者 : 粮油菜大市场 发布时间 : 23 Nov 2021 17:45:11

Tried to use Provider with a subtype of Listenable/Stream (MerchantUserProfileProvider).

 

flutter Unhandled Exception: type 'int' is not a subtype of type 'String'
发布者 : 粮油菜大市场 发布时间 : 23 Nov 2021 02:37:24

Unhandled Exception: type 'int' is not a subtype of type 'String'

latitude = double.parse(json['latitude']);
本来以为这个可以把int转换成double,原来只能是转换String
看来得用json['latitude'].toDouble()方法了