getSun method
date: 查询日期,日期格式为yyyyMMdd,例如 20200531
Implementation
Future<SunRsp?> getSun(String location, String date) async {
Map param = {"location": location, "date": date};
Map? value =
await _methodChannel.invokeMapMethod(MethodConstants.GetSun, param);
return value == null ? null : SunRsp.fromMap(value);
}