Browse Source

Merge branch 'master' into dev

# Conflicts:
#	lib/mine/mine_page.dart
#	lib/order/logistics_information_page.dart
null_safety
w-R 3 years ago
parent
commit
5e050b5867
  1. 12
      ios/Runner.xcodeproj/project.pbxproj
  2. 3
      lib/address/address_map_page.dart
  3. 7
      lib/home/huixiang_brand_page.dart
  4. 8
      lib/home/main_home_page.dart
  5. 13
      lib/home/points_mall_page.dart
  6. 8
      lib/main.dart
  7. 1
      lib/message/main_message_page.dart
  8. 2
      lib/message/mine_message.dart
  9. 1
      lib/mine/coupons_page.dart
  10. 10
      lib/mine/mine_page.dart
  11. 1
      lib/mine/roll_center_page.dart
  12. 2
      lib/mine/vip_detail_page.dart
  13. 36
      lib/order/logistics_information_page.dart
  14. 2
      lib/order/store_selector_page.dart
  15. 1
      lib/order/write_off_page.dart
  16. 1
      lib/setting/treaty_page.dart
  17. 1
      lib/union/store_details_page.dart
  18. 1
      lib/utils/status_utils.dart
  19. 84
      lib/view_widget/custom_image.dart
  20. 1
      lib/view_widget/item_input_widget.dart
  21. 1
      lib/view_widget/login_tips.dart
  22. 8
      pubspec.lock

12
ios/Runner.xcodeproj/project.pbxproj

