From d5d9bee14b27a570e2f20eb4a142bdee3d3f1e38 Mon Sep 17 00:00:00 2001 From: laiiihz Date: Mon, 4 Jan 2021 16:28:16 +0800 Subject: [PATCH] remove shit code again! --- lib/base/assets_image.dart | 92 +++++++-------- .../activities_details_page.dart | 25 ++-- lib/pages/address_page/address_edit_page.dart | 3 - .../address_page/widget/address_item.dart | 1 - .../certification_page.dart | 1 - lib/pages/common/common_page.dart | 2 - lib/pages/community/community_index.dart | 2 +- lib/pages/community/widget/tab_list.dart | 20 ++-- lib/pages/community/widget/trend_card.dart | 109 +----------------- .../confirm_order_page.dart | 1 - .../confirm_order_page/pay_order_page.dart | 17 ++- .../convenient_phone/widget/phone_list.dart | 2 +- .../fitup_manage/widget/director_manage.dart | 11 +- .../fitup_manage/widget/owner_manage.dart | 5 +- .../goods_details/view_comments_page.dart | 3 - .../goods_details/widget/goods_app_bar.dart | 3 +- .../widget/goods_comments_card.dart | 2 +- .../goods_details/widget/product_content.dart | 2 +- .../widget/product_share_sheet.dart | 3 - .../goods_details/widget/product_swiper.dart | 2 +- .../deto_create_page/deto_create_page.dart | 1 - .../goods_deto_page/goods_deto_page.dart | 5 - .../widget/goods_info_card_button.dart | 4 +- .../goods_manage_page/goods_manage_page.dart | 10 +- .../mine_goods_page/mine_goods_page.dart | 12 +- lib/pages/home/home_page.dart | 3 +- lib/pages/home/widget/home_card.dart | 38 ------ lib/pages/home/widget/my_painter.dart | 34 ------ .../committee_mailbox_page.dart | 1 - .../industry_committee/widget/staff_list.dart | 6 +- lib/pages/invoice/invoice_page.dart | 1 - lib/pages/invoice/widget/invoice_input.dart | 2 - .../life_pay_bill_page/widget/bill_card.dart | 3 +- .../widget/record_card.dart | 2 +- .../market_cart_page/market_cart_page.dart | 9 +- .../widget/market_cart_bottom_bar.dart | 4 - .../widget/market_cart_card.dart | 20 +--- .../market_detail_page.dart | 1 + lib/pages/market/market_page.dart | 4 +- lib/pages/market/widget/market_list.dart | 4 +- .../market/widget/market_sticky_bar.dart | 1 - .../widget/sliver_goods_group_card.dart | 8 +- lib/pages/market_class/market_class_page.dart | 6 - .../market_class/widget/market_class_bar.dart | 1 - .../shop_message_page/shop_message_page.dart | 3 - .../system_message_page.dart | 5 +- lib/pages/mine_car_page/mine_car_page.dart | 78 +------------ lib/pages/personal/look_logistics_page.dart | 2 - lib/pages/personal/order_details_page.dart | 6 +- lib/pages/personal/personal_page.dart | 24 ++-- lib/pages/personal/refund_apply_page.dart | 2 +- lib/pages/personal/widget/order_card.dart | 8 +- lib/pages/personal/widget/order_list.dart | 1 + lib/pages/property/property_index.dart | 3 +- .../widget/property_activity_card.dart | 6 +- lib/pages/property/widget/property_card.dart | 4 +- lib/pages/scan/scan_page.dart | 7 +- .../feedback_page/feedback_page.dart | 16 --- lib/pages/setting_page/setting_page.dart | 5 - lib/pages/sign/sign_in_page.dart | 2 - lib/pages/tab_navigator.dart | 27 +++-- .../things_create_page.dart | 1 - .../widget/goods_info_card_button.dart | 4 +- .../things_page/widget/things_app_bar.dart | 1 - lib/pages/things_page/widget/things_list.dart | 5 +- .../total_applications_page.dart | 1 + .../visitor_access_page.dart | 3 +- .../visitor_record_page.dart | 2 - .../widget/record_item.dart | 7 +- .../widget/record_list.dart | 1 + lib/routers/page_routers.dart | 2 +- lib/service/net.dart | 1 - lib/utils/screenutil.dart | 2 - lib/utils/sp_util.dart | 1 - lib/utils/toast.dart | 6 +- lib/widget/app_bar_action.dart | 5 +- lib/widget/cached_image_wrapper.dart | 4 +- lib/widget/common_image_picker.dart | 5 +- lib/widget/community_card.dart | 2 +- lib/widget/single_image_up.dart | 4 - lib/widget/sliver_goods_card.dart | 29 +---- pubspec.lock | 30 ----- pubspec.yaml | 10 -- 83 files changed, 178 insertions(+), 633 deletions(-) delete mode 100644 lib/pages/goods_details/widget/product_share_sheet.dart delete mode 100644 lib/pages/home/widget/my_painter.dart diff --git a/lib/base/assets_image.dart b/lib/base/assets_image.dart index 8ebba27e..57688cda 100644 --- a/lib/base/assets_image.dart +++ b/lib/base/assets_image.dart @@ -1,83 +1,83 @@ class AssetsImage { - static final TAB_HOME_UNSELECT = 'assets/icons/tabbar_home_no.png'; + static const TAB_HOME_UNSELECT = 'assets/icons/tabbar_home_no.png'; - static final TAB_HOME_SELECT = 'assets/icons/tabbar_home.png'; + static const TAB_HOME_SELECT = 'assets/icons/tabbar_home.png'; - static final TAB_MARKET_UNSELECT = 'assets/icons/tabbar_market_no.png'; + static const TAB_MARKET_UNSELECT = 'assets/icons/tabbar_market_no.png'; - static final TAB_MARKET_SELECT = 'assets/icons/tabbar_market.png'; + static const TAB_MARKET_SELECT = 'assets/icons/tabbar_market.png'; - static final TAB_HOUSE_UNSELECT = 'assets/icons/tabbar_house_no.png'; + static const TAB_HOUSE_UNSELECT = 'assets/icons/tabbar_house_no.png'; - static final TAB_HOUSE_SELECT = 'assets/icons/tabbar_house.png'; + static const TAB_HOUSE_SELECT = 'assets/icons/tabbar_house.png'; - static final TAB_MESSAGE_UNSELECT = 'assets/icons/tabbar_message_no.png'; + static const TAB_MESSAGE_UNSELECT = 'assets/icons/tabbar_message_no.png'; - static final TAB_MESSAGE_SELECT = 'assets/icons/tabbar_message.png'; + static const TAB_MESSAGE_SELECT = 'assets/icons/tabbar_message.png'; - static final TAB_USER_UNSELECT = 'assets/icons/tabbar_user_no.png'; + static const TAB_USER_UNSELECT = 'assets/icons/tabbar_user_no.png'; - static final TAB_USER_SELECT = 'assets/icons/tabbar_user.png'; + static const TAB_USER_SELECT = 'assets/icons/tabbar_user.png'; - static final NOTIFICATION = 'assets/icons/icon_notification.png'; + static const NOTIFICATION = 'assets/icons/icon_notification.png'; - static final LOCATION = 'assets/icons/location.png'; + static const LOCATION = 'assets/icons/location.png'; - static final HOUSE = 'assets/icons/house.png'; + static const HOUSE = 'assets/icons/house.png'; - static final PHONE = 'assets/icons/phone.png'; + static const PHONE = 'assets/icons/phone.png'; - static final IMAGEADD = 'assets/icons/img_add.png'; + static const IMAGEADD = 'assets/icons/img_add.png'; - static final PROPERTY = 'assets/icons/property.png'; + static const PROPERTY = 'assets/icons/property.png'; - static final SYSTEMNOTICE = 'assets/icons/system_notice.png'; + static const SYSTEMNOTICE = 'assets/icons/system_notice.png'; - static final COMMENTNOTICE = 'assets/icons/comment_notice.png'; + static const COMMENTNOTICE = 'assets/icons/comment_notice.png'; - static final SHOPNOTICE = 'assets/icons/shop_notice.png'; + static const SHOPNOTICE = 'assets/icons/shop_notice.png'; - static final MINEBG = 'assets/images/mine_bg.png'; + static const MINEBG = 'assets/images/mine_bg.png'; - static final MEMBERBG = 'assets/images/member_bg.png'; + static const MEMBERBG = 'assets/images/member_bg.png'; - static final HOUSEHEADER = 'assets/images/house_header.png'; + static const HOUSEHEADER = 'assets/images/house_header.png'; - static final HOUSEATTESTATION = 'assets/images/house_attestation.png'; + static const HOUSEATTESTATION = 'assets/images/house_attestation.png'; - static final CARHEADER = 'assets/images/car_header.png'; + static const CARHEADER = 'assets/images/car_header.png'; - static final LOGO = 'assets/images/logo.png'; + static const LOGO = 'assets/images/logo.png'; - static final PHONELOGO = 'assets/images/phone_logo.png'; + static const PHONELOGO = 'assets/images/phone_logo.png'; - static final CODELOGO = 'assets/images/code_logo.png'; + static const CODELOGO = 'assets/images/code_logo.png'; - static final LICENSE = 'assets/images/license.png'; + static const LICENSE = 'assets/images/license.png'; - static final LICENSEBACK = 'assets/images/license_back.png'; + static const LICENSEBACK = 'assets/images/license_back.png'; - static final DRAWINGS = 'assets/images/drawings.png'; + static const DRAWINGS = 'assets/images/drawings.png'; - static final APPLICATION = 'assets/images/application.png'; + static const APPLICATION = 'assets/images/application.png'; - static final COMMITMENT = 'assets/images/commitment.png'; + static const COMMITMENT = 'assets/images/commitment.png'; - static final WXPAY = 'assets/images/wxpay.png'; + static const WXPAY = 'assets/images/wxpay.png'; - static final APPADD = 'assets/icons/app_add.png'; + static const APPADD = 'assets/icons/app_add.png'; - static final APPREDUCE = 'assets/icons/app_reduce.png'; + static const APPREDUCE = 'assets/icons/app_reduce.png'; - static final COMPLAINT = 'assets/icons/complaint.png'; + static const COMPLAINT = 'assets/icons/complaint.png'; - static final CONSULT = 'assets/icons/consult.png'; + static const CONSULT = 'assets/icons/consult.png'; - static final LIKE = 'assets/icons/like.png'; + static const LIKE = 'assets/icons/like.png'; - static final PROPOSAL = 'assets/icons/proposal.png'; + static const PROPOSAL = 'assets/icons/proposal.png'; - static final List> mineAppList = [ + static const List> mineAppList = [ { 'title': '一键开门', 'imagePath': 'assets/icons/tool_yjkm.png', @@ -94,7 +94,7 @@ class AssetsImage { } ]; - static final List> homeGridList = [ + static const List> homeGridList = [ { 'title': '一键开门', 'imagePath': 'assets/icons/tool_yjkm.png', @@ -153,7 +153,7 @@ class AssetsImage { }, ]; - static final List> recommendGridList = [ + static const List> recommendGridList = [ { 'title': '一键开门', 'imagePath': 'assets/icons/tool_yjkm.png', @@ -191,7 +191,7 @@ class AssetsImage { }, ]; - static final List> propertyGridList = [ + static const List> propertyGridList = [ { 'title': '一键开门', 'imagePath': 'assets/icons/tool_yjkm.png', @@ -292,7 +292,7 @@ class AssetsImage { }, ]; - static final List> shopGridList = [ + static const List> shopGridList = [ {'title': '居家生活', 'imagePath': 'assets/icons/tool_jjsh.png'}, {'title': '数码家电', 'imagePath': 'assets/icons/tool_smjd.png'}, {'title': '休闲副食', 'imagePath': 'assets/icons/tool_xxfs.png'}, @@ -303,7 +303,7 @@ class AssetsImage { {'title': '饮料酒水', 'imagePath': 'assets/icons/tool_yljs.png'}, ]; - static final List> orderGridList = [ + static const List> orderGridList = [ {'title': '待付款', 'imagePath': 'assets/icons/user_icon_dfk.png'}, {'title': '待发货', 'imagePath': 'assets/icons/user_icon_dfh.png'}, {'title': '待收货', 'imagePath': 'assets/icons/user_icon_dsh.png'}, @@ -311,7 +311,7 @@ class AssetsImage { {'title': '售后', 'imagePath': 'assets/icons/user_icon_sh.png'}, ]; - static final List> mineGridList = [ + static const List> mineGridList = [ { 'title': '我的房屋', 'imagePath': 'assets/icons/user_icon_wdfw.png', diff --git a/lib/pages/activities_page/activities_details_page/activities_details_page.dart b/lib/pages/activities_page/activities_details_page/activities_details_page.dart index b896e474..26e48848 100644 --- a/lib/pages/activities_page/activities_details_page/activities_details_page.dart +++ b/lib/pages/activities_page/activities_details_page/activities_details_page.dart @@ -91,7 +91,7 @@ class _ActivitiesDetailsPageState extends State { builder: (context) { return CupertinoAlertDialog( title: Text( - '是否确定投${url}一票', + '是否确定投$url\一票', style: TextStyle( fontSize: 34.sp, color: Color(0xff030303), @@ -144,8 +144,7 @@ class _ActivitiesDetailsPageState extends State { }, child: Container( margin: EdgeInsets.only(top: 39.w), - padding: EdgeInsets.only( - left: 41.w, bottom: 40.w), + padding: EdgeInsets.only(left: 41.w, bottom: 40.w), decoration: BoxDecoration( border: Border( bottom: BorderSide(color: BaseStyle.colord8d8d8, width: 0.5), @@ -276,14 +275,12 @@ class _ActivitiesDetailsPageState extends State { color: Colors.white, child: ListView( padding: EdgeInsets.only( - bottom: ( widget.bundle.getMap('details')['isVote'] ? 0 : 170).w), + bottom: + (widget.bundle.getMap('details')['isVote'] ? 0 : 170).w), children: [ Container( padding: EdgeInsets.only( - top: 26.w, - left: 32.w, - right: 32.w, - bottom: 60.w), + top: 26.w, left: 32.w, right: 32.w, bottom: 60.w), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -324,17 +321,12 @@ class _ActivitiesDetailsPageState extends State { ), Container( padding: EdgeInsets.only( - top: 26.w, - left: 32.w, - right: 32.w, - bottom: 60.w), + top: 26.w, left: 32.w, right: 32.w, bottom: 60.w), child: widget.bundle.getMap('details')['isVote'] ? Container( margin: EdgeInsets.only(top: 44.w), padding: EdgeInsets.only( - top: 50.w, - left: 32.w, - right: 25.w), + top: 50.w, left: 32.w, right: 25.w), width: 686.w, decoration: BoxDecoration( color: BaseStyle.colorf3f3f3, @@ -352,8 +344,7 @@ class _ActivitiesDetailsPageState extends State { color: BaseStyle.color999999), ), Container( - padding: - EdgeInsets.only(left: 3.w), + padding: EdgeInsets.only(left: 3.w), child: Column( children: _listView .asMap() diff --git a/lib/pages/address_page/address_edit_page.dart b/lib/pages/address_page/address_edit_page.dart index f0a17528..7ac93aff 100644 --- a/lib/pages/address_page/address_edit_page.dart +++ b/lib/pages/address_page/address_edit_page.dart @@ -1,6 +1,5 @@ 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/widget/common_app_bar.dart'; @@ -15,7 +14,6 @@ class AddressEditPage extends StatefulWidget { } class _AddressEditPageState extends State { - var _scaffoldKey = new GlobalKey(); GlobalKey _formKey = new GlobalKey(); bool isDefault = false; @@ -102,7 +100,6 @@ class _AddressEditPageState extends State { children: [ Form( key: _formKey, - autovalidate: true, child: Column( children: [ AddressEditItem(addressInfo: { diff --git a/lib/pages/address_page/widget/address_item.dart b/lib/pages/address_page/widget/address_item.dart index aa921751..1b6c9b23 100644 --- a/lib/pages/address_page/widget/address_item.dart +++ b/lib/pages/address_page/widget/address_item.dart @@ -3,7 +3,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:extended_text/extended_text.dart'; import 'package:akuCommunity/utils/screenutil.dart'; -import 'package:akuCommunity/base/assets_image.dart'; import 'package:akuCommunity/routers/page_routers.dart'; class AddressItem extends StatelessWidget { diff --git a/lib/pages/certification_page/certification_page.dart b/lib/pages/certification_page/certification_page.dart index 7fa16b29..e70b24e0 100644 --- a/lib/pages/certification_page/certification_page.dart +++ b/lib/pages/certification_page/certification_page.dart @@ -3,7 +3,6 @@ import 'package:flutter/cupertino.dart'; import 'package:akuCommunity/base/assets_image.dart'; import 'package:akuCommunity/utils/screenutil.dart'; import 'package:akuCommunity/widget/common_input.dart'; -import 'package:akuCommunity/widget/common_upload_image.dart'; import 'package:akuCommunity/widget/common_app_bar.dart'; import 'package:akuCommunity/widget/single_image_up.dart'; diff --git a/lib/pages/common/common_page.dart b/lib/pages/common/common_page.dart index 86cb5714..9f4e201b 100644 --- a/lib/pages/common/common_page.dart +++ b/lib/pages/common/common_page.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter_icons/flutter_icons.dart'; -import 'package:flutter_beautiful_popup/main.dart'; import 'package:akuCommunity/utils/screenutil.dart'; import 'package:akuCommunity/routers/page_routers.dart'; import 'package:akuCommunity/base/base_style.dart'; @@ -310,7 +309,6 @@ class _CommonPageState extends State { @override Widget build(BuildContext context) { - double _statusHeight = MediaQuery.of(context).padding.top; return Scaffold( appBar: PreferredSize( child: _commentAppBar(), diff --git a/lib/pages/community/community_index.dart b/lib/pages/community/community_index.dart index 43df68b2..74b1d9c2 100644 --- a/lib/pages/community/community_index.dart +++ b/lib/pages/community/community_index.dart @@ -44,7 +44,6 @@ class _CommunityIndexState extends State ); } - List _listActions() { return actionsList .map((item) => AppBarAction( @@ -104,6 +103,7 @@ class _CommunityIndexState extends State @override Widget build(BuildContext context) { + super.build(context); return Scaffold( backgroundColor: Colors.white, appBar: _appBar(), diff --git a/lib/pages/community/widget/tab_list.dart b/lib/pages/community/widget/tab_list.dart index 333418f4..c191baf4 100644 --- a/lib/pages/community/widget/tab_list.dart +++ b/lib/pages/community/widget/tab_list.dart @@ -86,8 +86,8 @@ class _TabListState extends State with AutomaticKeepAliveClientMixin { 'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=107966910,699677438&fm=26&gp=0.jpg', 'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3011269428,2056805718&fm=26&gp=0.jpg' ], - 'isLike':false, - 'avatar':Image.asset('assets/example/touxiang1.png'), + 'isLike': false, + 'avatar': Image.asset('assets/example/touxiang1.png'), }, { 'name': '马泽鹏', @@ -96,8 +96,8 @@ class _TabListState extends State with AutomaticKeepAliveClientMixin { 'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=3445658157,2379681095&fm=26&gp=0.jpg', 'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=3539674557,3804837870&fm=26&gp=0.jpg', ], - 'isLike':true, - 'avatar':Image.asset('assets/example/touxiang2.png') + 'isLike': true, + 'avatar': Image.asset('assets/example/touxiang2.png') }, { 'name': '王管事', @@ -106,8 +106,8 @@ class _TabListState extends State with AutomaticKeepAliveClientMixin { 'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=2446247351,2922660058&fm=26&gp=0.jpg', 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1601274815221&di=3a50314a4d2c7188f6003f67d24177c2&imgtype=0&src=http%3A%2F%2Fimg1.cache.netease.com%2Fcatchpic%2F6%2F62%2F620DAF59053DF902F1D991EDBF14FD26.gif', ], - 'isLike':false, - 'avatar':Image.asset('assets/example/touxiang3.jpeg') + 'isLike': false, + 'avatar': Image.asset('assets/example/touxiang3.jpeg') }, ]; @@ -140,6 +140,7 @@ class _TabListState extends State with AutomaticKeepAliveClientMixin { @override Widget build(BuildContext context) { + super.build(context); return SmartRefresher( controller: _refreshController, header: WaterDropHeader(), @@ -158,8 +159,7 @@ class _TabListState extends State with AutomaticKeepAliveClientMixin { content: _newsList[index]['content'], imageUrl: _newsList[index]['imageUrl'], isLike: _newsList[index]['isLike'], - avatar:_newsList[index]['avatar'] - ) + avatar: _newsList[index]['avatar']) : widget.index == 1 ? TopicCard( title: _topicList[index]['title'], @@ -176,7 +176,9 @@ class _TabListState extends State with AutomaticKeepAliveClientMixin { ), itemCount: widget.index == 0 ? _newsList.length - : widget.index == 1 ? _topicList.length : _circleList.length, + : widget.index == 1 + ? _topicList.length + : _circleList.length, ), ), ); diff --git a/lib/pages/community/widget/trend_card.dart b/lib/pages/community/widget/trend_card.dart index bd9ed8c5..c599b103 100644 --- a/lib/pages/community/widget/trend_card.dart +++ b/lib/pages/community/widget/trend_card.dart @@ -34,7 +34,7 @@ class _TrendCardState extends State { builder: (context) { return CupertinoAlertDialog( title: Text( - '是否${url}?', + '是否$url\?', style: TextStyle( fontSize: 34.sp, color: Color(0xff030303), @@ -194,114 +194,7 @@ class _TrendCardState extends State { ); } - TextStyle _textStylePopup() { - return TextStyle( - fontSize: 28.sp, - color: Color(0xff333333), - ); - } - Positioned _positionedPopupMenuButton() { - return Positioned( - right: 0, - bottom: 0, - child: PopupMenuButton( - color: Colors.transparent, - padding: EdgeInsets.all(0), - elevation: 0, - offset: Offset(0, -53), - child: Container( - width: 54.w, - decoration: BoxDecoration( - color: Color(0xffd8d8d8), - borderRadius: BorderRadius.all(Radius.circular(4)), - ), - child: Icon( - Feather.more_horizontal, - color: Colors.white, - size: 36.sp, - ), - ), - onSelected: (String value) { - setState(() {}); - }, - itemBuilder: (BuildContext context) => >[ - PopupMenuItem( - value: "选项一的内容", - child: Container( - decoration: BoxDecoration( - color: Color(0xffd8d8d8), - borderRadius: BorderRadius.all(Radius.circular(6)), - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - InkWell( - onTap: () { - print('赞'); - Navigator.pop(context); - }, - child: Container( - height: 68.w, - width: 181.w, - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Icon( - AntDesign.hearto, - size: 30.sp, - color: Color(0xff000000), - ), - SizedBox(width: 11.w), - Text( - '赞', - style: _textStylePopup(), - ), - ], - ), - ), - ), - SizedBox( - width: 1, - height: 48.w, - child: DecoratedBox( - decoration: BoxDecoration(color: Color(0xff979797)), - ), - ), - InkWell( - onTap: () { - print('评论'); - Navigator.pop(context); - }, - child: Container( - height: 68.w, - width: 181.w, - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Icon( - Feather.message_square, - size: 30.sp, - color: Color(0xff000000), - ), - SizedBox(width: 11.w), - Text( - '评论', - style: _textStylePopup(), - ), - ], - ), - ), - ), - ], - ), - ), - ), - ], - ), - ); - } Widget _columnCard(String name, String content,Image avatar) { return Stack( diff --git a/lib/pages/confirm_order_page/confirm_order_page.dart b/lib/pages/confirm_order_page/confirm_order_page.dart index 4ee0f197..a02a7fe5 100644 --- a/lib/pages/confirm_order_page/confirm_order_page.dart +++ b/lib/pages/confirm_order_page/confirm_order_page.dart @@ -1,6 +1,5 @@ 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/widget/common_app_bar.dart'; diff --git a/lib/pages/confirm_order_page/pay_order_page.dart b/lib/pages/confirm_order_page/pay_order_page.dart index 9d21db4e..865c531f 100644 --- a/lib/pages/confirm_order_page/pay_order_page.dart +++ b/lib/pages/confirm_order_page/pay_order_page.dart @@ -11,14 +11,13 @@ class PayOrderPage extends StatelessWidget { final Bundle bundle; PayOrderPage({Key key, this.bundle}) : super(key: key); - var alertStyle = AlertStyle( + final alertStyle = AlertStyle( isCloseButton: false, isOverlayTapDismiss: false, - titleStyle: - TextStyle(fontSize: 38.sp, color: Color(0xff333333)), + titleStyle: TextStyle(fontSize: 38.sp, color: Color(0xff333333)), ); - List> _listPay = [ + final List> _listPay = [ { 'title': '支付宝支付', 'widget': Icon( @@ -40,7 +39,7 @@ class PayOrderPage extends StatelessWidget { 'isCheck': false } ]; - Widget FadeAlertAnimation(BuildContext context, Animation animation, + Widget fadeAlertAnimation(BuildContext context, Animation animation, Animation secondaryAnimation, Widget child) { return Align( child: FadeTransition( @@ -67,8 +66,7 @@ class PayOrderPage extends StatelessWidget { end: Alignment.bottomCenter, colors: [Color(0xffffe16b), Color(0xffffc40d)], ), - borderRadius: - BorderRadius.all(Radius.circular(200.w)), + borderRadius: BorderRadius.all(Radius.circular(200.w)), ), child: Icon( Icons.check, @@ -77,7 +75,7 @@ class PayOrderPage extends StatelessWidget { ), ), style: alertStyle, - alertAnimation: FadeAlertAnimation, + alertAnimation: fadeAlertAnimation, buttons: [ DialogButton( child: Text( @@ -110,8 +108,7 @@ class PayOrderPage extends StatelessWidget { SizedBox(width: 24.w), Text( title, - style: TextStyle( - fontSize: 28.sp, color: Color(0xff333333)), + style: TextStyle(fontSize: 28.sp, color: Color(0xff333333)), ), ], ), diff --git a/lib/pages/convenient_phone/widget/phone_list.dart b/lib/pages/convenient_phone/widget/phone_list.dart index 85b9911d..22d078de 100644 --- a/lib/pages/convenient_phone/widget/phone_list.dart +++ b/lib/pages/convenient_phone/widget/phone_list.dart @@ -77,7 +77,7 @@ class _PhoneListState extends State { ), ), onPressed: () { - _phoneCall('tel:${url}'); + _phoneCall('tel:$url'); Navigator.pop(context); }, ), diff --git a/lib/pages/fitup_manage/widget/director_manage.dart b/lib/pages/fitup_manage/widget/director_manage.dart index f32485a2..10e29f7d 100644 --- a/lib/pages/fitup_manage/widget/director_manage.dart +++ b/lib/pages/fitup_manage/widget/director_manage.dart @@ -15,10 +15,7 @@ class DirectorManage extends StatefulWidget { _DirectorManageState createState() => _DirectorManageState(); } -class _DirectorManageState extends State - with AutomaticKeepAliveClientMixin { - @override - bool get wantKeepAlive => true; +class _DirectorManageState extends State { TextEditingController _companyName = new TextEditingController(); @@ -88,8 +85,7 @@ class _DirectorManageState extends State children: [ Text( title, - style: TextStyle( - fontSize: 28.sp, color: Color(0xff333333)), + style: TextStyle(fontSize: 28.sp, color: Color(0xff333333)), ), SizedBox(height: 25.w), widget @@ -113,8 +109,7 @@ class _DirectorManageState extends State children: [ Text( '上传凭证', - style: TextStyle( - fontSize: 28.sp, color: Color(0xff333333)), + style: TextStyle(fontSize: 28.sp, color: Color(0xff333333)), ), SizedBox(height: 25.w), Row( diff --git a/lib/pages/fitup_manage/widget/owner_manage.dart b/lib/pages/fitup_manage/widget/owner_manage.dart index 757fd59d..4c422bf9 100644 --- a/lib/pages/fitup_manage/widget/owner_manage.dart +++ b/lib/pages/fitup_manage/widget/owner_manage.dart @@ -1,6 +1,5 @@ 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/base/base_style.dart'; import 'package:akuCommunity/widget/bottom_button.dart'; @@ -81,8 +80,7 @@ class _OwnerManageState extends State top: 23.w, bottom: 24.w, ), - margin: EdgeInsets.only( - bottom:(index == 2 ? 117 : 0).w), + margin: EdgeInsets.only(bottom: (index == 2 ? 117 : 0).w), decoration: BoxDecoration( border: Border( bottom: @@ -107,6 +105,7 @@ class _OwnerManageState extends State @override Widget build(BuildContext context) { + super.build(context); return Container( color: Colors.white, child: Stack( diff --git a/lib/pages/goods_details/view_comments_page.dart b/lib/pages/goods_details/view_comments_page.dart index 60a16861..d0ab9950 100644 --- a/lib/pages/goods_details/view_comments_page.dart +++ b/lib/pages/goods_details/view_comments_page.dart @@ -1,11 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; -import 'package:flutter_icons/flutter_icons.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:akuCommunity/utils/screenutil.dart'; import 'package:akuCommunity/base/base_style.dart'; -import 'package:akuCommunity/widget/sliver_app_bar_delegate.dart'; -import 'package:akuCommunity/routers/page_routers.dart'; import 'widget/goods_app_bar.dart'; import 'widget/goods_comments_card.dart'; diff --git a/lib/pages/goods_details/widget/goods_app_bar.dart b/lib/pages/goods_details/widget/goods_app_bar.dart index c6f4307c..04a3291e 100644 --- a/lib/pages/goods_details/widget/goods_app_bar.dart +++ b/lib/pages/goods_details/widget/goods_app_bar.dart @@ -9,8 +9,7 @@ import 'package:fluwx/fluwx.dart'; class GoodsAppBar extends StatefulWidget { final String shareImg; final String title; - GoodsAppBar({Key key, @required this.shareImg, @required this.title}) - : super(key: key); + GoodsAppBar({Key key, this.shareImg, this.title}) : super(key: key); @override _GoodsAppBarState createState() => _GoodsAppBarState(); diff --git a/lib/pages/goods_details/widget/goods_comments_card.dart b/lib/pages/goods_details/widget/goods_comments_card.dart index 4928702b..2485ba81 100644 --- a/lib/pages/goods_details/widget/goods_comments_card.dart +++ b/lib/pages/goods_details/widget/goods_comments_card.dart @@ -109,7 +109,7 @@ class _GoodsCommentsCardState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( - '浏览${viewNum}次', + '浏览$viewNum次', style: TextStyle( fontSize: BaseStyle.fontSize22, color: BaseStyle.color999999, diff --git a/lib/pages/goods_details/widget/product_content.dart b/lib/pages/goods_details/widget/product_content.dart index 9ec09968..85de5449 100644 --- a/lib/pages/goods_details/widget/product_content.dart +++ b/lib/pages/goods_details/widget/product_content.dart @@ -18,7 +18,7 @@ class ProductContent extends StatelessWidget { return Row( children: [ Text( - '¥${price}', + '¥$price', style: TextStyle( fontSize: ScreenUtil().setSp(42), color: Color(0xff333333), diff --git a/lib/pages/goods_details/widget/product_share_sheet.dart b/lib/pages/goods_details/widget/product_share_sheet.dart deleted file mode 100644 index 515bfd3b..00000000 --- a/lib/pages/goods_details/widget/product_share_sheet.dart +++ /dev/null @@ -1,3 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; diff --git a/lib/pages/goods_details/widget/product_swiper.dart b/lib/pages/goods_details/widget/product_swiper.dart index 11326df1..11bbc85a 100644 --- a/lib/pages/goods_details/widget/product_swiper.dart +++ b/lib/pages/goods_details/widget/product_swiper.dart @@ -7,7 +7,7 @@ import 'package:akuCommunity/utils/fade_route.dart'; import 'package:akuCommunity/widget/gallery_photo_view_wrapper.dart'; class ProductSwiper extends StatelessWidget { - List imageUrl; + final List imageUrl; ProductSwiper({Key key, this.imageUrl}) : super(key: key); final Random _random = new Random(); diff --git a/lib/pages/goods_deto_page/deto_create_page/deto_create_page.dart b/lib/pages/goods_deto_page/deto_create_page/deto_create_page.dart index f14b8170..8fc341db 100644 --- a/lib/pages/goods_deto_page/deto_create_page/deto_create_page.dart +++ b/lib/pages/goods_deto_page/deto_create_page/deto_create_page.dart @@ -1,6 +1,5 @@ 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/base/assets_image.dart'; import 'package:akuCommunity/widget/common_image_picker.dart'; diff --git a/lib/pages/goods_deto_page/goods_deto_page.dart b/lib/pages/goods_deto_page/goods_deto_page.dart index 32568e8a..894b7374 100644 --- a/lib/pages/goods_deto_page/goods_deto_page.dart +++ b/lib/pages/goods_deto_page/goods_deto_page.dart @@ -1,7 +1,6 @@ import 'package:akuCommunity/utils/screenutil.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; -import 'package:flutter_icons/flutter_icons.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:akuCommunity/routers/page_routers.dart'; import 'package:akuCommunity/widget/bottom_button.dart'; @@ -57,10 +56,6 @@ class _GoodsDetoPageState extends State { } ]; - List> _listButton = [ - {'title': '查看二维码', 'icon': MaterialCommunityIcons.qrcode}, - {'title': '搬家公司', 'icon': SimpleLineIcons.phone} - ]; RefreshController _refreshController = RefreshController(initialRefresh: false); diff --git a/lib/pages/goods_deto_page/widget/goods_info_card_button.dart b/lib/pages/goods_deto_page/widget/goods_info_card_button.dart index f66ce714..63ec5f02 100644 --- a/lib/pages/goods_deto_page/widget/goods_info_card_button.dart +++ b/lib/pages/goods_deto_page/widget/goods_info_card_button.dart @@ -8,7 +8,7 @@ import 'package:akuCommunity/routers/page_routers.dart'; class GoodsInfoCardButton extends StatelessWidget { GoodsInfoCardButton({Key key}) : super(key: key); - List> _listButton = [ + final List> _listButton = [ {'title': '查看二维码', 'icon': MaterialCommunityIcons.qrcode}, {'title': '搬家公司', 'icon': SimpleLineIcons.phone} ]; @@ -55,7 +55,7 @@ class GoodsInfoCardButton extends StatelessWidget { ), ), onPressed: () { - _phoneCall('tel:${url}'); + _phoneCall('tel:$url'); Navigator.pop(context); }, ), diff --git a/lib/pages/goods_manage_page/goods_manage_page.dart b/lib/pages/goods_manage_page/goods_manage_page.dart index ccfa82e4..beeab46a 100644 --- a/lib/pages/goods_manage_page/goods_manage_page.dart +++ b/lib/pages/goods_manage_page/goods_manage_page.dart @@ -1,5 +1,4 @@ import 'dart:async'; -import 'dart:io' show Platform; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/services.dart'; @@ -8,7 +7,6 @@ import 'package:akuCommunity/utils/screenutil.dart'; import 'package:akuCommunity/widget/bottom_button.dart'; import 'package:akuCommunity/widget/cached_image_wrapper.dart'; import 'package:akuCommunity/widget/common_app_bar.dart'; -import 'package:akuCommunity/routers/page_routers.dart'; class GoodsManagePage extends StatefulWidget { GoodsManagePage({Key key}) : super(key: key); @@ -93,7 +91,7 @@ class _GoodsManagePageState extends State { mainAxisAlignment: MainAxisAlignment.start, children: [ Text( - '物品名称:${title}', + '物品名称:$title', style: TextStyle( fontSize: 28.sp, color: Color(0xff4a4b51), @@ -101,7 +99,7 @@ class _GoodsManagePageState extends State { ), SizedBox(height: 20.w), Text( - '数量剩余:${goodsNum}个', + '数量剩余:$goodsNum个', style: TextStyle( fontSize: 24.sp, color: Color(0xff999999), @@ -155,7 +153,7 @@ class _GoodsManagePageState extends State { final _cancelController = TextEditingController(text: "关闭"); var _aspectTolerance = 0.00; - var _numberOfCameras = 0; + var numberOfCameras = 0; var _selectedCamera = -1; var _useAutoFocus = true; var _autoEnableFlash = false; @@ -169,7 +167,7 @@ class _GoodsManagePageState extends State { super.initState(); Future.delayed(Duration.zero, () async { - _numberOfCameras = await BarcodeScanner.numberOfCameras; + numberOfCameras = await BarcodeScanner.numberOfCameras; setState(() {}); }); } diff --git a/lib/pages/goods_manage_page/mine_goods_page/mine_goods_page.dart b/lib/pages/goods_manage_page/mine_goods_page/mine_goods_page.dart index 0195311f..3a64f189 100644 --- a/lib/pages/goods_manage_page/mine_goods_page/mine_goods_page.dart +++ b/lib/pages/goods_manage_page/mine_goods_page/mine_goods_page.dart @@ -131,7 +131,7 @@ class _MineGoodsPageState extends State { mainAxisAlignment: MainAxisAlignment.start, children: [ Text( - '物品名称:${title}', + '物品名称:$title', style: TextStyle( fontSize: 28.sp, color: Color(0xff4a4b51), @@ -140,7 +140,7 @@ class _MineGoodsPageState extends State { Container( margin: EdgeInsets.only(top: 16.w), child: Text( - '借还数量:${goodsNum}个', + '借还数量:$goodsNum个', style: TextStyle( fontSize: 24.sp, color: Color(0xff333333), @@ -150,7 +150,7 @@ class _MineGoodsPageState extends State { Container( margin: EdgeInsets.only(top: 16.w), child: Text( - '借用时间: ${borrowTime}', + '借用时间: $borrowTime', style: TextStyle( fontSize: 24.sp, color: Color(0xff999999), @@ -160,7 +160,7 @@ class _MineGoodsPageState extends State { Container( margin: EdgeInsets.only(top: 16.w), child: Text( - '借用时长: ${timeLength}日', + '借用时长: $timeLength日', style: TextStyle( fontSize: 24.sp, color: Color(0xff999999), @@ -173,7 +173,7 @@ class _MineGoodsPageState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( - '借用状态: ${status}', + '借用状态: $status', style: TextStyle( fontSize: 24.sp, color: Color(0xff999999), @@ -189,7 +189,7 @@ class _MineGoodsPageState extends State { ? Container( margin: EdgeInsets.only(bottom: 9.w), child: Text( - '温馨提示:您的物品已借用${timeLength}天,如果用完,请及时归还', + '温馨提示:您的物品已借用$timeLength天,如果用完,请及时归还', style: TextStyle( fontSize: 22.sp, color: Color(0xff999999), diff --git a/lib/pages/home/home_page.dart b/lib/pages/home/home_page.dart index de969880..e344f47d 100644 --- a/lib/pages/home/home_page.dart +++ b/lib/pages/home/home_page.dart @@ -1,6 +1,5 @@ import 'dart:async'; import 'dart:convert'; -import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -16,7 +15,6 @@ 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/net_util.dart'; import 'package:akuCommunity/service/base_model.dart'; import 'package:akuCommunity/model/aku_shop_model.dart'; import 'package:akuCommunity/widget/goods_card_skeleton.dart'; @@ -77,6 +75,7 @@ class _HomePageState extends State @override Widget build(BuildContext context) { + super.build(context); ScreenUtil.init(context, designSize: Size(750, 1334), allowFontScaling: true); return Scaffold( diff --git a/lib/pages/home/widget/home_card.dart b/lib/pages/home/widget/home_card.dart index f0274dd7..d1f804d5 100644 --- a/lib/pages/home/widget/home_card.dart +++ b/lib/pages/home/widget/home_card.dart @@ -5,7 +5,6 @@ import 'package:image_stack/image_stack.dart'; import 'package:akuCommunity/utils/screenutil.dart'; import 'package:akuCommunity/widget/cached_image_wrapper.dart'; import 'package:akuCommunity/routers/page_routers.dart'; -import 'package:akuCommunity/model/aku_shop_model.dart'; class HomeCard extends StatefulWidget { final String title; @@ -33,43 +32,6 @@ class _HomeCardState extends State { "https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3604827221,1047385274&fm=26&gp=0.jpg", ]; - Widget _countDown() { - return Container( - width: 638.w, - color: Color(0xff333333).withOpacity(0.8), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Container( - padding: EdgeInsets.only( - left: 24.w, - top: 11.w, - bottom: 12.w, - ), - child: Text( - '剩余时间:09天13时46分', - style: TextStyle( - fontWeight: FontWeight.w600, - color: Color(0xffffffff), - fontSize: 24.sp), - ), - ), - Container( - padding: EdgeInsets.only( - right: 24.w, - top: 7.w, - bottom: 7.w, - ), - child: Text( - '¥99.9', - style: TextStyle( - color: Color(0xffff8200), fontSize: 36.sp), - ), - ), - ], - ), - ); - } Widget _button(String buttonName) { return InkWell( diff --git a/lib/pages/home/widget/my_painter.dart b/lib/pages/home/widget/my_painter.dart deleted file mode 100644 index 78b3574a..00000000 --- a/lib/pages/home/widget/my_painter.dart +++ /dev/null @@ -1,34 +0,0 @@ -import 'dart:math' as math; -import 'package:flutter/material.dart'; -import 'package:flutter/cupertino.dart'; - - -class MyPainter extends CustomPainter { - @override - paint(Canvas canvas, Size size) { - Color shadowColor = Colors.pink; - var shadowWidth = 20.0; - final Offset offsetCenter = Offset(10.0, 10.0); - var outerRadius = 100.0; //外圈大小 - var strokeWidth = 20.0; //圈宽度 - final ringPaint = Paint() - ..style = PaintingStyle.stroke - ..color = shadowColor - ..strokeWidth = (strokeWidth); - final ringPaint1 = Paint() - ..style = PaintingStyle.stroke - ..color = Colors.green - ..strokeWidth = (strokeWidth); - canvas.drawArc(Rect.fromCircle(center: offsetCenter, radius: 30), 10, math.pi/2, - false, ringPaint); - canvas.drawArc(Rect.fromCircle(center: offsetCenter, radius: 30), 10+math.pi/2, math.pi/2, - false, ringPaint1); - } - - @override - bool shouldRepaint(CustomPainter oldDelegate) { - return true; - } -} - - diff --git a/lib/pages/industry_committee/committee_mailbox/committee_mailbox_page.dart b/lib/pages/industry_committee/committee_mailbox/committee_mailbox_page.dart index 56ff27f1..dc58d534 100644 --- a/lib/pages/industry_committee/committee_mailbox/committee_mailbox_page.dart +++ b/lib/pages/industry_committee/committee_mailbox/committee_mailbox_page.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; -import 'package:url_launcher/url_launcher.dart'; import 'package:akuCommunity/utils/screenutil.dart'; import 'package:akuCommunity/widget/common_app_bar.dart'; diff --git a/lib/pages/industry_committee/widget/staff_list.dart b/lib/pages/industry_committee/widget/staff_list.dart index 58ccf8ba..347aa2ec 100644 --- a/lib/pages/industry_committee/widget/staff_list.dart +++ b/lib/pages/industry_committee/widget/staff_list.dart @@ -133,17 +133,17 @@ class _StaffListState extends State { ), SizedBox(width: 10.w), Text( - '住址:${address}', + '住址:$address', style: _subStyle(), ), SizedBox(width: 10.w), Text( - '任职期限:${tenure}', + '任职期限:$tenure', style: _subStyle(), ), SizedBox(width: 10.w), Text( - '从事岗位:${post}', + '从事岗位:$post', style: _subStyle(), ), ], diff --git a/lib/pages/invoice/invoice_page.dart b/lib/pages/invoice/invoice_page.dart index 5bf986fa..527240c4 100644 --- a/lib/pages/invoice/invoice_page.dart +++ b/lib/pages/invoice/invoice_page.dart @@ -246,7 +246,6 @@ class _InvoicePageState extends State { _containerHeader(), Form( key: _formKey, - autovalidate: true, child: Column( children: [InvoiceInput(isEnterprise: isEnterprise)], ), diff --git a/lib/pages/invoice/widget/invoice_input.dart b/lib/pages/invoice/widget/invoice_input.dart index 1293835e..7174a7b6 100644 --- a/lib/pages/invoice/widget/invoice_input.dart +++ b/lib/pages/invoice/widget/invoice_input.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:akuCommunity/utils/screenutil.dart'; -import 'package:flutter/services.dart'; class InvoiceInput extends StatefulWidget { final bool isEnterprise; @@ -15,7 +14,6 @@ class _InvoiceInputState extends State { TextEditingController _userName = new TextEditingController(); TextEditingController _userPhone = new TextEditingController(); TextEditingController _userAddress = new TextEditingController(); - TextEditingController _userAddressDetail = new TextEditingController(); @override void initState() { diff --git a/lib/pages/life_pay/life_pay_bill_page/widget/bill_card.dart b/lib/pages/life_pay/life_pay_bill_page/widget/bill_card.dart index f4f8377d..0b501970 100644 --- a/lib/pages/life_pay/life_pay_bill_page/widget/bill_card.dart +++ b/lib/pages/life_pay/life_pay_bill_page/widget/bill_card.dart @@ -2,12 +2,11 @@ import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:akuCommunity/utils/screenutil.dart'; import 'package:akuCommunity/base/base_style.dart'; -import 'package:flutter_icons/flutter_icons.dart'; class BillCard extends StatelessWidget { BillCard({Key key}) : super(key: key); - List> _listBill = [ + final List> _listBill = [ {'title': '账单月份', 'value': '2020年1月'}, {'title': '账单金额', 'value': '¥19.40'}, {'title': '已缴金额', 'value': '¥0.00'}, diff --git a/lib/pages/life_pay/life_pay_record_page/widget/record_card.dart b/lib/pages/life_pay/life_pay_record_page/widget/record_card.dart index 8f8569d2..042386a9 100644 --- a/lib/pages/life_pay/life_pay_record_page/widget/record_card.dart +++ b/lib/pages/life_pay/life_pay_record_page/widget/record_card.dart @@ -8,7 +8,7 @@ class RecordCard extends StatelessWidget { final Function fun; RecordCard({Key key, this.fun}) : super(key: key); - List> _listBill = [ + final List> _listBill = [ { 'title': '物业管理费', 'value': '深蓝公寓 1幢1单元306', diff --git a/lib/pages/market/market_cart_page/market_cart_page.dart b/lib/pages/market/market_cart_page/market_cart_page.dart index 2d21629b..50f7cc97 100644 --- a/lib/pages/market/market_cart_page/market_cart_page.dart +++ b/lib/pages/market/market_cart_page/market_cart_page.dart @@ -79,7 +79,7 @@ class _MarketCartPageState extends State { Container( margin: EdgeInsets.only(top: 40.w), child: Text( - '¥${price}', + '¥$price', style: TextStyle( fontSize: 28.sp, color: Color(0xffe60e0e), @@ -210,11 +210,6 @@ class _MarketCartPageState extends State { List _cartList; - Future _getCartInfo(BuildContext context) async { - await Provider.of(context, listen: true).getCartInfo(); - return 'end'; - } - Widget _selectAll( CartProvidde model, ) { @@ -290,7 +285,7 @@ class _MarketCartPageState extends State { margin: EdgeInsets.symmetric(vertical: 16.w), padding: EdgeInsets.symmetric(vertical: 12.w), child: Text( - '结算(${_goodsCount})', + '结算($_goodsCount)', style: TextStyle( fontSize: 30.sp, color: diff --git a/lib/pages/market/market_cart_page/widget/market_cart_bottom_bar.dart b/lib/pages/market/market_cart_page/widget/market_cart_bottom_bar.dart index edc589e0..c61dc7af 100644 --- a/lib/pages/market/market_cart_page/widget/market_cart_bottom_bar.dart +++ b/lib/pages/market/market_cart_page/widget/market_cart_bottom_bar.dart @@ -1,7 +1,3 @@ - -import 'package:akuCommunity/pages/confirm_order_page/confirm_order_page.dart'; -import 'package:akuCommunity/routers/page_routers.dart'; -import 'package:ani_route/ani_route.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:provider/provider.dart'; diff --git a/lib/pages/market/market_cart_page/widget/market_cart_card.dart b/lib/pages/market/market_cart_page/widget/market_cart_card.dart index 63b79ff9..3a96ea9d 100644 --- a/lib/pages/market/market_cart_page/widget/market_cart_card.dart +++ b/lib/pages/market/market_cart_page/widget/market_cart_card.dart @@ -1,11 +1,9 @@ import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; -import 'package:flutter_icons/flutter_icons.dart'; import 'package:flutter_slidable/flutter_slidable.dart'; import 'package:akuCommunity/widget/cached_image_wrapper.dart'; import 'package:akuCommunity/widget/cart_count.dart'; import 'package:akuCommunity/utils/screenutil.dart'; -import 'package:akuCommunity/widget/goods_specs_sheet.dart'; import 'package:akuCommunity/model/aku_shop_model.dart'; import 'package:provider/provider.dart'; import 'package:akuCommunity/provider/cart.dart'; @@ -14,22 +12,6 @@ class MarketCartCard extends StatelessWidget { final AkuShopModel cartItem; MarketCartCard({Key key, this.cartItem}) : super(key: key); - void _showGoodsSpecsSheet() { - // showModalBottomSheet( - // isScrollControlled: true, - // context: context, - // backgroundColor: Colors.white, - // builder: (context) { - // return GoodsSpecsSheet( - // goodsNum: widget.goodsNum, - // index: widget.index, - // reduce: widget.reduce, - // add: widget.add, - // ); - // }, - // ); - } - Widget _cardRadio( BuildContext context, AkuShopModel cartItem, CartProvidde model) { return InkWell( @@ -121,7 +103,7 @@ class MarketCartCard extends StatelessWidget { Container( margin: EdgeInsets.only(top: 40.w), child: Text( - '¥${price}', + '¥$price', style: TextStyle( fontSize: 28.sp, color: Color(0xffe60e0e), diff --git a/lib/pages/market/market_detail_page/market_detail_page.dart b/lib/pages/market/market_detail_page/market_detail_page.dart index b12a5f0e..34041d75 100644 --- a/lib/pages/market/market_detail_page/market_detail_page.dart +++ b/lib/pages/market/market_detail_page/market_detail_page.dart @@ -41,6 +41,7 @@ class _MarketDetailPageState extends State @override Widget build(BuildContext context) { + super.build(context); return Scaffold( appBar: PreferredSize( preferredSize: Size.fromHeight(kToolbarHeight), //319 diff --git a/lib/pages/market/market_page.dart b/lib/pages/market/market_page.dart index 35b6e778..10ee8b53 100644 --- a/lib/pages/market/market_page.dart +++ b/lib/pages/market/market_page.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:akuCommunity/routers/page_routers.dart'; import 'package:akuCommunity/base/assets_image.dart'; import 'package:akuCommunity/widget/container_comment.dart'; import 'package:akuCommunity/widget/app_bar_action.dart'; @@ -66,7 +65,8 @@ class _MarketPageState extends State @override Widget build(BuildContext context) { - double _appBarHeight = ScreenUtil().setHeight(506); + // double _appBarHeight = ScreenUtil().setHeight(506); + super.build(context); return Scaffold( appBar: AppBar( elevation: 0, diff --git a/lib/pages/market/widget/market_list.dart b/lib/pages/market/widget/market_list.dart index 14e466ab..204df57e 100644 --- a/lib/pages/market/widget/market_list.dart +++ b/lib/pages/market/widget/market_list.dart @@ -1,13 +1,11 @@ import 'dart:async'; import 'dart:convert'; -import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:akuCommunity/widget/sliver_goods_card.dart'; import 'package:akuCommunity/utils/screenutil.dart'; import 'package:akuCommunity/widget/goods_card_skeleton.dart'; -import 'package:akuCommunity/service/net_util.dart'; import 'package:akuCommunity/service/base_model.dart'; import 'package:akuCommunity/model/aku_shop_model.dart'; import 'sliver_goods_group_card.dart'; @@ -27,7 +25,6 @@ class _MarketListState extends State bool get wantKeepAlive => true; RefreshController _refreshController = RefreshController(initialRefresh: false); - ScrollController _controller; List _shopList = []; @@ -206,6 +203,7 @@ class _MarketListState extends State @override Widget build(BuildContext context) { + super.build(context); return RefreshConfiguration( hideFooterWhenNotFull: true, child: SmartRefresher( diff --git a/lib/pages/market/widget/market_sticky_bar.dart b/lib/pages/market/widget/market_sticky_bar.dart index e838c7fc..c68a0469 100644 --- a/lib/pages/market/widget/market_sticky_bar.dart +++ b/lib/pages/market/widget/market_sticky_bar.dart @@ -1,4 +1,3 @@ -import 'dart:math'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; diff --git a/lib/pages/market/widget/sliver_goods_group_card.dart b/lib/pages/market/widget/sliver_goods_group_card.dart index 947c402c..3f1c3f23 100644 --- a/lib/pages/market/widget/sliver_goods_group_card.dart +++ b/lib/pages/market/widget/sliver_goods_group_card.dart @@ -78,7 +78,7 @@ class _SliverGoodsGroupCardState extends State { mainAxisAlignment: MainAxisAlignment.center, children: [ Text( - '¥${price}', + '¥$price', style: TextStyle( fontWeight: FontWeight.w600, fontSize: 24.sp, @@ -151,7 +151,7 @@ class _SliverGoodsGroupCardState extends State { color: isOverTime ? Color(0xff333333) : Color(0xffff7f00), ), Text( - '剩余时间:${remainingTime}', + '剩余时间:$remainingTime', maxLines: 1, overflow: TextOverflow.ellipsis, style: TextStyle( @@ -172,14 +172,14 @@ class _SliverGoodsGroupCardState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - '原产地:${address}', + '原产地:$address', style: TextStyle( color: Color(0xff999999), fontSize: 20.sp), ), SizedBox(height: 10.w), Text( - '预计到货:${arrivalTime}', + '预计到货:$arrivalTime', style: TextStyle( color: Color(0xff999999), fontSize: 20.sp), diff --git a/lib/pages/market_class/market_class_page.dart b/lib/pages/market_class/market_class_page.dart index bf135e08..743b72d6 100644 --- a/lib/pages/market_class/market_class_page.dart +++ b/lib/pages/market_class/market_class_page.dart @@ -6,8 +6,6 @@ import 'package:akuCommunity/utils/screenutil.dart'; import 'package:akuCommunity/base/base_style.dart'; import 'package:loading_animations/loading_animations.dart'; import 'package:akuCommunity/widget/cached_image_wrapper.dart'; -import 'package:akuCommunity/routers/page_routers.dart'; -import 'package:akuCommunity/service/net_util.dart'; import 'package:akuCommunity/model/aku_shop_class_model.dart'; import 'package:akuCommunity/service/base_model.dart'; import 'widget/market_class_bar.dart'; @@ -40,10 +38,6 @@ class _MarketClassPageState extends State { '运动旅游', '滋补保健', ]; - List> _rightContent = [ - {'title': '新品推荐', 'imagePath': ''}, - {'title': '新品推荐', 'imagePath': ''} - ]; ScrollController _controller = ScrollController(); diff --git a/lib/pages/market_class/widget/market_class_bar.dart b/lib/pages/market_class/widget/market_class_bar.dart index 4f1c5f67..853bddc2 100644 --- a/lib/pages/market_class/widget/market_class_bar.dart +++ b/lib/pages/market_class/widget/market_class_bar.dart @@ -3,7 +3,6 @@ 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'; -import 'package:akuCommunity/routers/page_routers.dart'; class MarketClassBar extends StatelessWidget { Widget _inkWellSearch(BuildContext context) { diff --git a/lib/pages/message_center_page/shop_message_page/shop_message_page.dart b/lib/pages/message_center_page/shop_message_page/shop_message_page.dart index 442abe15..380a24f1 100644 --- a/lib/pages/message_center_page/shop_message_page/shop_message_page.dart +++ b/lib/pages/message_center_page/shop_message_page/shop_message_page.dart @@ -16,9 +16,6 @@ class ShopMessagePage extends StatefulWidget { class _ShopMessagePageState extends State { RefreshController _refreshController = RefreshController(initialRefresh: false); - - ScrollController _controller; - List> _listNotice = [ { 'status': '已读', diff --git a/lib/pages/message_center_page/system_message_page/system_message_page.dart b/lib/pages/message_center_page/system_message_page/system_message_page.dart index b69923ce..aef9aa74 100644 --- a/lib/pages/message_center_page/system_message_page/system_message_page.dart +++ b/lib/pages/message_center_page/system_message_page/system_message_page.dart @@ -16,9 +16,6 @@ class SystemMessagePage extends StatefulWidget { class _SystemMessagePageState extends State { RefreshController _refreshController = RefreshController(initialRefresh: false); - - ScrollController _controller; - List> _listNotice = [ {'status': '已读', 'type': '业主信息审核:未通过', 'content': '您的信息有错误,请您重新填写'}, { @@ -141,7 +138,7 @@ class _SystemMessagePageState extends State { ), SizedBox(height: 8.w), Text( - '驳回理由:${content}', + '驳回理由:$content', maxLines: 1, overflow: TextOverflow.ellipsis, style: TextStyle( diff --git a/lib/pages/mine_car_page/mine_car_page.dart b/lib/pages/mine_car_page/mine_car_page.dart index 4522f112..933ab5bd 100644 --- a/lib/pages/mine_car_page/mine_car_page.dart +++ b/lib/pages/mine_car_page/mine_car_page.dart @@ -18,9 +18,6 @@ class _MineCarPageState extends State { {'title': '深圳华茂悦峰', 'subtitle': '1幢-1单元-702室'}, ]; - List> _listCart = [ - {'title': '浙BZ3183', 'isDelete': true}, - ]; Widget _containerHouseCard(String title, subtitle) { return Container( @@ -141,7 +138,7 @@ class _MineCarPageState extends State { ), SizedBox(height: 8.w), Text( - '尊敬的业主/租客,您还没有添加您的${tag}', + '尊敬的业主/租客,您还没有添加您的$tag', style: TextStyle( fontSize: 24.sp, color: Color(0xff999999), @@ -154,79 +151,6 @@ class _MineCarPageState extends State { ); } - Widget _containerInfoCard(String title, bool isDelete) { - return Container( - margin: EdgeInsets.only( - left: 32.w, - top: 26.w, - right: 32.w, - ), - child: Container( - padding: EdgeInsets.only( - left: 40.w, - right: 26.w, - top: 26.w, - bottom: 25.w, - ), - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(4)), - border: Border.all(color: Color(0xffeeeeee), width: 0.5), - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - title, - style: TextStyle( - fontWeight: FontWeight.w600, - fontSize: 32.sp, - color: Color(0xff333333), - ), - ), - isDelete - ? InkWell( - child: Text( - '移除', - style: TextStyle( - fontSize: 28.sp, - color: Color(0xff999999), - ), - ), - ) - : SizedBox(), - ], - ), - ), - ); - } - - Widget _positionedBottomBar(String buttonName) { - return Positioned( - bottom: 0, - child: InkWell( - onTap: () {}, - child: Container( - padding: EdgeInsets.only( - top: 23.w, - bottom: 22.w, - ), - color: Color(0xffffd000), - alignment: Alignment.center, - height: 85.w, - width: MediaQuery.of(context).size.width, - child: Text( - buttonName, - style: TextStyle( - fontWeight: FontWeight.w600, - fontSize: 28.sp, - color: Color(0xff333333), - ), - ), - ), - ), - ); - } - @override Widget build(BuildContext context) { return Scaffold( diff --git a/lib/pages/personal/look_logistics_page.dart b/lib/pages/personal/look_logistics_page.dart index 74faa36c..182332c7 100644 --- a/lib/pages/personal/look_logistics_page.dart +++ b/lib/pages/personal/look_logistics_page.dart @@ -7,7 +7,6 @@ import 'package:latlong/latlong.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:cached_network_image/cached_network_image.dart'; import 'package:akuCommunity/utils/screenutil.dart'; -import 'package:akuCommunity/base/assets_image.dart'; import 'package:akuCommunity/base/base_style.dart'; import 'package:akuCommunity/widget/cached_image_wrapper.dart'; @@ -19,7 +18,6 @@ class LookLogisticsPage extends StatefulWidget { } class _LookLogisticsPageState extends State { - final double _initFabHeight = 120.0; double _panelHeightOpen; double _panelHeightClosed = 95.0; @override diff --git a/lib/pages/personal/order_details_page.dart b/lib/pages/personal/order_details_page.dart index 44a41946..0f970cde 100644 --- a/lib/pages/personal/order_details_page.dart +++ b/lib/pages/personal/order_details_page.dart @@ -224,7 +224,7 @@ class _OrderDetailsPageState extends State { Container( margin: EdgeInsets.only(right: 25.w), child: Text( - '实付款¥${payPrice}', + '实付款¥$payPrice', style: TextStyle( fontWeight: FontWeight.w600, fontSize: BaseStyle.fontSize28, @@ -244,7 +244,7 @@ class _OrderDetailsPageState extends State { crossAxisAlignment: CrossAxisAlignment.end, children: [ Text( - '¥${price}', + '¥$price', style: TextStyle( fontWeight: FontWeight.w600, fontSize: BaseStyle.fontSize28, @@ -252,7 +252,7 @@ class _OrderDetailsPageState extends State { ), ), Text( - 'x${shopNum}', + 'x$shopNum', style: TextStyle( fontSize: BaseStyle.fontSize28, color: BaseStyle.color999999, diff --git a/lib/pages/personal/personal_page.dart b/lib/pages/personal/personal_page.dart index a2e662b9..19851df5 100644 --- a/lib/pages/personal/personal_page.dart +++ b/lib/pages/personal/personal_page.dart @@ -27,15 +27,13 @@ class _PersonalIndexState extends State @override bool get wantKeepAlive => true; - bool _isSigned=false; @override - void initState() { + void initState() { super.initState(); - _isSigned=widget.isSign; } SliverAppBar _sliverAppBar(double height) { - final userProvider=Provider.of(context); + final userProvider = Provider.of(context); return SliverAppBar( pinned: true, elevation: 0, @@ -62,9 +60,7 @@ class _PersonalIndexState extends State children: [ Spacer(), Container( - margin: EdgeInsets.only( - top: 175.w, - left: 32.w), + margin: EdgeInsets.only(top: 175.w, left: 32.w), child: Row( children: [ Container( @@ -79,12 +75,12 @@ class _PersonalIndexState extends State ), ), InkWell( - onTap: (){ - userProvider.isSigned? null:ARoute.push(context, SignInPage()); + onTap: () { + if (!userProvider.isSigned) + ARoute.push(context, SignInPage()); }, child: Container( - margin: EdgeInsets.only( - left: 16.w), + margin: EdgeInsets.only(left: 16.w), child: userProvider.isSigned ? Text( 'Cheailune', @@ -175,6 +171,7 @@ class _PersonalIndexState extends State @override Widget build(BuildContext context) { + super.build(context); double _statusHeight = MediaQuery.of(context).padding.top; return Scaffold( body: CustomScrollView( @@ -196,10 +193,7 @@ class _PersonalIndexState extends State ), SliverToBoxAdapter( child: Container( - margin: EdgeInsets.only( - top: 32.w, - left: 32.w, - right: 32.w), + margin: EdgeInsets.only(top: 32.w, left: 32.w, right: 32.w), child: Divider( color: Color(0xffd8d8d8), ), diff --git a/lib/pages/personal/refund_apply_page.dart b/lib/pages/personal/refund_apply_page.dart index 5c19597d..eab18387 100644 --- a/lib/pages/personal/refund_apply_page.dart +++ b/lib/pages/personal/refund_apply_page.dart @@ -81,7 +81,7 @@ class _RefundApplyPageState extends State { ), ), Text( - '¥${payPrice}', + '¥$payPrice', style: TextStyle( fontWeight: FontWeight.w600, fontSize: BaseStyle.fontSize32, diff --git a/lib/pages/personal/widget/order_card.dart b/lib/pages/personal/widget/order_card.dart index cc2d6755..c33ae848 100644 --- a/lib/pages/personal/widget/order_card.dart +++ b/lib/pages/personal/widget/order_card.dart @@ -94,7 +94,7 @@ class _OrderCardState extends State { crossAxisAlignment: CrossAxisAlignment.end, children: [ Text( - '¥${price}', + '¥$price', style: TextStyle( fontWeight: FontWeight.w600, fontSize: BaseStyle.fontSize28, @@ -102,7 +102,7 @@ class _OrderCardState extends State { ), ), Text( - 'x${shopNum}', + 'x$shopNum', style: TextStyle( fontSize: BaseStyle.fontSize28, color: BaseStyle.color999999, @@ -139,7 +139,7 @@ class _OrderCardState extends State { mainAxisAlignment: MainAxisAlignment.end, children: [ Text( - '总价¥${totalPrice}', + '总价¥$totalPrice', style: TextStyle( fontSize: BaseStyle.fontSize28, color: BaseStyle.color999999, @@ -147,7 +147,7 @@ class _OrderCardState extends State { ), SizedBox(width: 16.w), Text( - '实付款¥${payPrice}', + '实付款¥$payPrice', style: TextStyle( fontWeight: FontWeight.w600, fontSize: BaseStyle.fontSize28, diff --git a/lib/pages/personal/widget/order_list.dart b/lib/pages/personal/widget/order_list.dart index 22c42fb4..446d3df6 100644 --- a/lib/pages/personal/widget/order_list.dart +++ b/lib/pages/personal/widget/order_list.dart @@ -159,6 +159,7 @@ class _OrderListState extends State @override Widget build(BuildContext context) { + super.build(context); return RefreshConfiguration( hideFooterWhenNotFull: true, child: SmartRefresher( diff --git a/lib/pages/property/property_index.dart b/lib/pages/property/property_index.dart index 9acfbc3e..c83b9fc6 100644 --- a/lib/pages/property/property_index.dart +++ b/lib/pages/property/property_index.dart @@ -61,8 +61,6 @@ class _PropertyIndexState extends State }, ]; - - RefreshController _refreshController = RefreshController(initialRefresh: false); ScrollController _controller; @@ -118,6 +116,7 @@ class _PropertyIndexState extends State @override Widget build(BuildContext context) { + super.build(context); return Scaffold( appBar: AppBar( centerTitle: true, diff --git a/lib/pages/property/widget/property_activity_card.dart b/lib/pages/property/widget/property_activity_card.dart index f8692e61..726ee734 100644 --- a/lib/pages/property/widget/property_activity_card.dart +++ b/lib/pages/property/widget/property_activity_card.dart @@ -8,13 +8,13 @@ class PropertyActivityCard extends StatelessWidget { final Function fun; PropertyActivityCard({Key key, this.fun}) : super(key: key); - List images = [ + final List images = [ "https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1151143562,4115642159&fm=26&gp=0.jpg", "https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=2551412680,857245643&fm=26&gp=0.jpg", "https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3604827221,1047385274&fm=26&gp=0.jpg", ]; - List> _listView = [ + final List> _listView = [ { 'imagePath': 'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3786472598,2225627644&fm=26&gp=0.jpg', @@ -140,7 +140,7 @@ class PropertyActivityCard extends StatelessWidget { ), SizedBox(width: 26.w), Text( - '${peopleNum}人已参加', + '$peopleNum人已参加', style: _textStyleSubtitle(), ), ], diff --git a/lib/pages/property/widget/property_card.dart b/lib/pages/property/widget/property_card.dart index aa3da56a..ae50ef6b 100644 --- a/lib/pages/property/widget/property_card.dart +++ b/lib/pages/property/widget/property_card.dart @@ -7,7 +7,7 @@ import 'package:akuCommunity/utils/screenutil.dart'; class PropertyCard extends StatelessWidget { PropertyCard({Key key}) : super(key: key); - List> _listCard = [ + final List> _listCard = [ { 'title': '语音管家', 'subtitle': '随时随地帮你下单', @@ -67,7 +67,7 @@ class PropertyCard extends StatelessWidget { ), ), onPressed: () { - _phoneCall('tel:${url}'); + _phoneCall('tel:$url'); Navigator.pop(context); }, ), diff --git a/lib/pages/scan/scan_page.dart b/lib/pages/scan/scan_page.dart index 6369d177..66e91c19 100644 --- a/lib/pages/scan/scan_page.dart +++ b/lib/pages/scan/scan_page.dart @@ -98,7 +98,6 @@ class _ScanPageState extends State { ListTile( title: TextField( decoration: InputDecoration( - hasFloatingPlaceholder: true, labelText: "Flash On", ), controller: _flashOnController, @@ -107,7 +106,6 @@ class _ScanPageState extends State { ListTile( title: TextField( decoration: InputDecoration( - hasFloatingPlaceholder: true, labelText: "Flash Off", ), controller: _flashOffController, @@ -116,7 +114,6 @@ class _ScanPageState extends State { ListTile( title: TextField( decoration: InputDecoration( - hasFloatingPlaceholder: true, labelText: "Cancel", ), controller: _cancelController, @@ -186,7 +183,9 @@ class _ScanPageState extends State { materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, value: selectedFormats.length == _possibleFormats.length ? true - : selectedFormats.length == 0 ? false : null, + : selectedFormats.length == 0 + ? false + : null, onChanged: (checked) { setState(() { selectedFormats = [ diff --git a/lib/pages/setting_page/feedback_page/feedback_page.dart b/lib/pages/setting_page/feedback_page/feedback_page.dart index d22e746e..99941fe5 100644 --- a/lib/pages/setting_page/feedback_page/feedback_page.dart +++ b/lib/pages/setting_page/feedback_page/feedback_page.dart @@ -4,7 +4,6 @@ import 'package:flustars/flustars.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:akuCommunity/utils/screenutil.dart'; -import 'package:akuCommunity/base/assets_image.dart'; import 'package:akuCommunity/widget/common_app_bar.dart'; import 'package:akuCommunity/widget/common_image_picker.dart'; import 'package:oktoast/oktoast.dart'; @@ -58,21 +57,6 @@ class _FeedBackPageState extends State { ); } - Widget _containerAddImage() { - return Container( - width: 218.w, - height: 218.w, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.all(Radius.circular(8)), - border: Border.all(color: Color(0xffd4cfbe), width: 1.0), - image: DecorationImage( - image: AssetImage(AssetsImage.IMAGEADD), fit: BoxFit.fill), - ), - // child: , - ); - } - Widget _inkWellSubmit() { return InkWell( onTap: () { diff --git a/lib/pages/setting_page/setting_page.dart b/lib/pages/setting_page/setting_page.dart index 4cfc1b1f..c301ba39 100644 --- a/lib/pages/setting_page/setting_page.dart +++ b/lib/pages/setting_page/setting_page.dart @@ -102,11 +102,6 @@ class _SettingPageState extends State { ); } - void _selectAction(String title, subtitle) async { - int index1 = await showPayActionSheets( - context: context, title: title, subtitle: subtitle); - print(index1); - } /// 具体使用方式 Future showPayActionSheets( diff --git a/lib/pages/sign/sign_in_page.dart b/lib/pages/sign/sign_in_page.dart index e8f46bfd..2714553f 100644 --- a/lib/pages/sign/sign_in_page.dart +++ b/lib/pages/sign/sign_in_page.dart @@ -5,7 +5,6 @@ import 'package:akuCommunity/pages/setting_page/agreement_page/agreement_page.da import 'package:akuCommunity/pages/setting_page/agreement_page/privacy_page.dart'; import 'package:akuCommunity/pages/sign/user_authentication_page.dart'; import 'package:ani_route/ani_route.dart'; -import 'package:extended_text/extended_text.dart'; import 'package:flustars/flustars.dart' show TextUtil; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; @@ -196,7 +195,6 @@ class _SignInPageState extends State { @override Widget build(BuildContext context) { - double _statusHeight = MediaQuery.of(context).padding.top; return Scaffold( backgroundColor: Colors.white, appBar: _appBar(), diff --git a/lib/pages/tab_navigator.dart b/lib/pages/tab_navigator.dart index b55f7ea2..b5a4b210 100644 --- a/lib/pages/tab_navigator.dart +++ b/lib/pages/tab_navigator.dart @@ -9,9 +9,10 @@ import 'property/property_index.dart'; import 'community/community_index.dart'; import 'personal/personal_page.dart'; - class TabNavigator extends StatefulWidget { - const TabNavigator({Key key, }) : super(key: key); + const TabNavigator({ + Key key, + }) : super(key: key); @override _TabNavigatorState createState() => _TabNavigatorState(); } @@ -22,26 +23,24 @@ class _TabNavigatorState extends State { DateTime _lastPressed; //页面列表 -List _pages = [ -]; + List _pages = []; @override void initState() { super.initState(); -_pages=[ - - HomePage(), - MarketPage(), - PropertyIndex(), - CommunityIndex(), - PersonalIndex( - ) -]; + _pages = [ + HomePage(), + MarketPage(), + PropertyIndex(), + CommunityIndex(), + PersonalIndex() + ]; } @override Widget build(BuildContext context) { - ScreenUtil.init(context, designSize: Size(750, 1334), allowFontScaling: true); + ScreenUtil.init(context, + designSize: Size(750, 1334), allowFontScaling: true); double iconSize = ScreenUtil().setWidth(44); //底部导航来 List _bottomNav = [ diff --git a/lib/pages/things_page/things_create_page/things_create_page.dart b/lib/pages/things_page/things_create_page/things_create_page.dart index a3d1f55e..c6d364e0 100644 --- a/lib/pages/things_page/things_create_page/things_create_page.dart +++ b/lib/pages/things_page/things_create_page/things_create_page.dart @@ -1,6 +1,5 @@ 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/base/assets_image.dart'; import 'package:akuCommunity/widget/common_app_bar.dart'; diff --git a/lib/pages/things_page/things_detail_page/widget/goods_info_card_button.dart b/lib/pages/things_page/things_detail_page/widget/goods_info_card_button.dart index f66ce714..63ec5f02 100644 --- a/lib/pages/things_page/things_detail_page/widget/goods_info_card_button.dart +++ b/lib/pages/things_page/things_detail_page/widget/goods_info_card_button.dart @@ -8,7 +8,7 @@ import 'package:akuCommunity/routers/page_routers.dart'; class GoodsInfoCardButton extends StatelessWidget { GoodsInfoCardButton({Key key}) : super(key: key); - List> _listButton = [ + final List> _listButton = [ {'title': '查看二维码', 'icon': MaterialCommunityIcons.qrcode}, {'title': '搬家公司', 'icon': SimpleLineIcons.phone} ]; @@ -55,7 +55,7 @@ class GoodsInfoCardButton extends StatelessWidget { ), ), onPressed: () { - _phoneCall('tel:${url}'); + _phoneCall('tel:$url'); Navigator.pop(context); }, ), diff --git a/lib/pages/things_page/widget/things_app_bar.dart b/lib/pages/things_page/widget/things_app_bar.dart index 265ae0cf..0c046984 100644 --- a/lib/pages/things_page/widget/things_app_bar.dart +++ b/lib/pages/things_page/widget/things_app_bar.dart @@ -2,7 +2,6 @@ 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'; class ThingsAppBar extends StatelessWidget { final String title, subtitle; diff --git a/lib/pages/things_page/widget/things_list.dart b/lib/pages/things_page/widget/things_list.dart index a94493cc..77f1529a 100644 --- a/lib/pages/things_page/widget/things_list.dart +++ b/lib/pages/things_page/widget/things_list.dart @@ -5,9 +5,9 @@ import 'package:akuCommunity/utils/screenutil.dart'; import 'things_card.dart'; class ThingsList extends StatefulWidget { - final List> listCard ; + final List> listCard; final bool isRepair; - ThingsList({Key key,this.listCard,this.isRepair}) : super(key: key); + ThingsList({Key key, this.listCard, this.isRepair}) : super(key: key); @override _ThingsListState createState() => _ThingsListState(); @@ -34,6 +34,7 @@ class _ThingsListState extends State @override Widget build(BuildContext context) { + super.build(context); return SmartRefresher( controller: _refreshController, header: WaterDropHeader(), diff --git a/lib/pages/total_application_page/total_applications_page.dart b/lib/pages/total_application_page/total_applications_page.dart index b5441d7b..9a1f54e4 100644 --- a/lib/pages/total_application_page/total_applications_page.dart +++ b/lib/pages/total_application_page/total_applications_page.dart @@ -343,6 +343,7 @@ class _TotalApplicationsPageState extends State { return _myAppGrid(AssetsImage.shopGridList, 3); break; default: + return SizedBox(); } }), ], diff --git a/lib/pages/visitor_access_page/visitor_access_page.dart b/lib/pages/visitor_access_page/visitor_access_page.dart index 2a38ac85..03dff92e 100644 --- a/lib/pages/visitor_access_page/visitor_access_page.dart +++ b/lib/pages/visitor_access_page/visitor_access_page.dart @@ -4,7 +4,6 @@ import 'package:flutter_datetime_picker/flutter_datetime_picker.dart'; import 'package:akuCommunity/base/assets_image.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:akuCommunity/utils/screenutil.dart'; -import 'package:akuCommunity/routers/page_routers.dart'; import 'package:akuCommunity/widget/common_app_bar.dart'; import 'package:akuCommunity/widget/common_input.dart'; @@ -239,7 +238,7 @@ class _VisitorAccessPageState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( - '${dateTime}', + '$dateTime', style: TextStyle( fontWeight: FontWeight.w600, fontSize: 34.sp, diff --git a/lib/pages/visitor_access_page/visitor_record_page.dart b/lib/pages/visitor_access_page/visitor_record_page.dart index a3a1f500..cffdd411 100644 --- a/lib/pages/visitor_access_page/visitor_record_page.dart +++ b/lib/pages/visitor_access_page/visitor_record_page.dart @@ -1,7 +1,5 @@ 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/common_app_bar.dart'; import 'widget/record_list.dart'; diff --git a/lib/pages/visitor_access_page/widget/record_item.dart b/lib/pages/visitor_access_page/widget/record_item.dart index 263336fb..6be9caed 100644 --- a/lib/pages/visitor_access_page/widget/record_item.dart +++ b/lib/pages/visitor_access_page/widget/record_item.dart @@ -30,10 +30,8 @@ class _RecordItemState extends State alignment: Alignment.center, decoration: BoxDecoration( color: Color(0xffffffff), - borderRadius: - BorderRadius.all(Radius.circular(36.w)), - border: Border.all( - color: Color(0xffffc500), width: 3.w)), + borderRadius: BorderRadius.all(Radius.circular(36.w)), + border: Border.all(color: Color(0xffffc500), width: 3.w)), padding: EdgeInsets.symmetric( vertical: 11.w, horizontal: 32.w, @@ -75,6 +73,7 @@ class _RecordItemState extends State @override Widget build(BuildContext context) { + super.build(context); return InkWell( onTap: recordPass, child: Container( diff --git a/lib/pages/visitor_access_page/widget/record_list.dart b/lib/pages/visitor_access_page/widget/record_list.dart index 5d1a3e33..662ddc62 100644 --- a/lib/pages/visitor_access_page/widget/record_list.dart +++ b/lib/pages/visitor_access_page/widget/record_list.dart @@ -29,6 +29,7 @@ class _RecordListState extends State @override Widget build(BuildContext context) { + super.build(context); return Container( color: Colors.white, child: SmartRefresher( diff --git a/lib/routers/page_routers.dart b/lib/routers/page_routers.dart index be814f60..f6482436 100644 --- a/lib/routers/page_routers.dart +++ b/lib/routers/page_routers.dart @@ -178,7 +178,7 @@ class Bundle { _getValue(String k) { if (!_map.containsKey(k)) { - throw Exception("你使用的${k}在payload不存在,请检查你的key名字是否正确,或者确定key是否存在payload"); + throw Exception("你使用的$k\在payload不存在,请检查你的key名字是否正确,或者确定key是否存在payload"); } return _map[k]; } diff --git a/lib/service/net.dart b/lib/service/net.dart index 622a9d53..93938758 100644 --- a/lib/service/net.dart +++ b/lib/service/net.dart @@ -2,7 +2,6 @@ import 'dart:convert'; import 'dart:io'; import 'package:dio/adapter.dart'; import 'package:dio/dio.dart'; -import 'package:flutter/material.dart'; import 'base_model.dart'; // import 'net_header.dart'; diff --git a/lib/utils/screenutil.dart b/lib/utils/screenutil.dart index 385dbd34..39cd4833 100644 --- a/lib/utils/screenutil.dart +++ b/lib/utils/screenutil.dart @@ -1,5 +1,3 @@ -import 'package:flutter_screenutil/flutter_screenutil.dart'; - export 'package:flutter_screenutil/flutter_screenutil.dart'; // class Screenutil { diff --git a/lib/utils/sp_util.dart b/lib/utils/sp_util.dart index 81a4f1a9..8db8d149 100644 --- a/lib/utils/sp_util.dart +++ b/lib/utils/sp_util.dart @@ -1,5 +1,4 @@ import 'dart:async'; -import 'dart:convert'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:synchronized/synchronized.dart'; diff --git a/lib/utils/toast.dart b/lib/utils/toast.dart index 02109da6..6ecced28 100644 --- a/lib/utils/toast.dart +++ b/lib/utils/toast.dart @@ -3,8 +3,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class Toast { - static Future globalToast(String text) { - showToast( + static ToastFuture globalToast(String text) { + return showToast( text, duration: Duration(milliseconds: 2000), // position: ToastPosition.top, @@ -14,4 +14,4 @@ class Toast { textStyle: TextStyle(fontSize: ScreenUtil().setSp(34)), ); } -} \ No newline at end of file +} diff --git a/lib/widget/app_bar_action.dart b/lib/widget/app_bar_action.dart index cdbc700a..924a7250 100644 --- a/lib/widget/app_bar_action.dart +++ b/lib/widget/app_bar_action.dart @@ -1,5 +1,4 @@ import 'dart:async'; -import 'dart:io' show Platform; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/services.dart'; @@ -24,7 +23,7 @@ class _AppBarActionState extends State { final _cancelController = TextEditingController(text: "关闭"); var _aspectTolerance = 0.00; - var _numberOfCameras = 0; + var numberOfCameras = 0; var _selectedCamera = -1; var _useAutoFocus = true; var _autoEnableFlash = false; @@ -38,7 +37,7 @@ class _AppBarActionState extends State { super.initState(); Future.delayed(Duration.zero, () async { - _numberOfCameras = await BarcodeScanner.numberOfCameras; + numberOfCameras = await BarcodeScanner.numberOfCameras; setState(() {}); }); } diff --git a/lib/widget/cached_image_wrapper.dart b/lib/widget/cached_image_wrapper.dart index 09a5b9ab..57559ebe 100644 --- a/lib/widget/cached_image_wrapper.dart +++ b/lib/widget/cached_image_wrapper.dart @@ -1,9 +1,7 @@ -import 'dart:io'; import 'dart:math'; import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; -import 'package:flutter_luban/flutter_luban.dart'; enum ImageType { normal, @@ -17,7 +15,7 @@ class CachedImageWrapper extends StatelessWidget { final double height; final BoxFit fit; final ImageType imageType; - bool isSigned; + final bool isSigned; CachedImageWrapper( {@required this.url, diff --git a/lib/widget/common_image_picker.dart b/lib/widget/common_image_picker.dart index f175c7a5..79057117 100644 --- a/lib/widget/common_image_picker.dart +++ b/lib/widget/common_image_picker.dart @@ -1,4 +1,3 @@ -import 'dart:typed_data'; import 'dart:async'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; @@ -55,8 +54,8 @@ class _CommonImagePickerState extends State { //一张张上传照片 for (int i = 0; i < images.length; i++) { //获取byteData - ByteData byteData = await images[i].getByteData(); - List imageData = byteData.buffer.asUint8List(); + // ByteData byteData = await images[i].getByteData(); + // List imageData = byteData.buffer.asUint8List(); //MultipartFile multipartFile = MultipartFile.fromBytes( //imageData, diff --git a/lib/widget/community_card.dart b/lib/widget/community_card.dart index f18731c6..085d9472 100644 --- a/lib/widget/community_card.dart +++ b/lib/widget/community_card.dart @@ -123,7 +123,7 @@ class _CommunityCardState extends State { ), ), Text( - '${peopleNum}人已参加', + '$peopleNum人已参加', style: TextStyle( fontSize: BaseStyle.fontSize22, color: BaseStyle.color333333), diff --git a/lib/widget/single_image_up.dart b/lib/widget/single_image_up.dart index ba7bbad9..96e4934b 100644 --- a/lib/widget/single_image_up.dart +++ b/lib/widget/single_image_up.dart @@ -1,4 +1,3 @@ -import 'dart:typed_data'; import 'dart:async'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; @@ -6,7 +5,6 @@ import 'package:flutter_icons/flutter_icons.dart'; import 'package:multi_image_picker/multi_image_picker.dart'; import 'package:akuCommunity/utils/screenutil.dart'; import 'package:akuCommunity/base/base_style.dart'; -import 'package:akuCommunity/base/assets_image.dart'; class SingleImageUp extends StatefulWidget { final String title, imagePath; @@ -56,8 +54,6 @@ class _SingleImageUpState extends State { //一张张上传照片 for (int i = 0; i < images.length; i++) { //获取byteData - ByteData byteData = await images[i].getByteData(); - List imageData = byteData.buffer.asUint8List(); //MultipartFile multipartFile = MultipartFile.fromBytes( //imageData, diff --git a/lib/widget/sliver_goods_card.dart b/lib/widget/sliver_goods_card.dart index 021c3ec7..039b83c0 100644 --- a/lib/widget/sliver_goods_card.dart +++ b/lib/widget/sliver_goods_card.dart @@ -14,31 +14,6 @@ class SliverGoodsCard extends StatelessWidget { @override Widget build(BuildContext context) { - Row _rowTag() { - return Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - Expanded( - child: Container( - padding: EdgeInsets.symmetric( - horizontal: 16.w, - vertical: 8.w, - ), - color: Color(0xff000000).withOpacity(0.6), - child: Text( - '剩余时间:09天13时46分', - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: TextStyle( - color: Color(0xffffffff), fontSize: 20.sp), - ), - ), - ), - ], - ); - } - return SliverGrid( delegate: SliverChildBuilderDelegate( (BuildContext context, int index) { @@ -137,8 +112,8 @@ class SliverGoodsCard extends StatelessWidget { ), decoration: BoxDecoration( color: Color(0xffffc40c), - borderRadius: BorderRadius.all( - Radius.circular(20.w)), + borderRadius: + BorderRadius.all(Radius.circular(20.w)), ), child: Text( '立即购买', diff --git a/pubspec.lock b/pubspec.lock index c9d7f0d9..01789fc9 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -267,13 +267,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.0.1" - extended_tabs: - dependency: "direct main" - description: - name: extended_tabs - url: "https://pub.flutter-io.cn" - source: hosted - version: "0.2.3" extended_text: dependency: "direct main" description: @@ -363,15 +356,6 @@ packages: description: flutter source: sdk version: "0.0.0" - flutter_anywhere_menus: - dependency: "direct main" - description: - path: "." - ref: eb91b16210fdac9907eaab9604c017d436e423ca - resolved-ref: eb91b16210fdac9907eaab9604c017d436e423ca - url: "https://github.com/haysuperman/flutter_anywhere_menus.git" - source: git - version: "0.1.2" flutter_beautiful_popup: dependency: "direct main" description: @@ -426,13 +410,6 @@ packages: description: flutter source: sdk version: "0.0.0" - flutter_luban: - dependency: "direct main" - description: - name: flutter_luban - url: "https://pub.flutter-io.cn" - source: hosted - version: "0.1.11" flutter_map: dependency: "direct main" description: @@ -475,13 +452,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "0.5.7" - flutter_spinkit: - dependency: "direct main" - description: - name: flutter_spinkit - url: "https://pub.flutter-io.cn" - source: hosted - version: "3.1.0" flutter_svg: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 36f14c88..c20880c5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -28,13 +28,6 @@ dependencies: # 瀑布流 waterfall_flow: 2.0.2 - # - extended_tabs: 0.2.3 - # - flutter_anywhere_menus: - git: - url: https://github.com/haysuperman/flutter_anywhere_menus.git - ref: eb91b16210fdac9907eaab9604c017d436e423ca # 权限组件 permission_handler: ^5.0.1+1 # 版本信息 @@ -59,8 +52,6 @@ dependencies: flutter_icons: 1.1.0 extended_image: 0.9.0 extended_text: 4.0.0 - # loading界面 - flutter_spinkit: ^3.1.0 #轮播图 flutter_swiper: ^1.1.6 #路由 @@ -73,7 +64,6 @@ dependencies: photo_view: ^0.10.2 #图片缓存 cached_network_image: ^2.3.1 - flutter_luban: ^0.1.11 #评价 smooth_star_rating: ^1.1.1 #头像层叠