From 843f1b99c3a66e57679eed1c98721428f95ce7dc Mon Sep 17 00:00:00 2001 From: laiiihz Date: Mon, 25 Jan 2021 19:53:22 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E8=AE=BF=E5=AE=A2?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit remove sh*t code again. --- lib/constants/api.dart | 3 + .../manager/visitor_list_item_model.dart | 44 ++++ .../visitor_access_page.dart | 16 +- .../visitor_pass_page.dart | 207 ------------------ .../widget/record_item.dart | 116 ---------- .../widget/record_list.dart | 51 ----- lib/ui/manager/visitor/visitor_list_item.dart | 86 ++++++++ .../visitor/visitor_passport_page.dart | 45 ++++ .../manager/visitor/visitor_record_page.dart | 10 +- .../manager/visitor/visitor_record_view.dart | 54 +++++ lib/widget/bee_back_button.dart | 4 +- 11 files changed, 245 insertions(+), 391 deletions(-) create mode 100644 lib/model/manager/visitor_list_item_model.dart delete mode 100644 lib/pages/visitor_access_page/visitor_pass_page.dart delete mode 100644 lib/pages/visitor_access_page/widget/record_item.dart delete mode 100644 lib/pages/visitor_access_page/widget/record_list.dart create mode 100644 lib/ui/manager/visitor/visitor_list_item.dart create mode 100644 lib/ui/manager/visitor/visitor_passport_page.dart create mode 100644 lib/ui/manager/visitor/visitor_record_view.dart diff --git a/lib/constants/api.dart b/lib/constants/api.dart index fcf0259c..3f11be11 100644 --- a/lib/constants/api.dart +++ b/lib/constants/api.dart @@ -76,6 +76,9 @@ class _Manager { ///访客通行:添加填写的访客信息 String get insertVisitorInfo => '/user/visitorAccess/insertVisitorInfo'; + ///访客通行:查询访客记录信息(包含条件搜索) + String get visitorAccessList => '/user/visitorAccess/list'; + ///物品出户:查询当前用户所有的物品出户信息 String get articleOut => '/user/articleOut/list'; diff --git a/lib/model/manager/visitor_list_item_model.dart b/lib/model/manager/visitor_list_item_model.dart new file mode 100644 index 00000000..385cd8c1 --- /dev/null +++ b/lib/model/manager/visitor_list_item_model.dart @@ -0,0 +1,44 @@ +import 'package:common_utils/common_utils.dart'; + +class VisitorListItemModel { + int id; + int accessCode; + int visitorStatus; + String name; + int isDrive; + String carNum; + String effectiveTime; + + DateTime get date => DateUtil.getDateTime(effectiveTime); + + VisitorListItemModel( + {this.id, + this.accessCode, + this.visitorStatus, + this.name, + this.isDrive, + this.carNum, + this.effectiveTime}); + + VisitorListItemModel.fromJson(Map json) { + id = json['id']; + accessCode = json['accessCode']; + visitorStatus = json['visitorStatus']; + name = json['name']; + isDrive = json['isDrive']; + carNum = json['carNum']; + effectiveTime = json['effectiveTime']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['accessCode'] = this.accessCode; + data['visitorStatus'] = this.visitorStatus; + data['name'] = this.name; + data['isDrive'] = this.isDrive; + data['carNum'] = this.carNum; + data['effectiveTime'] = this.effectiveTime; + return data; + } +} diff --git a/lib/pages/visitor_access_page/visitor_access_page.dart b/lib/pages/visitor_access_page/visitor_access_page.dart index cf5b5ed1..7bacdf1a 100644 --- a/lib/pages/visitor_access_page/visitor_access_page.dart +++ b/lib/pages/visitor_access_page/visitor_access_page.dart @@ -2,6 +2,7 @@ import 'package:akuCommunity/pages/manager_func.dart'; import 'package:akuCommunity/ui/manager/visitor/visitor_record_page.dart'; import 'package:akuCommunity/provider/user_provider.dart'; import 'package:akuCommunity/widget/bee_scaffold.dart'; +import 'package:akuCommunity/widget/picker/bee_date_picker.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter_datetime_picker/flutter_datetime_picker.dart'; @@ -210,17 +211,10 @@ class _VisitorAccessPageState extends State { Widget _selectTime() { return InkWell( - onTap: () { - DatePicker.showDatePicker(context, - showTitleActions: true, - minTime: DateTime(2020, 1, 1), - maxTime: DateTime(2020, 12, 31), onChanged: (date) { - print('change $date in time zone ' + - date.timeZoneOffset.inHours.toString()); - }, onConfirm: (date) { - dateTime = date; - setState(() {}); - }, currentTime: DateTime.now(), locale: LocaleType.zh); + onTap: () async { + DateTime date = await BeeDatePicker.pick(DateTime.now()); + if (date != null) dateTime = date; + setState(() {}); }, child: Container( padding: EdgeInsets.only( diff --git a/lib/pages/visitor_access_page/visitor_pass_page.dart b/lib/pages/visitor_access_page/visitor_pass_page.dart deleted file mode 100644 index d7356930..00000000 --- a/lib/pages/visitor_access_page/visitor_pass_page.dart +++ /dev/null @@ -1,207 +0,0 @@ -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter_icons/flutter_icons.dart'; -import 'package:akuCommunity/utils/headers.dart'; -import 'package:akuCommunity/widget/dotted_line.dart'; - -class VisitorPassPage extends StatefulWidget { - VisitorPassPage({Key key}) : super(key: key); - - @override - _VisitorPassPageState createState() => _VisitorPassPageState(); -} - -class _VisitorPassPageState extends State { - Widget _header() { - return Container( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - '宁波华茂悦峰', - style: TextStyle(fontSize: 40.sp, color: Color(0xffffffff)), - ), - SizedBox(height: 10.w), - Text( - '1幢-1单元-702室', - style: TextStyle(fontSize: 26.sp, color: Color(0xffffffff)), - ), - ], - ), - ); - } - - Widget _card() { - return Container( - decoration: BoxDecoration( - color: Color(0xffffffff), - borderRadius: BorderRadius.all(Radius.circular(16.w)), - boxShadow: [ - BoxShadow( - color: Colors.grey.withOpacity(0.2), - offset: Offset(1.1, 1.1), - blurRadius: 10.0), - ], - ), - margin: EdgeInsets.symmetric( - horizontal: 75.w, - vertical: 32.w, - ), - padding: EdgeInsets.only( - bottom: 16.w, - left: 32.w, - right: 21.w, - top: 25.w, - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Row( - children: [ - Icon( - AntDesign.contacts, - size: 40.sp, - color: Color(0xff999999), - ), - SizedBox(width: 10.w), - Text( - '马成泽先生', - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontWeight: FontWeight.w600, - fontSize: 36.sp, - color: Color(0xff333333)), - ), - ], - ), - Row( - children: [ - Icon( - AntDesign.car, - size: 40.sp, - color: Color(0xff999999), - ), - SizedBox(width: 10.w), - Text( - '无车辆信息', - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontWeight: FontWeight.w600, - fontSize: 36.sp, - color: Color(0xff333333), - ), - ), - ], - ), - ], - ), - SizedBox(height: 13.w), - Text( - '有限时间:2020年6月30日', - style: TextStyle( - fontSize: 26.sp, - color: Color(0xff999999), - ), - ), - SizedBox(height: 23.w), - DottedLine(color: Color(0xfff5f5f5)), - Container( - padding: EdgeInsets.only( - top: 30.w, - bottom: 38.w, - ), - height: 389.w, - alignment: Alignment.center, - child: Column( - children: [ - Text( - '020-598-230', - style: TextStyle( - fontWeight: FontWeight.w600, - fontSize: 36.sp, - color: Color(0xff333333), - ), - ), - SizedBox(height: 11.w), - Image.asset( - 'assets/example/QR_code.png', - height: 260.w, - width: 260.w, - color: Color(0xff333333), - fit: BoxFit.fill, - ), - ], - ), - ), - DottedLine(color: Color(0xfff5f5f5)), - SizedBox(height: 16.w), - Container( - alignment: Alignment.center, - child: Text( - '进入小区时,请出示此通行证给门岗', - style: TextStyle( - fontSize: 24.sp, - color: Color(0xff999999), - ), - ), - ), - ], - ), - ); - } - - Widget _bottomButton() { - return InkWell( - onTap: () {}, - child: Container( - alignment: Alignment.center, - height: 98.w, - width: 750.w, - padding: EdgeInsets.symmetric(vertical: 26.5.w), - color: Color(0xffffc40c), - child: Text( - '发送给访客', - style: TextStyle( - fontWeight: FontWeight.w600, - fontSize: 32.sp, - color: Color(0xff333333), - ), - ), - ), - ); - } - - @override - Widget build(BuildContext context) { - return BeeScaffold( - title: '访客通行证', - body: Container( - color: Color(0xff333333), - child: Stack( - children: [ - Column( - children: [ - SizedBox(height: 192.w - kToolbarHeight), - _header(), - SizedBox(height: 32.w), - _card(), - ], - ), - Positioned( - bottom: 0, - child: _bottomButton(), - ), - ], - ), - ), - ); - } -} diff --git a/lib/pages/visitor_access_page/widget/record_item.dart b/lib/pages/visitor_access_page/widget/record_item.dart deleted file mode 100644 index fa753cc7..00000000 --- a/lib/pages/visitor_access_page/widget/record_item.dart +++ /dev/null @@ -1,116 +0,0 @@ -import 'package:akuCommunity/pages/visitor_access_page/visitor_pass_page.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter_icons/flutter_icons.dart'; -import 'package:akuCommunity/utils/headers.dart'; - -class RecordItem extends StatefulWidget { - final bool isQRCode; - RecordItem({Key key, this.isQRCode}) : super(key: key); - - @override - _RecordItemState createState() => _RecordItemState(); -} - -class _RecordItemState extends State - with AutomaticKeepAliveClientMixin { - @override - bool get wantKeepAlive => true; - void recordPass() { - VisitorPassPage().to; - } - - Positioned _positionedAgain() { - return Positioned( - right: 0, - top: 16.w, - child: InkWell( - onTap: () {}, - child: Container( - alignment: Alignment.center, - decoration: BoxDecoration( - color: Color(0xffffffff), - 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, - ), - child: Text( - '再次邀请', - style: TextStyle( - fontWeight: FontWeight.w600, - fontSize: 24.sp, - color: Color(0xff333333), - ), - ), - ), - ), - ); - } - - Positioned _positionedQRcode() { - return Positioned( - right: 0, - top: 16.w, - child: Row( - children: [ - Icon( - AntDesign.qrcode, - size: 40.sp, - color: Color(0xff999999), - ), - SizedBox(height: 18.w), - Icon( - AntDesign.right, - size: 40.sp, - color: Color(0xff999999), - ), - ], - ), - ); - } - - @override - Widget build(BuildContext context) { - super.build(context); - return InkWell( - onTap: recordPass, - child: Container( - padding: EdgeInsets.only( - top: 32.w, - left: 32.w, - right: 32.w, - ), - color: Colors.white, - child: Stack( - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - '马成泽(浙A88888)', - style: TextStyle( - fontSize: 32.sp, - color: Color(0xff333333), - ), - ), - SizedBox(height: 8.w), - Text( - '2020年6月30日', - style: TextStyle( - fontSize: 24.sp, - color: Color(0xff999999), - ), - ), - SizedBox(height: 33.w), - Divider() - ], - ), - widget.isQRCode ? _positionedQRcode() : _positionedAgain(), - ], - ), - ), - ); - } -} diff --git a/lib/pages/visitor_access_page/widget/record_list.dart b/lib/pages/visitor_access_page/widget/record_list.dart deleted file mode 100644 index 662ddc62..00000000 --- a/lib/pages/visitor_access_page/widget/record_list.dart +++ /dev/null @@ -1,51 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'record_item.dart'; - -class RecordList extends StatefulWidget { - RecordList({Key key}) : super(key: key); - - @override - _RecordListState createState() => _RecordListState(); -} - -class _RecordListState extends State - with AutomaticKeepAliveClientMixin { - @override - bool get wantKeepAlive => true; - RefreshController _refreshController = - RefreshController(initialRefresh: false); - - void _onRefresh() async { - await Future.delayed(Duration(milliseconds: 1500)); - _refreshController.refreshCompleted(); - } - - void _onLoading() async { - if (mounted) setState(() {}); - _refreshController.loadComplete(); - } - - @override - Widget build(BuildContext context) { - super.build(context); - return Container( - color: Colors.white, - child: SmartRefresher( - controller: _refreshController, - header: WaterDropHeader(), - footer: ClassicFooter(), - onRefresh: _onRefresh, - onLoading: _onLoading, - enablePullUp: true, - child: ListView.builder( - itemBuilder: (context, index) => RecordItem( - isQRCode: (index % 2 == 0) ? false : true, - ), - itemCount: 6, - ), - ), - ); - } -} diff --git a/lib/ui/manager/visitor/visitor_list_item.dart b/lib/ui/manager/visitor/visitor_list_item.dart new file mode 100644 index 00000000..7fd51d46 --- /dev/null +++ b/lib/ui/manager/visitor/visitor_list_item.dart @@ -0,0 +1,86 @@ +import 'package:akuCommunity/model/manager/visitor_list_item_model.dart'; +import 'package:akuCommunity/ui/manager/visitor/visitor_passport_page.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:common_utils/common_utils.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:velocity_x/velocity_x.dart'; + +class VisitorListItem extends StatefulWidget { + final VisitorListItemModel model; + VisitorListItem({Key key, @required this.model}) : super(key: key); + + @override + _VisitorListItemState createState() => _VisitorListItemState(); +} + +class _VisitorListItemState extends State { + String get _name { + StringBuffer buffer = StringBuffer(); + var name = widget.model.name; + buffer.write(name); + var car = widget.model.carNum; + if (TextUtil.isEmpty(car)) return buffer.toString(); + buffer.write('($car)'); + return buffer.toString(); + } + + bool get outDate => DateTime.now().isAfter(widget.model.date); + _buildSuffix() { + if (outDate) + return MaterialButton( + onPressed: () {}, + materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, + padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 12.w), + height: 56.w, + child: '再次邀约'.text.size(24.sp).bold.make(), + shape: StadiumBorder( + side: BorderSide( + color: Color(0xFFFFC500), + width: 3.w, + ), + ), + ); + return Row( + mainAxisSize: MainAxisSize.min, + children: [ + Icon(Icons.qr_code_rounded), + 16.wb, + Icon(CupertinoIcons.chevron_forward), + ], + ); + } + + @override + Widget build(BuildContext context) { + return MaterialButton( + onPressed: () { + if (!outDate) { + VisitorPassportPage().to(); + } + }, + color: Colors.white, + elevation: 0, + materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, + height: 152.w, + child: Row( + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + _name.text.size(32.sp).bold.make(), + 8.hb, + DateUtil.formatDate(widget.model.date, format: 'yyyy-MM-dd') + .text + .size(24.sp) + .color(Color(0xFF999999)) + .make(), + ], + ), + Spacer(), + _buildSuffix(), + ], + ), + ); + } +} diff --git a/lib/ui/manager/visitor/visitor_passport_page.dart b/lib/ui/manager/visitor/visitor_passport_page.dart new file mode 100644 index 00000000..eb341381 --- /dev/null +++ b/lib/ui/manager/visitor/visitor_passport_page.dart @@ -0,0 +1,45 @@ +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_back_button.dart'; +import 'package:flutter/material.dart'; +import 'package:velocity_x/velocity_x.dart'; + +class VisitorPassportPage extends StatefulWidget { + VisitorPassportPage({Key key}) : super(key: key); + + @override + _VisitorPassportPageState createState() => _VisitorPassportPageState(); +} + +class _VisitorPassportPageState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Color(0xFF333333), + appBar: AppBar( + leading: BeeBackButton(color: Colors.white), + backgroundColor: Color(0xFF333333), + elevation: 0, + centerTitle: true, + title: '访客通行证'.text.white.make(), + ), + body: ListView( + children: [ + 64.hb, + '宁波华茂悦峰'.text.size(40.sp).white.bold.make().centered(), + '1幢-1单元-702室'.text.size(30.sp).white.make().centered(), + 32.hb, + Container( + height: 600.w, + width: 600.w, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(16.w), + ), + // child: , + //TODO 二维码显示 + ).centered(), + ], + ), + ); + } +} diff --git a/lib/ui/manager/visitor/visitor_record_page.dart b/lib/ui/manager/visitor/visitor_record_page.dart index e5018c09..6fa08b4f 100644 --- a/lib/ui/manager/visitor/visitor_record_page.dart +++ b/lib/ui/manager/visitor/visitor_record_page.dart @@ -1,8 +1,8 @@ +import 'package:akuCommunity/ui/manager/visitor/visitor_record_view.dart'; import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:akuCommunity/widget/tab_bar/bee_tab_bar.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; -import '../../../pages/visitor_access_page/widget/record_list.dart'; class VisitorRecordPage extends StatefulWidget { VisitorRecordPage({Key key}) : super(key: key); @@ -38,10 +38,10 @@ class _VisitorRecordPageState extends State ), body: TabBarView( controller: _controller, - children: List.generate( - _tabs.length, - (index) => RecordList(), - ), + children: [ + VisitorRecordView(type: 1), + VisitorRecordView(type: 2), + ], ), ); } diff --git a/lib/ui/manager/visitor/visitor_record_view.dart b/lib/ui/manager/visitor/visitor_record_view.dart new file mode 100644 index 00000000..0c926683 --- /dev/null +++ b/lib/ui/manager/visitor/visitor_record_view.dart @@ -0,0 +1,54 @@ +import 'package:akuCommunity/constants/api.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/model/manager/visitor_list_item_model.dart'; +import 'package:akuCommunity/pages/things_page/widget/bee_list_view.dart'; +import 'package:akuCommunity/ui/manager/visitor/visitor_list_item.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_easyrefresh/easy_refresh.dart'; + +class VisitorRecordView extends StatefulWidget { + ///访客状态(1.未到,2.已到) + final int type; + VisitorRecordView({Key key, @required this.type}) : super(key: key); + + @override + _VisitorRecordViewState createState() => _VisitorRecordViewState(); +} + +class _VisitorRecordViewState extends State { + EasyRefreshController _refreshController = EasyRefreshController(); + + + @override + void dispose() { + _refreshController?.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return BeeListView( + controller: _refreshController, + path: API.manager.visitorAccessList, + extraParams: {'visitorStatus': widget.type}, + convert: (model) { + return model.tableList + .map((e) => VisitorListItemModel.fromJson(e)) + .toList(); + }, + builder: (items) { + return ListView.separated( + separatorBuilder: (_, __) => Divider( + indent: 32.w, + endIndent: 32.w, + height: 1.w, + ), + itemBuilder: (context, index) { + return VisitorListItem(model: items[index]); + }, + itemCount: items.length, + ); + }, + ); + } +} diff --git a/lib/widget/bee_back_button.dart b/lib/widget/bee_back_button.dart index 505932ab..4a0a4b12 100644 --- a/lib/widget/bee_back_button.dart +++ b/lib/widget/bee_back_button.dart @@ -3,7 +3,8 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; class BeeBackButton extends StatelessWidget { - const BeeBackButton({Key key}) : super(key: key); + final Color color; + const BeeBackButton({Key key, this.color = Colors.black}) : super(key: key); @override Widget build(BuildContext context) { @@ -12,6 +13,7 @@ class BeeBackButton extends StatelessWidget { onPressed: () => Get.back(), icon: Icon( CupertinoIcons.chevron_back, + color: color, ), ) : SizedBox(); From 7ab70c8a59d35480562bc8dfeafd254f542ac01c Mon Sep 17 00:00:00 2001 From: laiiihz Date: Tue, 26 Jan 2021 10:04:10 +0800 Subject: [PATCH 2/2] sort all files' import. by import_sorter --- lib/base/base_style.dart | 5 +- lib/extensions/num_ext.dart | 3 + lib/extensions/page_router.dart | 3 + lib/extensions/widget_list_ext.dart | 3 + lib/main.dart | 23 +- lib/model/manager/advice_detail_model.dart | 1 + .../manager/suggestion_or_complain_model.dart | 1 + .../manager/visitor_list_item_model.dart | 1 + lib/model/user/user_info_model.dart | 1 + .../activities_details_page.dart | 19 +- .../activities_page/activities_page.dart | 9 +- .../member_list_page/member_list_page.dart | 11 +- lib/pages/address_page/address_edit_page.dart | 15 +- lib/pages/address_page/address_page.dart | 11 +- .../widget/address_edit_item.dart | 7 +- .../address_page/widget/address_item.dart | 15 +- .../certification_page.dart | 7 +- lib/pages/community/community_index.dart | 13 +- lib/pages/community/note_create_page.dart | 13 +- lib/pages/community/topice_detail_page.dart | 13 +- lib/pages/community/widget/tab_list.dart | 11 +- lib/pages/community/widget/topic_card.dart | 9 +- lib/pages/community/widget/trend_card.dart | 19 +- .../confirm_order_page.dart | 11 +- .../confirm_order_page/pay_order_page.dart | 11 +- .../widget/confirm_address.dart | 10 +- .../widget/confirm_bottom_bar.dart | 9 +- .../widget/confirm_content.dart | 14 +- .../convenient_phone_page.dart | 13 +- .../convenient_phone/widget/phone_list.dart | 9 +- lib/pages/fitup_manage/fitup_manage_page.dart | 11 +- .../fitup_manage/widget/common_select.dart | 11 +- .../fitup_manage/widget/decorator_info.dart | 9 +- .../fitup_manage/widget/director_manage.dart | 11 +- lib/pages/fitup_manage/widget/house_info.dart | 9 +- .../fitup_manage/widget/owner_manage.dart | 7 +- .../fitup_manage/widget/pay_model_sheet.dart | 13 +- .../goods_details/goods_details_page.dart | 17 +- .../goods_details/view_comments_page.dart | 9 +- .../goods_details/widget/goods_app_bar.dart | 13 +- .../widget/goods_comments_card.dart | 11 +- .../widget/goods_details_bottom_bar.dart | 13 +- .../goods_details/widget/product_content.dart | 5 +- .../goods_details/widget/product_detail.dart | 7 +- .../widget/product_evaluate.dart | 5 +- .../goods_details/widget/product_service.dart | 5 +- .../goods_details/widget/product_specs.dart | 7 +- .../goods_details/widget/product_swiper.dart | 11 +- .../deto_code_page/deto_code_page.dart | 9 +- .../deto_create_page/deto_create_page.dart | 13 +- .../widget/common_picker.dart | 11 +- .../deto_create_page/widget/common_radio.dart | 5 +- .../goods_deto_page/goods_deto_page.dart | 11 +- .../widget/goods_info_card.dart | 9 +- .../widget/goods_info_card_button.dart | 12 +- .../widget/image_horizontal_list.dart | 9 +- .../goods_manage_page/goods_manage_page.dart | 11 +- .../mine_goods_page/mine_goods_page.dart | 9 +- lib/pages/home/home_page.dart | 35 +- lib/pages/home/widget/animate_app_bar.dart | 5 +- lib/pages/home/widget/home_app_bar.dart | 7 +- lib/pages/home/widget/home_card.dart | 15 +- lib/pages/home/widget/home_search.dart | 9 +- lib/pages/home/widget/home_swiper.dart | 7 +- lib/pages/home/widget/home_tag_bar.dart | 9 +- .../committee_mailbox_page.dart | 7 +- .../industry_committee_page.dart | 19 +- lib/pages/invoice/invoice_page.dart | 13 +- lib/pages/invoice/widget/invoice_input.dart | 5 +- .../life_pay_bill_page.dart | 7 +- .../life_pay_bill_page/widget/bill_card.dart | 7 +- .../life_pay_info_page.dart | 13 +- .../widget/details_card.dart | 11 +- lib/pages/life_pay/life_pay_page.dart | 15 +- .../life_pay_record_page.dart | 11 +- .../widget/record_card.dart | 11 +- lib/pages/life_pay/widget/order_card.dart | 9 +- lib/pages/life_pay/widget/submit_bar.dart | 7 +- lib/pages/manager_func.dart | 7 +- .../market_cart_page/market_cart_page.dart | 15 +- .../widget/market_cart_app_bar.dart | 9 +- .../widget/market_cart_bottom_bar.dart | 9 +- .../widget/market_cart_card.dart | 15 +- .../market_detail_page.dart | 5 +- .../widget/market_details_app_bar.dart | 9 +- lib/pages/market/market_page.dart | 17 +- lib/pages/market/widget/market_list.dart | 15 +- .../market/widget/market_sticky_bar.dart | 3 + .../widget/sliver_goods_group_card.dart | 9 +- lib/pages/market_class/market_class_page.dart | 11 +- .../market_class/widget/market_class_bar.dart | 9 +- .../comment_message_page.dart | 11 +- .../message_center_page.dart | 15 +- .../message_center_page/refund_details.dart | 7 +- .../shop_message_page/shop_message_page.dart | 12 +- .../system_details_page.dart | 9 +- .../system_message_page.dart | 15 +- .../car_add_page/car_add_page.dart | 7 +- lib/pages/mine_car_page/mine_car_page.dart | 13 +- .../select_community_page.dart | 13 +- .../select_parking_page.dart | 9 +- .../house_authenticate_page.dart | 7 +- .../mine_house_page/mine_house_page.dart | 11 +- lib/pages/notice_page/notice_page.dart | 11 +- lib/pages/one_alarm/widget/alarm_page.dart | 13 +- .../one_alarm/widget/explain_template.dart | 10 +- lib/pages/open_door_page/open_door_page.dart | 13 +- .../opening_code_page/opening_code_page.dart | 9 +- lib/pages/personal/change_nick_name_page.dart | 9 +- lib/pages/personal/evaluate_good_page.dart | 13 +- lib/pages/personal/look_logistics_page.dart | 15 +- lib/pages/personal/order_details_page.dart | 15 +- lib/pages/personal/order_page.dart | 11 +- lib/pages/personal/personal_page.dart | 27 +- lib/pages/personal/refund_apply_page.dart | 13 +- lib/pages/personal/refund_select_page.dart | 15 +- lib/pages/personal/update_tel_page.dart | 20 +- lib/pages/personal/user_profile_page.dart | 24 +- lib/pages/personal/widget/order_card.dart | 11 +- lib/pages/personal/widget/order_list.dart | 7 +- .../personal/widget/refund_shop_card.dart | 7 +- .../personal/widget/refund_tile_card.dart | 9 +- lib/pages/property/property_index.dart | 25 +- .../widget/property_activity_card.dart | 7 +- lib/pages/property/widget/property_bar.dart | 7 +- lib/pages/property/widget/property_card.dart | 7 +- .../questionnaire_details_page.dart | 13 +- .../questionnaire_page.dart | 13 +- lib/pages/scan/scan_page.dart | 4 + .../setting_page/about_page/about_page.dart | 7 +- .../setting_page/account_manager_page.dart | 9 +- .../agreement_page/agreement_page.dart | 5 +- .../agreement_page/privacy_page.dart | 5 +- .../feedback_page/feedback_page.dart | 14 +- .../setting_page/invite_page/invite_page.dart | 9 +- lib/pages/setting_page/settings_page.dart | 22 +- lib/pages/sign/sign_func.dart | 11 +- lib/pages/sign/sign_in_page.dart | 34 +- .../sign/sign_up/sign_up_common_widget.dart | 9 +- .../sign_up/sign_up_pick_building_page.dart | 13 +- .../sign/sign_up/sign_up_pick_plot_page.dart | 11 +- .../sign/sign_up/sign_up_pick_role_page.dart | 13 +- .../sign/sign_up/sign_up_pick_unit_page.dart | 15 +- .../sign_up/sign_up_set_nickname_page.dart | 17 +- .../sign/sign_up/sign_up_verify_page.dart | 15 +- lib/pages/splash/splash_page.dart | 13 +- lib/pages/tab_navigator.dart | 236 +++++----- lib/pages/things_page/fixed_submit_page.dart | 25 +- .../things_create_page.dart | 9 +- .../things_detail_page.dart | 17 +- .../widget/goods_info_card.dart | 7 +- .../widget/goods_info_card_button.dart | 11 +- .../widget/image_horizontal_list.dart | 9 +- .../things_evaluate_page.dart | 11 +- .../widget/add_fixed_submit_page.dart | 24 +- .../things_page/widget/bee_list_view.dart | 9 +- .../widget/finish_fixed_submit_page.dart | 11 +- .../things_page/widget/fixed_check_box.dart | 7 +- .../things_page/widget/fixed_detail_page.dart | 17 +- .../things_page/widget/things_app_bar.dart | 9 +- lib/pages/things_page/widget/things_card.dart | 11 +- lib/pages/things_page/widget/things_list.dart | 7 +- .../total_applications_page.dart | 11 +- .../widget/applications_bar.dart | 11 +- .../visitor_access_page.dart | 23 +- lib/painters/plus_painter.dart | 3 + lib/painters/user_bottom_bar_painter.dart | 3 + lib/provider/cart.dart | 11 +- lib/provider/sign_up_provider.dart | 1 + lib/provider/user_provider.dart | 9 +- lib/service/base_model.dart | 26 +- lib/service/net.dart | 427 +++++++++--------- lib/service/net_header.dart | 18 +- lib/service/net_url.dart | 50 +- lib/service/net_util.dart | 111 ++--- .../advice/advice_add_comment_page.dart | 13 +- lib/ui/manager/advice/advice_card.dart | 13 +- lib/ui/manager/advice/advice_detail_page.dart | 21 +- .../manager/advice/advice_evaluate_page.dart | 13 +- lib/ui/manager/advice/advice_page.dart | 17 +- lib/ui/manager/advice/new_advice_page.dart | 22 +- lib/ui/manager/visitor/visitor_list_item.dart | 13 +- .../visitor/visitor_passport_page.dart | 9 +- .../manager/visitor/visitor_record_page.dart | 7 +- .../manager/visitor/visitor_record_view.dart | 11 +- lib/utils/fade_route.dart | 1 + lib/utils/hive_store.dart | 1 + lib/utils/network/base_model.dart | 2 +- lib/utils/network/net_util.dart | 17 +- lib/utils/sp_util.dart | 2 + lib/utils/toast.dart | 4 +- lib/widget/activity_card.dart | 9 +- lib/widget/animated/animated_scale.dart | 1 + lib/widget/animated/animated_transition.dart | 1 + lib/widget/app_bar_action.dart | 7 +- lib/widget/bee_back_button.dart | 3 + lib/widget/bee_divider.dart | 3 + lib/widget/bee_scaffold.dart | 9 +- lib/widget/bottom_button.dart | 7 +- lib/widget/buttons/bottom_button.dart | 7 +- lib/widget/buttons/radio_button.dart | 5 +- lib/widget/cached_image_wrapper.dart | 9 +- lib/widget/cart_count.dart | 7 +- lib/widget/circle_trend.dart | 5 +- lib/widget/common_image_picker.dart | 13 +- lib/widget/common_input.dart | 9 +- lib/widget/common_upload_image.dart | 7 +- lib/widget/community_card.dart | 9 +- lib/widget/container_comment.dart | 5 +- lib/widget/custom_action_sheet.dart | 1 + lib/widget/dotted_line.dart | 1 + lib/widget/expandable_text.dart | 4 +- lib/widget/gallery_photo_view_wrapper.dart | 10 +- lib/widget/goods_card_skeleton.dart | 5 + lib/widget/goods_specs_sheet.dart | 13 +- lib/widget/grid_buttons.dart | 3 + lib/widget/picker/bee_date_picker.dart | 3 + lib/widget/picker/bee_image_picker.dart | 9 +- lib/widget/picker/bee_image_preview.dart | 10 +- lib/widget/picker/grid_image_picker.dart | 13 +- lib/widget/round_check_box.dart | 3 + lib/widget/search_bar_delegate.dart | 3 + lib/widget/single_ad_space.dart | 5 +- lib/widget/single_image_up.dart | 11 +- lib/widget/sliver_app_bar_delegate.dart | 3 + lib/widget/sliver_goods_card.dart | 13 +- lib/widget/tab_bar/bee_tab_bar.dart | 7 +- lib/widget/views/bee_grid_image_view.dart | 9 +- lib/widget/views/horizontal_image_view.dart | 13 +- pubspec.lock | 159 ++++--- pubspec.yaml | 1 + test/widget_test.dart | 4 + 232 files changed, 2134 insertions(+), 1172 deletions(-) diff --git a/lib/base/base_style.dart b/lib/base/base_style.dart index fbff3c2b..e735aad7 100644 --- a/lib/base/base_style.dart +++ b/lib/base/base_style.dart @@ -1,5 +1,8 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/utils/headers.dart'; const ktextPrimary = Color(0xff333333); diff --git a/lib/extensions/num_ext.dart b/lib/extensions/num_ext.dart index 5b445175..de935cc5 100644 --- a/lib/extensions/num_ext.dart +++ b/lib/extensions/num_ext.dart @@ -1,4 +1,7 @@ +// Flutter imports: import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_screenutil/flutter_screenutil.dart'; extension NumExt on num { diff --git a/lib/extensions/page_router.dart b/lib/extensions/page_router.dart index 5275c594..97b6e6a5 100644 --- a/lib/extensions/page_router.dart +++ b/lib/extensions/page_router.dart @@ -1,4 +1,7 @@ +// Flutter imports: import 'package:flutter/material.dart'; + +// Package imports: import 'package:get/get.dart'; extension PageExt on Widget { diff --git a/lib/extensions/widget_list_ext.dart b/lib/extensions/widget_list_ext.dart index 664f9ed9..03daa608 100644 --- a/lib/extensions/widget_list_ext.dart +++ b/lib/extensions/widget_list_ext.dart @@ -1,4 +1,7 @@ +// Flutter imports: import 'package:flutter/material.dart'; + +// Project imports: import 'num_ext.dart'; extension WidgetListExt on List { diff --git a/lib/main.dart b/lib/main.dart index cebb54c1..a75aa283 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,17 +1,22 @@ -import 'package:akuCommunity/pages/splash/splash_page.dart'; -import 'package:akuCommunity/provider/sign_up_provider.dart'; -import 'package:akuCommunity/provider/user_provider.dart'; -import 'package:akuCommunity/utils/developer_util.dart'; -import 'package:bot_toast/bot_toast.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:bot_toast/bot_toast.dart'; +import 'package:flutter_localizations/flutter_localizations.dart'; +import 'package:flutter_picker/flutter_picker.dart'; import 'package:fluwx/fluwx.dart'; import 'package:get/get.dart'; import 'package:provider/provider.dart'; -import 'package:akuCommunity/provider/cart.dart'; -import 'package:flutter_picker/flutter_picker.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; + +// Project imports: +import 'package:akuCommunity/pages/splash/splash_page.dart'; +import 'package:akuCommunity/provider/cart.dart'; +import 'package:akuCommunity/provider/sign_up_provider.dart'; +import 'package:akuCommunity/provider/user_provider.dart'; +import 'package:akuCommunity/utils/developer_util.dart'; void main() async { WidgetsFlutterBinding.ensureInitialized(); diff --git a/lib/model/manager/advice_detail_model.dart b/lib/model/manager/advice_detail_model.dart index 7f2e3b24..b9ef61bf 100644 --- a/lib/model/manager/advice_detail_model.dart +++ b/lib/model/manager/advice_detail_model.dart @@ -1,3 +1,4 @@ +// Package imports: import 'package:common_utils/common_utils.dart'; class AdviceDetailModel { diff --git a/lib/model/manager/suggestion_or_complain_model.dart b/lib/model/manager/suggestion_or_complain_model.dart index 877edf23..a72a1f29 100644 --- a/lib/model/manager/suggestion_or_complain_model.dart +++ b/lib/model/manager/suggestion_or_complain_model.dart @@ -1,3 +1,4 @@ +// Package imports: import 'package:common_utils/common_utils.dart'; class SuggestionOrComplainModel { diff --git a/lib/model/manager/visitor_list_item_model.dart b/lib/model/manager/visitor_list_item_model.dart index 385cd8c1..2b38fca1 100644 --- a/lib/model/manager/visitor_list_item_model.dart +++ b/lib/model/manager/visitor_list_item_model.dart @@ -1,3 +1,4 @@ +// Package imports: import 'package:common_utils/common_utils.dart'; class VisitorListItemModel { diff --git a/lib/model/user/user_info_model.dart b/lib/model/user/user_info_model.dart index 47a56716..6d929c17 100644 --- a/lib/model/user/user_info_model.dart +++ b/lib/model/user/user_info_model.dart @@ -1,3 +1,4 @@ +// Package imports: import 'package:common_utils/common_utils.dart'; class UserInfoModel { 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 7b95cf87..1c249117 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 @@ -1,16 +1,21 @@ -import 'package:akuCommunity/pages/activities_page/member_list_page/member_list_page.dart'; -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:flutter_html/flutter_html.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:get/get.dart'; import 'package:image_stack/image_stack.dart'; -import 'package:flutter_html/flutter_html.dart'; -import 'package:akuCommunity/utils/headers.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; -import 'package:akuCommunity/widget/cached_image_wrapper.dart'; -import 'package:akuCommunity/widget/bottom_button.dart'; +import 'package:akuCommunity/pages/activities_page/member_list_page/member_list_page.dart'; import 'package:akuCommunity/routers/page_routers.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; +import 'package:akuCommunity/widget/bottom_button.dart'; +import 'package:akuCommunity/widget/cached_image_wrapper.dart'; class ActivitiesDetailsPage extends StatefulWidget { final Bundle bundle; diff --git a/lib/pages/activities_page/activities_page.dart b/lib/pages/activities_page/activities_page.dart index 3c83556f..2d32e722 100644 --- a/lib/pages/activities_page/activities_page.dart +++ b/lib/pages/activities_page/activities_page.dart @@ -1,9 +1,14 @@ -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:get/get.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; + +// Project imports: import 'package:akuCommunity/widget/activity_card.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; class ActivitiesPage extends StatefulWidget { ActivitiesPage({Key key}) : super(key: key); diff --git a/lib/pages/activities_page/member_list_page/member_list_page.dart b/lib/pages/activities_page/member_list_page/member_list_page.dart index 9c3e0408..0fb58c38 100644 --- a/lib/pages/activities_page/member_list_page/member_list_page.dart +++ b/lib/pages/activities_page/member_list_page/member_list_page.dart @@ -1,9 +1,14 @@ -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:akuCommunity/utils/headers.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:akuCommunity/widget/cached_image_wrapper.dart'; class MemberListPage extends StatefulWidget { diff --git a/lib/pages/address_page/address_edit_page.dart b/lib/pages/address_page/address_edit_page.dart index a826a529..5178a8b7 100644 --- a/lib/pages/address_page/address_edit_page.dart +++ b/lib/pages/address_page/address_edit_page.dart @@ -1,12 +1,17 @@ -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; -import 'package:akuCommunity/routers/page_routers.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:get/get.dart'; -import 'widget/address_edit_item.dart'; import 'package:velocity_x/velocity_x.dart'; +// Project imports: +import 'package:akuCommunity/routers/page_routers.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; +import 'widget/address_edit_item.dart'; + class AddressEditPage extends StatefulWidget { final Bundle bundle; AddressEditPage({Key key, this.bundle}) : super(key: key); diff --git a/lib/pages/address_page/address_page.dart b/lib/pages/address_page/address_page.dart index 1187246e..e66b672c 100644 --- a/lib/pages/address_page/address_page.dart +++ b/lib/pages/address_page/address_page.dart @@ -1,9 +1,14 @@ -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:velocity_x/velocity_x.dart'; + +// Project imports: +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'widget/address_item.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; class AddressPage extends StatefulWidget { AddressPage({Key key}) : super(key: key); diff --git a/lib/pages/address_page/widget/address_edit_item.dart b/lib/pages/address_page/widget/address_edit_item.dart index 29d9b2cf..c42d2b69 100644 --- a/lib/pages/address_page/widget/address_edit_item.dart +++ b/lib/pages/address_page/widget/address_edit_item.dart @@ -1,8 +1,11 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; +import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; +// Project imports: +import 'package:akuCommunity/utils/headers.dart'; + class AddressEditItem extends StatefulWidget { final Map addressInfo; AddressEditItem({Key key, this.addressInfo}) : super(key: key); diff --git a/lib/pages/address_page/widget/address_item.dart b/lib/pages/address_page/widget/address_item.dart index e67de26c..7f8cf756 100644 --- a/lib/pages/address_page/widget/address_item.dart +++ b/lib/pages/address_page/widget/address_item.dart @@ -1,12 +1,17 @@ -import 'package:akuCommunity/pages/address_page/address_edit_page.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:flutter_icons/flutter_icons.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:extended_text/extended_text.dart'; -import 'package:akuCommunity/utils/headers.dart'; -import 'package:akuCommunity/routers/page_routers.dart'; +import 'package:flutter_icons/flutter_icons.dart'; import 'package:get/get.dart'; +// Project imports: +import 'package:akuCommunity/pages/address_page/address_edit_page.dart'; +import 'package:akuCommunity/routers/page_routers.dart'; +import 'package:akuCommunity/utils/headers.dart'; + class AddressItem extends StatelessWidget { final String name, phone, address; final bool isDefualt; diff --git a/lib/pages/certification_page/certification_page.dart b/lib/pages/certification_page/certification_page.dart index 879a09f7..1aaded2d 100644 --- a/lib/pages/certification_page/certification_page.dart +++ b/lib/pages/certification_page/certification_page.dart @@ -1,8 +1,11 @@ -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/base/assets_image.dart'; import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:akuCommunity/widget/common_input.dart'; import 'package:akuCommunity/widget/single_image_up.dart'; diff --git a/lib/pages/community/community_index.dart b/lib/pages/community/community_index.dart index dccb70a1..b507052a 100644 --- a/lib/pages/community/community_index.dart +++ b/lib/pages/community/community_index.dart @@ -1,11 +1,16 @@ +// Flutter imports: +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:velocity_x/velocity_x.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; import 'package:akuCommunity/pages/community/note_create_page.dart'; -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/cupertino.dart'; import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'widget/tab_list.dart'; -import 'package:velocity_x/velocity_x.dart'; class CommunityIndex extends StatefulWidget { CommunityIndex({Key key}) : super(key: key); diff --git a/lib/pages/community/note_create_page.dart b/lib/pages/community/note_create_page.dart index bd6943f4..1b60e3fc 100644 --- a/lib/pages/community/note_create_page.dart +++ b/lib/pages/community/note_create_page.dart @@ -1,11 +1,16 @@ -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; -import 'package:akuCommunity/base/assets_image.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; import 'package:get/get.dart'; +// Project imports: +import 'package:akuCommunity/base/assets_image.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; + class NoteCreatePage extends StatefulWidget { NoteCreatePage({Key key}) : super(key: key); diff --git a/lib/pages/community/topice_detail_page.dart b/lib/pages/community/topice_detail_page.dart index 2c450b6f..97612695 100644 --- a/lib/pages/community/topice_detail_page.dart +++ b/lib/pages/community/topice_detail_page.dart @@ -1,11 +1,16 @@ -import 'package:akuCommunity/pages/community/note_create_page.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:flutter_icons/flutter_icons.dart'; import 'package:get/get.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:flutter_icons/flutter_icons.dart'; -import 'package:akuCommunity/utils/headers.dart'; + +// Project imports: +import 'package:akuCommunity/pages/community/note_create_page.dart'; import 'package:akuCommunity/routers/page_routers.dart'; +import 'package:akuCommunity/utils/headers.dart'; import 'widget/trend_card.dart'; class TopiceDetailPage extends StatefulWidget { diff --git a/lib/pages/community/widget/tab_list.dart b/lib/pages/community/widget/tab_list.dart index 7cba4a63..a0016652 100644 --- a/lib/pages/community/widget/tab_list.dart +++ b/lib/pages/community/widget/tab_list.dart @@ -1,10 +1,15 @@ -import 'package:akuCommunity/utils/headers.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:pull_to_refresh/pull_to_refresh.dart'; + +// Project imports: +import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/circle_trend.dart'; -import 'trend_card.dart'; import 'topic_card.dart'; +import 'trend_card.dart'; class TabList extends StatefulWidget { final int index; diff --git a/lib/pages/community/widget/topic_card.dart b/lib/pages/community/widget/topic_card.dart index f07d3739..1703cad0 100644 --- a/lib/pages/community/widget/topic_card.dart +++ b/lib/pages/community/widget/topic_card.dart @@ -1,7 +1,12 @@ -import 'package:akuCommunity/pages/community/topice_detail_page.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; + +// Project imports: +import 'package:akuCommunity/pages/community/topice_detail_page.dart'; import 'package:akuCommunity/utils/headers.dart'; class TopicCard extends StatefulWidget { diff --git a/lib/pages/community/widget/trend_card.dart b/lib/pages/community/widget/trend_card.dart index 7d7bd933..f8e08a22 100644 --- a/lib/pages/community/widget/trend_card.dart +++ b/lib/pages/community/widget/trend_card.dart @@ -1,16 +1,23 @@ +// Dart imports: import 'dart:ui'; -import 'package:akuCommunity/base/base_style.dart'; -import 'package:akuCommunity/widget/views/horizontal_image_view.dart'; -import 'package:bot_toast/bot_toast.dart'; -import 'package:flutter/material.dart'; + +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:bot_toast/bot_toast.dart'; import 'package:flutter_icons/flutter_icons.dart'; -import 'package:akuCommunity/utils/headers.dart'; -import 'package:akuCommunity/widget/expandable_text.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; + +// Project imports: +import 'package:akuCommunity/base/base_style.dart'; import 'package:akuCommunity/extensions/num_ext.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/expandable_text.dart'; +import 'package:akuCommunity/widget/views/horizontal_image_view.dart'; class TrendCard extends StatefulWidget { final String name; diff --git a/lib/pages/confirm_order_page/confirm_order_page.dart b/lib/pages/confirm_order_page/confirm_order_page.dart index 49d3a03e..99607560 100644 --- a/lib/pages/confirm_order_page/confirm_order_page.dart +++ b/lib/pages/confirm_order_page/confirm_order_page.dart @@ -1,11 +1,14 @@ -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/routers/page_routers.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'widget/confirm_address.dart'; -import 'widget/confirm_content.dart'; import 'widget/confirm_bottom_bar.dart'; +import 'widget/confirm_content.dart'; class ConfirmOrderPage extends StatelessWidget { final Bundle bundle; diff --git a/lib/pages/confirm_order_page/pay_order_page.dart b/lib/pages/confirm_order_page/pay_order_page.dart index b088fe5c..ad2d8a05 100644 --- a/lib/pages/confirm_order_page/pay_order_page.dart +++ b/lib/pages/confirm_order_page/pay_order_page.dart @@ -1,12 +1,17 @@ -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; import 'package:get/get.dart'; import 'package:rflutter_alert/rflutter_alert.dart'; -import 'package:akuCommunity/utils/headers.dart'; + +// Project imports: import 'package:akuCommunity/base/assets_image.dart'; import 'package:akuCommunity/routers/page_routers.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; class PayOrderPage extends StatelessWidget { final Bundle bundle; diff --git a/lib/pages/confirm_order_page/widget/confirm_address.dart b/lib/pages/confirm_order_page/widget/confirm_address.dart index 4fa5f5a8..97bcf282 100644 --- a/lib/pages/confirm_order_page/widget/confirm_address.dart +++ b/lib/pages/confirm_order_page/widget/confirm_address.dart @@ -1,9 +1,13 @@ - -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; -import 'package:akuCommunity/utils/headers.dart'; + +// Project imports: import 'package:akuCommunity/base/assets_image.dart'; +import 'package:akuCommunity/utils/headers.dart'; class ConfirmAddress extends StatefulWidget { ConfirmAddress({Key key}) : super(key: key); diff --git a/lib/pages/confirm_order_page/widget/confirm_bottom_bar.dart b/lib/pages/confirm_order_page/widget/confirm_bottom_bar.dart index 2351322e..0f52f9e6 100644 --- a/lib/pages/confirm_order_page/widget/confirm_bottom_bar.dart +++ b/lib/pages/confirm_order_page/widget/confirm_bottom_bar.dart @@ -1,8 +1,11 @@ -import 'package:akuCommunity/pages/confirm_order_page/pay_order_page.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/pages/confirm_order_page/pay_order_page.dart'; +import 'package:akuCommunity/utils/headers.dart'; class ConfirmBottomBar extends StatelessWidget { final Map cartMap; diff --git a/lib/pages/confirm_order_page/widget/confirm_content.dart b/lib/pages/confirm_order_page/widget/confirm_content.dart index f515ac60..da22a1c3 100644 --- a/lib/pages/confirm_order_page/widget/confirm_content.dart +++ b/lib/pages/confirm_order_page/widget/confirm_content.dart @@ -1,12 +1,18 @@ -import 'package:akuCommunity/pages/invoice/invoice_page.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; +import 'package:get/get.dart'; + +// Project imports: +import 'package:akuCommunity/pages/invoice/invoice_page.dart'; import 'package:akuCommunity/routers/page_routers.dart'; -// import 'package:akuCommunity/widget/cart_count.dart'; import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/cached_image_wrapper.dart'; -import 'package:get/get.dart'; + +// import 'package:akuCommunity/widget/cart_count.dart'; class ConfirmContent extends StatelessWidget { final Map cartMap; diff --git a/lib/pages/convenient_phone/convenient_phone_page.dart b/lib/pages/convenient_phone/convenient_phone_page.dart index 511c0ac6..33d963c4 100644 --- a/lib/pages/convenient_phone/convenient_phone_page.dart +++ b/lib/pages/convenient_phone/convenient_phone_page.dart @@ -1,15 +1,20 @@ -import 'package:akuCommunity/constants/api.dart'; -import 'package:akuCommunity/model/user/convenient_phone_model.dart'; -import 'package:akuCommunity/pages/things_page/widget/bee_list_view.dart'; -import 'package:akuCommunity/widget/bee_scaffold.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:url_launcher/url_launcher.dart'; import 'package:velocity_x/velocity_x.dart'; + +// Project imports: import 'package:akuCommunity/const/resource.dart'; +import 'package:akuCommunity/constants/api.dart'; +import 'package:akuCommunity/model/user/convenient_phone_model.dart'; +import 'package:akuCommunity/pages/things_page/widget/bee_list_view.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; class ConvenientPhonePage extends StatefulWidget { ConvenientPhonePage({Key key}) : super(key: key); diff --git a/lib/pages/convenient_phone/widget/phone_list.dart b/lib/pages/convenient_phone/widget/phone_list.dart index 1505cf66..e68c74a2 100644 --- a/lib/pages/convenient_phone/widget/phone_list.dart +++ b/lib/pages/convenient_phone/widget/phone_list.dart @@ -1,10 +1,15 @@ -import 'package:akuCommunity/utils/headers.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:get/get.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:url_launcher/url_launcher.dart'; + +// Project imports: import 'package:akuCommunity/base/assets_image.dart'; +import 'package:akuCommunity/utils/headers.dart'; class PhoneList extends StatefulWidget { PhoneList({Key key}) : super(key: key); diff --git a/lib/pages/fitup_manage/fitup_manage_page.dart b/lib/pages/fitup_manage/fitup_manage_page.dart index 9553ec6e..27adc02e 100644 --- a/lib/pages/fitup_manage/fitup_manage_page.dart +++ b/lib/pages/fitup_manage/fitup_manage_page.dart @@ -1,11 +1,14 @@ -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:akuCommunity/widget/sliver_app_bar_delegate.dart'; -import 'widget/owner_manage.dart'; import 'widget/director_manage.dart'; +import 'widget/owner_manage.dart'; class FitupManagePage extends StatefulWidget { FitupManagePage({Key key}) : super(key: key); diff --git a/lib/pages/fitup_manage/widget/common_select.dart b/lib/pages/fitup_manage/widget/common_select.dart index 8c8a9079..cdb7e41b 100644 --- a/lib/pages/fitup_manage/widget/common_select.dart +++ b/lib/pages/fitup_manage/widget/common_select.dart @@ -1,10 +1,15 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:flutter_datetime_picker/flutter_datetime_picker.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:flutter_picker/flutter_picker.dart'; -import 'package:flutter_datetime_picker/flutter_datetime_picker.dart'; -import 'package:akuCommunity/utils/headers.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/utils/headers.dart'; class CommonSelect extends StatefulWidget { final String title; diff --git a/lib/pages/fitup_manage/widget/decorator_info.dart b/lib/pages/fitup_manage/widget/decorator_info.dart index 8ecf81c8..f23431e8 100644 --- a/lib/pages/fitup_manage/widget/decorator_info.dart +++ b/lib/pages/fitup_manage/widget/decorator_info.dart @@ -1,8 +1,11 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; -import 'package:akuCommunity/base/base_style.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/base/assets_image.dart'; +import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/common_input.dart'; import 'package:akuCommunity/widget/single_image_up.dart'; import 'common_select.dart'; diff --git a/lib/pages/fitup_manage/widget/director_manage.dart b/lib/pages/fitup_manage/widget/director_manage.dart index c29ce21c..61c838bf 100644 --- a/lib/pages/fitup_manage/widget/director_manage.dart +++ b/lib/pages/fitup_manage/widget/director_manage.dart @@ -1,12 +1,15 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; -import 'package:akuCommunity/base/base_style.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/base/assets_image.dart'; +import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/common_input.dart'; import 'package:akuCommunity/widget/single_image_up.dart'; -import 'house_info.dart'; import 'decorator_info.dart'; +import 'house_info.dart'; class DirectorManage extends StatefulWidget { DirectorManage({Key key}) : super(key: key); diff --git a/lib/pages/fitup_manage/widget/house_info.dart b/lib/pages/fitup_manage/widget/house_info.dart index 892cb382..4c7aadd1 100644 --- a/lib/pages/fitup_manage/widget/house_info.dart +++ b/lib/pages/fitup_manage/widget/house_info.dart @@ -1,8 +1,11 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/base/assets_image.dart'; import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/utils/headers.dart'; class HouseInfo extends StatefulWidget { final String title,subtitle; @@ -57,4 +60,4 @@ class _HouseInfoState extends State { ), ); } -} \ No newline at end of file +} diff --git a/lib/pages/fitup_manage/widget/owner_manage.dart b/lib/pages/fitup_manage/widget/owner_manage.dart index 4f96fd78..c4991cc7 100644 --- a/lib/pages/fitup_manage/widget/owner_manage.dart +++ b/lib/pages/fitup_manage/widget/owner_manage.dart @@ -1,7 +1,10 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/bottom_button.dart'; import 'package:akuCommunity/widget/common_input.dart'; import 'common_select.dart'; diff --git a/lib/pages/fitup_manage/widget/pay_model_sheet.dart b/lib/pages/fitup_manage/widget/pay_model_sheet.dart index 17bc6ca8..ca914924 100644 --- a/lib/pages/fitup_manage/widget/pay_model_sheet.dart +++ b/lib/pages/fitup_manage/widget/pay_model_sheet.dart @@ -1,11 +1,16 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; -import 'package:akuCommunity/utils/headers.dart'; -import 'package:akuCommunity/base/base_style.dart'; +import 'package:get/get.dart'; + +// Project imports: import 'package:akuCommunity/base/assets_image.dart'; +import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/bottom_button.dart'; -import 'package:get/get.dart'; class PayModelSheet extends StatefulWidget { PayModelSheet({Key key}) : super(key: key); diff --git a/lib/pages/goods_details/goods_details_page.dart b/lib/pages/goods_details/goods_details_page.dart index 82353a55..66ac3900 100644 --- a/lib/pages/goods_details/goods_details_page.dart +++ b/lib/pages/goods_details/goods_details_page.dart @@ -1,16 +1,21 @@ +// Dart imports: import 'dart:convert'; -import 'package:akuCommunity/pages/goods_details/view_comments_page.dart'; -import 'package:flutter/material.dart'; + +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Project imports: +import 'package:akuCommunity/pages/goods_details/view_comments_page.dart'; import 'package:akuCommunity/routers/page_routers.dart'; import 'package:akuCommunity/utils/headers.dart'; import 'widget/goods_app_bar.dart'; -import 'widget/product_swiper.dart'; +import 'widget/goods_details_bottom_bar.dart'; import 'widget/product_content.dart'; -import 'widget/product_service.dart'; -import 'widget/product_evaluate.dart'; import 'widget/product_detail.dart'; -import 'widget/goods_details_bottom_bar.dart'; +import 'widget/product_evaluate.dart'; +import 'widget/product_service.dart'; +import 'widget/product_swiper.dart'; class GoodsDetailsPage extends StatefulWidget { final Bundle bundle; diff --git a/lib/pages/goods_details/view_comments_page.dart b/lib/pages/goods_details/view_comments_page.dart index 024478ff..42689d47 100644 --- a/lib/pages/goods_details/view_comments_page.dart +++ b/lib/pages/goods_details/view_comments_page.dart @@ -1,8 +1,13 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:akuCommunity/utils/headers.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/utils/headers.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 b4873ea0..d5b63e7c 100644 --- a/lib/pages/goods_details/widget/goods_app_bar.dart +++ b/lib/pages/goods_details/widget/goods_app_bar.dart @@ -1,12 +1,17 @@ -import 'package:akuCommunity/pages/market/market_cart_page/market_cart_page.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; -import 'package:akuCommunity/base/base_style.dart'; -import 'package:akuCommunity/utils/headers.dart'; import 'package:fluwx/fluwx.dart'; import 'package:get/get.dart'; +// Project imports: +import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/pages/market/market_cart_page/market_cart_page.dart'; +import 'package:akuCommunity/utils/headers.dart'; + class GoodsAppBar extends StatefulWidget { final String shareImg; final String title; diff --git a/lib/pages/goods_details/widget/goods_comments_card.dart b/lib/pages/goods_details/widget/goods_comments_card.dart index 4963b6c1..283b11fe 100644 --- a/lib/pages/goods_details/widget/goods_comments_card.dart +++ b/lib/pages/goods_details/widget/goods_comments_card.dart @@ -1,11 +1,16 @@ -import 'package:akuCommunity/widget/views/horizontal_image_view.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; -import 'package:akuCommunity/utils/headers.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/cached_image_wrapper.dart'; import 'package:akuCommunity/widget/expandable_text.dart'; +import 'package:akuCommunity/widget/views/horizontal_image_view.dart'; class GoodsCommentsCard extends StatefulWidget { final String imagePath, diff --git a/lib/pages/goods_details/widget/goods_details_bottom_bar.dart b/lib/pages/goods_details/widget/goods_details_bottom_bar.dart index 588332e4..2b4f5ee9 100644 --- a/lib/pages/goods_details/widget/goods_details_bottom_bar.dart +++ b/lib/pages/goods_details/widget/goods_details_bottom_bar.dart @@ -1,12 +1,17 @@ -import 'package:akuCommunity/pages/market/market_cart_page/market_cart_page.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:provider/provider.dart'; + +// Project imports: +import 'package:akuCommunity/extensions/page_router.dart'; +import 'package:akuCommunity/pages/market/market_cart_page/market_cart_page.dart'; import 'package:akuCommunity/provider/cart.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:akuCommunity/widget/goods_specs_sheet.dart'; -import 'package:akuCommunity/extensions/page_router.dart'; class GoodsDetailsBottomBar extends StatefulWidget { final String itemid, itemtitle, itemprice, itempic; diff --git a/lib/pages/goods_details/widget/product_content.dart b/lib/pages/goods_details/widget/product_content.dart index 4842b9e8..a97f39d7 100644 --- a/lib/pages/goods_details/widget/product_content.dart +++ b/lib/pages/goods_details/widget/product_content.dart @@ -1,5 +1,8 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:fluwx/fluwx.dart'; diff --git a/lib/pages/goods_details/widget/product_detail.dart b/lib/pages/goods_details/widget/product_detail.dart index c9ab060e..25373e18 100644 --- a/lib/pages/goods_details/widget/product_detail.dart +++ b/lib/pages/goods_details/widget/product_detail.dart @@ -1,7 +1,10 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/cached_image_wrapper.dart'; class ProductDetail extends StatelessWidget { diff --git a/lib/pages/goods_details/widget/product_evaluate.dart b/lib/pages/goods_details/widget/product_evaluate.dart index 01fa027e..b23b4852 100644 --- a/lib/pages/goods_details/widget/product_evaluate.dart +++ b/lib/pages/goods_details/widget/product_evaluate.dart @@ -1,5 +1,8 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; diff --git a/lib/pages/goods_details/widget/product_service.dart b/lib/pages/goods_details/widget/product_service.dart index a3881d82..16b7f285 100644 --- a/lib/pages/goods_details/widget/product_service.dart +++ b/lib/pages/goods_details/widget/product_service.dart @@ -1,5 +1,8 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; diff --git a/lib/pages/goods_details/widget/product_specs.dart b/lib/pages/goods_details/widget/product_specs.dart index 67407109..1623e226 100644 --- a/lib/pages/goods_details/widget/product_specs.dart +++ b/lib/pages/goods_details/widget/product_specs.dart @@ -1,7 +1,12 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; + +// Project imports: import 'package:akuCommunity/widget/goods_specs_sheet.dart'; class ProductSpecs extends StatefulWidget { diff --git a/lib/pages/goods_details/widget/product_swiper.dart b/lib/pages/goods_details/widget/product_swiper.dart index 3a7fc5c8..49968ebb 100644 --- a/lib/pages/goods_details/widget/product_swiper.dart +++ b/lib/pages/goods_details/widget/product_swiper.dart @@ -1,8 +1,15 @@ +// Dart imports: import 'dart:math'; -import 'package:flutter/material.dart'; + +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:flutter_swiper/flutter_swiper.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:flutter_swiper/flutter_swiper.dart'; + +// Project imports: import 'package:akuCommunity/utils/fade_route.dart'; import 'package:akuCommunity/widget/gallery_photo_view_wrapper.dart'; diff --git a/lib/pages/goods_deto_page/deto_code_page/deto_code_page.dart b/lib/pages/goods_deto_page/deto_code_page/deto_code_page.dart index a4588895..87cb3a67 100644 --- a/lib/pages/goods_deto_page/deto_code_page/deto_code_page.dart +++ b/lib/pages/goods_deto_page/deto_code_page/deto_code_page.dart @@ -1,9 +1,14 @@ -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; import 'package:qr_flutter/qr_flutter.dart'; + +// Project imports: import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:akuCommunity/widget/dotted_line.dart'; class DetoCodePage extends StatelessWidget { 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 7da44c25..608dbf88 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,12 +1,15 @@ -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:akuCommunity/widget/picker/grid_image_picker.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/base/assets_image.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:akuCommunity/widget/bottom_button.dart'; -import 'widget/common_radio.dart'; +import 'package:akuCommunity/widget/picker/grid_image_picker.dart'; import 'widget/common_picker.dart'; +import 'widget/common_radio.dart'; class DetoCreatePage extends StatefulWidget { DetoCreatePage({Key key}) : super(key: key); diff --git a/lib/pages/goods_deto_page/deto_create_page/widget/common_picker.dart b/lib/pages/goods_deto_page/deto_create_page/widget/common_picker.dart index 2f6ec97b..e9e51453 100644 --- a/lib/pages/goods_deto_page/deto_create_page/widget/common_picker.dart +++ b/lib/pages/goods_deto_page/deto_create_page/widget/common_picker.dart @@ -1,10 +1,15 @@ -import 'package:akuCommunity/widget/picker/bee_date_picker.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:flutter_datetime_picker/flutter_datetime_picker.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:flutter_picker/flutter_picker.dart'; -import 'package:flutter_datetime_picker/flutter_datetime_picker.dart'; + +// Project imports: import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/picker/bee_date_picker.dart'; class CommonPicker extends StatefulWidget { final String title; diff --git a/lib/pages/goods_deto_page/deto_create_page/widget/common_radio.dart b/lib/pages/goods_deto_page/deto_create_page/widget/common_radio.dart index c1a84fda..312fa61b 100644 --- a/lib/pages/goods_deto_page/deto_create_page/widget/common_radio.dart +++ b/lib/pages/goods_deto_page/deto_create_page/widget/common_radio.dart @@ -1,5 +1,8 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; import 'package:akuCommunity/utils/headers.dart'; diff --git a/lib/pages/goods_deto_page/goods_deto_page.dart b/lib/pages/goods_deto_page/goods_deto_page.dart index 568849a9..ec657e53 100644 --- a/lib/pages/goods_deto_page/goods_deto_page.dart +++ b/lib/pages/goods_deto_page/goods_deto_page.dart @@ -1,12 +1,17 @@ +// Flutter imports: +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:flutter_easyrefresh/easy_refresh.dart'; + +// Project imports: import 'package:akuCommunity/constants/api.dart'; import 'package:akuCommunity/model/manager/goods_out_model.dart'; import 'package:akuCommunity/pages/goods_deto_page/deto_create_page/deto_create_page.dart'; import 'package:akuCommunity/pages/things_page/widget/bee_list_view.dart'; import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:akuCommunity/widget/bottom_button.dart'; import 'widget/goods_info_card.dart'; diff --git a/lib/pages/goods_deto_page/widget/goods_info_card.dart b/lib/pages/goods_deto_page/widget/goods_info_card.dart index d4aff041..9f54b7c1 100644 --- a/lib/pages/goods_deto_page/widget/goods_info_card.dart +++ b/lib/pages/goods_deto_page/widget/goods_info_card.dart @@ -1,8 +1,11 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/utils/headers.dart'; -import 'image_horizontal_list.dart'; import 'goods_info_card_button.dart'; +import 'image_horizontal_list.dart'; class GoodsInfoCard extends StatelessWidget { final List listImage; @@ -137,4 +140,4 @@ class GoodsInfoCard extends StatelessWidget { ), ); } -} \ No newline at end of file +} 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 d3c816a1..8a2ba73e 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 @@ -1,11 +1,17 @@ -import 'package:akuCommunity/pages/goods_deto_page/deto_code_page/deto_code_page.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; -import 'package:akuCommunity/utils/headers.dart'; import 'package:get/get.dart'; import 'package:url_launcher/url_launcher.dart'; + +// Project imports: import 'package:akuCommunity/extensions/page_router.dart'; +import 'package:akuCommunity/pages/goods_deto_page/deto_code_page/deto_code_page.dart'; +import 'package:akuCommunity/utils/headers.dart'; + class GoodsInfoCardButton extends StatelessWidget { GoodsInfoCardButton({Key key}) : super(key: key); diff --git a/lib/pages/goods_deto_page/widget/image_horizontal_list.dart b/lib/pages/goods_deto_page/widget/image_horizontal_list.dart index 66f56b9e..7a4f47d6 100644 --- a/lib/pages/goods_deto_page/widget/image_horizontal_list.dart +++ b/lib/pages/goods_deto_page/widget/image_horizontal_list.dart @@ -1,8 +1,13 @@ +// Dart imports: import 'dart:math'; -import 'package:flutter/material.dart'; + +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/utils/fade_route.dart'; +import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/gallery_photo_view_wrapper.dart'; class ImageHorizontalList extends StatelessWidget { diff --git a/lib/pages/goods_manage_page/goods_manage_page.dart b/lib/pages/goods_manage_page/goods_manage_page.dart index 8208b01d..356b6df7 100644 --- a/lib/pages/goods_manage_page/goods_manage_page.dart +++ b/lib/pages/goods_manage_page/goods_manage_page.dart @@ -1,10 +1,15 @@ -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:velocity_x/velocity_x.dart'; + +// Project imports: import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:akuCommunity/widget/bottom_button.dart'; import 'package:akuCommunity/widget/cached_image_wrapper.dart'; -import 'package:velocity_x/velocity_x.dart'; class GoodsManagePage extends StatefulWidget { GoodsManagePage({Key key}) : super(key: key); 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 13d2d7a8..f51e7e55 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 @@ -1,8 +1,13 @@ -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:pull_to_refresh/pull_to_refresh.dart'; + +// Project imports: import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; class MineGoodsPage extends StatefulWidget { MineGoodsPage({Key key}) : super(key: key); diff --git a/lib/pages/home/home_page.dart b/lib/pages/home/home_page.dart index 0451a9bb..d22267a5 100644 --- a/lib/pages/home/home_page.dart +++ b/lib/pages/home/home_page.dart @@ -1,6 +1,22 @@ +// Dart imports: import 'dart:async'; import 'dart:convert'; + +// Flutter imports: +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:flutter_icons/flutter_icons.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:pull_to_refresh/pull_to_refresh.dart'; +import 'package:velocity_x/velocity_x.dart'; + +// Project imports: import 'package:akuCommunity/const/resource.dart'; +import 'package:akuCommunity/extensions/num_ext.dart'; +import 'package:akuCommunity/extensions/page_router.dart'; +import 'package:akuCommunity/model/aku_shop_model.dart'; import 'package:akuCommunity/pages/activities_page/activities_page.dart'; import 'package:akuCommunity/pages/convenient_phone/convenient_phone_page.dart'; import 'package:akuCommunity/pages/home/widget/animate_app_bar.dart'; @@ -12,25 +28,16 @@ import 'package:akuCommunity/pages/scan/scan_page.dart'; import 'package:akuCommunity/pages/things_page/fixed_submit_page.dart'; import 'package:akuCommunity/pages/total_application_page/total_applications_page.dart'; import 'package:akuCommunity/pages/visitor_access_page/visitor_access_page.dart'; -import 'package:akuCommunity/extensions/num_ext.dart'; +import 'package:akuCommunity/service/base_model.dart'; import 'package:akuCommunity/ui/manager/advice/advice_page.dart'; -import 'package:akuCommunity/widget/grid_buttons.dart'; -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:pull_to_refresh/pull_to_refresh.dart'; import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/container_comment.dart'; +import 'package:akuCommunity/widget/grid_buttons.dart'; +import 'package:akuCommunity/widget/single_ad_space.dart'; +import 'widget/home_card.dart'; import 'widget/home_search.dart'; import 'widget/home_swiper.dart'; -import 'widget/home_card.dart'; import 'widget/home_tag_bar.dart'; -import 'package:akuCommunity/widget/container_comment.dart'; -import 'package:akuCommunity/widget/single_ad_space.dart'; -import 'package:akuCommunity/service/base_model.dart'; -import 'package:akuCommunity/model/aku_shop_model.dart'; -import 'package:velocity_x/velocity_x.dart'; -import 'package:akuCommunity/extensions/page_router.dart'; class HomePage extends StatefulWidget { HomePage({Key key}) : super(key: key); diff --git a/lib/pages/home/widget/animate_app_bar.dart b/lib/pages/home/widget/animate_app_bar.dart index 3262c804..75ab1162 100644 --- a/lib/pages/home/widget/animate_app_bar.dart +++ b/lib/pages/home/widget/animate_app_bar.dart @@ -1,6 +1,9 @@ +// Flutter imports: import 'package:flutter/material.dart'; -import 'package:velocity_x/velocity_x.dart'; + +// Package imports: import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:velocity_x/velocity_x.dart'; class AnimateAppBar extends StatefulWidget with PreferredSizeWidget { final ScrollController scrollController; diff --git a/lib/pages/home/widget/home_app_bar.dart b/lib/pages/home/widget/home_app_bar.dart index ba02f6c4..7526d8b8 100644 --- a/lib/pages/home/widget/home_app_bar.dart +++ b/lib/pages/home/widget/home_app_bar.dart @@ -1,6 +1,11 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; + +// Project imports: import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/app_bar_action.dart'; diff --git a/lib/pages/home/widget/home_card.dart b/lib/pages/home/widget/home_card.dart index 86ef0612..545384e5 100644 --- a/lib/pages/home/widget/home_card.dart +++ b/lib/pages/home/widget/home_card.dart @@ -1,12 +1,19 @@ +// Dart imports: import 'dart:convert'; -import 'package:akuCommunity/pages/activities_page/activities_details_page/activities_details_page.dart'; -import 'package:akuCommunity/pages/goods_details/goods_details_page.dart'; -import 'package:flutter/material.dart'; + +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:image_stack/image_stack.dart'; + +// Project imports: +import 'package:akuCommunity/pages/activities_page/activities_details_page/activities_details_page.dart'; +import 'package:akuCommunity/pages/goods_details/goods_details_page.dart'; +import 'package:akuCommunity/routers/page_routers.dart'; import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/cached_image_wrapper.dart'; -import 'package:akuCommunity/routers/page_routers.dart'; class HomeCard extends StatefulWidget { final String title; diff --git a/lib/pages/home/widget/home_search.dart b/lib/pages/home/widget/home_search.dart index 7d743f84..297950e5 100644 --- a/lib/pages/home/widget/home_search.dart +++ b/lib/pages/home/widget/home_search.dart @@ -1,8 +1,13 @@ -import 'package:akuCommunity/widget/search_bar_delegate.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; + +// Project imports: import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/search_bar_delegate.dart'; class HomeSearch extends StatefulWidget { HomeSearch({Key key}) : super(key: key); diff --git a/lib/pages/home/widget/home_swiper.dart b/lib/pages/home/widget/home_swiper.dart index 8a8d2fc2..8e6fef77 100644 --- a/lib/pages/home/widget/home_swiper.dart +++ b/lib/pages/home/widget/home_swiper.dart @@ -1,6 +1,11 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_swiper/flutter_swiper.dart'; + +// Project imports: import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/cached_image_wrapper.dart'; diff --git a/lib/pages/home/widget/home_tag_bar.dart b/lib/pages/home/widget/home_tag_bar.dart index c511650e..208de829 100644 --- a/lib/pages/home/widget/home_tag_bar.dart +++ b/lib/pages/home/widget/home_tag_bar.dart @@ -1,8 +1,13 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; -import 'package:akuCommunity/utils/headers.dart'; + +// Project imports: import 'package:akuCommunity/base/assets_image.dart'; +import 'package:akuCommunity/utils/headers.dart'; class HomeTagBar extends StatefulWidget { final String title; 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 154c4735..b8720585 100644 --- a/lib/pages/industry_committee/committee_mailbox/committee_mailbox_page.dart +++ b/lib/pages/industry_committee/committee_mailbox/committee_mailbox_page.dart @@ -1,7 +1,10 @@ -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; class CommitteeMailboxPage extends StatefulWidget { CommitteeMailboxPage({Key key}) : super(key: key); diff --git a/lib/pages/industry_committee/industry_committee_page.dart b/lib/pages/industry_committee/industry_committee_page.dart index edc82266..5ac34766 100644 --- a/lib/pages/industry_committee/industry_committee_page.dart +++ b/lib/pages/industry_committee/industry_committee_page.dart @@ -1,16 +1,21 @@ +// Flutter imports: +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:flutter_easyrefresh/easy_refresh.dart'; +import 'package:get/get.dart'; +import 'package:url_launcher/url_launcher.dart'; +import 'package:velocity_x/velocity_x.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; import 'package:akuCommunity/constants/api.dart'; import 'package:akuCommunity/model/user/committee_item_model.dart'; import 'package:akuCommunity/pages/industry_committee/committee_mailbox/committee_mailbox_page.dart'; import 'package:akuCommunity/pages/things_page/widget/bee_list_view.dart'; -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter_easyrefresh/easy_refresh.dart'; -import 'package:get/get.dart'; -import 'package:url_launcher/url_launcher.dart'; import 'package:akuCommunity/utils/headers.dart'; -import 'package:velocity_x/velocity_x.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; class IndustryCommitteePage extends StatefulWidget { IndustryCommitteePage({Key key}) : super(key: key); diff --git a/lib/pages/invoice/invoice_page.dart b/lib/pages/invoice/invoice_page.dart index 6bd909b3..3c8fc147 100644 --- a/lib/pages/invoice/invoice_page.dart +++ b/lib/pages/invoice/invoice_page.dart @@ -1,11 +1,16 @@ -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; -import 'package:akuCommunity/utils/headers.dart'; +import 'package:get/get.dart'; + +// Project imports: import 'package:akuCommunity/routers/page_routers.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:akuCommunity/widget/round_check_box.dart'; -import 'package:get/get.dart'; import 'widget/invoice_input.dart'; class InvoicePage extends StatefulWidget { diff --git a/lib/pages/invoice/widget/invoice_input.dart b/lib/pages/invoice/widget/invoice_input.dart index 068d9d25..9599e062 100644 --- a/lib/pages/invoice/widget/invoice_input.dart +++ b/lib/pages/invoice/widget/invoice_input.dart @@ -1,5 +1,8 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/utils/headers.dart'; class InvoiceInput extends StatefulWidget { diff --git a/lib/pages/life_pay/life_pay_bill_page/life_pay_bill_page.dart b/lib/pages/life_pay/life_pay_bill_page/life_pay_bill_page.dart index 36fa7e6e..38e730af 100644 --- a/lib/pages/life_pay/life_pay_bill_page/life_pay_bill_page.dart +++ b/lib/pages/life_pay/life_pay_bill_page/life_pay_bill_page.dart @@ -1,7 +1,10 @@ -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'widget/bill_card.dart'; class LifePayBillPage extends StatefulWidget { 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 21ebf814..96ea036e 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 @@ -1,7 +1,10 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/utils/headers.dart'; class BillCard extends StatelessWidget { BillCard({Key key}) : super(key: key); diff --git a/lib/pages/life_pay/life_pay_info_page/life_pay_info_page.dart b/lib/pages/life_pay/life_pay_info_page/life_pay_info_page.dart index 9306f601..b137086b 100644 --- a/lib/pages/life_pay/life_pay_info_page/life_pay_info_page.dart +++ b/lib/pages/life_pay/life_pay_info_page/life_pay_info_page.dart @@ -1,11 +1,14 @@ -import 'package:akuCommunity/pages/life_pay/life_pay_bill_page/life_pay_bill_page.dart'; -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; +import 'package:flutter/material.dart'; + +// Project imports: +import 'package:akuCommunity/pages/life_pay/life_pay_bill_page/life_pay_bill_page.dart'; import 'package:akuCommunity/routers/page_routers.dart'; -import 'widget/details_card.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import '../widget/submit_bar.dart'; +import 'widget/details_card.dart'; class LifePayInfoPage extends StatefulWidget { final Bundle bundle; diff --git a/lib/pages/life_pay/life_pay_info_page/widget/details_card.dart b/lib/pages/life_pay/life_pay_info_page/widget/details_card.dart index 07a66969..379156b5 100644 --- a/lib/pages/life_pay/life_pay_info_page/widget/details_card.dart +++ b/lib/pages/life_pay/life_pay_info_page/widget/details_card.dart @@ -1,9 +1,14 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; -import 'package:akuCommunity/base/base_style.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; +// Project imports: +import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/utils/headers.dart'; + class DetailsCard extends StatefulWidget { final Function fun; DetailsCard({Key key,this.fun}) : super(key: key); diff --git a/lib/pages/life_pay/life_pay_page.dart b/lib/pages/life_pay/life_pay_page.dart index aa8dce46..1a825d83 100644 --- a/lib/pages/life_pay/life_pay_page.dart +++ b/lib/pages/life_pay/life_pay_page.dart @@ -1,13 +1,18 @@ +// Flutter imports: +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:velocity_x/velocity_x.dart'; + +// Project imports: import 'package:akuCommunity/pages/life_pay/life_pay_info_page/life_pay_info_page.dart'; import 'package:akuCommunity/pages/life_pay/life_pay_record_page/life_pay_record_page.dart'; -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/routers/page_routers.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'widget/order_card.dart'; import 'widget/submit_bar.dart'; -import 'package:velocity_x/velocity_x.dart'; class LifePayPage extends StatefulWidget { LifePayPage({Key key}) : super(key: key); diff --git a/lib/pages/life_pay/life_pay_record_page/life_pay_record_page.dart b/lib/pages/life_pay/life_pay_record_page/life_pay_record_page.dart index 702aa442..aec47a9a 100644 --- a/lib/pages/life_pay/life_pay_record_page/life_pay_record_page.dart +++ b/lib/pages/life_pay/life_pay_record_page/life_pay_record_page.dart @@ -1,9 +1,14 @@ -import 'package:akuCommunity/pages/life_pay/life_pay_bill_page/life_pay_bill_page.dart'; -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:pull_to_refresh/pull_to_refresh.dart'; + +// Project imports: +import 'package:akuCommunity/pages/life_pay/life_pay_bill_page/life_pay_bill_page.dart'; import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'widget/record_card.dart'; class LifePayRecordPage extends StatefulWidget { 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 a72b0396..438769e0 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 @@ -1,9 +1,14 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; -import 'package:akuCommunity/base/base_style.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; +// Project imports: +import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/utils/headers.dart'; + class RecordCard extends StatelessWidget { final Function fun; RecordCard({Key key, this.fun}) : super(key: key); diff --git a/lib/pages/life_pay/widget/order_card.dart b/lib/pages/life_pay/widget/order_card.dart index 86cb6b3c..959b4558 100644 --- a/lib/pages/life_pay/widget/order_card.dart +++ b/lib/pages/life_pay/widget/order_card.dart @@ -1,9 +1,12 @@ -import 'package:akuCommunity/pages/life_pay/life_pay_info_page/life_pay_info_page.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/pages/life_pay/life_pay_info_page/life_pay_info_page.dart'; import 'package:akuCommunity/routers/page_routers.dart'; +import 'package:akuCommunity/utils/headers.dart'; class OrderCard extends StatefulWidget { final Function fun; diff --git a/lib/pages/life_pay/widget/submit_bar.dart b/lib/pages/life_pay/widget/submit_bar.dart index 898d02a7..15f088fa 100644 --- a/lib/pages/life_pay/widget/submit_bar.dart +++ b/lib/pages/life_pay/widget/submit_bar.dart @@ -1,7 +1,10 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/utils/headers.dart'; class SubmitBar extends StatefulWidget { final String title; diff --git a/lib/pages/manager_func.dart b/lib/pages/manager_func.dart index 7ffd970c..5f471328 100644 --- a/lib/pages/manager_func.dart +++ b/lib/pages/manager_func.dart @@ -1,9 +1,12 @@ +// Package imports: +import 'package:dio/dio.dart'; +import 'package:flustars/flustars.dart'; + +// Project imports: import 'package:akuCommunity/constants/api.dart'; import 'package:akuCommunity/model/manager/fixed_detail_model.dart'; import 'package:akuCommunity/utils/network/base_model.dart'; import 'package:akuCommunity/utils/network/net_util.dart'; -import 'package:dio/dio.dart'; -import 'package:flustars/flustars.dart'; class ManagerFunc { static insertVisitorInfo(int id, int type, String name, int sex, String tel, 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 f33a225c..45ccb0d0 100644 --- a/lib/pages/market/market_cart_page/market_cart_page.dart +++ b/lib/pages/market/market_cart_page/market_cart_page.dart @@ -1,12 +1,17 @@ -import 'package:akuCommunity/model/aku_shop_model.dart'; -import 'package:akuCommunity/utils/headers.dart'; -import 'package:akuCommunity/widget/cached_image_wrapper.dart'; -import 'package:akuCommunity/widget/cart_count.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_slidable/flutter_slidable.dart'; import 'package:provider/provider.dart'; + +// Project imports: +import 'package:akuCommunity/model/aku_shop_model.dart'; import 'package:akuCommunity/provider/cart.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/cached_image_wrapper.dart'; +import 'package:akuCommunity/widget/cart_count.dart'; import 'widget/market_cart_app_bar.dart'; class MarketCartPage extends StatefulWidget { diff --git a/lib/pages/market/market_cart_page/widget/market_cart_app_bar.dart b/lib/pages/market/market_cart_page/widget/market_cart_app_bar.dart index e5ac1685..4482c65b 100644 --- a/lib/pages/market/market_cart_page/widget/market_cart_app_bar.dart +++ b/lib/pages/market/market_cart_page/widget/market_cart_app_bar.dart @@ -1,9 +1,14 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; -import 'package:akuCommunity/utils/headers.dart'; import 'package:get/get.dart'; +// Project imports: +import 'package:akuCommunity/utils/headers.dart'; + class MarketCartAppBar extends StatelessWidget { const MarketCartAppBar({Key key}) : super(key: key); 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 5dce34ae..73d9beab 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,8 +1,13 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:provider/provider.dart'; -import 'package:akuCommunity/utils/headers.dart'; + +// Project imports: import 'package:akuCommunity/provider/cart.dart'; +import 'package:akuCommunity/utils/headers.dart'; class MarketCartBottomBar extends StatelessWidget { const MarketCartBottomBar({Key key}) : super(key: key); 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 182203f3..44f7804e 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,12 +1,17 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: 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/headers.dart'; -import 'package:akuCommunity/model/aku_shop_model.dart'; import 'package:provider/provider.dart'; + +// Project imports: +import 'package:akuCommunity/model/aku_shop_model.dart'; import 'package:akuCommunity/provider/cart.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/cached_image_wrapper.dart'; +import 'package:akuCommunity/widget/cart_count.dart'; class MarketCartCard extends StatelessWidget { final AkuShopModel cartItem; 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 34041d75..561c2449 100644 --- a/lib/pages/market/market_detail_page/market_detail_page.dart +++ b/lib/pages/market/market_detail_page/market_detail_page.dart @@ -1,6 +1,9 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; + +// Project imports: import 'package:akuCommunity/routers/page_routers.dart'; import '../widget/market_list.dart'; import 'widget/market_details_app_bar.dart'; diff --git a/lib/pages/market/market_detail_page/widget/market_details_app_bar.dart b/lib/pages/market/market_detail_page/widget/market_details_app_bar.dart index d1722f4b..5f76728b 100644 --- a/lib/pages/market/market_detail_page/widget/market_details_app_bar.dart +++ b/lib/pages/market/market_detail_page/widget/market_details_app_bar.dart @@ -1,9 +1,14 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; -import 'package:akuCommunity/utils/headers.dart'; import 'package:get/get.dart'; +// Project imports: +import 'package:akuCommunity/utils/headers.dart'; + class MarketDetailsAppBar extends StatefulWidget { final String title; MarketDetailsAppBar({Key key, this.title}) : super(key: key); diff --git a/lib/pages/market/market_page.dart b/lib/pages/market/market_page.dart index 72603a71..c1ca7ada 100644 --- a/lib/pages/market/market_page.dart +++ b/lib/pages/market/market_page.dart @@ -1,15 +1,20 @@ -import 'package:akuCommunity/widget/grid_buttons.dart'; -import 'package:akuCommunity/widget/search_bar_delegate.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:akuCommunity/widget/container_comment.dart'; + +// Project imports: +import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/app_bar_action.dart'; +import 'package:akuCommunity/widget/container_comment.dart'; +import 'package:akuCommunity/widget/grid_buttons.dart'; +import 'package:akuCommunity/widget/search_bar_delegate.dart'; import 'package:akuCommunity/widget/single_ad_space.dart'; -import 'package:akuCommunity/utils/headers.dart'; -import 'widget/market_sticky_bar.dart'; import 'widget/market_list.dart'; +import 'widget/market_sticky_bar.dart'; class MarketPage extends StatefulWidget { MarketPage({Key key}) : super(key: key); diff --git a/lib/pages/market/widget/market_list.dart b/lib/pages/market/widget/market_list.dart index f3abe76b..06e64298 100644 --- a/lib/pages/market/widget/market_list.dart +++ b/lib/pages/market/widget/market_list.dart @@ -1,13 +1,20 @@ +// Dart imports: import 'dart:async'; import 'dart:convert'; -import 'package:flutter/material.dart'; + +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:akuCommunity/widget/sliver_goods_card.dart'; + +// Project imports: +import 'package:akuCommunity/model/aku_shop_model.dart'; +import 'package:akuCommunity/service/base_model.dart'; import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/goods_card_skeleton.dart'; -import 'package:akuCommunity/service/base_model.dart'; -import 'package:akuCommunity/model/aku_shop_model.dart'; +import 'package:akuCommunity/widget/sliver_goods_card.dart'; import 'sliver_goods_group_card.dart'; class MarketList extends StatefulWidget { diff --git a/lib/pages/market/widget/market_sticky_bar.dart b/lib/pages/market/widget/market_sticky_bar.dart index c68a0469..2f390a39 100644 --- a/lib/pages/market/widget/market_sticky_bar.dart +++ b/lib/pages/market/widget/market_sticky_bar.dart @@ -1,4 +1,7 @@ +// Flutter imports: import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_screenutil/flutter_screenutil.dart'; class MarketStickyBar extends StatefulWidget { diff --git a/lib/pages/market/widget/sliver_goods_group_card.dart b/lib/pages/market/widget/sliver_goods_group_card.dart index 14373e7d..683dbe16 100644 --- a/lib/pages/market/widget/sliver_goods_group_card.dart +++ b/lib/pages/market/widget/sliver_goods_group_card.dart @@ -1,8 +1,13 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; -import 'package:akuCommunity/widget/cached_image_wrapper.dart'; + +// Project imports: import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/cached_image_wrapper.dart'; class SliverGoodsGroupCard extends StatefulWidget { SliverGoodsGroupCard({Key key}) : super(key: key); diff --git a/lib/pages/market_class/market_class_page.dart b/lib/pages/market_class/market_class_page.dart index c4639629..14d73084 100644 --- a/lib/pages/market_class/market_class_page.dart +++ b/lib/pages/market_class/market_class_page.dart @@ -1,12 +1,17 @@ +// Dart imports: import 'dart:async'; import 'dart:convert'; -import 'package:flutter/material.dart'; + +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; -import 'package:akuCommunity/widget/cached_image_wrapper.dart'; import 'package:akuCommunity/model/aku_shop_class_model.dart'; import 'package:akuCommunity/service/base_model.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/cached_image_wrapper.dart'; import 'widget/market_class_bar.dart'; class MarketClassPage extends StatefulWidget { diff --git a/lib/pages/market_class/widget/market_class_bar.dart b/lib/pages/market_class/widget/market_class_bar.dart index c4dbaaad..264a9bae 100644 --- a/lib/pages/market_class/widget/market_class_bar.dart +++ b/lib/pages/market_class/widget/market_class_bar.dart @@ -1,9 +1,14 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; +import 'package:get/get.dart'; + +// Project imports: import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/search_bar_delegate.dart'; -import 'package:get/get.dart'; class MarketClassBar extends StatelessWidget { Widget _inkWellSearch(BuildContext context) { diff --git a/lib/pages/message_center_page/comment_message_page/comment_message_page.dart b/lib/pages/message_center_page/comment_message_page/comment_message_page.dart index 597325e6..b1a29b5e 100644 --- a/lib/pages/message_center_page/comment_message_page/comment_message_page.dart +++ b/lib/pages/message_center_page/comment_message_page/comment_message_page.dart @@ -1,10 +1,15 @@ -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:akuCommunity/utils/headers.dart'; import 'package:velocity_x/velocity_x.dart'; +// Project imports: +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; + class CommentMessagePage extends StatefulWidget { CommentMessagePage({Key key}) : super(key: key); diff --git a/lib/pages/message_center_page/message_center_page.dart b/lib/pages/message_center_page/message_center_page.dart index 94149722..d29a6b20 100644 --- a/lib/pages/message_center_page/message_center_page.dart +++ b/lib/pages/message_center_page/message_center_page.dart @@ -1,12 +1,17 @@ +// Flutter imports: +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:velocity_x/velocity_x.dart'; + +// Project imports: +import 'package:akuCommunity/base/assets_image.dart'; import 'package:akuCommunity/pages/message_center_page/comment_message_page/comment_message_page.dart'; import 'package:akuCommunity/pages/message_center_page/shop_message_page/shop_message_page.dart'; import 'package:akuCommunity/pages/message_center_page/system_message_page/system_message_page.dart'; -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/cupertino.dart'; import 'package:akuCommunity/utils/headers.dart'; -import 'package:akuCommunity/base/assets_image.dart'; -import 'package:velocity_x/velocity_x.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; class MessageCenterPage extends StatefulWidget { MessageCenterPage({Key key}) : super(key: key); diff --git a/lib/pages/message_center_page/refund_details.dart b/lib/pages/message_center_page/refund_details.dart index 5529adcd..6156a4dd 100644 --- a/lib/pages/message_center_page/refund_details.dart +++ b/lib/pages/message_center_page/refund_details.dart @@ -1,7 +1,10 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/utils/headers.dart'; class RefundDetails extends StatelessWidget { final double statusHeight; 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 c5f75e3b..b8cfc33e 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 @@ -1,12 +1,18 @@ // import 'package:akuCommunity/pages/common/common_page.dart'; -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; + +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:akuCommunity/utils/headers.dart'; import 'package:velocity_x/velocity_x.dart'; +// Project imports: +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; + class ShopMessagePage extends StatefulWidget { ShopMessagePage({Key key}) : super(key: key); diff --git a/lib/pages/message_center_page/system_message_page/system_details_page/system_details_page.dart b/lib/pages/message_center_page/system_message_page/system_details_page/system_details_page.dart index 200075b6..3a67af50 100644 --- a/lib/pages/message_center_page/system_message_page/system_details_page/system_details_page.dart +++ b/lib/pages/message_center_page/system_message_page/system_details_page/system_details_page.dart @@ -1,8 +1,11 @@ -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/routers/page_routers.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; class SystemDetailsPage extends StatelessWidget { final Bundle bundle; 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 1d0c7b72..8635fa72 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 @@ -1,13 +1,18 @@ -import 'package:akuCommunity/pages/message_center_page/system_message_page/system_details_page/system_details_page.dart'; -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:akuCommunity/utils/headers.dart'; -import 'package:akuCommunity/routers/page_routers.dart'; import 'package:velocity_x/velocity_x.dart'; +// Project imports: +import 'package:akuCommunity/pages/message_center_page/system_message_page/system_details_page/system_details_page.dart'; +import 'package:akuCommunity/routers/page_routers.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; + class SystemMessagePage extends StatefulWidget { SystemMessagePage({Key key}) : super(key: key); diff --git a/lib/pages/mine_car_page/car_add_page/car_add_page.dart b/lib/pages/mine_car_page/car_add_page/car_add_page.dart index 0d72d7a6..c8859764 100644 --- a/lib/pages/mine_car_page/car_add_page/car_add_page.dart +++ b/lib/pages/mine_car_page/car_add_page/car_add_page.dart @@ -1,7 +1,10 @@ -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:akuCommunity/widget/common_input.dart'; class CarAddPage extends StatefulWidget { diff --git a/lib/pages/mine_car_page/mine_car_page.dart b/lib/pages/mine_car_page/mine_car_page.dart index bcb539bc..0d8ed7f2 100644 --- a/lib/pages/mine_car_page/mine_car_page.dart +++ b/lib/pages/mine_car_page/mine_car_page.dart @@ -1,11 +1,14 @@ -import 'package:akuCommunity/pages/mine_car_page/car_add_page/car_add_page.dart'; -import 'package:akuCommunity/pages/mine_car_page/select_community_page/select_community_page.dart'; -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/base/assets_image.dart'; +import 'package:akuCommunity/pages/mine_car_page/car_add_page/car_add_page.dart'; +import 'package:akuCommunity/pages/mine_car_page/select_community_page/select_community_page.dart'; import 'package:akuCommunity/routers/page_routers.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; class MineCarPage extends StatefulWidget { final Bundle bundle; diff --git a/lib/pages/mine_car_page/select_community_page/select_community_page.dart b/lib/pages/mine_car_page/select_community_page/select_community_page.dart index 27e8f191..2d6c0e9f 100644 --- a/lib/pages/mine_car_page/select_community_page/select_community_page.dart +++ b/lib/pages/mine_car_page/select_community_page/select_community_page.dart @@ -1,10 +1,15 @@ -import 'package:akuCommunity/pages/mine_car_page/select_parking_page/select_parking_page.dart'; -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; -import 'package:akuCommunity/utils/headers.dart'; + +// Project imports: +import 'package:akuCommunity/pages/mine_car_page/select_parking_page/select_parking_page.dart'; import 'package:akuCommunity/routers/page_routers.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; class SelectCommunityPage extends StatefulWidget { SelectCommunityPage({Key key}) : super(key: key); diff --git a/lib/pages/mine_car_page/select_parking_page/select_parking_page.dart b/lib/pages/mine_car_page/select_parking_page/select_parking_page.dart index 9637bd36..d0561d4c 100644 --- a/lib/pages/mine_car_page/select_parking_page/select_parking_page.dart +++ b/lib/pages/mine_car_page/select_parking_page/select_parking_page.dart @@ -1,8 +1,11 @@ -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/routers/page_routers.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; class SelectParkingPage extends StatefulWidget { final Bundle bundle; diff --git a/lib/pages/mine_house_page/house_authenticate_page/house_authenticate_page.dart b/lib/pages/mine_house_page/house_authenticate_page/house_authenticate_page.dart index ecb829cc..d1caf484 100644 --- a/lib/pages/mine_house_page/house_authenticate_page/house_authenticate_page.dart +++ b/lib/pages/mine_house_page/house_authenticate_page/house_authenticate_page.dart @@ -1,7 +1,10 @@ -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:akuCommunity/widget/common_input.dart'; class HouseAuthenticatePage extends StatefulWidget { diff --git a/lib/pages/mine_house_page/mine_house_page.dart b/lib/pages/mine_house_page/mine_house_page.dart index 21b9571c..dc423605 100644 --- a/lib/pages/mine_house_page/mine_house_page.dart +++ b/lib/pages/mine_house_page/mine_house_page.dart @@ -1,9 +1,12 @@ -import 'package:akuCommunity/pages/mine_house_page/house_authenticate_page/house_authenticate_page.dart'; -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/base/assets_image.dart'; +import 'package:akuCommunity/pages/mine_house_page/house_authenticate_page/house_authenticate_page.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; class MineHousePage extends StatefulWidget { MineHousePage({Key key}) : super(key: key); diff --git a/lib/pages/notice_page/notice_page.dart b/lib/pages/notice_page/notice_page.dart index 49ea78a6..a49b0844 100644 --- a/lib/pages/notice_page/notice_page.dart +++ b/lib/pages/notice_page/notice_page.dart @@ -1,9 +1,14 @@ -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_html/flutter_html.dart'; -import 'package:akuCommunity/utils/headers.dart'; + +// Project imports: import 'package:akuCommunity/routers/page_routers.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:akuCommunity/widget/cached_image_wrapper.dart'; const htmlData = ''' diff --git a/lib/pages/one_alarm/widget/alarm_page.dart b/lib/pages/one_alarm/widget/alarm_page.dart index 342ad60a..8eec80ea 100644 --- a/lib/pages/one_alarm/widget/alarm_page.dart +++ b/lib/pages/one_alarm/widget/alarm_page.dart @@ -1,9 +1,9 @@ -import 'package:akuCommunity/pages/one_alarm/widget/explain_template.dart'; -import 'package:akuCommunity/utils/headers.dart'; -import 'package:akuCommunity/widget/bee_scaffold.dart'; +// Flutter imports: import 'package:flutter/material.dart'; -import 'package:amap_map_fluttify/amap_map_fluttify.dart'; + +// Package imports: import 'package:amap_location_fluttify/amap_location_fluttify.dart'; +import 'package:amap_map_fluttify/amap_map_fluttify.dart'; import 'package:flutter_beautiful_popup/main.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -11,6 +11,11 @@ import 'package:permission_handler/permission_handler.dart'; import 'package:url_launcher/url_launcher.dart'; import 'package:velocity_x/velocity_x.dart'; +// Project imports: +import 'package:akuCommunity/pages/one_alarm/widget/explain_template.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; + class PermissionUtil { static Future getLocationPermission() async { return await Permission.locationWhenInUse.request().isGranted; diff --git a/lib/pages/one_alarm/widget/explain_template.dart b/lib/pages/one_alarm/widget/explain_template.dart index ea28ed81..4836ba9c 100644 --- a/lib/pages/one_alarm/widget/explain_template.dart +++ b/lib/pages/one_alarm/widget/explain_template.dart @@ -1,10 +1,16 @@ +// Dart imports: import 'dart:ui'; -import 'package:flutter/material.dart'; + +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_beautiful_popup/main.dart'; -import 'package:akuCommunity/utils/headers.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; +// Project imports: +import 'package:akuCommunity/utils/headers.dart'; class ExplainTemplate extends BeautifulPopupTemplate { final BeautifulPopup options; diff --git a/lib/pages/open_door_page/open_door_page.dart b/lib/pages/open_door_page/open_door_page.dart index 3fcf7c0a..04cedc14 100644 --- a/lib/pages/open_door_page/open_door_page.dart +++ b/lib/pages/open_door_page/open_door_page.dart @@ -1,10 +1,15 @@ -import 'package:akuCommunity/pages/certification_page/certification_page.dart'; -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:get/get.dart'; +// Project imports: +import 'package:akuCommunity/pages/certification_page/certification_page.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; + class OpenDoorPage extends StatefulWidget { OpenDoorPage({Key key}) : super(key: key); diff --git a/lib/pages/opening_code_page/opening_code_page.dart b/lib/pages/opening_code_page/opening_code_page.dart index fa6b2199..17c525ad 100644 --- a/lib/pages/opening_code_page/opening_code_page.dart +++ b/lib/pages/opening_code_page/opening_code_page.dart @@ -1,9 +1,14 @@ -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; import 'package:qr_flutter/qr_flutter.dart'; + +// Project imports: import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; class OpeningCodePage extends StatefulWidget { OpeningCodePage({Key key}) : super(key: key); diff --git a/lib/pages/personal/change_nick_name_page.dart b/lib/pages/personal/change_nick_name_page.dart index 59ae6b1c..60ab4c9e 100644 --- a/lib/pages/personal/change_nick_name_page.dart +++ b/lib/pages/personal/change_nick_name_page.dart @@ -1,11 +1,16 @@ -import 'package:akuCommunity/provider/user_provider.dart'; -import 'package:akuCommunity/widget/bee_scaffold.dart'; +// Flutter imports: import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:provider/provider.dart'; import 'package:velocity_x/velocity_x.dart'; +// Project imports: +import 'package:akuCommunity/provider/user_provider.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; + class ChangeNickName extends StatefulWidget { ChangeNickName({Key key}) : super(key: key); diff --git a/lib/pages/personal/evaluate_good_page.dart b/lib/pages/personal/evaluate_good_page.dart index 8ade4786..58c7a2d4 100644 --- a/lib/pages/personal/evaluate_good_page.dart +++ b/lib/pages/personal/evaluate_good_page.dart @@ -1,12 +1,17 @@ -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; -import 'package:akuCommunity/utils/headers.dart'; +import 'package:get/get.dart'; + +// Project imports: import 'package:akuCommunity/base/assets_image.dart'; import 'package:akuCommunity/base/base_style.dart'; import 'package:akuCommunity/routers/page_routers.dart'; -import 'package:get/get.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'widget/refund_shop_card.dart'; class EvaluateGoodPage extends StatefulWidget { diff --git a/lib/pages/personal/look_logistics_page.dart b/lib/pages/personal/look_logistics_page.dart index a2c51cb4..196fd5e0 100644 --- a/lib/pages/personal/look_logistics_page.dart +++ b/lib/pages/personal/look_logistics_page.dart @@ -1,12 +1,19 @@ +// Dart imports: import 'dart:ui'; -import 'package:flutter/material.dart'; + +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:cached_network_image/cached_network_image.dart'; +import 'package:flutter_icons/flutter_icons.dart'; import 'package:get/get.dart'; import 'package:sliding_up_panel/sliding_up_panel.dart'; -import 'package:flutter_icons/flutter_icons.dart'; -import 'package:cached_network_image/cached_network_image.dart'; -import 'package:akuCommunity/utils/headers.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/cached_image_wrapper.dart'; class LookLogisticsPage extends StatefulWidget { diff --git a/lib/pages/personal/order_details_page.dart b/lib/pages/personal/order_details_page.dart index a848a359..63d1dff2 100644 --- a/lib/pages/personal/order_details_page.dart +++ b/lib/pages/personal/order_details_page.dart @@ -1,14 +1,19 @@ -import 'package:akuCommunity/pages/personal/refund_select_page.dart'; -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:extended_text/extended_text.dart'; import 'package:flutter_icons/flutter_icons.dart'; -import 'package:akuCommunity/utils/headers.dart'; +import 'package:get/get.dart'; + +// Project imports: import 'package:akuCommunity/base/assets_image.dart'; import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/pages/personal/refund_select_page.dart'; import 'package:akuCommunity/routers/page_routers.dart'; -import 'package:get/get.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; class OrderDetailsPage extends StatefulWidget { final Bundle bundle; diff --git a/lib/pages/personal/order_page.dart b/lib/pages/personal/order_page.dart index 0491e2c9..b949b7c0 100644 --- a/lib/pages/personal/order_page.dart +++ b/lib/pages/personal/order_page.dart @@ -1,10 +1,15 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; -import 'package:akuCommunity/utils/headers.dart'; +import 'package:get/get.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; import 'package:akuCommunity/routers/page_routers.dart'; -import 'package:get/get.dart'; +import 'package:akuCommunity/utils/headers.dart'; import 'widget/order_list.dart'; class OrderPage extends StatefulWidget { diff --git a/lib/pages/personal/personal_page.dart b/lib/pages/personal/personal_page.dart index c6249b47..89c47821 100644 --- a/lib/pages/personal/personal_page.dart +++ b/lib/pages/personal/personal_page.dart @@ -1,3 +1,16 @@ +// Flutter imports: +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:flutter_icons/flutter_icons.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; +import 'package:provider/provider.dart'; + +// Project imports: +import 'package:akuCommunity/base/assets_image.dart'; +import 'package:akuCommunity/base/base_style.dart'; import 'package:akuCommunity/const/resource.dart'; import 'package:akuCommunity/constants/api.dart'; import 'package:akuCommunity/pages/activities_page/activities_page.dart'; @@ -13,19 +26,11 @@ import 'package:akuCommunity/pages/things_page/fixed_submit_page.dart'; import 'package:akuCommunity/pages/visitor_access_page/visitor_access_page.dart'; import 'package:akuCommunity/painters/user_bottom_bar_painter.dart'; import 'package:akuCommunity/provider/user_provider.dart'; -import 'package:akuCommunity/widget/grid_buttons.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter_icons/flutter_icons.dart'; +import 'package:akuCommunity/routers/page_routers.dart'; import 'package:akuCommunity/utils/headers.dart'; -import 'package:akuCommunity/base/assets_image.dart'; -import 'package:akuCommunity/base/base_style.dart'; -import 'package:akuCommunity/widget/single_ad_space.dart'; import 'package:akuCommunity/widget/cached_image_wrapper.dart'; -import 'package:akuCommunity/routers/page_routers.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:get/get.dart'; -import 'package:provider/provider.dart'; +import 'package:akuCommunity/widget/grid_buttons.dart'; +import 'package:akuCommunity/widget/single_ad_space.dart'; class PersonalIndex extends StatefulWidget { final bool isSign; diff --git a/lib/pages/personal/refund_apply_page.dart b/lib/pages/personal/refund_apply_page.dart index 7503fc10..babbf177 100644 --- a/lib/pages/personal/refund_apply_page.dart +++ b/lib/pages/personal/refund_apply_page.dart @@ -1,11 +1,16 @@ -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; -import 'package:akuCommunity/utils/headers.dart'; +import 'package:get/get.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; import 'package:akuCommunity/routers/page_routers.dart'; -import 'package:get/get.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'widget/refund_shop_card.dart'; import 'widget/refund_tile_card.dart'; diff --git a/lib/pages/personal/refund_select_page.dart b/lib/pages/personal/refund_select_page.dart index 1bce5b6f..078cec2f 100644 --- a/lib/pages/personal/refund_select_page.dart +++ b/lib/pages/personal/refund_select_page.dart @@ -1,11 +1,16 @@ -import 'package:akuCommunity/pages/personal/refund_apply_page.dart'; -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; -import 'package:akuCommunity/utils/headers.dart'; -import 'package:akuCommunity/routers/page_routers.dart'; import 'package:get/get.dart'; + +// Project imports: +import 'package:akuCommunity/pages/personal/refund_apply_page.dart'; +import 'package:akuCommunity/routers/page_routers.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'widget/refund_shop_card.dart'; import 'widget/refund_tile_card.dart'; diff --git a/lib/pages/personal/update_tel_page.dart b/lib/pages/personal/update_tel_page.dart index e4fcf7fb..0875c3f8 100644 --- a/lib/pages/personal/update_tel_page.dart +++ b/lib/pages/personal/update_tel_page.dart @@ -1,17 +1,23 @@ +// Dart imports: import 'dart:async'; -import 'package:akuCommunity/base/base_style.dart'; -import 'package:akuCommunity/pages/sign/sign_func.dart'; -import 'package:akuCommunity/provider/user_provider.dart'; -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:bot_toast/bot_toast.dart'; -import 'package:flustars/flustars.dart'; +// Flutter imports: import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; + +// Package imports: +import 'package:bot_toast/bot_toast.dart'; +import 'package:flustars/flustars.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:provider/provider.dart'; import 'package:velocity_x/velocity_x.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; + +// Project imports: +import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/pages/sign/sign_func.dart'; +import 'package:akuCommunity/provider/user_provider.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; class UpdateTelPage extends StatefulWidget { UpdateTelPage({Key key}) : super(key: key); diff --git a/lib/pages/personal/user_profile_page.dart b/lib/pages/personal/user_profile_page.dart index 25a16dc8..c663239f 100644 --- a/lib/pages/personal/user_profile_page.dart +++ b/lib/pages/personal/user_profile_page.dart @@ -1,24 +1,30 @@ +// Dart imports: import 'dart:io'; +// Flutter imports: +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:bot_toast/bot_toast.dart'; +import 'package:common_utils/common_utils.dart'; +import 'package:get/get.dart'; +import 'package:image_picker/image_picker.dart'; +import 'package:provider/provider.dart'; +import 'package:velocity_x/velocity_x.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; import 'package:akuCommunity/const/resource.dart'; import 'package:akuCommunity/constants/api.dart'; import 'package:akuCommunity/pages/personal/change_nick_name_page.dart'; import 'package:akuCommunity/pages/personal/update_tel_page.dart'; import 'package:akuCommunity/provider/user_provider.dart'; +import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/utils/network/base_file_model.dart'; import 'package:akuCommunity/utils/network/net_util.dart'; import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/picker/bee_image_picker.dart'; -import 'package:bot_toast/bot_toast.dart'; -import 'package:common_utils/common_utils.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; -import 'package:image_picker/image_picker.dart'; -import 'package:provider/provider.dart'; -import 'package:velocity_x/velocity_x.dart'; class UserProfilePage extends StatefulWidget { UserProfilePage({Key key}) : super(key: key); diff --git a/lib/pages/personal/widget/order_card.dart b/lib/pages/personal/widget/order_card.dart index c005866a..2ad84ac6 100644 --- a/lib/pages/personal/widget/order_card.dart +++ b/lib/pages/personal/widget/order_card.dart @@ -1,11 +1,14 @@ +// Flutter imports: +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Project imports: +import 'package:akuCommunity/base/base_style.dart'; import 'package:akuCommunity/pages/personal/evaluate_good_page.dart'; import 'package:akuCommunity/pages/personal/look_logistics_page.dart'; import 'package:akuCommunity/pages/personal/order_details_page.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; -import 'package:akuCommunity/base/base_style.dart'; import 'package:akuCommunity/routers/page_routers.dart'; +import 'package:akuCommunity/utils/headers.dart'; class OrderCard extends StatefulWidget { final String status; diff --git a/lib/pages/personal/widget/order_list.dart b/lib/pages/personal/widget/order_list.dart index 446d3df6..bad7ed0b 100644 --- a/lib/pages/personal/widget/order_list.dart +++ b/lib/pages/personal/widget/order_list.dart @@ -1,6 +1,11 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:pull_to_refresh/pull_to_refresh.dart'; + +// Project imports: import 'order_card.dart'; class OrderList extends StatefulWidget { diff --git a/lib/pages/personal/widget/refund_shop_card.dart b/lib/pages/personal/widget/refund_shop_card.dart index 74613bff..89d5092d 100644 --- a/lib/pages/personal/widget/refund_shop_card.dart +++ b/lib/pages/personal/widget/refund_shop_card.dart @@ -1,7 +1,10 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/utils/headers.dart'; class RefundShopCard extends StatelessWidget { final String imagePath, content, specs; diff --git a/lib/pages/personal/widget/refund_tile_card.dart b/lib/pages/personal/widget/refund_tile_card.dart index efe1899f..fb1e2d54 100644 --- a/lib/pages/personal/widget/refund_tile_card.dart +++ b/lib/pages/personal/widget/refund_tile_card.dart @@ -1,8 +1,13 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; -import 'package:akuCommunity/utils/headers.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/utils/headers.dart'; class RefundTileCard extends StatefulWidget { final List> listTile; diff --git a/lib/pages/property/property_index.dart b/lib/pages/property/property_index.dart index 2fddb6e0..5cb538d8 100644 --- a/lib/pages/property/property_index.dart +++ b/lib/pages/property/property_index.dart @@ -1,3 +1,12 @@ +// Flutter imports: +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:get/get.dart'; +import 'package:pull_to_refresh/pull_to_refresh.dart'; + +// Project imports: import 'package:akuCommunity/const/resource.dart'; import 'package:akuCommunity/pages/activities_page/activities_details_page/activities_details_page.dart'; import 'package:akuCommunity/pages/activities_page/activities_page.dart'; @@ -13,21 +22,17 @@ import 'package:akuCommunity/pages/questionnaire_page/questionnaire_page.dart'; import 'package:akuCommunity/pages/things_page/fixed_submit_page.dart'; import 'package:akuCommunity/pages/total_application_page/total_applications_page.dart'; import 'package:akuCommunity/pages/visitor_access_page/visitor_access_page.dart'; +import 'package:akuCommunity/routers/page_routers.dart'; import 'package:akuCommunity/ui/manager/advice/advice_page.dart'; +import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/bee_scaffold.dart'; +import 'package:akuCommunity/widget/circle_trend.dart'; +import 'package:akuCommunity/widget/container_comment.dart'; import 'package:akuCommunity/widget/grid_buttons.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:get/get.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:akuCommunity/widget/single_ad_space.dart'; -import 'package:akuCommunity/widget/container_comment.dart'; -import 'package:akuCommunity/widget/circle_trend.dart'; -import 'package:akuCommunity/routers/page_routers.dart'; -import 'widget/property_card.dart'; -import 'widget/property_bar.dart'; import 'widget/property_activity_card.dart'; -import 'package:akuCommunity/utils/headers.dart'; +import 'widget/property_bar.dart'; +import 'widget/property_card.dart'; class PropertyIndex extends StatefulWidget { PropertyIndex({Key key}) : super(key: key); diff --git a/lib/pages/property/widget/property_activity_card.dart b/lib/pages/property/widget/property_activity_card.dart index 60c171d0..4dd4cf83 100644 --- a/lib/pages/property/widget/property_activity_card.dart +++ b/lib/pages/property/widget/property_activity_card.dart @@ -1,6 +1,11 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:image_stack/image_stack.dart'; + +// Project imports: import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/cached_image_wrapper.dart'; diff --git a/lib/pages/property/widget/property_bar.dart b/lib/pages/property/widget/property_bar.dart index c339425d..55e10153 100644 --- a/lib/pages/property/widget/property_bar.dart +++ b/lib/pages/property/widget/property_bar.dart @@ -1,6 +1,11 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; + +// Project imports: import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/sliver_app_bar_delegate.dart'; diff --git a/lib/pages/property/widget/property_card.dart b/lib/pages/property/widget/property_card.dart index bf006c57..d6a246e3 100644 --- a/lib/pages/property/widget/property_card.dart +++ b/lib/pages/property/widget/property_card.dart @@ -1,7 +1,12 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:get/get.dart'; import 'package:url_launcher/url_launcher.dart'; + +// Project imports: import 'package:akuCommunity/base/assets_image.dart'; import 'package:akuCommunity/utils/headers.dart'; diff --git a/lib/pages/questionnaire_page/questionnaire_details_page/questionnaire_details_page.dart b/lib/pages/questionnaire_page/questionnaire_details_page/questionnaire_details_page.dart index de166cfd..723e4505 100644 --- a/lib/pages/questionnaire_page/questionnaire_details_page/questionnaire_details_page.dart +++ b/lib/pages/questionnaire_page/questionnaire_details_page/questionnaire_details_page.dart @@ -1,11 +1,16 @@ -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_html/flutter_html.dart'; -import 'package:akuCommunity/utils/headers.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; -import 'package:akuCommunity/widget/cached_image_wrapper.dart'; import 'package:akuCommunity/routers/page_routers.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; +import 'package:akuCommunity/widget/cached_image_wrapper.dart'; class QuestionnaireDetailsPage extends StatefulWidget { final Bundle bundle; diff --git a/lib/pages/questionnaire_page/questionnaire_page.dart b/lib/pages/questionnaire_page/questionnaire_page.dart index 77327939..748dca6a 100644 --- a/lib/pages/questionnaire_page/questionnaire_page.dart +++ b/lib/pages/questionnaire_page/questionnaire_page.dart @@ -1,11 +1,16 @@ -import 'package:akuCommunity/pages/questionnaire_page/questionnaire_details_page/questionnaire_details_page.dart'; -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:pull_to_refresh/pull_to_refresh.dart'; + +// Project imports: +import 'package:akuCommunity/pages/questionnaire_page/questionnaire_details_page/questionnaire_details_page.dart'; import 'package:akuCommunity/routers/page_routers.dart'; -import 'package:akuCommunity/widget/community_card.dart'; import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; +import 'package:akuCommunity/widget/community_card.dart'; class QuestionnairePage extends StatefulWidget { QuestionnairePage({Key key}) : super(key: key); diff --git a/lib/pages/scan/scan_page.dart b/lib/pages/scan/scan_page.dart index 8a3486b9..a473c011 100644 --- a/lib/pages/scan/scan_page.dart +++ b/lib/pages/scan/scan_page.dart @@ -1,6 +1,10 @@ +// Dart imports: import 'dart:io'; +// Flutter imports: import 'package:flutter/material.dart'; + +// Package imports: import 'package:qr_code_scanner/qr_code_scanner.dart'; class ScanPage extends StatefulWidget { diff --git a/lib/pages/setting_page/about_page/about_page.dart b/lib/pages/setting_page/about_page/about_page.dart index 6c04aa9c..406108fe 100644 --- a/lib/pages/setting_page/about_page/about_page.dart +++ b/lib/pages/setting_page/about_page/about_page.dart @@ -1,7 +1,10 @@ -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; class AboutPage extends StatelessWidget { const AboutPage({Key key}) : super(key: key); diff --git a/lib/pages/setting_page/account_manager_page.dart b/lib/pages/setting_page/account_manager_page.dart index 3c642ea8..7fd2b0f4 100644 --- a/lib/pages/setting_page/account_manager_page.dart +++ b/lib/pages/setting_page/account_manager_page.dart @@ -1,10 +1,15 @@ -import 'package:akuCommunity/pages/sign/sign_in_page.dart'; -import 'package:akuCommunity/widget/bee_scaffold.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; + +// Package imports: import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; +// Project imports: +import 'package:akuCommunity/pages/sign/sign_in_page.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; + class AccountManagerPage extends StatefulWidget { AccountManagerPage({Key key}) : super(key: key); diff --git a/lib/pages/setting_page/agreement_page/agreement_page.dart b/lib/pages/setting_page/agreement_page/agreement_page.dart index 7c109500..e0410e64 100644 --- a/lib/pages/setting_page/agreement_page/agreement_page.dart +++ b/lib/pages/setting_page/agreement_page/agreement_page.dart @@ -1,6 +1,9 @@ +// Flutter imports: +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; class AgreementPage extends StatefulWidget { @override diff --git a/lib/pages/setting_page/agreement_page/privacy_page.dart b/lib/pages/setting_page/agreement_page/privacy_page.dart index 352e585b..6fbdd280 100644 --- a/lib/pages/setting_page/agreement_page/privacy_page.dart +++ b/lib/pages/setting_page/agreement_page/privacy_page.dart @@ -1,6 +1,9 @@ +// Flutter imports: +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; class PrivacyPage extends StatefulWidget { PrivacyPage({Key key}) : super(key: key); diff --git a/lib/pages/setting_page/feedback_page/feedback_page.dart b/lib/pages/setting_page/feedback_page/feedback_page.dart index 2a4146b5..a54f2de8 100644 --- a/lib/pages/setting_page/feedback_page/feedback_page.dart +++ b/lib/pages/setting_page/feedback_page/feedback_page.dart @@ -1,13 +1,19 @@ +// Dart imports: import 'dart:math'; -import 'package:akuCommunity/widget/bee_scaffold.dart'; +// Flutter imports: +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:bot_toast/bot_toast.dart'; import 'package:flustars/flustars.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/cupertino.dart'; +import 'package:get/get.dart'; + +// Project imports: import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:akuCommunity/widget/common_image_picker.dart'; -import 'package:get/get.dart'; class FeedBackPage extends StatefulWidget { FeedBackPage({Key key}) : super(key: key); diff --git a/lib/pages/setting_page/invite_page/invite_page.dart b/lib/pages/setting_page/invite_page/invite_page.dart index c6f63806..e508b4bb 100644 --- a/lib/pages/setting_page/invite_page/invite_page.dart +++ b/lib/pages/setting_page/invite_page/invite_page.dart @@ -1,8 +1,13 @@ -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:qr_flutter/qr_flutter.dart'; + +// Project imports: import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; class InvitePage extends StatelessWidget { const InvitePage({Key key}) : super(key: key); diff --git a/lib/pages/setting_page/settings_page.dart b/lib/pages/setting_page/settings_page.dart index cc75a31e..1f7ac859 100644 --- a/lib/pages/setting_page/settings_page.dart +++ b/lib/pages/setting_page/settings_page.dart @@ -1,5 +1,18 @@ +// Flutter imports: +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; +import 'package:provider/provider.dart'; +import 'package:velocity_x/velocity_x.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; import 'package:akuCommunity/extensions/num_ext.dart'; +import 'package:akuCommunity/extensions/page_router.dart'; +import 'package:akuCommunity/extensions/widget_list_ext.dart'; import 'package:akuCommunity/pages/setting_page/about_page/about_page.dart'; import 'package:akuCommunity/pages/setting_page/account_manager_page.dart'; import 'package:akuCommunity/pages/setting_page/feedback_page/feedback_page.dart'; @@ -7,15 +20,6 @@ import 'package:akuCommunity/pages/setting_page/invite_page/invite_page.dart'; import 'package:akuCommunity/pages/sign/sign_in_page.dart'; import 'package:akuCommunity/provider/user_provider.dart'; import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:akuCommunity/extensions/page_router.dart'; - -import 'package:akuCommunity/extensions/widget_list_ext.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; -import 'package:provider/provider.dart'; -import 'package:velocity_x/velocity_x.dart'; class SettingsPage extends StatefulWidget { SettingsPage({Key key}) : super(key: key); diff --git a/lib/pages/sign/sign_func.dart b/lib/pages/sign/sign_func.dart index 147daef9..6e628034 100644 --- a/lib/pages/sign/sign_func.dart +++ b/lib/pages/sign/sign_func.dart @@ -1,3 +1,10 @@ +// Package imports: +import 'package:bot_toast/bot_toast.dart'; +import 'package:dio/dio.dart'; +import 'package:get/get.dart' hide Response; +import 'package:provider/provider.dart'; + +// Project imports: import 'package:akuCommunity/constants/api.dart'; import 'package:akuCommunity/model/user/pick_building_model.dart'; import 'package:akuCommunity/model/user/user_detail_model.dart'; @@ -6,10 +13,6 @@ import 'package:akuCommunity/provider/sign_up_provider.dart'; import 'package:akuCommunity/provider/user_provider.dart'; import 'package:akuCommunity/utils/network/base_model.dart'; import 'package:akuCommunity/utils/network/net_util.dart'; -import 'package:bot_toast/bot_toast.dart'; -import 'package:dio/dio.dart'; -import 'package:get/get.dart' hide Response; -import 'package:provider/provider.dart'; class SignFunc { static Future sendMessageCode(String phone) async { diff --git a/lib/pages/sign/sign_in_page.dart b/lib/pages/sign/sign_in_page.dart index 832ce07a..9479eb6b 100644 --- a/lib/pages/sign/sign_in_page.dart +++ b/lib/pages/sign/sign_in_page.dart @@ -1,30 +1,36 @@ +// Dart imports: import 'dart:async'; import 'dart:ui'; -import 'package:akuCommunity/pages/setting_page/agreement_page/agreement_page.dart'; -import 'package:akuCommunity/pages/setting_page/agreement_page/privacy_page.dart'; -import 'package:akuCommunity/pages/sign/sign_func.dart'; -import 'package:akuCommunity/extensions/num_ext.dart'; -import 'package:akuCommunity/const/resource.dart'; -import 'package:akuCommunity/pages/sign/sign_up/sign_up_pick_plot_page.dart'; -import 'package:akuCommunity/pages/tab_navigator.dart'; -import 'package:akuCommunity/provider/sign_up_provider.dart'; -import 'package:akuCommunity/provider/user_provider.dart'; +// Flutter imports: +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:bot_toast/bot_toast.dart'; import 'package:common_utils/common_utils.dart'; import 'package:dio/dio.dart'; import 'package:flustars/flustars.dart' show TextUtil; -import 'package:flutter/material.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; -import 'package:akuCommunity/base/base_style.dart'; -import 'package:akuCommunity/base/assets_image.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart' hide Response; import 'package:power_logger/power_logger.dart'; import 'package:provider/provider.dart'; import 'package:velocity_x/velocity_x.dart'; +// Project imports: +import 'package:akuCommunity/base/assets_image.dart'; +import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/const/resource.dart'; +import 'package:akuCommunity/extensions/num_ext.dart'; +import 'package:akuCommunity/pages/setting_page/agreement_page/agreement_page.dart'; +import 'package:akuCommunity/pages/setting_page/agreement_page/privacy_page.dart'; +import 'package:akuCommunity/pages/sign/sign_func.dart'; +import 'package:akuCommunity/pages/sign/sign_up/sign_up_pick_plot_page.dart'; +import 'package:akuCommunity/pages/tab_navigator.dart'; +import 'package:akuCommunity/provider/sign_up_provider.dart'; +import 'package:akuCommunity/provider/user_provider.dart'; +import 'package:akuCommunity/utils/headers.dart'; + class SignInPage extends StatefulWidget { SignInPage({Key key}) : super(key: key); diff --git a/lib/pages/sign/sign_up/sign_up_common_widget.dart b/lib/pages/sign/sign_up/sign_up_common_widget.dart index 75c598fa..9ba5ca05 100644 --- a/lib/pages/sign/sign_up/sign_up_common_widget.dart +++ b/lib/pages/sign/sign_up/sign_up_common_widget.dart @@ -1,8 +1,13 @@ -import 'package:akuCommunity/base/base_style.dart'; +// Flutter imports: import 'package:flutter/material.dart'; + +// Package imports: +import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:velocity_x/velocity_x.dart'; + +// Project imports: +import 'package:akuCommunity/base/base_style.dart'; import 'package:akuCommunity/utils/headers.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; signUpTitle(String subTitle) { return Column( diff --git a/lib/pages/sign/sign_up/sign_up_pick_building_page.dart b/lib/pages/sign/sign_up/sign_up_pick_building_page.dart index 4ccff583..932fbcfd 100644 --- a/lib/pages/sign/sign_up/sign_up_pick_building_page.dart +++ b/lib/pages/sign/sign_up/sign_up_pick_building_page.dart @@ -1,12 +1,17 @@ -import 'package:akuCommunity/model/user/pick_building_model.dart'; -import 'package:akuCommunity/pages/sign/sign_func.dart'; -import 'package:akuCommunity/pages/sign/sign_up/sign_up_pick_unit_page.dart'; -import 'package:akuCommunity/widget/bee_scaffold.dart'; +// Flutter imports: import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; +// Project imports: +import 'package:akuCommunity/model/user/pick_building_model.dart'; +import 'package:akuCommunity/pages/sign/sign_func.dart'; +import 'package:akuCommunity/pages/sign/sign_up/sign_up_pick_unit_page.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; + class SignUpPickBuildingPage extends StatefulWidget { SignUpPickBuildingPage({Key key}) : super(key: key); diff --git a/lib/pages/sign/sign_up/sign_up_pick_plot_page.dart b/lib/pages/sign/sign_up/sign_up_pick_plot_page.dart index af806978..9b21bb21 100644 --- a/lib/pages/sign/sign_up/sign_up_pick_plot_page.dart +++ b/lib/pages/sign/sign_up/sign_up_pick_plot_page.dart @@ -1,9 +1,14 @@ -import 'package:akuCommunity/pages/sign/sign_up/sign_up_pick_building_page.dart'; -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:akuCommunity/extensions/page_router.dart'; +// Flutter imports: import 'package:flutter/material.dart'; + +// Package imports: import 'package:velocity_x/velocity_x.dart'; +// Project imports: +import 'package:akuCommunity/extensions/page_router.dart'; +import 'package:akuCommunity/pages/sign/sign_up/sign_up_pick_building_page.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; + class SignUpPickPlotPage extends StatefulWidget { SignUpPickPlotPage({Key key}) : super(key: key); diff --git a/lib/pages/sign/sign_up/sign_up_pick_role_page.dart b/lib/pages/sign/sign_up/sign_up_pick_role_page.dart index 3fc9660d..86db0b3a 100644 --- a/lib/pages/sign/sign_up/sign_up_pick_role_page.dart +++ b/lib/pages/sign/sign_up/sign_up_pick_role_page.dart @@ -1,12 +1,17 @@ +// Flutter imports: +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:get/get.dart'; +import 'package:provider/provider.dart'; +import 'package:velocity_x/velocity_x.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; import 'package:akuCommunity/pages/sign/sign_up/sign_up_common_widget.dart'; import 'package:akuCommunity/pages/sign/sign_up/sign_up_set_nickname_page.dart'; import 'package:akuCommunity/provider/sign_up_provider.dart'; import 'package:akuCommunity/utils/headers.dart'; -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; -import 'package:provider/provider.dart'; -import 'package:velocity_x/velocity_x.dart'; class SignUpPickRolePage extends StatefulWidget { SignUpPickRolePage({Key key}) : super(key: key); diff --git a/lib/pages/sign/sign_up/sign_up_pick_unit_page.dart b/lib/pages/sign/sign_up/sign_up_pick_unit_page.dart index b0ca4638..87434478 100644 --- a/lib/pages/sign/sign_up/sign_up_pick_unit_page.dart +++ b/lib/pages/sign/sign_up/sign_up_pick_unit_page.dart @@ -1,14 +1,19 @@ -import 'package:akuCommunity/model/user/pick_building_model.dart'; -import 'package:akuCommunity/pages/sign/sign_func.dart'; -import 'package:akuCommunity/pages/sign/sign_up/sign_up_pick_role_page.dart'; -import 'package:akuCommunity/provider/sign_up_provider.dart'; -import 'package:akuCommunity/widget/bee_scaffold.dart'; +// Flutter imports: import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart'; import 'package:provider/provider.dart'; import 'package:velocity_x/velocity_x.dart'; +// Project imports: +import 'package:akuCommunity/model/user/pick_building_model.dart'; +import 'package:akuCommunity/pages/sign/sign_func.dart'; +import 'package:akuCommunity/pages/sign/sign_up/sign_up_pick_role_page.dart'; +import 'package:akuCommunity/provider/sign_up_provider.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; + class SignUpPickUnitPage extends StatefulWidget { final int buildingId; SignUpPickUnitPage({Key key, this.buildingId}) : super(key: key); diff --git a/lib/pages/sign/sign_up/sign_up_set_nickname_page.dart b/lib/pages/sign/sign_up/sign_up_set_nickname_page.dart index ec7f38b0..8dd0e830 100644 --- a/lib/pages/sign/sign_up/sign_up_set_nickname_page.dart +++ b/lib/pages/sign/sign_up/sign_up_set_nickname_page.dart @@ -1,15 +1,20 @@ -import 'package:akuCommunity/base/base_style.dart'; -import 'package:akuCommunity/pages/sign/sign_up/sign_up_common_widget.dart'; -import 'package:akuCommunity/pages/sign/sign_up/sign_up_verify_page.dart'; -import 'package:akuCommunity/provider/sign_up_provider.dart'; -import 'package:akuCommunity/utils/headers.dart'; -import 'package:flustars/flustars.dart'; +// Flutter imports: import 'package:flutter/material.dart'; + +// Package imports: +import 'package:flustars/flustars.dart'; import 'package:get/get.dart'; import 'package:provider/provider.dart'; import 'package:random_character/chinese_character/random_chinese_charater.dart'; import 'package:velocity_x/velocity_x.dart'; +// Project imports: +import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/pages/sign/sign_up/sign_up_common_widget.dart'; +import 'package:akuCommunity/pages/sign/sign_up/sign_up_verify_page.dart'; +import 'package:akuCommunity/provider/sign_up_provider.dart'; +import 'package:akuCommunity/utils/headers.dart'; + class SignUpSetNicknamePage extends StatefulWidget { SignUpSetNicknamePage({Key key}) : super(key: key); diff --git a/lib/pages/sign/sign_up/sign_up_verify_page.dart b/lib/pages/sign/sign_up/sign_up_verify_page.dart index fb51d799..f0283fe5 100644 --- a/lib/pages/sign/sign_up/sign_up_verify_page.dart +++ b/lib/pages/sign/sign_up/sign_up_verify_page.dart @@ -1,14 +1,19 @@ +// Flutter imports: +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:common_utils/common_utils.dart'; +import 'package:get/get.dart'; +import 'package:provider/provider.dart'; +import 'package:velocity_x/velocity_x.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; import 'package:akuCommunity/pages/sign/sign_func.dart'; import 'package:akuCommunity/pages/sign/sign_up/sign_up_common_widget.dart'; import 'package:akuCommunity/pages/tab_navigator.dart'; import 'package:akuCommunity/provider/sign_up_provider.dart'; import 'package:akuCommunity/utils/headers.dart'; -import 'package:common_utils/common_utils.dart'; -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; -import 'package:provider/provider.dart'; -import 'package:velocity_x/velocity_x.dart'; class SignUpVerifyPage extends StatefulWidget { SignUpVerifyPage({Key key}) : super(key: key); diff --git a/lib/pages/splash/splash_page.dart b/lib/pages/splash/splash_page.dart index 3f1a458a..b2d7e837 100644 --- a/lib/pages/splash/splash_page.dart +++ b/lib/pages/splash/splash_page.dart @@ -1,8 +1,8 @@ -import 'package:akuCommunity/pages/tab_navigator.dart'; -import 'package:akuCommunity/provider/user_provider.dart'; -import 'package:akuCommunity/utils/hive_store.dart'; -import 'package:amap_location_fluttify/amap_location_fluttify.dart'; +// Flutter imports: import 'package:flutter/material.dart'; + +// Package imports: +import 'package:amap_location_fluttify/amap_location_fluttify.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:hive/hive.dart'; @@ -11,6 +11,11 @@ import 'package:power_logger/power_logger.dart'; import 'package:provider/provider.dart'; import 'package:velocity_x/velocity_x.dart'; +// Project imports: +import 'package:akuCommunity/pages/tab_navigator.dart'; +import 'package:akuCommunity/provider/user_provider.dart'; +import 'package:akuCommunity/utils/hive_store.dart'; + //TODO splashPage class SplashPage extends StatefulWidget { SplashPage({Key key}) : super(key: key); diff --git a/lib/pages/tab_navigator.dart b/lib/pages/tab_navigator.dart index 1619967a..ac10db5f 100644 --- a/lib/pages/tab_navigator.dart +++ b/lib/pages/tab_navigator.dart @@ -1,116 +1,120 @@ -import 'package:akuCommunity/const/resource.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:akuCommunity/base/assets_image.dart'; - -import 'home/home_page.dart'; -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); - @override - _TabNavigatorState createState() => _TabNavigatorState(); -} - -class _TabNavigatorState extends State { - PageController _pageController = PageController(); - int _currentIndex = 0; - DateTime _lastPressed; - - //页面列表 - List _pages = []; - - @override - void initState() { - super.initState(); - - _pages = [ - HomePage(), - // MarketPage(), - PropertyIndex(), - CommunityIndex(), - PersonalIndex() - ]; - } - - _buildBottomBar( - String title, - String unselected, - String selected, - ) { - return BottomNavigationBarItem( - icon: Image.asset( - unselected, - height: 44.w, - width: 44.w, - color: Colors.black38, - ), - activeIcon: Image.asset( - selected, - height: 44.w, - width: 44.w, - ), - label: title, - ); - } - - @override - Widget build(BuildContext context) { - //底部导航来 - List _bottomNav = [ - _buildBottomBar('首页', R.ASSETS_ICONS_TABBAR_HOME_NO_PNG, - R.ASSETS_ICONS_TABBAR_HOME_PNG), - // _buildBottomBar( - // '商城', AssetsImage.TAB_MARKET_UNSELECT, AssetsImage.TAB_MARKET_SELECT), - _buildBottomBar('物业', R.ASSETS_ICONS_TABBAR_HOUSE_NO_PNG, - R.ASSETS_ICONS_TABBAR_HOUSE_PNG), - _buildBottomBar('社区', R.ASSETS_ICONS_TABBAR_MESSAGE_NO_PNG, - R.ASSETS_ICONS_TABBAR_MESSAGE_PNG), - _buildBottomBar('我的', R.ASSETS_ICONS_TABBAR_USER_NO_PNG, - R.ASSETS_ICONS_TABBAR_USER_PNG), - ]; - return Scaffold( - body: WillPopScope( - onWillPop: () async { - if (_lastPressed == null || - DateTime.now().difference(_lastPressed) > Duration(seconds: 1)) { - //两次点击间隔超过1秒重新计算 - _lastPressed = DateTime.now(); - return false; - } - //否则关闭app - return true; - }, - child: PageView.builder( - itemBuilder: (context, index) => _pages[index], - itemCount: _pages.length, - controller: _pageController, - // physics: NeverScrollableScrollPhysics(), - onPageChanged: (index) { - setState(() { - _currentIndex = index; - }); - }, - ), - ), - bottomNavigationBar: BottomNavigationBar( - type: BottomNavigationBarType.fixed, - items: _bottomNav, - currentIndex: _currentIndex, - selectedFontSize: 20.sp, - unselectedFontSize: 16.sp, - selectedItemColor: Colors.black, - unselectedItemColor: Colors.black38, - selectedLabelStyle: TextStyle(fontWeight: FontWeight.bold), - onTap: (index) { - _pageController.jumpToPage(index); - }, - ), - ); - } -} +// Flutter imports: +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:flutter_screenutil/flutter_screenutil.dart'; + +// Project imports: +import 'package:akuCommunity/base/assets_image.dart'; +import 'package:akuCommunity/const/resource.dart'; +import 'community/community_index.dart'; +import 'home/home_page.dart'; +import 'personal/personal_page.dart'; +import 'property/property_index.dart'; + +class TabNavigator extends StatefulWidget { + const TabNavigator({ + Key key, + }) : super(key: key); + @override + _TabNavigatorState createState() => _TabNavigatorState(); +} + +class _TabNavigatorState extends State { + PageController _pageController = PageController(); + int _currentIndex = 0; + DateTime _lastPressed; + + //页面列表 + List _pages = []; + + @override + void initState() { + super.initState(); + + _pages = [ + HomePage(), + // MarketPage(), + PropertyIndex(), + CommunityIndex(), + PersonalIndex() + ]; + } + + _buildBottomBar( + String title, + String unselected, + String selected, + ) { + return BottomNavigationBarItem( + icon: Image.asset( + unselected, + height: 44.w, + width: 44.w, + color: Colors.black38, + ), + activeIcon: Image.asset( + selected, + height: 44.w, + width: 44.w, + ), + label: title, + ); + } + + @override + Widget build(BuildContext context) { + //底部导航来 + List _bottomNav = [ + _buildBottomBar('首页', R.ASSETS_ICONS_TABBAR_HOME_NO_PNG, + R.ASSETS_ICONS_TABBAR_HOME_PNG), + // _buildBottomBar( + // '商城', AssetsImage.TAB_MARKET_UNSELECT, AssetsImage.TAB_MARKET_SELECT), + _buildBottomBar('物业', R.ASSETS_ICONS_TABBAR_HOUSE_NO_PNG, + R.ASSETS_ICONS_TABBAR_HOUSE_PNG), + _buildBottomBar('社区', R.ASSETS_ICONS_TABBAR_MESSAGE_NO_PNG, + R.ASSETS_ICONS_TABBAR_MESSAGE_PNG), + _buildBottomBar('我的', R.ASSETS_ICONS_TABBAR_USER_NO_PNG, + R.ASSETS_ICONS_TABBAR_USER_PNG), + ]; + return Scaffold( + body: WillPopScope( + onWillPop: () async { + if (_lastPressed == null || + DateTime.now().difference(_lastPressed) > Duration(seconds: 1)) { + //两次点击间隔超过1秒重新计算 + _lastPressed = DateTime.now(); + return false; + } + //否则关闭app + return true; + }, + child: PageView.builder( + itemBuilder: (context, index) => _pages[index], + itemCount: _pages.length, + controller: _pageController, + // physics: NeverScrollableScrollPhysics(), + onPageChanged: (index) { + setState(() { + _currentIndex = index; + }); + }, + ), + ), + bottomNavigationBar: BottomNavigationBar( + type: BottomNavigationBarType.fixed, + items: _bottomNav, + currentIndex: _currentIndex, + selectedFontSize: 20.sp, + unselectedFontSize: 16.sp, + selectedItemColor: Colors.black, + unselectedItemColor: Colors.black38, + selectedLabelStyle: TextStyle(fontWeight: FontWeight.bold), + onTap: (index) { + _pageController.jumpToPage(index); + }, + ), + ); + } +} diff --git a/lib/pages/things_page/fixed_submit_page.dart b/lib/pages/things_page/fixed_submit_page.dart index 5647b8e4..e17bbdf6 100644 --- a/lib/pages/things_page/fixed_submit_page.dart +++ b/lib/pages/things_page/fixed_submit_page.dart @@ -1,5 +1,20 @@ +// Flutter imports: +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:bot_toast/bot_toast.dart'; +import 'package:flutter_easyrefresh/easy_refresh.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; +import 'package:provider/provider.dart'; +import 'package:velocity_x/velocity_x.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; import 'package:akuCommunity/constants/api.dart'; +import 'package:akuCommunity/extensions/num_ext.dart'; +import 'package:akuCommunity/extensions/page_router.dart'; import 'package:akuCommunity/model/user/fixed_submit_model.dart'; import 'package:akuCommunity/pages/manager_func.dart'; import 'package:akuCommunity/pages/things_page/widget/add_fixed_submit_page.dart'; @@ -10,16 +25,6 @@ import 'package:akuCommunity/provider/user_provider.dart'; import 'package:akuCommunity/utils/bee_map.dart'; import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:akuCommunity/widget/views/horizontal_image_view.dart'; -import 'package:bot_toast/bot_toast.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyrefresh/easy_refresh.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:get/get.dart'; -import 'package:provider/provider.dart'; -import 'package:velocity_x/velocity_x.dart'; -import 'package:akuCommunity/extensions/num_ext.dart'; -import 'package:akuCommunity/extensions/page_router.dart'; class FixedSubmitPage extends StatefulWidget { FixedSubmitPage({Key key}) : super(key: key); 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 6442274f..66a52feb 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,9 +1,12 @@ -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/base/assets_image.dart'; import 'package:akuCommunity/routers/page_routers.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:akuCommunity/widget/common_image_picker.dart'; class ThingsCreatePage extends StatefulWidget { diff --git a/lib/pages/things_page/things_detail_page/things_detail_page.dart b/lib/pages/things_page/things_detail_page/things_detail_page.dart index ec5702b0..1512c1fd 100644 --- a/lib/pages/things_page/things_detail_page/things_detail_page.dart +++ b/lib/pages/things_page/things_detail_page/things_detail_page.dart @@ -1,13 +1,18 @@ -import 'package:akuCommunity/pages/things_page/things_evaluate_page/things_evaluate_page.dart'; -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:akuCommunity/widget/views/horizontal_image_view.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:velocity_x/velocity_x.dart'; + +// Project imports: +import 'package:akuCommunity/pages/things_page/things_evaluate_page/things_evaluate_page.dart'; +import 'package:akuCommunity/routers/page_routers.dart'; import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:akuCommunity/widget/expandable_text.dart'; -import 'package:akuCommunity/routers/page_routers.dart'; +import 'package:akuCommunity/widget/views/horizontal_image_view.dart'; import 'widget/goods_info_card.dart'; -import 'package:velocity_x/velocity_x.dart'; class ThingsDetailPage extends StatefulWidget { final Bundle bundle; diff --git a/lib/pages/things_page/things_detail_page/widget/goods_info_card.dart b/lib/pages/things_page/things_detail_page/widget/goods_info_card.dart index 667716cb..4f17b628 100644 --- a/lib/pages/things_page/things_detail_page/widget/goods_info_card.dart +++ b/lib/pages/things_page/things_detail_page/widget/goods_info_card.dart @@ -1,8 +1,11 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/utils/headers.dart'; -import 'image_horizontal_list.dart'; import 'goods_info_card_button.dart'; +import 'image_horizontal_list.dart'; class GoodsInfoCard extends StatelessWidget { final List listImage; 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 643945ab..9b5d6af1 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 @@ -1,11 +1,16 @@ -import 'package:akuCommunity/pages/goods_deto_page/deto_code_page/deto_code_page.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; -import 'package:akuCommunity/utils/headers.dart'; import 'package:get/get.dart'; import 'package:url_launcher/url_launcher.dart'; +// Project imports: +import 'package:akuCommunity/pages/goods_deto_page/deto_code_page/deto_code_page.dart'; +import 'package:akuCommunity/utils/headers.dart'; + class GoodsInfoCardButton extends StatelessWidget { GoodsInfoCardButton({Key key}) : super(key: key); diff --git a/lib/pages/things_page/things_detail_page/widget/image_horizontal_list.dart b/lib/pages/things_page/things_detail_page/widget/image_horizontal_list.dart index 66f56b9e..7a4f47d6 100644 --- a/lib/pages/things_page/things_detail_page/widget/image_horizontal_list.dart +++ b/lib/pages/things_page/things_detail_page/widget/image_horizontal_list.dart @@ -1,8 +1,13 @@ +// Dart imports: import 'dart:math'; -import 'package:flutter/material.dart'; + +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/utils/fade_route.dart'; +import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/gallery_photo_view_wrapper.dart'; class ImageHorizontalList extends StatelessWidget { diff --git a/lib/pages/things_page/things_evaluate_page/things_evaluate_page.dart b/lib/pages/things_page/things_evaluate_page/things_evaluate_page.dart index b6d0675f..2d769bae 100644 --- a/lib/pages/things_page/things_evaluate_page/things_evaluate_page.dart +++ b/lib/pages/things_page/things_evaluate_page/things_evaluate_page.dart @@ -1,10 +1,15 @@ -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; import 'package:smooth_star_rating/smooth_star_rating.dart'; -import 'package:akuCommunity/utils/headers.dart'; + +// Project imports: import 'package:akuCommunity/routers/page_routers.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; class ThingsEvaluatePage extends StatefulWidget { final Bundle bundle; diff --git a/lib/pages/things_page/widget/add_fixed_submit_page.dart b/lib/pages/things_page/widget/add_fixed_submit_page.dart index 83ac5be0..99bb0ecc 100644 --- a/lib/pages/things_page/widget/add_fixed_submit_page.dart +++ b/lib/pages/things_page/widget/add_fixed_submit_page.dart @@ -1,7 +1,22 @@ +// Dart imports: import 'dart:io'; +// Flutter imports: +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:bot_toast/bot_toast.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:provider/provider.dart'; +import 'package:velocity_x/velocity_x.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/const/resource.dart'; import 'package:akuCommunity/constants/api.dart'; +import 'package:akuCommunity/extensions/page_router.dart'; +import 'package:akuCommunity/extensions/widget_list_ext.dart'; import 'package:akuCommunity/pages/manager_func.dart'; import 'package:akuCommunity/pages/things_page/widget/finish_fixed_submit_page.dart'; import 'package:akuCommunity/provider/user_provider.dart'; @@ -10,15 +25,6 @@ import 'package:akuCommunity/utils/network/net_util.dart'; import 'package:akuCommunity/widget/bee_divider.dart'; import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:akuCommunity/widget/picker/grid_image_picker.dart'; -import 'package:bot_toast/bot_toast.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:velocity_x/velocity_x.dart'; -import 'package:akuCommunity/const/resource.dart'; -import 'package:akuCommunity/extensions/widget_list_ext.dart'; -import 'package:akuCommunity/extensions/page_router.dart'; class AddFixedSubmitPage extends StatefulWidget { AddFixedSubmitPage({Key key}) : super(key: key); diff --git a/lib/pages/things_page/widget/bee_list_view.dart b/lib/pages/things_page/widget/bee_list_view.dart index e298d5df..a3915c4c 100644 --- a/lib/pages/things_page/widget/bee_list_view.dart +++ b/lib/pages/things_page/widget/bee_list_view.dart @@ -1,8 +1,13 @@ -import 'package:akuCommunity/utils/network/base_list_model.dart'; -import 'package:akuCommunity/utils/network/net_util.dart'; +// Flutter imports: import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_easyrefresh/easy_refresh.dart'; +// Project imports: +import 'package:akuCommunity/utils/network/base_list_model.dart'; +import 'package:akuCommunity/utils/network/net_util.dart'; + /// ## BeeListView ///```dart ///BeeListView( diff --git a/lib/pages/things_page/widget/finish_fixed_submit_page.dart b/lib/pages/things_page/widget/finish_fixed_submit_page.dart index e34cb7be..0e46cd9a 100644 --- a/lib/pages/things_page/widget/finish_fixed_submit_page.dart +++ b/lib/pages/things_page/widget/finish_fixed_submit_page.dart @@ -1,9 +1,14 @@ -import 'package:akuCommunity/base/base_style.dart'; -import 'package:akuCommunity/widget/bee_scaffold.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:velocity_x/velocity_x.dart'; + +// Package imports: import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:velocity_x/velocity_x.dart'; + +// Project imports: +import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; class FinishFixedSubmitPage extends StatelessWidget { const FinishFixedSubmitPage({Key key}) : super(key: key); diff --git a/lib/pages/things_page/widget/fixed_check_box.dart b/lib/pages/things_page/widget/fixed_check_box.dart index 625870f5..dd9d875a 100644 --- a/lib/pages/things_page/widget/fixed_check_box.dart +++ b/lib/pages/things_page/widget/fixed_check_box.dart @@ -1,7 +1,12 @@ -import 'package:akuCommunity/base/base_style.dart'; +// Flutter imports: import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_screenutil/flutter_screenutil.dart'; +// Project imports: +import 'package:akuCommunity/base/base_style.dart'; + class FixedCheckBox extends StatefulWidget { final Function(bool isSelect) onChanged; FixedCheckBox({Key key, this.onChanged}) : super(key: key); diff --git a/lib/pages/things_page/widget/fixed_detail_page.dart b/lib/pages/things_page/widget/fixed_detail_page.dart index 5c78a107..454f9a7d 100644 --- a/lib/pages/things_page/widget/fixed_detail_page.dart +++ b/lib/pages/things_page/widget/fixed_detail_page.dart @@ -1,16 +1,21 @@ +// Flutter imports: +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:flutter_easyrefresh/easy_refresh.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:velocity_x/velocity_x.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/const/resource.dart'; import 'package:akuCommunity/model/manager/fixed_detail_model.dart'; import 'package:akuCommunity/pages/manager_func.dart'; import 'package:akuCommunity/utils/bee_map.dart'; +import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/bee_divider.dart'; import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:akuCommunity/widget/views/horizontal_image_view.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyrefresh/easy_refresh.dart'; -import 'package:velocity_x/velocity_x.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:akuCommunity/utils/headers.dart'; -import 'package:akuCommunity/const/resource.dart'; class FixedDetailPage extends StatefulWidget { final int id; diff --git a/lib/pages/things_page/widget/things_app_bar.dart b/lib/pages/things_page/widget/things_app_bar.dart index 11c945dc..ec278bf4 100644 --- a/lib/pages/things_page/widget/things_app_bar.dart +++ b/lib/pages/things_page/widget/things_app_bar.dart @@ -1,9 +1,14 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; -import 'package:akuCommunity/utils/headers.dart'; import 'package:get/get.dart'; +// Project imports: +import 'package:akuCommunity/utils/headers.dart'; + //TODO CLEAN BOTTOM CODES. @Deprecated("sh*t app bar need to be cleaned.") class ThingsAppBar extends StatelessWidget { diff --git a/lib/pages/things_page/widget/things_card.dart b/lib/pages/things_page/widget/things_card.dart index 81a6766a..5f1bcf87 100644 --- a/lib/pages/things_page/widget/things_card.dart +++ b/lib/pages/things_page/widget/things_card.dart @@ -1,10 +1,13 @@ -import 'package:akuCommunity/pages/things_page/things_detail_page/things_detail_page.dart'; -import 'package:akuCommunity/widget/views/horizontal_image_view.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; +import 'package:flutter/material.dart'; + +// Project imports: +import 'package:akuCommunity/pages/things_page/things_detail_page/things_detail_page.dart'; import 'package:akuCommunity/routers/page_routers.dart'; +import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/expandable_text.dart'; +import 'package:akuCommunity/widget/views/horizontal_image_view.dart'; class ThingsCard extends StatefulWidget { final String time, tag, content; diff --git a/lib/pages/things_page/widget/things_list.dart b/lib/pages/things_page/widget/things_list.dart index 1cd1c31d..9c1b6edc 100644 --- a/lib/pages/things_page/widget/things_list.dart +++ b/lib/pages/things_page/widget/things_list.dart @@ -1,6 +1,11 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:pull_to_refresh/pull_to_refresh.dart'; + +// Project imports: import 'package:akuCommunity/utils/headers.dart'; import 'things_card.dart'; diff --git a/lib/pages/total_application_page/total_applications_page.dart b/lib/pages/total_application_page/total_applications_page.dart index 6a4a7c2e..189d4699 100644 --- a/lib/pages/total_application_page/total_applications_page.dart +++ b/lib/pages/total_application_page/total_applications_page.dart @@ -1,3 +1,9 @@ +// Flutter imports: +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Project imports: +import 'package:akuCommunity/base/assets_image.dart'; import 'package:akuCommunity/pages/activities_page/activities_page.dart'; import 'package:akuCommunity/pages/convenient_phone/convenient_phone_page.dart'; import 'package:akuCommunity/pages/fitup_manage/fitup_manage_page.dart'; @@ -12,12 +18,9 @@ import 'package:akuCommunity/pages/opening_code_page/opening_code_page.dart'; import 'package:akuCommunity/pages/questionnaire_page/questionnaire_page.dart'; import 'package:akuCommunity/pages/things_page/fixed_submit_page.dart'; import 'package:akuCommunity/pages/visitor_access_page/visitor_access_page.dart'; +import 'package:akuCommunity/routers/page_routers.dart'; import 'package:akuCommunity/ui/manager/advice/advice_page.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/cupertino.dart'; import 'package:akuCommunity/utils/headers.dart'; -import 'package:akuCommunity/base/assets_image.dart'; -import 'package:akuCommunity/routers/page_routers.dart'; import 'widget/applications_bar.dart'; class TotalApplicationsPage extends StatefulWidget { diff --git a/lib/pages/total_application_page/widget/applications_bar.dart b/lib/pages/total_application_page/widget/applications_bar.dart index 86e8c962..3ace0cdc 100644 --- a/lib/pages/total_application_page/widget/applications_bar.dart +++ b/lib/pages/total_application_page/widget/applications_bar.dart @@ -1,10 +1,15 @@ -import 'package:akuCommunity/widget/search_bar_delegate.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; -import 'package:akuCommunity/utils/headers.dart'; import 'package:get/get.dart'; +// Project imports: +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/search_bar_delegate.dart'; + class ApplicationsBar extends StatelessWidget { const ApplicationsBar({Key key}) : super(key: key); diff --git a/lib/pages/visitor_access_page/visitor_access_page.dart b/lib/pages/visitor_access_page/visitor_access_page.dart index 7bacdf1a..2c9e707f 100644 --- a/lib/pages/visitor_access_page/visitor_access_page.dart +++ b/lib/pages/visitor_access_page/visitor_access_page.dart @@ -1,19 +1,24 @@ -import 'package:akuCommunity/pages/manager_func.dart'; -import 'package:akuCommunity/ui/manager/visitor/visitor_record_page.dart'; -import 'package:akuCommunity/provider/user_provider.dart'; -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:akuCommunity/widget/picker/bee_date_picker.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: 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/headers.dart'; -import 'package:akuCommunity/widget/common_input.dart'; import 'package:get/get.dart'; import 'package:provider/provider.dart'; import 'package:velocity_x/velocity_x.dart'; +// Project imports: +import 'package:akuCommunity/base/assets_image.dart'; +import 'package:akuCommunity/pages/manager_func.dart'; +import 'package:akuCommunity/provider/user_provider.dart'; +import 'package:akuCommunity/ui/manager/visitor/visitor_record_page.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; +import 'package:akuCommunity/widget/common_input.dart'; +import 'package:akuCommunity/widget/picker/bee_date_picker.dart'; + class VisitorAccessPage extends StatefulWidget { VisitorAccessPage({Key key}) : super(key: key); diff --git a/lib/painters/plus_painter.dart b/lib/painters/plus_painter.dart index c7cd7de3..3989535d 100644 --- a/lib/painters/plus_painter.dart +++ b/lib/painters/plus_painter.dart @@ -1,4 +1,7 @@ +// Flutter imports: import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_screenutil/flutter_screenutil.dart'; class PlusPainter extends CustomPainter { diff --git a/lib/painters/user_bottom_bar_painter.dart b/lib/painters/user_bottom_bar_painter.dart index fe8ed6ae..f4f4f3b5 100644 --- a/lib/painters/user_bottom_bar_painter.dart +++ b/lib/painters/user_bottom_bar_painter.dart @@ -1,4 +1,7 @@ +// Flutter imports: import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_screenutil/flutter_screenutil.dart'; class UserBottomBarPainter extends CustomPainter { diff --git a/lib/provider/cart.dart b/lib/provider/cart.dart index a634e3dd..c099b2fb 100644 --- a/lib/provider/cart.dart +++ b/lib/provider/cart.dart @@ -1,7 +1,14 @@ -import 'package:flutter/material.dart'; +// Dart imports: +import 'dart:convert'; + +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:shared_preferences/shared_preferences.dart'; -import 'dart:convert'; + +// Project imports: import 'package:akuCommunity/model/aku_shop_model.dart'; class CartProvidde with ChangeNotifier { diff --git a/lib/provider/sign_up_provider.dart b/lib/provider/sign_up_provider.dart index bb7c5ac1..df191476 100644 --- a/lib/provider/sign_up_provider.dart +++ b/lib/provider/sign_up_provider.dart @@ -1,3 +1,4 @@ +// Flutter imports: import 'package:flutter/material.dart'; class SignUpProvider extends ChangeNotifier { diff --git a/lib/provider/user_provider.dart b/lib/provider/user_provider.dart index 60e6eec5..9120b584 100644 --- a/lib/provider/user_provider.dart +++ b/lib/provider/user_provider.dart @@ -1,3 +1,10 @@ +// Flutter imports: +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:flustars/flustars.dart'; + +// Project imports: import 'package:akuCommunity/constants/api.dart'; import 'package:akuCommunity/model/user/user_detail_model.dart'; import 'package:akuCommunity/model/user/user_info_model.dart'; @@ -5,8 +12,6 @@ import 'package:akuCommunity/pages/sign/sign_func.dart'; import 'package:akuCommunity/utils/hive_store.dart'; import 'package:akuCommunity/utils/network/base_model.dart'; import 'package:akuCommunity/utils/network/net_util.dart'; -import 'package:flustars/flustars.dart'; -import 'package:flutter/material.dart'; class UserProvider extends ChangeNotifier { //登录状态管理 diff --git a/lib/service/base_model.dart b/lib/service/base_model.dart index 8cc65e6d..355805e0 100644 --- a/lib/service/base_model.dart +++ b/lib/service/base_model.dart @@ -1,13 +1,13 @@ -class BaseModel { - int code; - dynamic result; - String message; - - BaseModel({this.code, this.result, this.message}); - - BaseModel.fromJson(Map json) { - code = json['Code'] != null ? json['Code'] : json['code']; - result = json['Result'] != null ? json['Result'] : json['data']; - message = json['Message'] != null ? json['Message'] : json['msg']; - } -} +class BaseModel { + int code; + dynamic result; + String message; + + BaseModel({this.code, this.result, this.message}); + + BaseModel.fromJson(Map json) { + code = json['Code'] != null ? json['Code'] : json['code']; + result = json['Result'] != null ? json['Result'] : json['data']; + message = json['Message'] != null ? json['Message'] : json['msg']; + } +} diff --git a/lib/service/net.dart b/lib/service/net.dart index e782f8b0..45c9c13a 100644 --- a/lib/service/net.dart +++ b/lib/service/net.dart @@ -1,211 +1,216 @@ -import 'dart:convert'; -import 'dart:io'; -import 'package:dio/adapter.dart'; -import 'package:dio/dio.dart'; - -import 'base_model.dart'; -// import 'net_header.dart'; -// import 'package:light_wave/utils/global_toast.dart'; -// import 'package:light_wave/pages/login/login_page.dart'; -// import 'package:light_wave/routers/application.dart'; -// import 'package:fluttertoast/fluttertoast.dart'; - -/// 自定义枚举 -enum Method { get, post } - -class Net { - // 工厂模式 - factory Net() => _getInstance(); - static Net get instance => _getInstance(); - static Net _instance; - - Dio dio; - Net._internal() { - // 初始化 - dio = Dio( - BaseOptions( - connectTimeout: 60000, // 连接服务器超时时间,单位是毫秒. - receiveTimeout: 10000, // 响应流上前后两次接受到数据的间隔,单位为毫秒, 这并不是接收数据的总时限. - // contentType: ContentType.parse('x-www-form-urlencoded').toString(), - // responseType: ResponseType.plain, - // responseType: ResponseType.json, - ), - ); - - (dio.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate = - (client) { - client.badCertificateCallback = - (X509Certificate cert, String host, int port) { - //TODO - return true; - }; - }; - } - - /// 打印拦截器(便于调试) - static final interceptors = InterceptorsWrapper( - /// 请求发送前处理处理一些事情 - onRequest: (RequestOptions options) { - print("--------------------请求参数---------------------"); - print(json.encode(options.headers)); - print(options.method); - print(options.queryParameters); - print(options.baseUrl + options.path); - print(options.data); - print("--------------------请求参数---------------------"); - return options; - }, - - /// 在数据响应前做一些预处理 - onResponse: (Response response) { - // Log.i("--------------------响应结果---------------------"); - // Log.e("response.statusCode", "${response.statusCode}"); - // Log.e("response.data", "${json.encode(response.data)}"); - // Log.e("response.headers", "${response.headers}"); - // Log.i("--------------------响应结果---------------------"); - return response; - }, - - /// 错误处理 - onError: (DioError e) { - // Log.e("DioError", "$e"); - return e; - }, - ); - // 单列模式 - static Net _getInstance() { - if (_instance == null) { - _instance = Net._internal(); - } - return _instance; - } - - get(String url, Map params, - {Function success, Function failure}) { - _doRequest(url, params, Method.get, success, failure); - } - - post(String url, Map params, - {Function success, Function failure}) { - _doRequest(url, params, Method.post, success, failure); - } - - void _doRequest(String url, Map params, Method method, - Function successCallBack, Function failureCallBack) async { - try { - /// 可以添加header - // if (isIntelligent) { - // dio.options.headers.addAll(await NetHeader.getZnToken()); - // } else { - // if (isContentType) { - // dio.options.contentType = - // ContentType.parse("application/x-www-form-urlencoded").toString(); - // } - // dio.options.headers.addAll(NetHeader.dmsHeaders); - // } - dio.interceptors.add(interceptors); - Response response; - switch (method) { - case Method.get: - if (params != null && params.isNotEmpty) { - response = await dio.get(url, queryParameters: params); - } else { - response = await dio.get(url); - } - break; - case Method.post: - if (params != null && params.isNotEmpty) { - response = await dio.post(url, data: params); - } else { - response = await dio.post(url); - } - break; - } - Map result = json.decode(response.toString()); - // 打印信息 - print('''api: $url\nparams: $params\nresult: $result'''); - // 转化为model - BaseModel model = BaseModel.fromJson(result); - if (model.code == 100 || model.code == 0) { - // 100 请求成功 - if (successCallBack != null) { - //返回请求数据 - if (model.result == null) { - successCallBack(model.message); - } else { - successCallBack(model.result); - } - } - } else { - //TODO - //直接使用Toast弹出错误信息 - //返回失败信息 - // GlobalToast.globalToast('${model.message}!~'); - if (failureCallBack != null) { - failureCallBack(model.code); - // if (model.code == 1 && model.message == 'token过期') { - // Application.navigatorKey.currentState.pushNamedAndRemoveUntil( - // "/LoginPage", ModalRoute.withName("/")); - // } - // failureCallBack(model.message); - } - } - } catch (exception) { - print('错误:${exception.toString()}'); - // FlutterToast.showToast(msg: "请求失败,请稍后再试"); - if (failureCallBack != null) { - failureCallBack(exception.toString()); - } - } - } - -// 上传文件(图片) -// doUploadFile(String url, File file, String loadingText,Function successCallBack, -// Function failureCallBack) async { -// try { -// String timeStamp = DateTime.now().millisecondsSinceEpoch.toString(); -// FormData formData = FormData.from({ -// 'file': UploadFileInfo(file, '$timeStamp.jpg', -// contentType: ContentType.parse("image/jpeg")) -// }); -// Response response = await dio.post(url, data: formData); -// print('$response'); // 在需要生成model时需要json格式 -// Map result = json.decode(response.toString()); -// assert(() { -// // assert只会在debug模式下执行,release模式下不会执行 -// // 打印信息 -// print('''api: $url\nresult: $result'''); -// return true; -// }()); - -// BaseModel model = BaseModel.fromJson(result); -// if (model.code == 200) { -// // 200 请求成功 -// if (successCallBack != null) { -// if (model.data != null) { -// successCallBack(model.data); -// } else { -// successCallBack({}); -// } -// } -// } else { -// //Fluttertoast.showToast(msg: "${model.msg}"); -// if (failureCallBack != null) { -// failureCallBack(model.msg); -// } -// } -// } catch (exception) { -// assert(() { -// // 打印信息 -// print('''api: $url\n错误:${exception.toString()}'''); -// return true; -// }()); - -// // Fluttertoast.showToast(msg: '加载失败'); -// if (failureCallBack != null) { -// failureCallBack(exception.toString()); -// } -// } -// } - -} +// Dart imports: +import 'dart:convert'; +import 'dart:io'; + +// Package imports: +import 'package:dio/adapter.dart'; +import 'package:dio/dio.dart'; + +// Project imports: +import 'base_model.dart'; + +// import 'net_header.dart'; +// import 'package:light_wave/utils/global_toast.dart'; +// import 'package:light_wave/pages/login/login_page.dart'; +// import 'package:light_wave/routers/application.dart'; +// import 'package:fluttertoast/fluttertoast.dart'; + +/// 自定义枚举 +enum Method { get, post } + +class Net { + // 工厂模式 + factory Net() => _getInstance(); + static Net get instance => _getInstance(); + static Net _instance; + + Dio dio; + Net._internal() { + // 初始化 + dio = Dio( + BaseOptions( + connectTimeout: 60000, // 连接服务器超时时间,单位是毫秒. + receiveTimeout: 10000, // 响应流上前后两次接受到数据的间隔,单位为毫秒, 这并不是接收数据的总时限. + // contentType: ContentType.parse('x-www-form-urlencoded').toString(), + // responseType: ResponseType.plain, + // responseType: ResponseType.json, + ), + ); + + (dio.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate = + (client) { + client.badCertificateCallback = + (X509Certificate cert, String host, int port) { + //TODO + return true; + }; + }; + } + + /// 打印拦截器(便于调试) + static final interceptors = InterceptorsWrapper( + /// 请求发送前处理处理一些事情 + onRequest: (RequestOptions options) { + print("--------------------请求参数---------------------"); + print(json.encode(options.headers)); + print(options.method); + print(options.queryParameters); + print(options.baseUrl + options.path); + print(options.data); + print("--------------------请求参数---------------------"); + return options; + }, + + /// 在数据响应前做一些预处理 + onResponse: (Response response) { + // Log.i("--------------------响应结果---------------------"); + // Log.e("response.statusCode", "${response.statusCode}"); + // Log.e("response.data", "${json.encode(response.data)}"); + // Log.e("response.headers", "${response.headers}"); + // Log.i("--------------------响应结果---------------------"); + return response; + }, + + /// 错误处理 + onError: (DioError e) { + // Log.e("DioError", "$e"); + return e; + }, + ); + // 单列模式 + static Net _getInstance() { + if (_instance == null) { + _instance = Net._internal(); + } + return _instance; + } + + get(String url, Map params, + {Function success, Function failure}) { + _doRequest(url, params, Method.get, success, failure); + } + + post(String url, Map params, + {Function success, Function failure}) { + _doRequest(url, params, Method.post, success, failure); + } + + void _doRequest(String url, Map params, Method method, + Function successCallBack, Function failureCallBack) async { + try { + /// 可以添加header + // if (isIntelligent) { + // dio.options.headers.addAll(await NetHeader.getZnToken()); + // } else { + // if (isContentType) { + // dio.options.contentType = + // ContentType.parse("application/x-www-form-urlencoded").toString(); + // } + // dio.options.headers.addAll(NetHeader.dmsHeaders); + // } + dio.interceptors.add(interceptors); + Response response; + switch (method) { + case Method.get: + if (params != null && params.isNotEmpty) { + response = await dio.get(url, queryParameters: params); + } else { + response = await dio.get(url); + } + break; + case Method.post: + if (params != null && params.isNotEmpty) { + response = await dio.post(url, data: params); + } else { + response = await dio.post(url); + } + break; + } + Map result = json.decode(response.toString()); + // 打印信息 + print('''api: $url\nparams: $params\nresult: $result'''); + // 转化为model + BaseModel model = BaseModel.fromJson(result); + if (model.code == 100 || model.code == 0) { + // 100 请求成功 + if (successCallBack != null) { + //返回请求数据 + if (model.result == null) { + successCallBack(model.message); + } else { + successCallBack(model.result); + } + } + } else { + //TODO + //直接使用Toast弹出错误信息 + //返回失败信息 + // GlobalToast.globalToast('${model.message}!~'); + if (failureCallBack != null) { + failureCallBack(model.code); + // if (model.code == 1 && model.message == 'token过期') { + // Application.navigatorKey.currentState.pushNamedAndRemoveUntil( + // "/LoginPage", ModalRoute.withName("/")); + // } + // failureCallBack(model.message); + } + } + } catch (exception) { + print('错误:${exception.toString()}'); + // FlutterToast.showToast(msg: "请求失败,请稍后再试"); + if (failureCallBack != null) { + failureCallBack(exception.toString()); + } + } + } + +// 上传文件(图片) +// doUploadFile(String url, File file, String loadingText,Function successCallBack, +// Function failureCallBack) async { +// try { +// String timeStamp = DateTime.now().millisecondsSinceEpoch.toString(); +// FormData formData = FormData.from({ +// 'file': UploadFileInfo(file, '$timeStamp.jpg', +// contentType: ContentType.parse("image/jpeg")) +// }); +// Response response = await dio.post(url, data: formData); +// print('$response'); // 在需要生成model时需要json格式 +// Map result = json.decode(response.toString()); +// assert(() { +// // assert只会在debug模式下执行,release模式下不会执行 +// // 打印信息 +// print('''api: $url\nresult: $result'''); +// return true; +// }()); + +// BaseModel model = BaseModel.fromJson(result); +// if (model.code == 200) { +// // 200 请求成功 +// if (successCallBack != null) { +// if (model.data != null) { +// successCallBack(model.data); +// } else { +// successCallBack({}); +// } +// } +// } else { +// //Fluttertoast.showToast(msg: "${model.msg}"); +// if (failureCallBack != null) { +// failureCallBack(model.msg); +// } +// } +// } catch (exception) { +// assert(() { +// // 打印信息 +// print('''api: $url\n错误:${exception.toString()}'''); +// return true; +// }()); + +// // Fluttertoast.showToast(msg: '加载失败'); +// if (failureCallBack != null) { +// failureCallBack(exception.toString()); +// } +// } +// } + +} diff --git a/lib/service/net_header.dart b/lib/service/net_header.dart index a424b7d0..34de824d 100644 --- a/lib/service/net_header.dart +++ b/lib/service/net_header.dart @@ -1,9 +1,9 @@ -class NetHeader { - /// 自定义Header - static String appID = 'MOBILE-APP-ZNY'; - static String appSecret = '293FCB579B80BC1D5E6414F0B41C6FF4'; - static Map dmsHeaders = { - 'AppID': appID, - 'AppSecret': appSecret, - }; -} +class NetHeader { + /// 自定义Header + static String appID = 'MOBILE-APP-ZNY'; + static String appSecret = '293FCB579B80BC1D5E6414F0B41C6FF4'; + static Map dmsHeaders = { + 'AppID': appID, + 'AppSecret': appSecret, + }; +} diff --git a/lib/service/net_url.dart b/lib/service/net_url.dart index d3b1e42a..62c19704 100644 --- a/lib/service/net_url.dart +++ b/lib/service/net_url.dart @@ -1,25 +1,25 @@ -class NetUrl { - /// DMS服务器地址 - static const String BASE_URL = - "https://www.easy-mock.com/mock/5f68981b08d0e90f8b2abb6a/akuCommunity"; - - static const String Shop = BASE_URL + "/shop"; - - static const String ShopClass = BASE_URL + "/shopClass"; - - static const String JJSH = BASE_URL + "/jjsh"; - - static const String SMJD = BASE_URL + "/smjd"; - - static const String XXFS = BASE_URL + "/xxfs"; - - static const String ZBBJ = BASE_URL + "/zbbj"; - - static const String CZXS = BASE_URL + "/czxs"; - - static const String FSXB = BASE_URL + "/fsxb"; - - static const String MYWJ = BASE_URL + "/mywj"; - - static const String YLJS = BASE_URL + "/yljs"; -} +class NetUrl { + /// DMS服务器地址 + static const String BASE_URL = + "https://www.easy-mock.com/mock/5f68981b08d0e90f8b2abb6a/akuCommunity"; + + static const String Shop = BASE_URL + "/shop"; + + static const String ShopClass = BASE_URL + "/shopClass"; + + static const String JJSH = BASE_URL + "/jjsh"; + + static const String SMJD = BASE_URL + "/smjd"; + + static const String XXFS = BASE_URL + "/xxfs"; + + static const String ZBBJ = BASE_URL + "/zbbj"; + + static const String CZXS = BASE_URL + "/czxs"; + + static const String FSXB = BASE_URL + "/fsxb"; + + static const String MYWJ = BASE_URL + "/mywj"; + + static const String YLJS = BASE_URL + "/yljs"; +} diff --git a/lib/service/net_util.dart b/lib/service/net_util.dart index 3acbe06a..0584e4e1 100644 --- a/lib/service/net_util.dart +++ b/lib/service/net_util.dart @@ -1,55 +1,56 @@ -import "net.dart"; -import 'net_url.dart'; - -class NetUtil { - /// 测试商品获取 - static void akuShop(Map params, - {Function success, Function failure}) { - Net().get(NetUrl.Shop, params, success: success, failure: failure); - } - - static void akuShopClass(Map params, - {Function success, Function failure}) { - Net().get(NetUrl.ShopClass, params, success: success, failure: failure); - } - - static void akuShopJJSH(Map params, - {Function success, Function failure}) { - Net().get(NetUrl.JJSH, params, success: success, failure: failure); - } - - static void akuShopSMJD(Map params, - {Function success, Function failure}) { - Net().get(NetUrl.SMJD, params, success: success, failure: failure); - } - - static void akuShopXXFS(Map params, - {Function success, Function failure}) { - Net().get(NetUrl.XXFS, params, success: success, failure: failure); - } - - static void akuShopZBBJ(Map params, - {Function success, Function failure}) { - Net().get(NetUrl.ZBBJ, params, success: success, failure: failure); - } - - static void akuShopCZXS(Map params, - {Function success, Function failure}) { - Net().get(NetUrl.CZXS, params, success: success, failure: failure); - } - - static void akuShopFSXB(Map params, - {Function success, Function failure}) { - Net().get(NetUrl.FSXB, params, success: success, failure: failure); - } - - static void akuShopMYWJ(Map params, - {Function success, Function failure}) { - Net().get(NetUrl.MYWJ, params, success: success, failure: failure); - } - - static void akuShopYLJS(Map params, - {Function success, Function failure}) { - Net().get(NetUrl.YLJS, params, success: success, failure: failure); - } -} +// Project imports: +import "net.dart"; +import 'net_url.dart'; + +class NetUtil { + /// 测试商品获取 + static void akuShop(Map params, + {Function success, Function failure}) { + Net().get(NetUrl.Shop, params, success: success, failure: failure); + } + + static void akuShopClass(Map params, + {Function success, Function failure}) { + Net().get(NetUrl.ShopClass, params, success: success, failure: failure); + } + + static void akuShopJJSH(Map params, + {Function success, Function failure}) { + Net().get(NetUrl.JJSH, params, success: success, failure: failure); + } + + static void akuShopSMJD(Map params, + {Function success, Function failure}) { + Net().get(NetUrl.SMJD, params, success: success, failure: failure); + } + + static void akuShopXXFS(Map params, + {Function success, Function failure}) { + Net().get(NetUrl.XXFS, params, success: success, failure: failure); + } + + static void akuShopZBBJ(Map params, + {Function success, Function failure}) { + Net().get(NetUrl.ZBBJ, params, success: success, failure: failure); + } + + static void akuShopCZXS(Map params, + {Function success, Function failure}) { + Net().get(NetUrl.CZXS, params, success: success, failure: failure); + } + + static void akuShopFSXB(Map params, + {Function success, Function failure}) { + Net().get(NetUrl.FSXB, params, success: success, failure: failure); + } + + static void akuShopMYWJ(Map params, + {Function success, Function failure}) { + Net().get(NetUrl.MYWJ, params, success: success, failure: failure); + } + + static void akuShopYLJS(Map params, + {Function success, Function failure}) { + Net().get(NetUrl.YLJS, params, success: success, failure: failure); + } +} diff --git a/lib/ui/manager/advice/advice_add_comment_page.dart b/lib/ui/manager/advice/advice_add_comment_page.dart index cb372254..92785c54 100644 --- a/lib/ui/manager/advice/advice_add_comment_page.dart +++ b/lib/ui/manager/advice/advice_add_comment_page.dart @@ -1,13 +1,18 @@ +// Flutter imports: +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:common_utils/common_utils.dart'; +import 'package:get/get.dart'; +import 'package:velocity_x/velocity_x.dart'; + +// Project imports: import 'package:akuCommunity/constants/api.dart'; import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/utils/network/base_model.dart'; import 'package:akuCommunity/utils/network/net_util.dart'; import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:akuCommunity/widget/buttons/bottom_button.dart'; -import 'package:common_utils/common_utils.dart'; -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; -import 'package:velocity_x/velocity_x.dart'; class AdviceAddCommentPage extends StatefulWidget { final int id; diff --git a/lib/ui/manager/advice/advice_card.dart b/lib/ui/manager/advice/advice_card.dart index 2eee5a63..379be8fb 100644 --- a/lib/ui/manager/advice/advice_card.dart +++ b/lib/ui/manager/advice/advice_card.dart @@ -1,12 +1,17 @@ +// Flutter imports: +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:common_utils/common_utils.dart'; +import 'package:flutter_rating_bar/flutter_rating_bar.dart'; +import 'package:velocity_x/velocity_x.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; import 'package:akuCommunity/model/manager/suggestion_or_complain_model.dart'; import 'package:akuCommunity/ui/manager/advice/advice_detail_page.dart'; import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/views/horizontal_image_view.dart'; -import 'package:common_utils/common_utils.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_rating_bar/flutter_rating_bar.dart'; -import 'package:velocity_x/velocity_x.dart'; class AdviceCard extends StatefulWidget { final SuggestionOrComplainModel model; diff --git a/lib/ui/manager/advice/advice_detail_page.dart b/lib/ui/manager/advice/advice_detail_page.dart index 5160fa8d..855fdd5e 100644 --- a/lib/ui/manager/advice/advice_detail_page.dart +++ b/lib/ui/manager/advice/advice_detail_page.dart @@ -1,21 +1,26 @@ +// Flutter imports: +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:common_utils/common_utils.dart'; +import 'package:dio/dio.dart'; +import 'package:flutter_easyrefresh/easy_refresh.dart'; +import 'package:get/get.dart' hide Response; +import 'package:shimmer/shimmer.dart'; +import 'package:velocity_x/velocity_x.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; import 'package:akuCommunity/constants/api.dart'; import 'package:akuCommunity/model/manager/advice_detail_model.dart'; import 'package:akuCommunity/model/manager/suggestion_or_complain_model.dart'; import 'package:akuCommunity/ui/manager/advice/advice_add_comment_page.dart'; import 'package:akuCommunity/ui/manager/advice/advice_evaluate_page.dart'; +import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/utils/network/net_util.dart'; import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/buttons/bottom_button.dart'; import 'package:akuCommunity/widget/views/bee_grid_image_view.dart'; -import 'package:common_utils/common_utils.dart'; -import 'package:dio/dio.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyrefresh/easy_refresh.dart'; -import 'package:get/get.dart' hide Response; -import 'package:shimmer/shimmer.dart'; -import 'package:velocity_x/velocity_x.dart'; class AdviceDetailPage extends StatefulWidget { final SuggestionOrComplainModel model; diff --git a/lib/ui/manager/advice/advice_evaluate_page.dart b/lib/ui/manager/advice/advice_evaluate_page.dart index b9fa9a2e..0f27c0e8 100644 --- a/lib/ui/manager/advice/advice_evaluate_page.dart +++ b/lib/ui/manager/advice/advice_evaluate_page.dart @@ -1,13 +1,18 @@ +// Flutter imports: +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:flutter_rating_bar/flutter_rating_bar.dart'; +import 'package:get/get.dart'; +import 'package:velocity_x/velocity_x.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; import 'package:akuCommunity/constants/api.dart'; import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/utils/network/base_model.dart'; import 'package:akuCommunity/utils/network/net_util.dart'; import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_rating_bar/flutter_rating_bar.dart'; -import 'package:get/get.dart'; -import 'package:velocity_x/velocity_x.dart'; class AdviceEvaluatePage extends StatefulWidget { final int id; diff --git a/lib/ui/manager/advice/advice_page.dart b/lib/ui/manager/advice/advice_page.dart index 3f3d80a8..b0cfb837 100644 --- a/lib/ui/manager/advice/advice_page.dart +++ b/lib/ui/manager/advice/advice_page.dart @@ -1,20 +1,25 @@ +// Flutter imports: +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:flutter_easyrefresh/easy_refresh.dart'; +import 'package:get/get.dart'; +import 'package:velocity_x/velocity_x.dart'; + +// Project imports: import 'package:akuCommunity/constants/api.dart'; import 'package:akuCommunity/model/manager/suggestion_or_complain_model.dart'; import 'package:akuCommunity/pages/things_page/widget/bee_list_view.dart'; import 'package:akuCommunity/ui/manager/advice/advice_card.dart'; import 'package:akuCommunity/ui/manager/advice/new_advice_page.dart'; +import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/utils/network/net_util.dart'; import 'package:akuCommunity/widget/animated/animated_transition.dart'; import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/buttons/bottom_button.dart'; import 'package:akuCommunity/widget/buttons/radio_button.dart'; import 'package:akuCommunity/widget/tab_bar/bee_tab_bar.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyrefresh/easy_refresh.dart'; -import 'package:get/get.dart'; -import 'package:velocity_x/velocity_x.dart'; enum AdviceType { SUGGESTION, diff --git a/lib/ui/manager/advice/new_advice_page.dart b/lib/ui/manager/advice/new_advice_page.dart index daa44393..8efa0232 100644 --- a/lib/ui/manager/advice/new_advice_page.dart +++ b/lib/ui/manager/advice/new_advice_page.dart @@ -1,21 +1,27 @@ +// Dart imports: import 'dart:io'; +// Flutter imports: +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:bot_toast/bot_toast.dart'; +import 'package:common_utils/common_utils.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; +import 'package:velocity_x/velocity_x.dart'; + +// Project imports: import 'package:akuCommunity/const/resource.dart'; import 'package:akuCommunity/constants/api.dart'; import 'package:akuCommunity/ui/manager/advice/advice_page.dart'; +import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/utils/network/base_model.dart'; import 'package:akuCommunity/utils/network/net_util.dart'; import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/buttons/bottom_button.dart'; import 'package:akuCommunity/widget/picker/grid_image_picker.dart'; -import 'package:bot_toast/bot_toast.dart'; -import 'package:common_utils/common_utils.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:get/get.dart'; -import 'package:velocity_x/velocity_x.dart'; class NewAdvicePage extends StatefulWidget { final AdviceType type; diff --git a/lib/ui/manager/visitor/visitor_list_item.dart b/lib/ui/manager/visitor/visitor_list_item.dart index 7fd51d46..14319de5 100644 --- a/lib/ui/manager/visitor/visitor_list_item.dart +++ b/lib/ui/manager/visitor/visitor_list_item.dart @@ -1,11 +1,16 @@ -import 'package:akuCommunity/model/manager/visitor_list_item_model.dart'; -import 'package:akuCommunity/ui/manager/visitor/visitor_passport_page.dart'; -import 'package:akuCommunity/utils/headers.dart'; -import 'package:common_utils/common_utils.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; + +// Package imports: +import 'package:common_utils/common_utils.dart'; import 'package:velocity_x/velocity_x.dart'; +// Project imports: +import 'package:akuCommunity/model/manager/visitor_list_item_model.dart'; +import 'package:akuCommunity/ui/manager/visitor/visitor_passport_page.dart'; +import 'package:akuCommunity/utils/headers.dart'; + class VisitorListItem extends StatefulWidget { final VisitorListItemModel model; VisitorListItem({Key key, @required this.model}) : super(key: key); diff --git a/lib/ui/manager/visitor/visitor_passport_page.dart b/lib/ui/manager/visitor/visitor_passport_page.dart index eb341381..0460caff 100644 --- a/lib/ui/manager/visitor/visitor_passport_page.dart +++ b/lib/ui/manager/visitor/visitor_passport_page.dart @@ -1,8 +1,13 @@ -import 'package:akuCommunity/utils/headers.dart'; -import 'package:akuCommunity/widget/bee_back_button.dart'; +// Flutter imports: import 'package:flutter/material.dart'; + +// Package imports: import 'package:velocity_x/velocity_x.dart'; +// Project imports: +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_back_button.dart'; + class VisitorPassportPage extends StatefulWidget { VisitorPassportPage({Key key}) : super(key: key); diff --git a/lib/ui/manager/visitor/visitor_record_page.dart b/lib/ui/manager/visitor/visitor_record_page.dart index 6fa08b4f..5b1a0f2d 100644 --- a/lib/ui/manager/visitor/visitor_record_page.dart +++ b/lib/ui/manager/visitor/visitor_record_page.dart @@ -1,8 +1,11 @@ +// Flutter imports: +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/ui/manager/visitor/visitor_record_view.dart'; import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:akuCommunity/widget/tab_bar/bee_tab_bar.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/cupertino.dart'; class VisitorRecordPage extends StatefulWidget { VisitorRecordPage({Key key}) : super(key: key); diff --git a/lib/ui/manager/visitor/visitor_record_view.dart b/lib/ui/manager/visitor/visitor_record_view.dart index 0c926683..d8d5d5d7 100644 --- a/lib/ui/manager/visitor/visitor_record_view.dart +++ b/lib/ui/manager/visitor/visitor_record_view.dart @@ -1,10 +1,15 @@ +// Flutter imports: +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:flutter_easyrefresh/easy_refresh.dart'; + +// Project imports: import 'package:akuCommunity/constants/api.dart'; -import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/model/manager/visitor_list_item_model.dart'; import 'package:akuCommunity/pages/things_page/widget/bee_list_view.dart'; import 'package:akuCommunity/ui/manager/visitor/visitor_list_item.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyrefresh/easy_refresh.dart'; +import 'package:akuCommunity/utils/headers.dart'; class VisitorRecordView extends StatefulWidget { ///访客状态(1.未到,2.已到) diff --git a/lib/utils/fade_route.dart b/lib/utils/fade_route.dart index 80d86b7d..9100d435 100644 --- a/lib/utils/fade_route.dart +++ b/lib/utils/fade_route.dart @@ -1,3 +1,4 @@ +// Flutter imports: import 'package:flutter/material.dart'; class FadeRoute extends PageRouteBuilder { diff --git a/lib/utils/hive_store.dart b/lib/utils/hive_store.dart index 724d2b4c..11b013ad 100644 --- a/lib/utils/hive_store.dart +++ b/lib/utils/hive_store.dart @@ -1,3 +1,4 @@ +// Package imports: import 'package:hive/hive.dart'; class HiveStore { diff --git a/lib/utils/network/base_model.dart b/lib/utils/network/base_model.dart index 0afc4854..c5f0d954 100644 --- a/lib/utils/network/base_model.dart +++ b/lib/utils/network/base_model.dart @@ -17,4 +17,4 @@ class BaseModel { data = json['data'] ?? null; status = json['status'] ?? false; } -} \ No newline at end of file +} diff --git a/lib/utils/network/net_util.dart b/lib/utils/network/net_util.dart index 8c3fe6ee..5173c8ed 100644 --- a/lib/utils/network/net_util.dart +++ b/lib/utils/network/net_util.dart @@ -1,19 +1,22 @@ +// Dart imports: import 'dart:io'; -import 'package:akuCommunity/pages/sign/sign_in_page.dart'; -import 'package:akuCommunity/provider/user_provider.dart'; -import 'package:akuCommunity/utils/network/base_file_model.dart'; -import 'package:akuCommunity/utils/network/base_list_model.dart'; -import 'package:akuCommunity/utils/network/base_model.dart'; +// Package imports: import 'package:bot_toast/bot_toast.dart'; import 'package:dio/dio.dart'; - -import 'package:akuCommunity/constants/api.dart'; import 'package:get/get.dart' hide Response, FormData, MultipartFile; import 'package:logger/logger.dart'; import 'package:power_logger/power_logger.dart'; import 'package:provider/provider.dart'; +// Project imports: +import 'package:akuCommunity/constants/api.dart'; +import 'package:akuCommunity/pages/sign/sign_in_page.dart'; +import 'package:akuCommunity/provider/user_provider.dart'; +import 'package:akuCommunity/utils/network/base_file_model.dart'; +import 'package:akuCommunity/utils/network/base_list_model.dart'; +import 'package:akuCommunity/utils/network/base_model.dart'; + class NetUtil { Dio _dio; Logger _logger; diff --git a/lib/utils/sp_util.dart b/lib/utils/sp_util.dart index 8db8d149..85f029e3 100644 --- a/lib/utils/sp_util.dart +++ b/lib/utils/sp_util.dart @@ -1,5 +1,7 @@ +// Dart imports: import 'dart:async'; +// Package imports: 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 302b15cb..2ecb1e0b 100644 --- a/lib/utils/toast.dart +++ b/lib/utils/toast.dart @@ -1,6 +1,8 @@ +// Flutter imports: +import 'package:flutter/material.dart'; +// Package imports: import 'package:bot_toast/bot_toast.dart'; -import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class Toast { diff --git a/lib/widget/activity_card.dart b/lib/widget/activity_card.dart index 7b4253c2..616d3e99 100644 --- a/lib/widget/activity_card.dart +++ b/lib/widget/activity_card.dart @@ -1,8 +1,13 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:image_stack/image_stack.dart'; -import 'package:akuCommunity/utils/headers.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/cached_image_wrapper.dart'; class ActivityCard extends StatelessWidget { diff --git a/lib/widget/animated/animated_scale.dart b/lib/widget/animated/animated_scale.dart index 323c29e5..41c2e3f2 100644 --- a/lib/widget/animated/animated_scale.dart +++ b/lib/widget/animated/animated_scale.dart @@ -1,3 +1,4 @@ +// Flutter imports: import 'package:flutter/material.dart'; class AnimatedScale extends ImplicitlyAnimatedWidget { diff --git a/lib/widget/animated/animated_transition.dart b/lib/widget/animated/animated_transition.dart index c9d8a73d..46bd3d6c 100644 --- a/lib/widget/animated/animated_transition.dart +++ b/lib/widget/animated/animated_transition.dart @@ -1,3 +1,4 @@ +// Flutter imports: import 'package:flutter/material.dart'; class AnimatedTranslate extends ImplicitlyAnimatedWidget { diff --git a/lib/widget/app_bar_action.dart b/lib/widget/app_bar_action.dart index e24fd91c..9f837184 100644 --- a/lib/widget/app_bar_action.dart +++ b/lib/widget/app_bar_action.dart @@ -1,8 +1,11 @@ +// Flutter imports: +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/pages/market/market_cart_page/market_cart_page.dart'; import 'package:akuCommunity/pages/market_class/market_class_page.dart'; import 'package:akuCommunity/pages/message_center_page/message_center_page.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/cupertino.dart'; import 'package:akuCommunity/utils/headers.dart'; class AppBarAction extends StatefulWidget { diff --git a/lib/widget/bee_back_button.dart b/lib/widget/bee_back_button.dart index 4a0a4b12..b7adc7f5 100644 --- a/lib/widget/bee_back_button.dart +++ b/lib/widget/bee_back_button.dart @@ -1,5 +1,8 @@ +// Flutter imports: import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; + +// Package imports: import 'package:get/get.dart'; class BeeBackButton extends StatelessWidget { diff --git a/lib/widget/bee_divider.dart b/lib/widget/bee_divider.dart index db072e2c..d3511ca1 100644 --- a/lib/widget/bee_divider.dart +++ b/lib/widget/bee_divider.dart @@ -1,4 +1,7 @@ +// Flutter imports: import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_screenutil/flutter_screenutil.dart'; class BeeDivider extends StatelessWidget { diff --git a/lib/widget/bee_scaffold.dart b/lib/widget/bee_scaffold.dart index fe0f71af..df31eb0a 100644 --- a/lib/widget/bee_scaffold.dart +++ b/lib/widget/bee_scaffold.dart @@ -1,7 +1,12 @@ -import 'package:akuCommunity/widget/bee_back_button.dart'; +// Flutter imports: import 'package:flutter/material.dart'; -import 'package:velocity_x/velocity_x.dart'; + +// Package imports: import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:velocity_x/velocity_x.dart'; + +// Project imports: +import 'package:akuCommunity/widget/bee_back_button.dart'; class BeeScaffold extends StatefulWidget { final String title; diff --git a/lib/widget/bottom_button.dart b/lib/widget/bottom_button.dart index 775fe45f..7369548b 100644 --- a/lib/widget/bottom_button.dart +++ b/lib/widget/bottom_button.dart @@ -1,7 +1,10 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/utils/headers.dart'; ///TODO CLEAN BOTTOM CODES. /// diff --git a/lib/widget/buttons/bottom_button.dart b/lib/widget/buttons/bottom_button.dart index 82197994..8f8cf1a3 100644 --- a/lib/widget/buttons/bottom_button.dart +++ b/lib/widget/buttons/bottom_button.dart @@ -1,7 +1,12 @@ -import 'package:akuCommunity/base/base_style.dart'; +// Flutter imports: import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_screenutil/flutter_screenutil.dart'; +// Project imports: +import 'package:akuCommunity/base/base_style.dart'; + class BottomButton extends StatelessWidget { final VoidCallback onPressed; final Widget child; diff --git a/lib/widget/buttons/radio_button.dart b/lib/widget/buttons/radio_button.dart index 29ac8f7d..081eb9a6 100644 --- a/lib/widget/buttons/radio_button.dart +++ b/lib/widget/buttons/radio_button.dart @@ -1,7 +1,10 @@ +// Flutter imports: +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/animated/animated_scale.dart'; -import 'package:flutter/material.dart'; class BeeRadio extends StatefulWidget { final T value; diff --git a/lib/widget/cached_image_wrapper.dart b/lib/widget/cached_image_wrapper.dart index 57559ebe..9a582d24 100644 --- a/lib/widget/cached_image_wrapper.dart +++ b/lib/widget/cached_image_wrapper.dart @@ -1,7 +1,12 @@ +// Dart imports: import 'dart:math'; -import 'package:cached_network_image/cached_network_image.dart'; -import 'package:flutter/material.dart'; + +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:cached_network_image/cached_network_image.dart'; enum ImageType { normal, diff --git a/lib/widget/cart_count.dart b/lib/widget/cart_count.dart index c209b684..52afbe63 100644 --- a/lib/widget/cart_count.dart +++ b/lib/widget/cart_count.dart @@ -1,8 +1,13 @@ +// Flutter imports: import 'package:flutter/material.dart'; + +// Package imports: import 'package:provider/provider.dart'; + +// Project imports: +import 'package:akuCommunity/model/aku_shop_model.dart'; import 'package:akuCommunity/provider/cart.dart'; import 'package:akuCommunity/utils/headers.dart'; -import 'package:akuCommunity/model/aku_shop_model.dart'; class CartCount extends StatelessWidget { final AkuShopModel cartItem; diff --git a/lib/widget/circle_trend.dart b/lib/widget/circle_trend.dart index eabdadb4..3013a3ce 100644 --- a/lib/widget/circle_trend.dart +++ b/lib/widget/circle_trend.dart @@ -1,5 +1,8 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/cached_image_wrapper.dart'; diff --git a/lib/widget/common_image_picker.dart b/lib/widget/common_image_picker.dart index 51e36036..afb6b215 100644 --- a/lib/widget/common_image_picker.dart +++ b/lib/widget/common_image_picker.dart @@ -1,11 +1,18 @@ +// Dart imports: import 'dart:async'; -import 'package:flutter/material.dart'; + +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; import 'package:multi_image_picker/multi_image_picker.dart'; -import 'package:akuCommunity/utils/headers.dart'; -import 'package:akuCommunity/base/base_style.dart'; + +// Project imports: import 'package:akuCommunity/base/assets_image.dart'; +import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/utils/headers.dart'; class CommonImagePicker extends StatefulWidget { CommonImagePicker({Key key}) : super(key: key); diff --git a/lib/widget/common_input.dart b/lib/widget/common_input.dart index 4180bdac..8c712a7c 100644 --- a/lib/widget/common_input.dart +++ b/lib/widget/common_input.dart @@ -1,7 +1,10 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/utils/headers.dart'; class CommonInput extends StatefulWidget { final TextEditingController inputController; @@ -45,4 +48,4 @@ class _CommonInputState extends State { ), ); } -} \ No newline at end of file +} diff --git a/lib/widget/common_upload_image.dart b/lib/widget/common_upload_image.dart index 47813ce2..dc801db5 100644 --- a/lib/widget/common_upload_image.dart +++ b/lib/widget/common_upload_image.dart @@ -1,7 +1,10 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/utils/headers.dart'; class CommonUploadImage extends StatefulWidget { final String imagePath, title; diff --git a/lib/widget/community_card.dart b/lib/widget/community_card.dart index 40fea851..99dfff2f 100644 --- a/lib/widget/community_card.dart +++ b/lib/widget/community_card.dart @@ -1,8 +1,13 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:image_stack/image_stack.dart'; -import 'package:akuCommunity/utils/headers.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/cached_image_wrapper.dart'; class CommunityCard extends StatefulWidget { diff --git a/lib/widget/container_comment.dart b/lib/widget/container_comment.dart index 0038d6d8..fd4caea0 100644 --- a/lib/widget/container_comment.dart +++ b/lib/widget/container_comment.dart @@ -1,5 +1,8 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_screenutil/flutter_screenutil.dart'; class ContainerComment extends StatelessWidget { diff --git a/lib/widget/custom_action_sheet.dart b/lib/widget/custom_action_sheet.dart index b40bfe06..7816b145 100644 --- a/lib/widget/custom_action_sheet.dart +++ b/lib/widget/custom_action_sheet.dart @@ -1,3 +1,4 @@ +// Flutter imports: import 'package:flutter/material.dart'; // 弹出底部sheet diff --git a/lib/widget/dotted_line.dart b/lib/widget/dotted_line.dart index fa963456..c04ce3fd 100644 --- a/lib/widget/dotted_line.dart +++ b/lib/widget/dotted_line.dart @@ -1,3 +1,4 @@ +// Flutter imports: import 'package:flutter/material.dart'; /// 虚线 diff --git a/lib/widget/expandable_text.dart b/lib/widget/expandable_text.dart index 4ad89ceb..930e00b3 100644 --- a/lib/widget/expandable_text.dart +++ b/lib/widget/expandable_text.dart @@ -1,5 +1,7 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + //TODO Please remove those sh*t code. class ExpandableText extends StatefulWidget { final String text; diff --git a/lib/widget/gallery_photo_view_wrapper.dart b/lib/widget/gallery_photo_view_wrapper.dart index 3f655528..0eca9053 100644 --- a/lib/widget/gallery_photo_view_wrapper.dart +++ b/lib/widget/gallery_photo_view_wrapper.dart @@ -1,11 +1,17 @@ +// Flutter imports: import 'package:flutter/material.dart'; + +// Package imports: import 'package:get/get.dart'; +import 'package:permission_handler/permission_handler.dart'; import 'package:photo_view/photo_view.dart'; import 'package:photo_view/photo_view_gallery.dart'; -// import 'package:image_gallery_saver/image_gallery_saver.dart'; -import 'package:permission_handler/permission_handler.dart'; + +// Project imports: import 'cached_image_wrapper.dart'; +// import 'package:image_gallery_saver/image_gallery_saver.dart'; + class GalleryPhotoViewWrapper extends StatefulWidget { GalleryPhotoViewWrapper({ this.loadingBuilder, diff --git a/lib/widget/goods_card_skeleton.dart b/lib/widget/goods_card_skeleton.dart index 9fc0baab..7f2f40d4 100644 --- a/lib/widget/goods_card_skeleton.dart +++ b/lib/widget/goods_card_skeleton.dart @@ -1,5 +1,10 @@ +// Flutter imports: import 'package:flutter/material.dart'; + +// Package imports: import 'package:shimmer/shimmer.dart'; + +// Project imports: import 'package:akuCommunity/utils/headers.dart'; class GoodsCardSkeleton extends StatelessWidget { diff --git a/lib/widget/goods_specs_sheet.dart b/lib/widget/goods_specs_sheet.dart index adb74948..6bf8ab0e 100644 --- a/lib/widget/goods_specs_sheet.dart +++ b/lib/widget/goods_specs_sheet.dart @@ -1,13 +1,18 @@ -import 'package:akuCommunity/pages/confirm_order_page/confirm_order_page.dart'; -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; import 'package:get/get.dart'; import 'package:provider/provider.dart'; + +// Project imports: +import 'package:akuCommunity/pages/confirm_order_page/confirm_order_page.dart'; +import 'package:akuCommunity/provider/cart.dart'; +import 'package:akuCommunity/routers/page_routers.dart'; import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/utils/toast.dart'; -import 'package:akuCommunity/routers/page_routers.dart'; -import 'package:akuCommunity/provider/cart.dart'; import 'cached_image_wrapper.dart'; class GoodsSpecsSheet extends StatefulWidget { diff --git a/lib/widget/grid_buttons.dart b/lib/widget/grid_buttons.dart index d1c312dd..673c2992 100644 --- a/lib/widget/grid_buttons.dart +++ b/lib/widget/grid_buttons.dart @@ -1,4 +1,7 @@ +// Flutter imports: import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_screenutil/flutter_screenutil.dart'; class GridButtons extends StatefulWidget { diff --git a/lib/widget/picker/bee_date_picker.dart b/lib/widget/picker/bee_date_picker.dart index 9905c842..0f45facc 100644 --- a/lib/widget/picker/bee_date_picker.dart +++ b/lib/widget/picker/bee_date_picker.dart @@ -1,5 +1,8 @@ +// Flutter imports: import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; + +// Package imports: import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; diff --git a/lib/widget/picker/bee_image_picker.dart b/lib/widget/picker/bee_image_picker.dart index 9d7f0617..2b115a4e 100644 --- a/lib/widget/picker/bee_image_picker.dart +++ b/lib/widget/picker/bee_image_picker.dart @@ -1,10 +1,17 @@ +// Dart imports: import 'dart:io'; -import 'package:akuCommunity/utils/headers.dart'; + +// Flutter imports: import 'package:flutter/cupertino.dart'; + +// Package imports: import 'package:get/get.dart'; import 'package:image_picker/image_picker.dart'; import 'package:velocity_x/velocity_x.dart'; +// Project imports: +import 'package:akuCommunity/utils/headers.dart'; + class BeeImagePicker { static Future pick({ String title, diff --git a/lib/widget/picker/bee_image_preview.dart b/lib/widget/picker/bee_image_preview.dart index 6f9c67be..43a43499 100644 --- a/lib/widget/picker/bee_image_preview.dart +++ b/lib/widget/picker/bee_image_preview.dart @@ -1,11 +1,17 @@ +// Dart imports: import 'dart:io'; import 'dart:ui'; -import 'package:akuCommunity/const/resource.dart'; -import 'package:akuCommunity/constants/api.dart'; +// Flutter imports: import 'package:flutter/material.dart'; + +// Package imports: import 'package:get/get.dart'; +// Project imports: +import 'package:akuCommunity/const/resource.dart'; +import 'package:akuCommunity/constants/api.dart'; + class BeeImagePreview extends StatefulWidget { final File file; final String path; diff --git a/lib/widget/picker/grid_image_picker.dart b/lib/widget/picker/grid_image_picker.dart index 9bcbc420..6d481292 100644 --- a/lib/widget/picker/grid_image_picker.dart +++ b/lib/widget/picker/grid_image_picker.dart @@ -1,13 +1,20 @@ +// Dart imports: import 'dart:io'; -import 'package:akuCommunity/painters/plus_painter.dart'; -import 'package:akuCommunity/widget/picker/bee_image_picker.dart'; -import 'package:akuCommunity/widget/picker/bee_image_preview.dart'; + +// Flutter imports: import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; +// Project imports: +import 'package:akuCommunity/painters/plus_painter.dart'; +import 'package:akuCommunity/widget/picker/bee_image_picker.dart'; +import 'package:akuCommunity/widget/picker/bee_image_preview.dart'; + ///网格图片选择 /// ///返回`File`数组 diff --git a/lib/widget/round_check_box.dart b/lib/widget/round_check_box.dart index f75ed026..2157a2b7 100644 --- a/lib/widget/round_check_box.dart +++ b/lib/widget/round_check_box.dart @@ -1,4 +1,7 @@ +// Flutter imports: import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/utils/headers.dart'; //TODO one day we need to remove those.😕 diff --git a/lib/widget/search_bar_delegate.dart b/lib/widget/search_bar_delegate.dart index e36208ca..79252a26 100644 --- a/lib/widget/search_bar_delegate.dart +++ b/lib/widget/search_bar_delegate.dart @@ -1,4 +1,7 @@ +// Flutter imports: import 'package:flutter/material.dart'; + +// Project imports: import 'asset.dart'; import 'bee_scaffold.dart'; diff --git a/lib/widget/single_ad_space.dart b/lib/widget/single_ad_space.dart index e23723a7..a57ee666 100644 --- a/lib/widget/single_ad_space.dart +++ b/lib/widget/single_ad_space.dart @@ -1,5 +1,8 @@ -import 'package:flutter/material.dart'; +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_screenutil/flutter_screenutil.dart'; class SingleAdSpace extends StatelessWidget { diff --git a/lib/widget/single_image_up.dart b/lib/widget/single_image_up.dart index 4b1a0691..cec998cf 100644 --- a/lib/widget/single_image_up.dart +++ b/lib/widget/single_image_up.dart @@ -1,10 +1,17 @@ +// Dart imports: import 'dart:async'; -import 'package:flutter/material.dart'; + +// Flutter imports: import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_icons/flutter_icons.dart'; import 'package:multi_image_picker/multi_image_picker.dart'; -import 'package:akuCommunity/utils/headers.dart'; + +// Project imports: import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/utils/headers.dart'; class SingleImageUp extends StatefulWidget { final String title, imagePath; diff --git a/lib/widget/sliver_app_bar_delegate.dart b/lib/widget/sliver_app_bar_delegate.dart index af181912..1bae049d 100644 --- a/lib/widget/sliver_app_bar_delegate.dart +++ b/lib/widget/sliver_app_bar_delegate.dart @@ -1,4 +1,7 @@ +// Dart imports: import 'dart:math'; + +// Flutter imports: import 'package:flutter/material.dart'; class SliverAppBarDelegate extends SliverPersistentHeaderDelegate { diff --git a/lib/widget/sliver_goods_card.dart b/lib/widget/sliver_goods_card.dart index f62a2a7f..17008f0c 100644 --- a/lib/widget/sliver_goods_card.dart +++ b/lib/widget/sliver_goods_card.dart @@ -1,10 +1,15 @@ +// Dart imports: import 'dart:convert'; -import 'package:akuCommunity/pages/goods_details/goods_details_page.dart'; -import 'package:flutter/material.dart'; + +// Flutter imports: import 'package:flutter/cupertino.dart'; -import 'package:akuCommunity/utils/headers.dart'; -import 'package:akuCommunity/routers/page_routers.dart'; +import 'package:flutter/material.dart'; + +// Project imports: import 'package:akuCommunity/model/aku_shop_model.dart'; +import 'package:akuCommunity/pages/goods_details/goods_details_page.dart'; +import 'package:akuCommunity/routers/page_routers.dart'; +import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/cached_image_wrapper.dart'; class SliverGoodsCard extends StatelessWidget { diff --git a/lib/widget/tab_bar/bee_tab_bar.dart b/lib/widget/tab_bar/bee_tab_bar.dart index 9997b9d5..19c09a29 100644 --- a/lib/widget/tab_bar/bee_tab_bar.dart +++ b/lib/widget/tab_bar/bee_tab_bar.dart @@ -1,7 +1,12 @@ -import 'package:akuCommunity/base/base_style.dart'; +// Flutter imports: import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_screenutil/flutter_screenutil.dart'; +// Project imports: +import 'package:akuCommunity/base/base_style.dart'; + class BeeTabBar extends StatefulWidget with PreferredSizeWidget { final TabController controller; final List tabs; diff --git a/lib/widget/views/bee_grid_image_view.dart b/lib/widget/views/bee_grid_image_view.dart index 235ec9a1..f61e74e6 100644 --- a/lib/widget/views/bee_grid_image_view.dart +++ b/lib/widget/views/bee_grid_image_view.dart @@ -1,9 +1,14 @@ +// Flutter imports: +import 'package:flutter/material.dart'; + +// Package imports: +import 'package:get/get.dart'; + +// Project imports: import 'package:akuCommunity/const/resource.dart'; import 'package:akuCommunity/constants/api.dart'; import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/picker/bee_image_preview.dart'; -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; class BeeGridImageView extends StatelessWidget { final List urls; diff --git a/lib/widget/views/horizontal_image_view.dart b/lib/widget/views/horizontal_image_view.dart index bc78eaf6..d273143b 100644 --- a/lib/widget/views/horizontal_image_view.dart +++ b/lib/widget/views/horizontal_image_view.dart @@ -1,12 +1,17 @@ -import 'package:akuCommunity/constants/api.dart'; -import 'package:akuCommunity/utils/headers.dart'; -import 'package:akuCommunity/widget/picker/bee_image_preview.dart'; +// Flutter imports: import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; + +// Package imports: import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:akuCommunity/const/resource.dart'; import 'package:get/get.dart'; +// Project imports: +import 'package:akuCommunity/const/resource.dart'; +import 'package:akuCommunity/constants/api.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/picker/bee_image_preview.dart'; + class HorizontalImageView extends StatelessWidget { final List urls; HorizontalImageView( diff --git a/pubspec.lock b/pubspec.lock index 1f914f0b..5a36a8b5 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -56,7 +56,7 @@ packages: name: ansicolor url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.1" + version: "1.0.5" archive: dependency: transitive description: @@ -105,7 +105,7 @@ packages: name: cached_network_image url: "https://pub.flutter-io.cn" source: hosted - version: "2.5.0" + version: "2.3.1" characters: dependency: transitive description: @@ -126,14 +126,14 @@ packages: name: chewie url: "https://pub.flutter-io.cn" source: hosted - version: "0.12.2" + version: "0.9.10" chewie_audio: dependency: transitive description: name: chewie_audio url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.1" + version: "1.0.0+1" cli_util: dependency: transitive description: @@ -155,6 +155,13 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.15.0-nullsafety.3" + colorize: + dependency: transitive + description: + name: colorize + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.0" common_utils: dependency: "direct main" description: @@ -189,7 +196,7 @@ packages: name: crypto url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.5" + version: "2.1.4" css_colors: dependency: transitive description: @@ -308,7 +315,7 @@ packages: name: fluro url: "https://pub.flutter-io.cn" source: hosted - version: "1.7.8" + version: "1.6.3" flustars: dependency: "direct main" description: @@ -341,7 +348,7 @@ packages: name: flutter_cache_manager url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.1" + version: "1.4.1" flutter_datetime_picker: dependency: "direct main" description: @@ -369,7 +376,7 @@ packages: name: flutter_html url: "https://pub.flutter-io.cn" source: hosted - version: "1.2.0" + version: "1.0.2" flutter_icons: dependency: "direct main" description: @@ -377,13 +384,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.1.0" - flutter_layout_grid: - dependency: transitive - description: - name: flutter_layout_grid - url: "https://pub.flutter-io.cn" - source: hosted - version: "0.10.3" flutter_localizations: dependency: "direct main" description: flutter @@ -444,7 +444,7 @@ packages: name: flutter_svg url: "https://pub.flutter-io.cn" source: hosted - version: "0.19.1" + version: "0.18.1" flutter_swiper: dependency: "direct main" description: @@ -475,7 +475,7 @@ packages: name: font_awesome_flutter url: "https://pub.flutter-io.cn" source: hosted - version: "8.11.0" + version: "8.8.1" foundation_fluttify: dependency: transitive description: @@ -524,7 +524,7 @@ packages: name: html url: "https://pub.flutter-io.cn" source: hosted - version: "0.14.0+4" + version: "0.14.0+3" http: dependency: transitive description: @@ -552,7 +552,7 @@ packages: name: image url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.19" + version: "2.1.14" image_picker: dependency: "direct main" description: @@ -574,13 +574,13 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.1.0" - import_js_library: - dependency: transitive + import_sorter: + dependency: "direct dev" description: - name: import_js_library + name: import_sorter url: "https://pub.flutter-io.cn" source: hosted - version: "1.0.2" + version: "4.4.1" intl: dependency: transitive description: @@ -608,7 +608,7 @@ packages: name: json_annotation url: "https://pub.flutter-io.cn" source: hosted - version: "3.1.1" + version: "3.0.1" latlong: dependency: "direct main" description: @@ -664,20 +664,27 @@ packages: name: node_interop url: "https://pub.flutter-io.cn" source: hosted - version: "1.2.1" + version: "1.1.1" node_io: dependency: transitive description: name: node_io url: "https://pub.flutter-io.cn" source: hosted - version: "1.2.0" + version: "1.1.1" octo_image: dependency: transitive description: name: octo_image url: "https://pub.flutter-io.cn" source: hosted + version: "0.2.1" + open_iconic_flutter: + dependency: transitive + description: + name: open_iconic_flutter + url: "https://pub.flutter-io.cn" + source: hosted version: "0.3.0" package_config: dependency: transitive @@ -720,7 +727,7 @@ packages: name: path_provider url: "https://pub.flutter-io.cn" source: hosted - version: "1.6.27" + version: "1.6.18" path_provider_linux: dependency: transitive description: @@ -734,28 +741,28 @@ packages: name: path_provider_macos url: "https://pub.flutter-io.cn" source: hosted - version: "0.0.4+8" + version: "0.0.4+3" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface url: "https://pub.flutter-io.cn" source: hosted - version: "1.0.4" + version: "1.0.3" path_provider_windows: dependency: transitive description: name: path_provider_windows url: "https://pub.flutter-io.cn" source: hosted - version: "0.0.4+3" + version: "0.0.4+1" pedantic: dependency: transitive description: name: pedantic url: "https://pub.flutter-io.cn" source: hosted - version: "1.9.2" + version: "1.9.0" permission_handler: dependency: "direct main" description: @@ -776,14 +783,14 @@ packages: name: petitparser url: "https://pub.flutter-io.cn" source: hosted - version: "3.1.0" + version: "3.0.4" photo_view: dependency: "direct main" description: name: photo_view url: "https://pub.flutter-io.cn" source: hosted - version: "0.10.3" + version: "0.10.2" platform: dependency: transitive description: @@ -791,13 +798,20 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "2.2.1" + platform_detect: + dependency: transitive + description: + name: platform_detect + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.4.0" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface url: "https://pub.flutter-io.cn" source: hosted - version: "1.0.3" + version: "1.0.2" power_logger: dependency: "direct main" description: @@ -827,7 +841,7 @@ packages: name: provider url: "https://pub.flutter-io.cn" source: hosted - version: "4.3.3" + version: "4.3.2+1" pub_semver: dependency: transitive description: @@ -863,13 +877,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "3.2.0" - quiver: - dependency: transitive - description: - name: quiver - url: "https://pub.flutter-io.cn" - source: hosted - version: "2.1.5" random_character: dependency: "direct main" description: @@ -906,28 +913,35 @@ packages: name: rxdart url: "https://pub.flutter-io.cn" source: hosted - version: "0.25.0" + version: "0.24.1" + screen: + dependency: transitive + description: + name: screen + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.0.5" shared_preferences: dependency: transitive description: name: shared_preferences url: "https://pub.flutter-io.cn" source: hosted - version: "0.5.12+4" + version: "0.5.10" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux url: "https://pub.flutter-io.cn" source: hosted - version: "0.0.2+4" + version: "0.0.2+2" shared_preferences_macos: dependency: transitive description: name: shared_preferences_macos url: "https://pub.flutter-io.cn" source: hosted - version: "0.0.1+11" + version: "0.0.1+10" shared_preferences_platform_interface: dependency: transitive description: @@ -942,13 +956,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "0.1.2+7" - shared_preferences_windows: - dependency: transitive - description: - name: shared_preferences_windows - url: "https://pub.flutter-io.cn" - source: hosted - version: "0.0.2+2" shimmer: dependency: "direct main" description: @@ -995,14 +1002,14 @@ packages: name: sqflite url: "https://pub.flutter-io.cn" source: hosted - version: "1.3.2+2" + version: "1.3.1+1" sqflite_common: dependency: transitive description: name: sqflite_common url: "https://pub.flutter-io.cn" source: hosted - version: "1.0.3" + version: "1.0.2+1" stack_trace: dependency: transitive description: @@ -1086,28 +1093,28 @@ packages: name: url_launcher_linux url: "https://pub.flutter-io.cn" source: hosted - version: "0.0.1+4" + version: "0.0.1+1" url_launcher_macos: dependency: transitive description: name: url_launcher_macos url: "https://pub.flutter-io.cn" source: hosted - version: "0.0.1+9" + version: "0.0.1+7" url_launcher_platform_interface: dependency: transitive description: name: url_launcher_platform_interface url: "https://pub.flutter-io.cn" source: hosted - version: "1.0.9" + version: "1.0.8" url_launcher_web: dependency: transitive description: name: url_launcher_web url: "https://pub.flutter-io.cn" source: hosted - version: "0.1.5+1" + version: "0.1.3+1" uuid: dependency: transitive description: @@ -1142,42 +1149,28 @@ packages: name: video_player url: "https://pub.flutter-io.cn" source: hosted - version: "1.0.1" + version: "0.10.12+2" video_player_platform_interface: dependency: transitive description: name: video_player_platform_interface url: "https://pub.flutter-io.cn" source: hosted - version: "2.2.0" + version: "2.1.1" video_player_web: dependency: transitive description: name: video_player_web url: "https://pub.flutter-io.cn" source: hosted - version: "0.1.4+1" + version: "0.1.3+2" wakelock: dependency: transitive description: name: wakelock url: "https://pub.flutter-io.cn" source: hosted - version: "0.2.1+1" - wakelock_platform_interface: - dependency: transitive - description: - name: wakelock_platform_interface - url: "https://pub.flutter-io.cn" - source: hosted - version: "0.1.0+1" - wakelock_web: - dependency: transitive - description: - name: wakelock_web - url: "https://pub.flutter-io.cn" - source: hosted - version: "0.1.0+3" + version: "0.1.4+2" watcher: dependency: transitive description: @@ -1198,28 +1191,28 @@ packages: name: webview_flutter url: "https://pub.flutter-io.cn" source: hosted - version: "1.0.7" + version: "0.3.22+1" win32: dependency: transitive description: name: win32 url: "https://pub.flutter-io.cn" source: hosted - version: "1.7.4" + version: "1.7.3" xdg_directories: dependency: transitive description: name: xdg_directories url: "https://pub.flutter-io.cn" source: hosted - version: "0.1.2" + version: "0.1.0" xml: dependency: transitive description: name: xml url: "https://pub.flutter-io.cn" source: hosted - version: "4.5.1" + version: "4.2.0" yaml: dependency: transitive description: @@ -1228,5 +1221,5 @@ packages: source: hosted version: "2.2.1" sdks: - dart: ">=2.10.2 <2.11.0" - flutter: ">=1.22.2 <2.0.0" + dart: ">=2.10.0 <2.11.0" + flutter: ">=1.20.0 <2.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 0b4e37d5..06b1b3ac 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -108,6 +108,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter + import_sorter: ^4.4.1 # 路由管理 ff_annotation_route: 3.3.2 diff --git a/test/widget_test.dart b/test/widget_test.dart index 86c15e38..0919ffb1 100644 --- a/test/widget_test.dart +++ b/test/widget_test.dart @@ -5,9 +5,13 @@ // gestures. You can also use WidgetTester to find child widgets in the widget // tree, read text, and verify that the values of widget properties are correct. +// Flutter imports: import 'package:flutter/material.dart'; + +// Package imports: import 'package:flutter_test/flutter_test.dart'; +// Project imports: import 'package:akuCommunity/main.dart'; void main() {