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

32
lib/union/union_list.dart

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

8
lib/union/union_page.dart

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

Loading…
Cancel
Save