|
|
@@ -1,19 +1,16 @@
|
|
|
-import 'dart:math';
|
|
|
-
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
+import 'package:flutter/material.dart';
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
import 'package:location/data/bean/track_daily_bean.dart';
|
|
|
-import 'package:location/data/bean/user_info.dart';
|
|
|
import 'package:location/data/consts/constants.dart';
|
|
|
import 'package:location/dialog/track_error_tips_dialog.dart';
|
|
|
-import 'package:location/module/analyse/location_analyse_page.dart';
|
|
|
import 'package:location/module/track/track_util.dart';
|
|
|
import 'package:location/resource/assets.gen.dart';
|
|
|
import 'package:location/resource/colors.gen.dart';
|
|
|
import 'package:location/resource/string.gen.dart';
|
|
|
import 'package:location/utils/common_expand.dart';
|
|
|
import 'package:location/utils/date_util.dart';
|
|
|
-
|
|
|
+import 'package:location/utils/toast_util.dart';
|
|
|
import '../track_status.dart';
|
|
|
|
|
|
typedef TrackItemClick = void Function(TrackDailyBean bean);
|
|
|
@@ -324,18 +321,45 @@ Widget _buildNetDesc(String? network) {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
+Widget _buildDoubtView() {
|
|
|
+ return Container(
|
|
|
+ constraints: BoxConstraints(
|
|
|
+ maxWidth: 0.9.sw,
|
|
|
+ ),
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ color: ColorName.black60,
|
|
|
+ borderRadius: BorderRadius.circular(4.r),
|
|
|
+ ),
|
|
|
+ padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 10.w),
|
|
|
+ child: Text(
|
|
|
+ StringName.trackNoDoubtDesc,
|
|
|
+ style: TextStyle(fontSize: 12.sp, color: ColorName.white),
|
|
|
+ ));
|
|
|
+}
|
|
|
+
|
|
|
Widget _buildLockDesc(int? highUnlock, int? totalUnlock) {
|
|
|
if ((highUnlock == null && totalUnlock == null) ||
|
|
|
(highUnlock == 0 && totalUnlock == 0)) {
|
|
|
- return Row(
|
|
|
- children: [
|
|
|
- Assets.images.iconTrackUnlockNoPermission
|
|
|
- .image(width: 14.w, height: 14.w),
|
|
|
- SizedBox(width: 2.w),
|
|
|
- Text(StringName.trackDetailNoAuthorize,
|
|
|
- style:
|
|
|
- TextStyle(fontSize: 11.sp, color: '#919DBE'.color, height: 1))
|
|
|
- ],
|
|
|
+ return GestureDetector(
|
|
|
+ behavior: HitTestBehavior.opaque,
|
|
|
+ onTap: () {
|
|
|
+ ToastUtil.show("",
|
|
|
+ displayTime: Duration(seconds: 3),
|
|
|
+ alignment: Alignment.center,
|
|
|
+ builder: (cxt) => _buildDoubtView());
|
|
|
+ },
|
|
|
+ child: Row(
|
|
|
+ children: [
|
|
|
+ Assets.images.iconTrackUnlockNoPermission
|
|
|
+ .image(width: 14.w, height: 14.w),
|
|
|
+ SizedBox(width: 2.w),
|
|
|
+ Text(StringName.trackDetailNoAuthorize,
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 11.sp, color: '#919DBE'.color, height: 1)),
|
|
|
+ SizedBox(width: 1.w),
|
|
|
+ Assets.images.iconTrackDailyDoubt.image(width: 12.w, height: 12.w)
|
|
|
+ ],
|
|
|
+ ),
|
|
|
);
|
|
|
} else {
|
|
|
return Row(
|