fmk 1 year ago
parent
commit
30f3eb690f
  1. 22
      lib/union/union_list.dart
  2. 8
      lib/union/union_page.dart

22
lib/union/union_list.dart

@ -303,6 +303,7 @@ class _UnionList extends State<UnionList> with AutomaticKeepAliveClientMixin {
children: []..addAll(
itemServer(store != null ? store.businessService : "")),
),
if (storeList[position].productShow != null)
SizedBox(height: store.businessService == "" ? 40.h : 23.h),
if (storeList[position].productShow != null)
Container(
@ -339,21 +340,16 @@ class _UnionList extends State<UnionList> with AutomaticKeepAliveClientMixin {
return list
.map((e) => Container(
margin: EdgeInsets.only(right: 8.w),
child: Container(
decoration: BoxDecoration(
color: Color(0xFFF65720),
borderRadius: BorderRadius.circular(2),
child: RoundButton(
height: 17.h * AppUtils.textScale(context),
text: "$e",
backgroup: Color(0xFFF65720),
padding: EdgeInsets.only(
left: 4.w,
right: 4.w,
),
padding: EdgeInsets.symmetric(vertical:2.h,horizontal:3.w),
margin: EdgeInsets.only(right: 10.w),
child: Text(
"$e",
style: TextStyle(
color: Colors.white,
fontSize: 10.sp,
fontWeight: MyFontWeight.regular,
),
),
textColor: Colors.white,
),
))
.toList();

8
lib/union/union_page.dart

@ -74,7 +74,7 @@ class UnionPageState extends State<UnionPage>
void permissionSettings() async {
if (_isShowLocalTips && await Permission.location.isGranted){
_isShowLocalTips = false;
startLocation();
getLocation();
}
}
@ -111,7 +111,7 @@ class UnionPageState extends State<UnionPage>
queryIpInfo();
}
startLocation({bool showLoading = true}) async {
getLocation({bool showLoading = true}) async {
if(showLoading)
EasyLoading.show(
status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black);
@ -147,7 +147,7 @@ class UnionPageState extends State<UnionPage>
// finallyFlag = true;
if (!powerFlag) {
if (await Permission.locationWhenInUse.status.isGranted) {
startLocation();
getLocation();
} else {
_isShowLocalTips = true;
loadFinish(showLoading: false);
@ -187,7 +187,7 @@ class UnionPageState extends State<UnionPage>
areaName = baseData.city.replaceAll("", "");
}
} finally {
startLocation(showLoading: false);
getLocation(showLoading: false);
}
}

Loading…
Cancel
Save