From d41867f281e117e613202814c8d6fe600b1ef1ea Mon Sep 17 00:00:00 2001 From: zhang <494089941@qq.com> Date: Tue, 12 Jan 2021 16:50:02 +0800 Subject: [PATCH] fixed some issues --- lib/pages/common/common_page.dart | 43 +++++++++---------- .../convenient_phone_page.dart | 2 +- lib/pages/home/home_page.dart | 2 - lib/pages/home/widget/home_search.dart | 4 +- lib/pages/market/market_page.dart | 4 +- .../market_class/widget/market_class_bar.dart | 2 +- lib/pages/personal/personal_page.dart | 1 - lib/pages/tab_navigator.dart | 1 - .../widget/applications_bar.dart | 4 +- lib/widget/goods_specs_sheet.dart | 5 +-- lib/widget/search_bar_delegate.dart | 4 +- 11 files changed, 32 insertions(+), 40 deletions(-) diff --git a/lib/pages/common/common_page.dart b/lib/pages/common/common_page.dart index 9f4e201b..3333f46d 100644 --- a/lib/pages/common/common_page.dart +++ b/lib/pages/common/common_page.dart @@ -1,10 +1,10 @@ +import 'package:akuCommunity/widget/search_bar_delegate.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:akuCommunity/utils/screenutil.dart'; import 'package:akuCommunity/routers/page_routers.dart'; import 'package:akuCommunity/base/base_style.dart'; -import 'package:akuCommunity/widget/search_bar_delegate.dart'; // import 'visitor_invitation/visitor_invitation.dart'; // import 'visitor_invitation/visitor_record.dart'; @@ -141,14 +141,11 @@ class _CommonPageState extends State { InkWell _inkWellSearch() { return InkWell( onTap: () { - showSearch(context: context, delegate: searchBarDelegate()); + showSearch(context: context, delegate: SearchBarDelegate()); }, child: Container( margin: EdgeInsets.only(right: 32.w), - padding: EdgeInsets.only( - left: 40.w, - top: 15.w, - bottom: 15.w), + padding: EdgeInsets.only(left: 40.w, top: 15.w, bottom: 15.w), decoration: BoxDecoration( color: BaseStyle.colorf3f3f3, borderRadius: BorderRadius.all(Radius.circular(36)), @@ -324,9 +321,9 @@ class _CommonPageState extends State { // case '访客通行证': // return VisitorPass(); case '便民电话': - // return ComplaintCall(); + // return ComplaintCall(); case '业委会': - // return IndustryCommittee(); + // return IndustryCommittee(); case '建议咨询': case '报事报修': // case '我的报修': @@ -396,21 +393,21 @@ class _CommonPageState extends State { // case '意见反馈': // return FeedBack(statusHeight: _statusHeight); case '活动投票': - // return ActivityMain(isVote: true); + // return ActivityMain(isVote: true); case '更多活动': case '社区活动': - // return ActivityMain(isVote: false); + // return ActivityMain(isVote: false); case '活动详情': - // return ActivityDetails( - // title: widget.bundle.getMap('commentMap')['name'], - // imagePath: widget.bundle.getMap('commentMap')['imagePath'], - // isVote: widget.bundle.getMap('commentMap')['isVote'], - // isOver: widget.bundle.getMap('commentMap')['isOver'], - // isVoteOver: widget.bundle.getMap('commentMap')['isVoteOver'], - // memberList: widget.bundle.getMap('commentMap')['memberList'], - // ); + // return ActivityDetails( + // title: widget.bundle.getMap('commentMap')['name'], + // imagePath: widget.bundle.getMap('commentMap')['imagePath'], + // isVote: widget.bundle.getMap('commentMap')['isVote'], + // isOver: widget.bundle.getMap('commentMap')['isOver'], + // isVoteOver: widget.bundle.getMap('commentMap')['isVoteOver'], + // memberList: widget.bundle.getMap('commentMap')['memberList'], + // ); case '参与人员': - // return ActivityMemberList(); + // return ActivityMemberList(); // case '问卷调查': // return widget.bundle.getMap('commentMap')['imagePath'] != null // ? QuestionnaireDetails( @@ -453,15 +450,15 @@ class _CommonPageState extends State { // case '付款方式': // return PayOrder(); case '全部应用': - // return TotalApplicationsMain(); + // return TotalApplicationsMain(); case '分类': - // return ShopClassMain(statusHeight: _statusHeight); + // return ShopClassMain(statusHeight: _statusHeight); case '一键报警': - // return OneAlarmMain(); + // return OneAlarmMain(); // case '一键开门': // return OpenDoorMain(); case '实名认证': - // return CertificationMain(); + // return CertificationMain(); // case '功能说明': // return Explain(); default: diff --git a/lib/pages/convenient_phone/convenient_phone_page.dart b/lib/pages/convenient_phone/convenient_phone_page.dart index 41cc3197..abf9c1be 100644 --- a/lib/pages/convenient_phone/convenient_phone_page.dart +++ b/lib/pages/convenient_phone/convenient_phone_page.dart @@ -20,7 +20,7 @@ class _ConvenientPhonePageState extends State { color: Colors.white, child: InkWell( onTap: () { - showSearch(context: context, delegate: searchBarDelegate()); + showSearch(context: context, delegate: SearchBarDelegate()); }, child: Container( margin: EdgeInsets.only( diff --git a/lib/pages/home/home_page.dart b/lib/pages/home/home_page.dart index 98e57a17..6a5a6254 100644 --- a/lib/pages/home/home_page.dart +++ b/lib/pages/home/home_page.dart @@ -14,10 +14,8 @@ import 'widget/home_tag_bar.dart'; import 'package:akuCommunity/widget/container_comment.dart'; import 'package:akuCommunity/widget/single_ad_space.dart'; import 'package:akuCommunity/widget/grid_button.dart'; -import 'package:akuCommunity/widget/sliver_goods_card.dart'; import 'package:akuCommunity/service/base_model.dart'; import 'package:akuCommunity/model/aku_shop_model.dart'; -import 'package:akuCommunity/widget/goods_card_skeleton.dart'; import 'package:akuCommunity/routers/page_routers.dart'; class HomePage extends StatefulWidget { diff --git a/lib/pages/home/widget/home_search.dart b/lib/pages/home/widget/home_search.dart index 1c905e3e..6a617b24 100644 --- a/lib/pages/home/widget/home_search.dart +++ b/lib/pages/home/widget/home_search.dart @@ -1,8 +1,8 @@ +import 'package:akuCommunity/widget/search_bar_delegate.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:akuCommunity/utils/screenutil.dart'; -import 'package:akuCommunity/widget/search_bar_delegate.dart'; class HomeSearch extends StatefulWidget { HomeSearch({Key key}) : super(key: key); @@ -30,7 +30,7 @@ class _HomeSearchState extends State { ), child: InkWell( onTap: () { - showSearch(context: context, delegate: searchBarDelegate()); + showSearch(context: context, delegate: SearchBarDelegate()); }, child: Container( width: 686.w, diff --git a/lib/pages/market/market_page.dart b/lib/pages/market/market_page.dart index 10ee8b53..b727e7bc 100644 --- a/lib/pages/market/market_page.dart +++ b/lib/pages/market/market_page.dart @@ -1,3 +1,4 @@ +import 'package:akuCommunity/widget/search_bar_delegate.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter_icons/flutter_icons.dart'; @@ -8,7 +9,6 @@ import 'package:akuCommunity/widget/app_bar_action.dart'; import 'package:akuCommunity/widget/single_ad_space.dart'; import 'package:akuCommunity/widget/grid_button.dart'; import 'package:akuCommunity/utils/screenutil.dart'; -import 'package:akuCommunity/widget/search_bar_delegate.dart'; import 'widget/market_sticky_bar.dart'; import 'widget/market_list.dart'; @@ -88,7 +88,7 @@ class _MarketPageState extends State ), child: InkWell( onTap: () { - showSearch(context: context, delegate: searchBarDelegate()); + showSearch(context: context, delegate: SearchBarDelegate()); }, child: Container( child: Row(children: [ diff --git a/lib/pages/market_class/widget/market_class_bar.dart b/lib/pages/market_class/widget/market_class_bar.dart index 853bddc2..0f1f2a5a 100644 --- a/lib/pages/market_class/widget/market_class_bar.dart +++ b/lib/pages/market_class/widget/market_class_bar.dart @@ -8,7 +8,7 @@ class MarketClassBar extends StatelessWidget { Widget _inkWellSearch(BuildContext context) { return InkWell( onTap: () { - showSearch(context: context, delegate: searchBarDelegate()); + showSearch(context: context, delegate: SearchBarDelegate()); }, child: Container( margin: EdgeInsets.only(right: 32.w), diff --git a/lib/pages/personal/personal_page.dart b/lib/pages/personal/personal_page.dart index c88735e1..fab1a3ac 100644 --- a/lib/pages/personal/personal_page.dart +++ b/lib/pages/personal/personal_page.dart @@ -1,6 +1,5 @@ import 'package:akuCommunity/pages/sign/sign_in_page.dart'; import 'package:akuCommunity/provider/user_provider.dart'; -import 'package:akuCommunity/service/net.dart'; import 'package:akuCommunity/utils/net_util.dart'; import 'package:ani_route/ani_route.dart'; import 'package:flutter/material.dart'; diff --git a/lib/pages/tab_navigator.dart b/lib/pages/tab_navigator.dart index 214f6ff8..26b51098 100644 --- a/lib/pages/tab_navigator.dart +++ b/lib/pages/tab_navigator.dart @@ -4,7 +4,6 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:akuCommunity/base/assets_image.dart'; import 'home/home_page.dart'; -import 'market/market_page.dart'; import 'property/property_index.dart'; import 'community/community_index.dart'; import 'personal/personal_page.dart'; diff --git a/lib/pages/total_application_page/widget/applications_bar.dart b/lib/pages/total_application_page/widget/applications_bar.dart index f14eb299..97e8dfa6 100644 --- a/lib/pages/total_application_page/widget/applications_bar.dart +++ b/lib/pages/total_application_page/widget/applications_bar.dart @@ -1,8 +1,8 @@ +import 'package:akuCommunity/widget/search_bar_delegate.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:akuCommunity/utils/screenutil.dart'; -import 'package:akuCommunity/widget/search_bar_delegate.dart'; class ApplicationsBar extends StatelessWidget { const ApplicationsBar({Key key}) : super(key: key); @@ -25,7 +25,7 @@ class ApplicationsBar extends StatelessWidget { centerTitle: true, title: InkWell( onTap: () { - showSearch(context: context, delegate: searchBarDelegate()); + showSearch(context: context, delegate: SearchBarDelegate()); }, child: Container( margin: EdgeInsets.only(right: 32.w), diff --git a/lib/widget/goods_specs_sheet.dart b/lib/widget/goods_specs_sheet.dart index 27a3ec0c..a8c9d48c 100644 --- a/lib/widget/goods_specs_sheet.dart +++ b/lib/widget/goods_specs_sheet.dart @@ -4,7 +4,6 @@ import 'package:flutter_icons/flutter_icons.dart'; import 'package:provider/provider.dart'; import 'package:akuCommunity/utils/screenutil.dart'; import 'package:akuCommunity/utils/toast.dart'; -import 'package:akuCommunity/widget/cart_count.dart'; import 'package:akuCommunity/routers/page_routers.dart'; import 'package:akuCommunity/provider/cart.dart'; import 'cached_image_wrapper.dart'; @@ -100,7 +99,7 @@ class _GoodsSpecsSheetState extends State { alignment: Alignment.center, color: Colors.white, child: Text( - '${count}', + '$count', style: TextStyle( fontSize: 24.sp, color: Color(0xff333333), @@ -134,7 +133,7 @@ class _GoodsSpecsSheetState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - '价格:¥${price}', + '价格:¥$price', style: TextStyle( color: Color(0xffe60e0e), fontSize: 28.sp, diff --git a/lib/widget/search_bar_delegate.dart b/lib/widget/search_bar_delegate.dart index 8cccccb4..b7ce060a 100644 --- a/lib/widget/search_bar_delegate.dart +++ b/lib/widget/search_bar_delegate.dart @@ -13,7 +13,7 @@ class _SearchBarDemoState extends State { IconButton( icon: Icon(Icons.search), onPressed: () { - showSearch(context: context, delegate: searchBarDelegate()); + showSearch(context: context, delegate: SearchBarDelegate()); } // showSearch(context:context,delegate: searchBarDelegate()), ), @@ -21,7 +21,7 @@ class _SearchBarDemoState extends State { } } -class searchBarDelegate extends SearchDelegate { +class SearchBarDelegate extends SearchDelegate { @override List buildActions(BuildContext context) { return [