|
|
@@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
import 'package:location/data/api/response/track_daily_summary_response.dart';
|
|
|
import 'package:location/data/bean/user_info.dart';
|
|
|
+import 'package:location/data/repositories/account_repository.dart';
|
|
|
import 'package:location/resource/assets.gen.dart';
|
|
|
import 'package:location/resource/string.gen.dart';
|
|
|
import 'package:location/utils/common_expand.dart';
|
|
|
@@ -266,7 +267,7 @@ class TrackShareView extends StatelessWidget {
|
|
|
),
|
|
|
),
|
|
|
SizedBox(height: 6.w),
|
|
|
- Text(getUserName(userInfo.phoneNumber),
|
|
|
+ Text(getUserName(),
|
|
|
style: TextStyle(
|
|
|
fontSize: 12.sp,
|
|
|
color: '#333333'.color,
|
|
|
@@ -276,7 +277,14 @@ class TrackShareView extends StatelessWidget {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- String getUserName(String phone) {
|
|
|
+ String getUserName() {
|
|
|
+ String phone;
|
|
|
+ if (userInfo.isMine == true) {
|
|
|
+ phone = AccountRepository.getInstance().loginPhoneNum.value ??
|
|
|
+ userInfo.phoneNumber;
|
|
|
+ } else {
|
|
|
+ phone = userInfo.phoneNumber;
|
|
|
+ }
|
|
|
if (phone.length > 4) {
|
|
|
phone = phone.substring(phone.length - 4);
|
|
|
}
|