@ -846,7 +846,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 26;
CURRENT_PROJECT_VERSION = 28;
DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -881,7 +881,7 @@
"$(PROJECT_DIR)/UniMPSDK/Libs",
"$(PROJECT_DIR)/wx/Libs",
);
MARKETING_VERSION = 1.0.26;
MARKETING_VERSION = 1.0.28;
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = (
"$(inherited)",
@ -1046,7 +1046,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 26;
CURRENT_PROJECT_VERSION = 28;
DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -1081,7 +1081,7 @@
"$(PROJECT_DIR)/UniMPSDK/Libs",
"$(PROJECT_DIR)/wx/Libs",
);
MARKETING_VERSION = 1.0.26;
MARKETING_VERSION = 1.0.28;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = (
"$(inherited)",
@ -1139,7 +1139,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 26;
CURRENT_PROJECT_VERSION = 28;
DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -1174,7 +1174,7 @@
"$(PROJECT_DIR)/UniMPSDK/Libs",
"$(PROJECT_DIR)/wx/Libs",
);
MARKETING_VERSION = 1.0.26;
MARKETING_VERSION = 1.0.28;
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = (
"$(inherited)",

3
lib/address/address_map_page.dart

@ -9,7 +9,6 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/retrofit/data/address.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:permission_handler/permission_handler.dart';
@ -151,7 +150,7 @@ class _AddressMapPage extends State<AddressMapPage> {
startLocation() async {
// await AmapCore.init('feaae7986201b571cace1b83728be5bb');
if (await Permission.locationWhenInUse.serviceStatus.isEnabled) {
bool isShown = await Permission.contacts.shouldShowRequestRationale;
// bool isShown = await Permission.contacts.shouldShowRequestRationale;
// if (isShown) {
// SmartDialog.showToast("shouldShowRequest");
// }

7
lib/home/huixiang_brand_page.dart

@ -14,15 +14,12 @@ import 'package:huixiang/retrofit/data/brand_data.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/MyPainter.dart';
import 'package:huixiang/utils/event_type.dart';
import 'package:huixiang/view_widget/border_text.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/round_button.dart';
import 'package:huixiang/view_widget/store_title_tab.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:sharesdk_plugin/sharesdk_interface.dart';
class BrandPage extends StatefulWidget {
@override
@ -217,8 +214,8 @@ class _BrandPage extends State<BrandPage>
child: MImage(
brandData == null ? "" : brandData.originAvatar,
fit: BoxFit.cover,
width: 60.w,
height: 60.h,
width: 60,
height: 60,
errorSrc: "assets/image/default_1.png",
fadeSrc: "assets/image/default_1.png",
),

8
lib/home/main_home_page.dart

@ -71,7 +71,9 @@ class _MainHomePage extends State<MainHomePage>
),
),
),
titleChild: TabBar(
titleChild: PreferredSize(
preferredSize: Size(double.infinity, 38.h),
child: TabBar(
controller: tabcontroller,
automaticIndicatorColorAdjustment: true,
isScrollable: true,
@ -97,7 +99,9 @@ class _MainHomePage extends State<MainHomePage>
MyTab(
text: S.of(context).jifenshangcheng,
),
]),
],
),
),
),
body: Container(
padding: EdgeInsets.only(bottom: 76.h),

13
lib/home/points_mall_page.dart

@ -19,7 +19,6 @@ import 'package:huixiang/utils/flutter_utils.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/item_title.dart';
import 'package:huixiang/view_widget/login_tips.dart';
import 'package:huixiang/view_widget/my_footer.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -270,8 +269,8 @@ class _PointsMallPage extends State<PointsMallPage>
//Widget之间间距
mainAxisSpacing: 16.w,
//Widget宽高比例 0.59
childAspectRatio: 166.w /
(281.h / 2 + (281.h / 2) * AppUtils.textScale(context)),
childAspectRatio: 166 /
(281 / 2 + (281 / 2) * AppUtils.textScale(context)),
),
itemBuilder: (contetx, index) {
return GestureDetector(
@ -383,7 +382,7 @@ class _PointsMallPage extends State<PointsMallPage>
height: 5.h,
),
Container(
height: 30.h * AppUtils.textScale(context),
height: 35.h * AppUtils.textScale(context),
child: Text(
goods.description,
maxLines: 2,
@ -468,9 +467,9 @@ class _PointsMallPage extends State<PointsMallPage>
children: [
MImage(
userinfo != null ? userinfo.headimg : "",
width: 50.w,
height: 50.h,
radius: BorderRadius.all(Radius.circular(100)),
width: 50,
height: 50,
isCircle: true,
fit: BoxFit.cover,
errorSrc: "assets/image/default_user.png",
fadeSrc: "assets/image/default_user.png",

8
lib/main.dart

@ -72,8 +72,7 @@ void main() async {
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
]);
// ignore: invalid_use_of_visible_for_testing_member
SharedPreferences.setMockInitialValues({});
SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
Locale locale;
if (sharedPreferences.containsKey("language") &&
@ -84,8 +83,9 @@ void main() async {
}
initSdk();
runApp(MyApp(locale, sharedPreferences.getBool("isFirst")));
bool isFirst = sharedPreferences.getBool("isFirst");
print("isFirst:$isFirst");
runApp(MyApp(locale, isFirst));
}
XgFlutterPlugin xgFlutterPlugin = XgFlutterPlugin();

1
lib/message/main_message_page.dart

@ -4,7 +4,6 @@ import 'package:huixiang/message/mine_message.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/round_button.dart';
class MainMessagePage extends StatefulWidget {
@override

2
lib/message/mine_message.dart

@ -1,5 +1,3 @@
import 'dart:collection';
import 'package:flutter/material.dart';
import 'package:huixiang/view_widget/message_item.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

1
lib/mine/coupons_page.dart

@ -1,7 +1,6 @@
import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/coupon.dart';

10
lib/mine/mine_page.dart

@ -157,7 +157,7 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
Column(
children: [
Container(
margin: EdgeInsets.only(right: 8.w),
margin: EdgeInsets.only(bottom:12.h,right: 16.w),
alignment: Alignment.centerRight,
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
@ -316,7 +316,7 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
///
Widget mineList(BuildContext context) {
return Container(
margin: EdgeInsets.fromLTRB(16.w, 8.h, 16.w, 8.h),
margin: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 28.h),
padding: EdgeInsets.fromLTRB(20.w, 12.h, 20.w, 12.h),
decoration: BoxDecoration(
color: Colors.white,
@ -455,7 +455,7 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
///
Widget orderOrCard() {
return Container(
margin: EdgeInsets.fromLTRB(16.w, 8.h, 16.w, 8.h),
margin: EdgeInsets.fromLTRB(16.w,16.h, 16.w, 8.h),
padding: EdgeInsets.fromLTRB(20.w, 12.h, 20.w, 12.h),
decoration: BoxDecoration(
color: Colors.white,
@ -568,8 +568,8 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
MImage(
userinfo == null ? "" : userinfo.headimg,
isCircle: true,
width: 50.w,
height: 50.h,
width: 50,
height: 50,
fit: BoxFit.cover,
errorSrc: "assets/image/default_user.png",
fadeSrc: "assets/image/default_user.png",

1
lib/mine/roll_center_page.dart

@ -1,7 +1,6 @@
import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/coupon.dart';

2
lib/mine/vip_detail_page.dart

@ -5,11 +5,9 @@ import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/order_info.dart';
import 'package:huixiang/retrofit/data/page.dart';
import 'package:huixiang/retrofit/data/store.dart';
import 'package:huixiang/retrofit/data/vip_card.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/painter_bg.dart';
import 'package:huixiang/utils/status_utils.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/my_footer.dart';

36
lib/order/logistics_information_page.dart

@ -12,6 +12,11 @@ class LogisticsInformationPage extends StatefulWidget {
}
class _LogisticsInformationPage extends State<LogisticsInformationPage> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
@ -31,22 +36,24 @@ class _LogisticsInformationPage extends State<LogisticsInformationPage> {
height: 16.h,
),
Container(
margin: EdgeInsets.symmetric(vertical: 8.h, horizontal: 16.w),
margin: EdgeInsets.symmetric(
vertical: 8.h,
horizontal: 16.w,
),
padding: EdgeInsets.all(16),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(8),
bottomLeft: Radius.circular(4),
topRight: Radius.circular(8),
bottomRight: Radius.circular(4),
borderRadius: BorderRadius.vertical(
top: Radius.circular(8.w),
bottom: Radius.circular(4.w),
),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 2),
blurRadius: 14,
spreadRadius: 0)
color: Colors.black.withAlpha(12),
offset: Offset(0, 2),
blurRadius: 14,
spreadRadius: 0,
)
],
),
child: Column(
@ -91,10 +98,11 @@ class _LogisticsInformationPage extends State<LogisticsInformationPage> {
borderRadius: BorderRadius.circular(4),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 2),
blurRadius: 14,
spreadRadius: 0)
color: Colors.black.withAlpha(12),
offset: Offset(0, 2),
blurRadius: 14,
spreadRadius: 0,
)
],
),
child: Column(

2
lib/order/store_selector_page.dart

@ -95,7 +95,7 @@ class _StoreSelectorPage extends State<StoreSelectorPage> {
startLocation() async {
if (await Permission.locationWhenInUse.serviceStatus.isEnabled) {
bool isShown = await Permission.contacts.shouldShowRequestRationale;
// bool isShown = await Permission.contacts.shouldShowRequestRationale;
// if (isShown) {
// SmartDialog.showToast("shouldShowRequestRationale");
// }

1
lib/order/write_off_page.dart

@ -3,7 +3,6 @@ import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/coupon.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/round_button.dart';
import 'package:huixiang/view_widget/separator.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:qr_flutter/qr_flutter.dart';

1
lib/setting/treaty_page.dart

@ -1,7 +1,6 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
// import 'package:webview_flutter/webview_flutter.dart';
// import 'package:webview_flutter/src/webview_cupertino.dart';

1
lib/union/store_details_page.dart

@ -1,6 +1,5 @@
import 'dart:io';
import 'package:chewie_audio/chewie_audio.dart';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';

1
lib/utils/status_utils.dart

@ -314,5 +314,6 @@ class StatusUtils {
}
}
}
return [Container()];
}
}

84
lib/view_widget/custom_image.dart

@ -27,68 +27,48 @@ class MImage extends StatelessWidget {
@override
Widget build(BuildContext context) {
Widget image = LayoutBuilder(builder: (context, constraints) {
String imageUrl = "$src?imageMogr2/thumbnail/${constraints.constrainWidth() * 2}x${constraints.constrainHeight() * 2}/format/webp/blur/1x0/quality/75";
print("imageUrl: $imageUrl");
return CachedNetworkImage(
imageUrl: imageUrl,
cacheManager: DefaultCacheManager(),
fadeInDuration: Duration(milliseconds: 300),
fadeOutDuration: Duration(milliseconds: 300),
imageBuilder: (context, provide) {
return Image(
image: provide,
fit: fit,
);
},
errorWidget: (context, error, stackTrace) {
return Image.asset(
errorSrc,
fit: fit,
);
},
placeholder: (context, placeholder) {
print("object $placeholder");
return Image.asset(
fadeSrc,
fit: fit,
);
},
);
});
var clipRRect ;
if (isCircle) {
clipRRect = ClipOval(
clipBehavior: Clip.antiAlias,
child: CachedNetworkImage(
imageUrl: "$src?imageMogr2/format/webp/blur/1x0/quality/75",
cacheManager: DefaultCacheManager(),
fadeInDuration: Duration(milliseconds: 300),
fadeOutDuration: Duration(milliseconds: 300),
imageBuilder: (context, provide) {
return Image(
image: provide,
fit: fit,
);
},
errorWidget: (context, error, stackTrace) {
return Image.asset(
errorSrc,
fit: fit,
);
},
placeholder: (context, placeholder) {
print("object $placeholder");
return Image.asset(
fadeSrc,
fit: fit,
);
},
),
child: image
);
} else {
clipRRect = ClipRRect(
borderRadius: radius,
child: CachedNetworkImage(
imageUrl: "$src?imageMogr2/format/webp/blur/1x0/quality/75",
cacheManager: DefaultCacheManager(),
fadeInDuration: Duration(milliseconds: 300),
fadeOutDuration: Duration(milliseconds: 300),
imageBuilder: (context, provide) {
return Image(
image: provide,
fit: fit,
);
},
errorWidget: (context, error, stackTrace) {
return Image.asset(
errorSrc,
fit: fit,
);
},
placeholder: (context, placeholder) {
print("object $placeholder");
return Image.asset(
fadeSrc,
fit: fit,
);
},
),
child: image,
);
}
if (aspectRatio != null && aspectRatio > 0) {
return Container(
child: AspectRatio(

1
lib/view_widget/item_input_widget.dart

@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/border_text.dart';
class ItemInputWidget extends StatelessWidget {
final String hintText;

1
lib/view_widget/login_tips.dart

@ -4,7 +4,6 @@ import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/utils/flutter_utils.dart';
import 'package:huixiang/view_widget/border_text.dart';
import 'package:huixiang/view_widget/round_button.dart';

8
pubspec.lock

@ -56,7 +56,7 @@ packages:
name: async
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.6.1"
version: "2.5.0"
barcode:
dependency: transitive
description:
@ -879,7 +879,7 @@ packages:
name: test_api
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.3.0"
version: "0.2.19"
timing:
dependency: transitive
description:
@ -1042,7 +1042,7 @@ packages:
name: win32
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.2.5"
version: "2.0.5"
xdg_directories:
dependency: transitive
description:
@ -1065,5 +1065,5 @@ packages:
source: hosted
version: "3.1.0"
sdks:
dart: ">=2.13.0 <3.0.0"
dart: ">=2.12.0 <3.0.0"
flutter: ">=2.0.0"

Loading…
Cancel
Save