diff --git a/lib/mock_models/manage_models/manage_model.dart b/lib/mock_models/manage_models/manage_model.dart index 2629f41..517c7d2 100644 --- a/lib/mock_models/manage_models/manage_model.dart +++ b/lib/mock_models/manage_models/manage_model.dart @@ -1,6 +1,3 @@ -import 'package:flutter/material.dart'; -import 'package:aku_community_manager/const/resource.dart'; - class GreenManageCardModel { String title; String task; diff --git a/lib/ui/home/application/applications_page.dart b/lib/ui/home/application/applications_page.dart index 4707c36..1fc94c8 100644 --- a/lib/ui/home/application/applications_page.dart +++ b/lib/ui/home/application/applications_page.dart @@ -178,7 +178,6 @@ class _ApplicationPageState extends State ///应用组 _buildBottomApps() { - final appProvider = Provider.of(context); return Expanded( child: Row( children: [ diff --git a/lib/ui/manage_pages/inspection_manage/inspection_manage_page.dart b/lib/ui/manage_pages/inspection_manage/inspection_manage_page.dart index 592db42..8e65b2a 100644 --- a/lib/ui/manage_pages/inspection_manage/inspection_manage_page.dart +++ b/lib/ui/manage_pages/inspection_manage/inspection_manage_page.dart @@ -1,14 +1,10 @@ -import 'package:aku_community_manager/mock_models/manage_models/manage_model.dart'; import 'package:aku_community_manager/provider/manage_provider.dart'; import 'package:aku_community_manager/style/app_style.dart'; -import 'package:aku_community_manager/tools/widget_tool.dart'; import 'package:aku_community_manager/ui/manage_pages/inspection_manage/inspection_manage_card.dart'; import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart'; -import 'package:aku_ui/common_widgets/aku_common_widgets.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:provider/provider.dart'; -import 'package:aku_community_manager/const/resource.dart'; class InspectionManagePage extends StatefulWidget { InspectionManagePage({Key key}) : super(key: key); diff --git a/lib/ui/settings/user_info_page.dart b/lib/ui/settings/user_info_page.dart index 9df3337..289f482 100644 --- a/lib/ui/settings/user_info_page.dart +++ b/lib/ui/settings/user_info_page.dart @@ -4,7 +4,6 @@ import 'package:aku_community_manager/ui/widgets/common/aku_tile.dart'; import 'package:aku_community_manager/ui/widgets/inner/pick_image.dart'; import 'package:flutter/material.dart'; import 'package:aku_community_manager/tools/screen_tool.dart'; -import 'package:get/get.dart'; import 'package:provider/provider.dart'; class UserInfoPage extends StatefulWidget { diff --git a/lib/ui/sub_pages/decoration_manager/decoration_department_page.dart b/lib/ui/sub_pages/decoration_manager/decoration_department_page.dart index c981799..388ea4f 100644 --- a/lib/ui/sub_pages/decoration_manager/decoration_department_page.dart +++ b/lib/ui/sub_pages/decoration_manager/decoration_department_page.dart @@ -1,6 +1,5 @@ import 'package:aku_community_manager/const/resource.dart'; import 'package:aku_community_manager/mock_models/decoration/decoration_model.dart'; -import 'package:aku_community_manager/mock_models/fix/fix_model.dart'; import 'package:aku_community_manager/mock_models/fix/fixer_model.dart'; import 'package:aku_community_manager/provider/fix_provider.dart'; import 'package:aku_community_manager/style/app_style.dart'; diff --git a/lib/ui/sub_pages/visitor_manager/visitor_manager_card.dart b/lib/ui/sub_pages/visitor_manager/visitor_manager_card.dart index d716d22..702427a 100644 --- a/lib/ui/sub_pages/visitor_manager/visitor_manager_card.dart +++ b/lib/ui/sub_pages/visitor_manager/visitor_manager_card.dart @@ -4,35 +4,46 @@ import 'package:aku_community_manager/tools/widget_tool.dart'; import 'package:aku_community_manager/ui/sub_pages/visitor_manager/visitor_manager_page.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; + class VisitorManagerCard extends StatefulWidget { final String adress; final String name; final String plate; final String time; final VisitorStatus status; - VisitorManagerCard({Key key, @required this.adress,@required this.name, this.plate, this.time,@required this.status}) : super(key: key); + VisitorManagerCard( + {Key key, + @required this.adress, + @required this.name, + this.plate, + this.time, + @required this.status}) + : super(key: key); @override _VisitorManagerCardState createState() => _VisitorManagerCardState(); } class _VisitorManagerCardState extends State { - -TextStyle _textStyle=TextStyle(color:AppStyle.primaryTextColor,fontSize:28.sp,); -String _adress; -String _name; -String _plate; -String _time; -VisitorStatus _status; + TextStyle _textStyle = TextStyle( + color: AppStyle.primaryTextColor, + fontSize: 28.sp, + ); + String _adress; + String _name; + String _plate; + String _time; + VisitorStatus _status; @override - void initState() { + void initState() { super.initState(); - _adress=widget.adress; - _name=widget.name; - _plate=widget.plate??'无信息'; - _time=widget.time??'无信息'; - _status=widget.status; + _adress = widget.adress; + _name = widget.name; + _plate = widget.plate ?? '无信息'; + _time = widget.time ?? '无信息'; + _status = widget.status; } + @override Widget build(BuildContext context) { return Column( @@ -42,49 +53,80 @@ VisitorStatus _status; color: Color(0xFFFFFFFF), width: double.infinity, height: 201.w, - padding: EdgeInsets.only(top:24.w,left:24.w,bottom: 28.w), - child: Stack(children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children:[ - Text(_adress,style: TextStyle(color:AppStyle.primaryTextColor,fontSize:32.sp,fontWeight: FontWeight.bold),), - AkuBox.h(16), - Row(children: [ - Image.asset(R.ASSETS_USER_IC_PERSON_PNG,width:40.w ,height: 40.w,), - AkuBox.w(8), - Text('$_name先生',style:_textStyle,), - AkuBox.w(137), - Image.asset(R.ASSETS_HOME_IC_BORROW_PNG,width: 40.w,height: 40.w,), - AkuBox.w(8), - Text(_plate,style: _textStyle,), + padding: EdgeInsets.only(top: 24.w, left: 24.w, bottom: 28.w), + child: Stack( + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _adress, + style: TextStyle( + color: AppStyle.primaryTextColor, + fontSize: 32.sp, + fontWeight: FontWeight.bold), + ), + AkuBox.h(16), + Row( + children: [ + Image.asset( + R.ASSETS_USER_IC_PERSON_PNG, + width: 40.w, + height: 40.w, + ), + AkuBox.w(8), + Text( + '$_name先生', + style: _textStyle, + ), + AkuBox.w(137), + Image.asset( + R.ASSETS_HOME_IC_BORROW_PNG, + width: 40.w, + height: 40.w, + ), + AkuBox.w(8), + Text( + _plate, + style: _textStyle, + ), + Spacer(), + ], + ), Spacer(), - ],), - Spacer(), - Row(children: [ - Image.asset(R.ASSETS_HOME_IC_ARTICLE_PNG,width: 40.w,height: 40.w,), - AkuBox.w(8), - Text(_time,style:_textStyle), - Spacer(), - ],), - ], - ), - Positioned( - left: 582.w, - bottom: 104.w, - child:_statusImage(_status) ), - ],), + Row( + children: [ + Image.asset( + R.ASSETS_HOME_IC_ARTICLE_PNG, + width: 40.w, + height: 40.w, + ), + AkuBox.w(8), + Text(_time, style: _textStyle), + Spacer(), + ], + ), + ], + ), + Positioned( + left: 582.w, bottom: 104.w, child: _statusImage(_status)), + ], + ), ), ], ); } - Widget _statusImage(VisitorStatus status){ + + Widget _statusImage(VisitorStatus status) { switch (status) { case VisitorStatus.NOT_VISIT: - return Placeholder(); - case VisitorStatus.VISIT_DONE: - return Placeholder(); - case VisitorStatus.OUTDATE: - return Placeholder(); + return Placeholder(); + case VisitorStatus.VISIT_DONE: + return Placeholder(); + case VisitorStatus.OUTDATE: + return Placeholder(); + default: + return Placeholder(); } } -} \ No newline at end of file +} diff --git a/lib/ui/widgets/common/aku_tile.dart b/lib/ui/widgets/common/aku_tile.dart index 4570dc1..2eed6be 100644 --- a/lib/ui/widgets/common/aku_tile.dart +++ b/lib/ui/widgets/common/aku_tile.dart @@ -1,4 +1,3 @@ -import 'package:aku_ui/common_widgets/aku_material_button.dart'; import 'package:flutter/material.dart'; import 'package:aku_community_manager/tools/screen_tool.dart';