diff --git a/android/build.gradle b/android/build.gradle index c5d4c70..4b5633b 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -31,4 +31,8 @@ android { lintOptions { disable 'InvalidPackage' } + + dependencies { + implementation 'com.amap.api:location:5.2.0' + } } diff --git a/android/libs/AMap_Location_V4.9.0_20200228.jar b/android/libs/AMap_Location_V4.9.0_20200228.jar new file mode 100644 index 0000000..baa1764 Binary files /dev/null and b/android/libs/AMap_Location_V4.9.0_20200228.jar differ diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 3eb1970..72f7620 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -54,7 +54,7 @@ android { ndk { //选择要添加的对应cpu类型的.so库。 abiFilters 'armeabi', 'armeabi-v7a', 'x86', 'x86_64', 'mips', 'mips64', 'arm64-v8a' - //abiFilters 'armeabi-v7a','x86_64' + //abiFilters 'armeabi-v7a','x86_64','arm64-v8a' } } @@ -113,9 +113,9 @@ android { // // 智夜生活 // zhiying { // applicationId "cn.zhios.zhiying" -// versionCode 55 +// versionCode 57 // dimension "app" -// versionName '1.3.15' +// versionName '1.3.17' // // 签名信息 // signingConfig signingConfigs.zhiying // } @@ -186,7 +186,6 @@ dependencies { implementation 'com.alibaba.sdk.android:nb_trade:4.0.0.16@aar' implementation 'com.alibaba:fastjson:1.2.41@jar' - implementation fileTree(include: ['*.jar'], dir: 'libs') } @@ -219,7 +218,7 @@ MobSDK { } Wechat { appId "wx598aaef252cd78e4" - appSecret "d2fc2edf9ece746765b3bfc0bf1b230e" + appSecret "e3e41385b2832d53745805181cb0daa6" shareByAppClient true withShareTicket true bypassApproval false diff --git a/example/android/app/libs/AMap_Location_V5.2.0_20200915.jar b/example/android/app/libs/AMap_Location_V5.2.0_20200915.jar deleted file mode 100644 index 28c3dae..0000000 Binary files a/example/android/app/libs/AMap_Location_V5.2.0_20200915.jar and /dev/null differ diff --git a/example/android/tmpmob/ShareSDK/assets/ShareSDK.xml b/example/android/tmpmob/ShareSDK/assets/ShareSDK.xml index 5cca3e4..0c9c943 100644 --- a/example/android/tmpmob/ShareSDK/assets/ShareSDK.xml +++ b/example/android/tmpmob/ShareSDK/assets/ShareSDK.xml @@ -16,7 +16,7 @@ - + diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 2e9b0d6..a7a115b 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -443,7 +443,7 @@ SPEC CHECKSUMS: flutter_webview_plugin: ed9e8a6a96baf0c867e90e1bce2673913eeac694 flutter_xupdate: bdb588f0fe4f6c5e45436b8b0de08d505a50c04e fluttertoast: b644586ef3b16f67fae9a1f8754cef6b2d6b634b - fluwx: 8d47bee15c7fed07b94c2a12fb2381677232431a + fluwx: 07a55ed66bf3a4961e836a2a411b02dcada32902 FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a image_cropper: 3c16d7651730ffe85897f5a1c4e2547e6b54989a image_picker: 9c3312491f862b28d21ecd8fdf0ee14e601b3f09 diff --git a/example/ios/Runner/AppDelegate.m b/example/ios/Runner/AppDelegate.m index 1e66d3b..610674d 100644 --- a/example/ios/Runner/AppDelegate.m +++ b/example/ios/Runner/AppDelegate.m @@ -27,12 +27,19 @@ // 获取设置 - (NSDictionary*)getSetting { - return @{ - @"domain": @"http://inapi.izhyin.cn", - @"master_id": @"123456", - @"secret_key": @"123456" +// return @{ +// @"domain": @"http://inapi.izhyin.cn", +// @"master_id": @"123456", +// @"secret_key": @"123456" //@"domain": @"http://192.168.0.113:5000" - }; +// }; + + return @{ + @"domain": @"http://api.zhios.cn", + @"master_id": @"99813608", + @"secret_key": @"123456" + //@"domain": @"http://192.168.0.113:5000" + }; } #pragma mark -- 第三方应用跳转 diff --git a/lib/pages/about_us_page/bloc/about_us_bloc.dart b/lib/pages/about_us_page/bloc/about_us_bloc.dart index 2ffd550..5c88eea 100644 --- a/lib/pages/about_us_page/bloc/about_us_bloc.dart +++ b/lib/pages/about_us_page/bloc/about_us_bloc.dart @@ -10,10 +10,7 @@ class AboutUsBloc extends Bloc { AboutUsRepository repository; - AboutUsBloc(this.repository); - - @override - AboutUsState get initialState => AboutUsInitial(); + AboutUsBloc(this.repository) : super(AboutUsInitial()); @override Stream mapEventToState( diff --git a/lib/pages/custom_page/bloc/custom_item_page_bloc.dart b/lib/pages/custom_page/bloc/custom_item_page_bloc.dart index ef870eb..28cae56 100644 --- a/lib/pages/custom_page/bloc/custom_item_page_bloc.dart +++ b/lib/pages/custom_page/bloc/custom_item_page_bloc.dart @@ -11,10 +11,9 @@ class CustomItemPageBloc extends Bloc CustomItemPageRepository repository; - CustomItemPageBloc(this.repository); + CustomItemPageBloc(this.repository) : super(CustomItemPageInitial()); + - @override - CustomItemPageState get initialState => CustomItemPageInitial(); @override Stream mapEventToState( diff --git a/lib/pages/custom_page/bloc/custom_page_bloc.dart b/lib/pages/custom_page/bloc/custom_page_bloc.dart index 467bcf1..1ce1686 100644 --- a/lib/pages/custom_page/bloc/custom_page_bloc.dart +++ b/lib/pages/custom_page/bloc/custom_page_bloc.dart @@ -13,10 +13,8 @@ class CustomPageBloc extends Bloc { CustomPageRepository repository; - CustomPageBloc(this.repository); + CustomPageBloc(this.repository) : super(CustomPageInitialState()); - @override - CustomPageState get initialState => CustomPageInitialState(); @override Stream mapEventToState( diff --git a/lib/pages/favorites_page/bloc/favorites_bloc.dart b/lib/pages/favorites_page/bloc/favorites_bloc.dart index eec3548..5cb49ad 100644 --- a/lib/pages/favorites_page/bloc/favorites_bloc.dart +++ b/lib/pages/favorites_page/bloc/favorites_bloc.dart @@ -17,11 +17,8 @@ class FavoritesBloc extends Bloc { FavoritesRepository repository; - FavoritesBloc(this.repository); + FavoritesBloc(this.repository) : super(FavoritesInitial()); - @override - // TODO: implement initialState - FavoritesState get initialState => FavoritesInitial(); @override Stream mapEventToState( diff --git a/lib/pages/feedback_page/bloc/feedback_bloc.dart b/lib/pages/feedback_page/bloc/feedback_bloc.dart index eb80386..0322341 100644 --- a/lib/pages/feedback_page/bloc/feedback_bloc.dart +++ b/lib/pages/feedback_page/bloc/feedback_bloc.dart @@ -7,12 +7,10 @@ import 'package:flutter_bloc/flutter_bloc.dart'; class FeedbackBloc extends Bloc { // FeedbackBloc() : super(FeedbackInitial()); - @override - FeedbackState get initialState => FeedbackInitial(); FeedBackRepository repository; - FeedbackBloc(this.repository); + FeedbackBloc(this.repository) : super(FeedbackInitial()); @override Stream mapEventToState( diff --git a/lib/pages/feedback_page/bloc/feedback_record_bloc.dart b/lib/pages/feedback_page/bloc/feedback_record_bloc.dart index f5dd414..88e0f6f 100644 --- a/lib/pages/feedback_page/bloc/feedback_record_bloc.dart +++ b/lib/pages/feedback_page/bloc/feedback_record_bloc.dart @@ -8,12 +8,11 @@ import 'feedback_record_state.dart'; class FeedbackRecordBloc extends Bloc { // FeedbackRecordBloc() : super(FeedbackRecordInitial()); - @override - FeedbackRecordState get initialState => FeedbackRecordInitial(); + FeedbackRecordRepository repository; - FeedbackRecordBloc(this.repository); + FeedbackRecordBloc(this.repository) : super(FeedbackRecordInitial()); @override Stream mapEventToState( diff --git a/lib/pages/goods_details_page/bloc/goods_details_page_bloc.dart b/lib/pages/goods_details_page/bloc/goods_details_page_bloc.dart index f107da4..ae43dbf 100644 --- a/lib/pages/goods_details_page/bloc/goods_details_page_bloc.dart +++ b/lib/pages/goods_details_page/bloc/goods_details_page_bloc.dart @@ -13,12 +13,10 @@ part 'goods_details_page_state.dart'; class GoodsDetailsPageBloc extends Bloc { // GoodsDetailsPageBloc() : super(GoodsDetailsPageInitial()); - @override - GoodsDetailsPageState get initialState => GoodsDetailsPageInitial(); GoodsDetailsPageRepository repository; - GoodsDetailsPageBloc({@required this.repository}); + GoodsDetailsPageBloc({@required this.repository}) : super(GoodsDetailsPageInitial()); @override Stream mapEventToState( diff --git a/lib/pages/message_notice_page/bloc/message_notice_bloc.dart b/lib/pages/message_notice_page/bloc/message_notice_bloc.dart index 0239471..96a2a80 100644 --- a/lib/pages/message_notice_page/bloc/message_notice_bloc.dart +++ b/lib/pages/message_notice_page/bloc/message_notice_bloc.dart @@ -18,10 +18,8 @@ class MessageNoticeBloc extends Bloc { MessageNoticeRepository repository; - MessageNoticeBloc(this.repository); + MessageNoticeBloc(this.repository) : super(MessageNoticeInitial()); - @override - MessageNoticeState get initialState => MessageNoticeInitial(); @override Stream mapEventToState( diff --git a/lib/pages/message_settings_page/bloc/message_settings_bloc.dart b/lib/pages/message_settings_page/bloc/message_settings_bloc.dart index 90072bb..3d25419 100644 --- a/lib/pages/message_settings_page/bloc/message_settings_bloc.dart +++ b/lib/pages/message_settings_page/bloc/message_settings_bloc.dart @@ -8,11 +8,10 @@ import 'message_settings_event.dart'; import 'message_settings_state.dart'; class MessageSettingsBloc extends Bloc { - @override - MessageSettingsState get initialState => MessageSettingsInitial(); + MessageSettingsRepository repository; - MessageSettingsBloc(this.repository); + MessageSettingsBloc(this.repository) : super(MessageSettingsInitial()); @override Stream mapEventToState( diff --git a/lib/pages/privacy_settings_page/bloc/privacy_settings_bloc.dart b/lib/pages/privacy_settings_page/bloc/privacy_settings_bloc.dart index 602284f..a1fb35a 100644 --- a/lib/pages/privacy_settings_page/bloc/privacy_settings_bloc.dart +++ b/lib/pages/privacy_settings_page/bloc/privacy_settings_bloc.dart @@ -7,12 +7,11 @@ import 'privacy_settings_state.dart'; import 'package:zhiying_comm/zhiying_comm.dart'; class PrivacySettingsBloc extends Bloc { - @override - PrivacySettingsState get initialState => PrivacySettingsInitial(); + PrivacySettingsRepository repository; - PrivacySettingsBloc(this.repository); + PrivacySettingsBloc(this.repository) : super(PrivacySettingsInitial()); @override Stream mapEventToState( diff --git a/lib/pages/search_page/bloc/search_bloc.dart b/lib/pages/search_page/bloc/search_bloc.dart index 17cf01f..5697eaa 100644 --- a/lib/pages/search_page/bloc/search_bloc.dart +++ b/lib/pages/search_page/bloc/search_bloc.dart @@ -15,10 +15,9 @@ class SearchBloc extends Bloc { SearchRepository repository; - SearchBloc({this.repository}); + SearchBloc({this.repository}) : super(SearchInitial()); + - @override - SearchState get initialState => SearchInitial(); @override Stream mapEventToState( diff --git a/lib/pages/search_page/item/bloc/search_item_page_bloc.dart b/lib/pages/search_page/item/bloc/search_item_page_bloc.dart index 2f06e61..eb1c58f 100644 --- a/lib/pages/search_page/item/bloc/search_item_page_bloc.dart +++ b/lib/pages/search_page/item/bloc/search_item_page_bloc.dart @@ -15,11 +15,9 @@ class SearchItemPageBloc extends Bloc SearchItemRepository repository; - SearchItemPageBloc({@required this.repository}); + SearchItemPageBloc({@required this.repository}) : super(SearchItemPageInitial()); + - @override - // TODO: implement initialState - SearchItemPageState get initialState => SearchItemPageInitial(); @override Stream mapEventToState( diff --git a/lib/pages/search_result_page/bloc/search_result_bloc.dart b/lib/pages/search_result_page/bloc/search_result_bloc.dart index 15b68c0..e7e15e2 100644 --- a/lib/pages/search_result_page/bloc/search_result_bloc.dart +++ b/lib/pages/search_result_page/bloc/search_result_bloc.dart @@ -15,10 +15,9 @@ class SearchResultBloc extends Bloc { SearchResultRepository repository; - SearchResultBloc({@required this.repository}); + SearchResultBloc({@required this.repository}) : super(SearchResultInitial()); + - @override - SearchResultState get initialState => SearchResultInitial(); @override Stream mapEventToState( diff --git a/lib/pages/search_result_page/item/bloc/search_result_item_bloc.dart b/lib/pages/search_result_page/item/bloc/search_result_item_bloc.dart index a867af3..f4fe1e3 100644 --- a/lib/pages/search_result_page/item/bloc/search_result_item_bloc.dart +++ b/lib/pages/search_result_page/item/bloc/search_result_item_bloc.dart @@ -15,10 +15,9 @@ class SearchResultItemBloc extends Bloc SearchResultItemInitial(); - SearchResultItemBloc({@required this.repository}); + + SearchResultItemBloc({@required this.repository}) : super(SearchResultItemInitial()); @override Stream mapEventToState( diff --git a/lib/pages/search_think_page/bloc/search_think_bloc.dart b/lib/pages/search_think_page/bloc/search_think_bloc.dart index 7457203..60e66d5 100644 --- a/lib/pages/search_think_page/bloc/search_think_bloc.dart +++ b/lib/pages/search_think_page/bloc/search_think_bloc.dart @@ -13,12 +13,11 @@ part 'search_think_state.dart'; class SearchThinkBloc extends Bloc { // SearchThinkBloc() : super(SearchThinkInitial()); - @override - SearchThinkState get initialState => SearchThinkInitial(); + SearchThinkRepository repository; - SearchThinkBloc(this.repository); + SearchThinkBloc(this.repository) : super(SearchThinkInitial()); @override Stream mapEventToState(SearchThinkEvent event,) async* { diff --git a/lib/pages/team_details_page/bloc/team_details_bloc.dart b/lib/pages/team_details_page/bloc/team_details_bloc.dart index a0b859e..6b61626 100644 --- a/lib/pages/team_details_page/bloc/team_details_bloc.dart +++ b/lib/pages/team_details_page/bloc/team_details_bloc.dart @@ -13,13 +13,11 @@ part 'team_details_event.dart'; part 'team_details_state.dart'; class TeamDetailsBloc extends Bloc { - // TeamDetailsBloc() : super(TeamDetailsInitial()); - @override - TeamDetailsState get initialState => TeamDetailsInitial(); + TeamDetailsRepository repository; - TeamDetailsBloc({@required this.repository}); + TeamDetailsBloc({@required this.repository}) : super(TeamDetailsInitial()); @override Stream mapEventToState( diff --git a/lib/pages/team_page/bloc/team_bloc.dart b/lib/pages/team_page/bloc/team_bloc.dart index a32e173..6b76f8f 100644 --- a/lib/pages/team_page/bloc/team_bloc.dart +++ b/lib/pages/team_page/bloc/team_bloc.dart @@ -17,10 +17,9 @@ class TeamBloc extends Bloc { TeamRepository repository; - TeamBloc({@required this.repository}); + TeamBloc({@required this.repository}) : super(TeamInitial()); + - @override - TeamState get initialState => TeamInitial(); @override Stream mapEventToState( diff --git a/lib/pages/upload_wechat_page/bloc/upload_wechat_bloc.dart b/lib/pages/upload_wechat_page/bloc/upload_wechat_bloc.dart index b19b67e..93c2ef6 100644 --- a/lib/pages/upload_wechat_page/bloc/upload_wechat_bloc.dart +++ b/lib/pages/upload_wechat_page/bloc/upload_wechat_bloc.dart @@ -7,12 +7,11 @@ import 'upload_wechat_event.dart'; import 'upload_wechat_state.dart'; class UploadWeChatBloc extends Bloc { - @override - UploadWeChatState get initialState => UploadWeChatInitial(); + UploadWeChatRepository repository; - UploadWeChatBloc(this.repository); + UploadWeChatBloc(this.repository) : super(UploadWeChatInitial()); @override Stream mapEventToState( diff --git a/lib/pages/vip_center_page/bloc/vip_center_bloc.dart b/lib/pages/vip_center_page/bloc/vip_center_bloc.dart index a9940e6..79a34b5 100644 --- a/lib/pages/vip_center_page/bloc/vip_center_bloc.dart +++ b/lib/pages/vip_center_page/bloc/vip_center_bloc.dart @@ -13,12 +13,11 @@ part 'vip_center_state.dart'; class VipCenterBloc extends Bloc { // VipCenterBloc() : super(VipCenterInitial()); - @override - VipCenterState get initialState => VipCenterInitial(); + VipCenterRepository repository; - VipCenterBloc(this.repository); + VipCenterBloc(this.repository) : super(VipCenterInitial()); @override Stream mapEventToState( diff --git a/lib/register.dart b/lib/register.dart index f777e6b..a426865 100644 --- a/lib/register.dart +++ b/lib/register.dart @@ -128,19 +128,21 @@ class BaseWidgetRegister { register.setupQQ(config.keys?.qq?.appId ?? '', config.keys?.qq?.appkey ?? ''); // ================ jd - if (Platform.isIOS) { - Jdsdk.init(appKey: config.keys?.jdIos?.appkey ?? '', appSecret: config.keys?.jdIos?.secret ?? ''); - } else if (Platform.isAndroid) { - Jdsdk.init(appKey: config.keys?.jdAndroid?.appkey ?? '', appSecret: config.keys?.jdAndroid?.secret ?? ''); - } SharesdkPlugin.regist(register); + ///微信支付初始化 registerWxApi(appId: config?.keys?.weixin?.appId, universalLink: config?.keys?.weixin?.universalLink); ///高德定位注册 AMapFlutterLocation.setApiKey(config?.keys?.gd?.androidKey ?? "", config?.keys?.gd?.iosKey); + if (Platform.isIOS) { + Jdsdk.init(appKey: config.keys?.jdIos?.appkey ?? '', appSecret: config.keys?.jdIos?.secret ?? ''); + } else if (Platform.isAndroid) { + Jdsdk.init(appKey: config.keys?.jdAndroid?.appkey ?? '', appSecret: config.keys?.jdAndroid?.secret ?? ''); + } + }); // MOB 秒验 diff --git a/lib/widgets/custom/multi_nav/bloc/custom_quick_entry_bloc.dart b/lib/widgets/custom/multi_nav/bloc/custom_quick_entry_bloc.dart index b6abed3..9d747f7 100644 --- a/lib/widgets/custom/multi_nav/bloc/custom_quick_entry_bloc.dart +++ b/lib/widgets/custom/multi_nav/bloc/custom_quick_entry_bloc.dart @@ -10,10 +10,9 @@ import './bloc.dart'; class CustomQuickEntryBloc extends Bloc { CustomQuickEntryRepository repository; - CustomQuickEntryBloc({@required this.repository}); + CustomQuickEntryBloc({@required this.repository}) : super(InitialCustomQuickEntryState()); + - @override - CustomQuickEntryState get initialState => InitialCustomQuickEntryState(); @override Stream mapEventToState(CustomQuickEntryEvent event) async* { diff --git a/lib/widgets/custom/notice/bloc/custom_notice_bloc.dart b/lib/widgets/custom/notice/bloc/custom_notice_bloc.dart index c266c31..1ab6e7a 100644 --- a/lib/widgets/custom/notice/bloc/custom_notice_bloc.dart +++ b/lib/widgets/custom/notice/bloc/custom_notice_bloc.dart @@ -6,10 +6,9 @@ import 'bloc.dart'; class CustomNoticeBloc extends Bloc { CustomNoticeRepository repository; - CustomNoticeBloc({this.repository}); + CustomNoticeBloc({this.repository}) : super(CustomNoticeInitial()); + - @override - CustomNoticeState get initialState => CustomNoticeInitial(); @override Stream mapEventToState( diff --git a/lib/widgets/custom/slide_banner/bloc/custom_slide_banner_bloc.dart b/lib/widgets/custom/slide_banner/bloc/custom_slide_banner_bloc.dart index c6593bb..aace5a7 100644 --- a/lib/widgets/custom/slide_banner/bloc/custom_slide_banner_bloc.dart +++ b/lib/widgets/custom/slide_banner/bloc/custom_slide_banner_bloc.dart @@ -9,10 +9,9 @@ import './bloc.dart'; class CustomSlideBannerBloc extends Bloc { CustomSlideBannerRepository repository; - CustomSlideBannerBloc({@required this.repository}); + CustomSlideBannerBloc({@required this.repository}) : super(InitialCustomSlideBannerState()); + - @override - CustomSlideBannerState get initialState => InitialCustomSlideBannerState(); @override Stream mapEventToState(CustomSlideBannerEvent event) async* { diff --git a/lib/widgets/favorites/goods_list/bloc/favorites_goods_list_bloc.dart b/lib/widgets/favorites/goods_list/bloc/favorites_goods_list_bloc.dart index 871e0aa..a721547 100644 --- a/lib/widgets/favorites/goods_list/bloc/favorites_goods_list_bloc.dart +++ b/lib/widgets/favorites/goods_list/bloc/favorites_goods_list_bloc.dart @@ -14,12 +14,11 @@ part 'favorites_goods_list_event.dart'; part 'favorites_goods_list_state.dart'; class FavoritesGoodsListBloc extends Bloc { - @override - FavoritesGoodsListState get initialState => FavoritesGoodsListInitial(); + FavoritesGoodsListRepository repository; - FavoritesGoodsListBloc(this.repository); + FavoritesGoodsListBloc(this.repository) : super(FavoritesGoodsListInitial()); @override Stream mapEventToState( diff --git a/lib/widgets/goods_details/coupon/bloc/counpon_bloc.dart b/lib/widgets/goods_details/coupon/bloc/counpon_bloc.dart index b0d2329..4c6e015 100644 --- a/lib/widgets/goods_details/coupon/bloc/counpon_bloc.dart +++ b/lib/widgets/goods_details/coupon/bloc/counpon_bloc.dart @@ -6,12 +6,11 @@ import 'bloc.dart'; import 'package:zhiying_comm/zhiying_comm.dart'; class CounponBloc extends Bloc { - @override - CounponState get initialState => CounponInitial(); + CounponRepository repository; - CounponBloc({this.repository}); + CounponBloc({this.repository}) : super(CounponInitial()); @override Stream mapEventToState( diff --git a/lib/widgets/goods_details/detail_img/bloc/goods_details_img_bloc.dart b/lib/widgets/goods_details/detail_img/bloc/goods_details_img_bloc.dart index 2222ef6..8eb4d92 100644 --- a/lib/widgets/goods_details/detail_img/bloc/goods_details_img_bloc.dart +++ b/lib/widgets/goods_details/detail_img/bloc/goods_details_img_bloc.dart @@ -13,7 +13,7 @@ part 'goods_details_img_event.dart'; part 'goods_details_img_state.dart'; class GoodsDetailsImgBloc extends Bloc { - GoodsDetailsImgBloc({this.repository}); + GoodsDetailsImgBloc({this.repository}) : super(GoodsDetailsImgInitial()); GoodsDetailsImgRepository repository; diff --git a/lib/widgets/goods_details/footer/bloc/goods_details_footer_bloc.dart b/lib/widgets/goods_details/footer/bloc/goods_details_footer_bloc.dart index 1852fee..366cf24 100644 --- a/lib/widgets/goods_details/footer/bloc/goods_details_footer_bloc.dart +++ b/lib/widgets/goods_details/footer/bloc/goods_details_footer_bloc.dart @@ -12,12 +12,10 @@ part 'goods_details_footer_event.dart'; part 'goods_details_footer_state.dart'; class GoodsDetailsFooterBloc extends Bloc { - GoodsDetailsFooterBloc({this.repository}); + GoodsDetailsFooterBloc({this.repository}) : super(GoodsDetailsFooterInitial()); GoodsDetailsFooterRepository repository; - @override - GoodsDetailsFooterState get initialState => GoodsDetailsFooterInitial(); @override Stream mapEventToState( diff --git a/lib/widgets/goods_details/slide_banner/bloc/goods_details_slide_banner_bloc.dart b/lib/widgets/goods_details/slide_banner/bloc/goods_details_slide_banner_bloc.dart index 66c0295..e4d35e2 100644 --- a/lib/widgets/goods_details/slide_banner/bloc/goods_details_slide_banner_bloc.dart +++ b/lib/widgets/goods_details/slide_banner/bloc/goods_details_slide_banner_bloc.dart @@ -15,10 +15,9 @@ part 'goods_details_slide_banner_state.dart'; class GoodsDetailsSlideBannerBloc extends Bloc { GoodsDetailsSlideBannerRepository repository; - GoodsDetailsSlideBannerBloc({@required this.repository}); + GoodsDetailsSlideBannerBloc({@required this.repository}) : super(GoodsDetailsSlideBannerInitial()); + - @override - GoodsDetailsSlideBannerState get initialState => GoodsDetailsSlideBannerInitial(); @override Stream mapEventToState( diff --git a/lib/widgets/goods_details/store/bloc/store_bloc.dart b/lib/widgets/goods_details/store/bloc/store_bloc.dart index 38d4f58..e0ed1bf 100644 --- a/lib/widgets/goods_details/store/bloc/store_bloc.dart +++ b/lib/widgets/goods_details/store/bloc/store_bloc.dart @@ -8,10 +8,9 @@ import 'bloc.dart'; class StoreBloc extends Bloc { StoreRepository repository; - StoreBloc({this.repository}); + StoreBloc({this.repository}) : super(StoreInitial()); + - @override - StoreState get initialState => StoreInitial(); @override Stream mapEventToState( diff --git a/lib/widgets/home/home_banner/bloc/home_banner_bloc.dart b/lib/widgets/home/home_banner/bloc/home_banner_bloc.dart index 9f89c42..832aa87 100644 --- a/lib/widgets/home/home_banner/bloc/home_banner_bloc.dart +++ b/lib/widgets/home/home_banner/bloc/home_banner_bloc.dart @@ -10,7 +10,7 @@ import './bloc.dart'; class HomeBannerBloc extends Bloc { HomeBannerRepository repository; - HomeBannerBloc({@required this.repository}); + HomeBannerBloc({@required this.repository}) : super(InitialHomeBannerState()); @override HomeBannerState get initialState => InitialHomeBannerState(); diff --git a/lib/widgets/home/home_goods/home_goods_item.dart b/lib/widgets/home/home_goods/home_goods_item.dart index d8572b9..ae7e44e 100644 --- a/lib/widgets/home/home_goods/home_goods_item.dart +++ b/lib/widgets/home/home_goods/home_goods_item.dart @@ -120,7 +120,7 @@ class HomeGoodsItem extends StatelessWidget { style: TextStyle( fontSize: 15, color: HexColor.fromHex('#333333'), - fontWeight: FontWeight.bold), + fontWeight: style?.listStyle?.isTitleBold=="1"? FontWeight.bold:FontWeight.w500), )); return RichText( maxLines: 2, diff --git a/lib/widgets/home/home_quick_entry/bloc/home_quick_entry_bloc.dart b/lib/widgets/home/home_quick_entry/bloc/home_quick_entry_bloc.dart index 18a5061..9964777 100644 --- a/lib/widgets/home/home_quick_entry/bloc/home_quick_entry_bloc.dart +++ b/lib/widgets/home/home_quick_entry/bloc/home_quick_entry_bloc.dart @@ -11,10 +11,9 @@ import './bloc.dart'; class HomeQuickEntryBloc extends Bloc { HomeQuickEntryRepository repository; - HomeQuickEntryBloc({@required this.repository}); + HomeQuickEntryBloc({@required this.repository}) : super(InitialHomeQuickEntryState()); + - @override - HomeQuickEntryState get initialState => InitialHomeQuickEntryState(); @override Stream mapEventToState(HomeQuickEntryEvent event) async* { diff --git a/lib/widgets/home/home_slide_banner/bloc/home_slide_banner_bloc.dart b/lib/widgets/home/home_slide_banner/bloc/home_slide_banner_bloc.dart index 12d2c6d..3fd114d 100644 --- a/lib/widgets/home/home_slide_banner/bloc/home_slide_banner_bloc.dart +++ b/lib/widgets/home/home_slide_banner/bloc/home_slide_banner_bloc.dart @@ -12,10 +12,9 @@ import './bloc.dart'; class HomeSlideBannerBloc extends Bloc { HomeSlideBannerRepository repository; - HomeSlideBannerBloc({@required this.repository}); + HomeSlideBannerBloc({@required this.repository}) : super(InitialHomeSlideBannerState()); + - @override - HomeSlideBannerState get initialState => InitialHomeSlideBannerState(); @override Stream mapEventToState(HomeSlideBannerEvent event) async* { diff --git a/lib/widgets/restart_widget/restart_widget.dart b/lib/widgets/restart_widget/restart_widget.dart index 26a6a92..8aeeb50 100644 --- a/lib/widgets/restart_widget/restart_widget.dart +++ b/lib/widgets/restart_widget/restart_widget.dart @@ -68,7 +68,11 @@ class _RestartWidgetState extends State { @override Widget build(BuildContext context) { - + const bool inProduction = const bool.fromEnvironment("dart.vm.product"); + if (!inProduction) { + ///debug阶段可重启 + isFirst=true; + } return StreamBuilder(stream: outData,builder: (context,asyn){ if(asyn.data==null&&!isFirst){ return Scaffold( diff --git a/lib/widgets/search_result/goods_list/bloc/search_result_goods_list_bloc.dart b/lib/widgets/search_result/goods_list/bloc/search_result_goods_list_bloc.dart index df7b299..d7632ae 100644 --- a/lib/widgets/search_result/goods_list/bloc/search_result_goods_list_bloc.dart +++ b/lib/widgets/search_result/goods_list/bloc/search_result_goods_list_bloc.dart @@ -16,10 +16,9 @@ class SearchResultGoodsListBloc extends Bloc SearchResultGoodsListInitial(); @override Stream mapEventToState( diff --git a/lib/widgets/share/share_alert.dart b/lib/widgets/share/share_alert.dart index 18402f7..52dc0f8 100644 --- a/lib/widgets/share/share_alert.dart +++ b/lib/widgets/share/share_alert.dart @@ -224,6 +224,14 @@ class _ShareAlertContentState extends State<_ShareAlertContent> { _shareMultipleImages(item.type); return; } + + if (widget?.model?.poster != null) { + Loading.show(context); + File file = await EncodeUtil.compressImage(context, images: widget?.model?.poster, size: 600); + widget?.model?.poster = await file.readAsBytes(); + Loading.dismiss(); + } + if (item.type == 'wx') { _shareByMob(ShareSDKPlatforms.wechatSession); } else if (item.type == 'pyq') { diff --git a/lib/widgets/team/fans_list/bloc/team_list_fans_bloc.dart b/lib/widgets/team/fans_list/bloc/team_list_fans_bloc.dart index 62f20c1..0457006 100644 --- a/lib/widgets/team/fans_list/bloc/team_list_fans_bloc.dart +++ b/lib/widgets/team/fans_list/bloc/team_list_fans_bloc.dart @@ -15,7 +15,7 @@ class TeamListFansBloc extends Bloc { TeamListFansRepository repository; - TeamListFansBloc(this.repository); + TeamListFansBloc(this.repository) : super(null); @override TeamListFansState get initialState => TeamListFansInitial(); diff --git a/lib/widgets/team/recommend/bloc/team_recommend_bloc.dart b/lib/widgets/team/recommend/bloc/team_recommend_bloc.dart index bddd677..9bfe5e1 100644 --- a/lib/widgets/team/recommend/bloc/team_recommend_bloc.dart +++ b/lib/widgets/team/recommend/bloc/team_recommend_bloc.dart @@ -15,10 +15,8 @@ class TeamRecommendBloc extends Bloc { TeamRecommendRepository repository; - TeamRecommendBloc(this.repository); + TeamRecommendBloc(this.repository) : super(TeamRecommendInitial()); - @override - TeamRecommendState get initialState => TeamRecommendInitial(); @override Stream mapEventToState( diff --git a/lib/zhiying_base_widget.dart b/lib/zhiying_base_widget.dart index cb7fe3b..8417fc4 100644 --- a/lib/zhiying_base_widget.dart +++ b/lib/zhiying_base_widget.dart @@ -8,4 +8,5 @@ export 'package:pull_to_refresh/pull_to_refresh.dart'; export 'package:flutter_user_agent/flutter_user_agent.dart'; export 'package:zhiying_base_widget/widgets/restart_widget/restart_widget.dart'; export 'package:amap_flutter_location/amap_flutter_location.dart'; -export 'package:amap_flutter_location/amap_location_option.dart'; \ No newline at end of file +export 'package:amap_flutter_location/amap_location_option.dart'; +export 'package:tab_indicator_styler/tab_indicator_styler.dart'; \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index a427a60..4d8942f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -12,7 +12,7 @@ dependencies: sdk: flutter flutter_swiper: ^1.1.6 - bloc: ^4.0.0 + bloc: ^5.0.0 event_bus: ^1.1.1 pull_to_refresh: git: @@ -56,8 +56,8 @@ dependencies: mobpush_plugin: - plugin_platform_interface: ^1.0.1 - permission_handler_platform_interface: ^2.0.1 + plugin_platform_interface: "1.0.2" + permission_handler_platform_interface: "2.0.1" flutter_user_agent: ^1.2.2 @@ -66,10 +66,10 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - zhiying_comm: path: ../zhiying_comm + # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec