| | |
| | | if (!sos) { |
| | | LocationUtil.startLocation(0, (state, map) { |
| | | if (LocationState.success == state) { |
| | | SOSApiUtil.addSOSRecord( |
| | | context, |
| | | SimpleLocation.fromBaiDuLocation( |
| | | BaiduLocation.fromJson(map))) |
| | | SOSApiUtil.addSOSRecord(context, map!) |
| | | .then((value) { |
| | | if (value!["code"] == 0) { |
| | | setState(() { |
| | |
| | | Container( |
| | | width: 12.5, |
| | | ), |
| | | _totalCount>0? |
| | | InkWell( |
| | | onTap: () { |
| | | DialogUtil.showDialog( |
| | | context, |
| | | NotifyDialog( |
| | | "温馨提示", |
| | | "确定要清空记录吗?", |
| | | () {}, |
| | | () { |
| | | SOSApiUtil.clearSOSRecord(context) |
| | | .then((value) { |
| | | if (value!["code"] == 0) { |
| | | _onRefresh(); |
| | | } else { |
| | | ToastUtil.toast(value["msg"]); |
| | | } |
| | | }); |
| | | }, |
| | | height: 200, |
| | | )); |
| | | }, |
| | | child: const Text( |
| | | "清空记录", |
| | | style: TextStyle( |
| | | color: Color(0xFF999999), fontSize: 12), |
| | | ), |
| | | ):Container(), |
| | | _totalCount > 0 |
| | | ? InkWell( |
| | | onTap: () { |
| | | DialogUtil.showDialog( |
| | | context, |
| | | NotifyDialog( |
| | | "温馨提示", |
| | | "确定要清空记录吗?", |
| | | () {}, |
| | | () { |
| | | SOSApiUtil.clearSOSRecord(context) |
| | | .then((value) { |
| | | if (value!["code"] == 0) { |
| | | _onRefresh(); |
| | | } else { |
| | | ToastUtil.toast(value["msg"]); |
| | | } |
| | | }); |
| | | }, |
| | | height: 200, |
| | | )); |
| | | }, |
| | | child: const Text( |
| | | "清空记录", |
| | | style: TextStyle( |
| | | color: Color(0xFF999999), |
| | | fontSize: 12), |
| | | ), |
| | | ) |
| | | : Container(), |
| | | Expanded( |
| | | child: SmartRefresher( |
| | | enablePullDown: true, |
| | |
| | | height: 6, |
| | | ), |
| | | Text( |
| | | record.targetDesc!, |
| | | record.targetDesc==null?"": record.targetDesc!, |
| | | style: TextStyle(fontSize: 12, color: const Color(0xFF8CAFC8)), |
| | | ), |
| | | Container( |
| | |
| | | ), |
| | | InkWell( |
| | | onTap: () { |
| | | NavigatorUtil.navigateToNextPage(context, MapPage("位置",share: false,location:record.location,uid: record.targetUid,), (data) { }); |
| | | |
| | | NavigatorUtil.navigateToNextPage( |
| | | context, |
| | | MapPage( |
| | | "位置", |
| | | share: false, |
| | | location: record.location, |
| | | uid: record.targetUid, |
| | | ), |
| | | (data) {}); |
| | | }, |
| | | child: Row( |
| | | crossAxisAlignment: CrossAxisAlignment.center, |
| | |
| | | width: 6, |
| | | ), |
| | | Expanded( |
| | | child: FittedBox( |
| | | fit: BoxFit.fitWidth, |
| | | child: Text( |
| | | child: Text( |
| | | record.location!.address! + |
| | | record.location!.addressDetail!, |
| | | softWrap: false, |
| | | overflow: TextOverflow.ellipsis, |
| | | style: const TextStyle( |
| | | fontSize: 12, color: Color(0xFF999999)), |
| | | ))), |
| | | )), |
| | | Container( |
| | | width: 6, |
| | | ), |