admin
2022-01-12 8327000a0cce5e47226372e0e25c1e6faec497e7
lib/ui/sos/sos.dart
@@ -149,10 +149,7 @@
                            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(() {
@@ -274,34 +271,36 @@
                            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,
@@ -448,7 +447,7 @@
            height: 6,
          ),
          Text(
            record.targetDesc!,
            record.targetDesc==null?"":    record.targetDesc!,
            style: TextStyle(fontSize: 12, color: const Color(0xFF8CAFC8)),
          ),
          Container(
@@ -472,8 +471,15 @@
          ),
          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,
@@ -485,16 +491,14 @@
                    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,
                  ),