发送帖子请求时出现奇怪的错误。
// this map is passed to a function
final Map<String, dynamic> activityData = {
"userId": 1,
"name": activityName.text,
"description": activityDescription.text,
"startAt": activityStartAt.text,
"endsAt": activityEndAt.text,
"lat": _latitude,
"long": _longitude,
"category": 2,
"status": "pending"
};
// this code bellow is inside a async function
final http.Response response =
await http.post(Uri.encodeFull(url), body: activityData);
Run Code Online (Sandbox Code Playgroud)
这是错误:
E/flutter (32582): [ERROR:flutter/shell/common/shell.cc(184)] Dart Error: Unhandled exception:
E/flutter (32582): type 'int' is not a subtype of type 'String' in type cast
E/flutter (32582): #0 CastMap.forEach.<anonymous closure> (dart:_internal/cast.dart:286:25)
E/flutter …Run Code Online (Sandbox Code Playgroud) 我跑的时候sudo systemctl status redis得到这个
? redis.service - Redis In-Memory Data Store
Loaded: loaded (/etc/systemd/system/redis.service; enabled; vendor preset:
enabled)
Active: inactive (dead) (Result: exit-code) since Thu 2017-05-11 03:43:43
WEST;
31min ago
Main PID: 1553 (code=exited, status=203/EXEC)
May 11 03:43:42 fevrok systemd[1]: redis.service: Control process exited,
code=exited status=203
May 11 03:43:42 fevrok systemd[1]: redis.service: Unit entered failed state.
May 11 03:43:42 fevrok systemd[1]: redis.service: Failed with result 'exit-code'.
May 11 03:43:43 fevrok systemd[1]: redis.service: Service hold-off time over, scheduling restart. …Run Code Online (Sandbox Code Playgroud)