图标更改,首页公告indicator更改

hmxc
张萌 4 years ago
parent 0e6ceadeed
commit 03657efe19

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

@ -41,6 +41,7 @@ class AllAnouncementState extends State<AllAnouncement> {
child: Row( child: Row(
children: [ children: [
Container( Container(
alignment: Alignment.center,
width: 104.w, width: 104.w,
height: 104.w, height: 104.w,
decoration: BoxDecoration( decoration: BoxDecoration(
@ -52,7 +53,7 @@ class AllAnouncementState extends State<AllAnouncement> {
Color(0xFF7EB4FF), Color(0xFF7EB4FF),
Color(0xFF3F8FFE), Color(0xFF3F8FFE),
])), ])),
child: Image.asset(R.ASSETS_MANAGE_IC_ANNOUNCE_PNG), child: Image.asset(R.ASSETS_MANAGE_IC_ANNOUNCE_PNG,width: 74.w,height: 60.w,),
), ),
SizedBox( SizedBox(
width: 24.w, width: 24.w,

@ -129,7 +129,7 @@ class _HomePageState extends State<HomePage> {
)); ));
} }
int _currentIndicator = 0; int _currentIndicator = 0;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final userProvider = Provider.of<UserProvider>(context); final userProvider = Provider.of<UserProvider>(context);
@ -395,48 +395,52 @@ class _HomePageState extends State<HomePage> {
// //
Container( Container(
color: Color(0xFFFFFFFF), color: Color(0xFFFFFFFF),
//
width: double.infinity, width: double.infinity,
height: 200.w, height: 172.w,
child: Column( child: Stack(children: [
children: [ CarouselSlider(
CarouselSlider( items: _anouncementProvider.anouncementCardModels
items: _anouncementProvider.anouncementCardModels .map((e) => AllAnouncementState.anounceCard(e))
.map((e) => AllAnouncementState.anounceCard(e)) .toList(),
.toList(), options: CarouselOptions(
options: CarouselOptions( viewportFraction: 1.0,
viewportFraction: 1.0, aspectRatio: 686 / 172,
aspectRatio: 686 / 172, autoPlay: true,
autoPlay: true, onPageChanged: (index, _) {
onPageChanged: (index, _) { setState(() {
setState(() { _currentIndicator = index;
_currentIndicator = index; });
}); },
}, ),
), ),
), Positioned(
Row( top: 144.w,
mainAxisAlignment: MainAxisAlignment.center, left: 0,
children: bottom: 16.w,
_anouncementProvider.anouncementCardModels.map((e) { right: 0,
int index = child: Row(
_anouncementProvider.anouncementCardModels.indexOf(e); mainAxisSize: MainAxisSize.max,
return Container( mainAxisAlignment: MainAxisAlignment.center,
width: 8.w, children:
height: 8.w, _anouncementProvider.anouncementCardModels.map((e) {
margin: EdgeInsets.symmetric( int index = _anouncementProvider.anouncementCardModels
vertical: 10.w, horizontal: 2.w), .indexOf(e);
decoration: BoxDecoration( return Container(
shape: BoxShape.circle, width: 12.w,
color: _currentIndicator == index height: 12.w,
? Color.fromRGBO(0, 0, 0, 0.9) margin: EdgeInsets.symmetric(
: Color.fromRGBO(0, 0, 0, 0.4), horizontal: 12.w),
), decoration: BoxDecoration(
); shape: BoxShape.circle,
}).toList(), color: _currentIndicator == index
), ? Color(0xFFFFC40C)
], : Color(0xFFE8E8E8),
), ),
);
}).toList(),
),
),
]),
), ),
SizedBox(height: 16.w), SizedBox(height: 16.w),
// //

@ -72,7 +72,7 @@ class InspectionManageCard {
Row( Row(
children: [ children: [
Image.asset( Image.asset(
R.ASSETS_HOME_IC_NEWS_PNG, R.ASSETS_INSPECTION_IC_XUNJIAN_PNG,
width: 40.w, width: 40.w,
height: 40.w, height: 40.w,
), ),

@ -1,3 +1,5 @@
import 'dart:math';
import 'package:aku_community_manager/mock_models/decoration/decoration_model.dart'; import 'package:aku_community_manager/mock_models/decoration/decoration_model.dart';
import 'package:aku_community_manager/mock_models/users/user_info_model.dart'; import 'package:aku_community_manager/mock_models/users/user_info_model.dart';
import 'package:aku_community_manager/provider/user_provider.dart'; import 'package:aku_community_manager/provider/user_provider.dart';
@ -122,7 +124,12 @@ class _DecorationManagerDetailStatePage
midBottom: widget.model.userHomeModel.detailAddr, midBottom: widget.model.userHomeModel.detailAddr,
name: '业主:' + widget.model.userHomeModel.userName, name: '业主:' + widget.model.userHomeModel.userName,
phone: widget.model.userHomeModel.phone, phone: widget.model.userHomeModel.phone,
rightTopWidget: Placeholder(), rightTopWidget: Transform.rotate(
angle: pi/4,
child: widget.model.statusType == DecorationStatusType.DONE
? Image.asset(R.ASSETS_MANAGE_IC_WANCHENG_PNG)
: Image.asset(R.ASSETS_MANAGE_IC_ZHUANGXIU_PNG),
),
), ),
AkuBox.h(16), AkuBox.h(16),
_buildInfoCard( _buildInfoCard(

@ -1,3 +1,5 @@
import 'dart:math';
import 'package:aku_community_manager/const/resource.dart'; import 'package:aku_community_manager/const/resource.dart';
import 'package:aku_community_manager/style/app_style.dart'; import 'package:aku_community_manager/style/app_style.dart';
import 'package:aku_community_manager/tools/widget_tool.dart'; import 'package:aku_community_manager/tools/widget_tool.dart';
@ -70,7 +72,7 @@ class _VisitorManagerCardState extends State<VisitorManagerCard> {
Row( Row(
children: [ children: [
Image.asset( Image.asset(
R.ASSETS_USER_IC_PERSON_PNG, R.ASSETS_OUTDOOR_IC_PEOPLE_PNG,
width: 40.w, width: 40.w,
height: 40.w, height: 40.w,
), ),
@ -81,7 +83,7 @@ class _VisitorManagerCardState extends State<VisitorManagerCard> {
), ),
AkuBox.w(137), AkuBox.w(137),
Image.asset( Image.asset(
R.ASSETS_HOME_IC_BORROW_PNG, R.ASSETS_MANAGE_IC_CAR_PNG,
width: 40.w, width: 40.w,
height: 40.w, height: 40.w,
), ),
@ -97,7 +99,7 @@ class _VisitorManagerCardState extends State<VisitorManagerCard> {
Row( Row(
children: [ children: [
Image.asset( Image.asset(
R.ASSETS_HOME_IC_ARTICLE_PNG, R.ASSETS_MANAGE_IC_TIME_PNG,
width: 40.w, width: 40.w,
height: 40.w, height: 40.w,
), ),
@ -109,7 +111,13 @@ class _VisitorManagerCardState extends State<VisitorManagerCard> {
], ],
), ),
Positioned( Positioned(
left: 582.w, bottom: 104.w, child: _statusImage(_status)), left: 552.w-24.w,
bottom: 75.w-28.w,
child: Transform.rotate(
angle: pi / 4,
child: Image.asset(_statusImage(_status),width: 140.w,height: 140.w,),
),
),
], ],
), ),
), ),
@ -117,16 +125,16 @@ class _VisitorManagerCardState extends State<VisitorManagerCard> {
); );
} }
Widget _statusImage(VisitorStatus status) { String _statusImage(VisitorStatus status) {
switch (status) { switch (status) {
case VisitorStatus.NOT_VISIT: case VisitorStatus.NOT_VISIT:
return Placeholder(); return R.ASSETS_MANAGE_IC_WEIDAO_PNG;
case VisitorStatus.VISIT_DONE: case VisitorStatus.VISIT_DONE:
return Placeholder(); return R.ASSETS_MANAGE_IC_DAOFANG_PNG;
case VisitorStatus.OUTDATE: case VisitorStatus.OUTDATE:
return Placeholder(); return R.ASSETS_MANAGE_IC_GUOQI_PNG;
default: default:
return Placeholder(); return '';
} }
} }
} }

Loading…
Cancel
Save