diff --git a/lib/mock_models/outdoor_models/outdoor_model.dart b/lib/mock_models/outdoor_models/outdoor_model.dart index 052e500..1e73cfd 100644 --- a/lib/mock_models/outdoor_models/outdoor_model.dart +++ b/lib/mock_models/outdoor_models/outdoor_model.dart @@ -19,8 +19,8 @@ class ItemsOutdoorModel { ///出户状态 OUTDOORSTATUS status; -///卡片上方时间,即开始时间 -DateTime datetime; + ///卡片上方时间,即开始时间 + DateTime datetime; ///小区名字 String communityname; @@ -37,23 +37,36 @@ DateTime datetime; ///物品 ItemDetails items; - ///出户时间 + ///预计出户时间 String outtime; - ItemsOutdoorModel( - {@required this.status, - @required this.datetime, - @required this.communityname, - @required this.adress, - @required this.name, - @required this.identify, - @required this.items, - @required this.outtime}); + + ///实际出户/驳回时间 + String finalOutTime; + + ///出户地点 + String outPlace; + + ///驳回理由 + String rejectReason; + ItemsOutdoorModel({ + @required this.status, + @required this.datetime, + @required this.communityname, + @required this.adress, + @required this.name, + @required this.identify, + @required this.items, + @required this.outtime, + this.finalOutTime, + this.outPlace, + this.rejectReason, + }); static List initList() { return [ ItemsOutdoorModel( status: OUTDOORSTATUS.NOT_OUT, - datetime: DateTime(2020,10,23,09,28,56), + datetime: DateTime(2020, 10, 23, 09, 28, 56), communityname: '深圳华悦茂峰', adress: '1幢1单元702室', name: '马云', @@ -69,10 +82,13 @@ DateTime datetime; ], ), outtime: '2020-10-24 12:00', + finalOutTime: '', + outPlace: '', + rejectReason: '', ), ItemsOutdoorModel( status: OUTDOORSTATUS.OUT_DONE, - datetime: DateTime(2020,10,23,09,28,56), + datetime: DateTime(2020, 10, 23, 09, 28, 56), communityname: '深圳华悦茂峰', adress: '1幢1单元702室', name: '马云', @@ -88,10 +104,13 @@ DateTime datetime; ], ), outtime: '2020-10-24 12:00', + finalOutTime: '2020-10-23 11:23:56', + outPlace: '东大门', + rejectReason: '' ), ItemsOutdoorModel( status: OUTDOORSTATUS.REJECTED, - datetime: DateTime(2020,10,23,09,28,56), + datetime: DateTime(2020, 10, 23, 09, 28, 56), communityname: '深圳华悦茂峰', adress: '1幢1单元702室', name: '马云', @@ -107,10 +126,13 @@ DateTime datetime; ], ), outtime: '2020-10-24 12:00', + finalOutTime: '2020-10-24 12:22:34', + outPlace: '', + rejectReason: '申报物品与实际物品不符', ), ItemsOutdoorModel( status: OUTDOORSTATUS.CANCELLATION, - datetime: DateTime(2020,10,23,09,28,56), + datetime: DateTime(2020, 10, 23, 09, 28, 56), communityname: '深圳华悦茂峰', adress: '1幢1单元702室', name: '马云', @@ -126,6 +148,9 @@ DateTime datetime; ], ), outtime: '2020-10-24 12:00', + finalOutTime: '', + outPlace: '', + rejectReason: '', ), ]; } @@ -154,4 +179,4 @@ class ItemDetails { @required this.weight, this.way, this.imagepath}); -} \ No newline at end of file +} diff --git a/lib/provider/outdoor_provider.dart b/lib/provider/outdoor_provider.dart index 2c6b89b..119105c 100644 --- a/lib/provider/outdoor_provider.dart +++ b/lib/provider/outdoor_provider.dart @@ -1,20 +1,29 @@ import 'package:aku_community_manager/mock_models/outdoor_models/outdoor_model.dart'; import 'package:flutter/material.dart'; -class OutdoorProvider extends ChangeNotifier{ - List _itemOutdoorModel=ItemsOutdoorModel.initList(); +class OutdoorProvider extends ChangeNotifier { + List _itemOutdoorModel = ItemsOutdoorModel.initList(); List get itemOutdoorModels => _itemOutdoorModel; - addOutdoormodel(ItemsOutdoorModel model){ + addOutdoormodel(ItemsOutdoorModel model) { _itemOutdoorModel.insert(0, model); - notifyListeners(); + notifyListeners(); + } + + List getOutdoorModels(int index) { + return [ + _itemOutdoorModel + .where((element) => element.status == OUTDOORSTATUS.NOT_OUT) + .toList(), + _itemOutdoorModel + .where((element) => element.status == OUTDOORSTATUS.OUT_DONE) + .toList(), + _itemOutdoorModel + .where((element) => element.status == OUTDOORSTATUS.REJECTED) + .toList(), + _itemOutdoorModel + .where((element) => element.status == OUTDOORSTATUS.CANCELLATION) + .toList(), + _itemOutdoorModel, + ][index]; } -List getOutdoorModels(int index){ - return [ - _itemOutdoorModel.where((element) => element.status==OUTDOORSTATUS.NOT_OUT).toList(), - _itemOutdoorModel.where((element) => element.status==OUTDOORSTATUS.OUT_DONE).toList(), - _itemOutdoorModel.where((element) => element.status==OUTDOORSTATUS.REJECTED).toList(), - _itemOutdoorModel.where((element) => element.status==OUTDOORSTATUS.CANCELLATION).toList(), - _itemOutdoorModel, - ][index]; -} } \ No newline at end of file diff --git a/lib/ui/home/messages/comment_message.dart b/lib/ui/home/messages/comment_message.dart index 512280c..ef31174 100644 --- a/lib/ui/home/messages/comment_message.dart +++ b/lib/ui/home/messages/comment_message.dart @@ -16,9 +16,9 @@ class _CommentMessageState extends State { return Column( children: [ Container( + margin: EdgeInsets.only(top:24.w,bottom:24.w), alignment: Alignment.center, width: double.infinity, - height: 48.w + 33.w, child: Text( date, style: TextStyle(color: AppStyle.minorTextColor, fontSize: 24.sp), @@ -135,7 +135,7 @@ class _CommentMessageState extends State { return AkuScaffold( title: '评论消息', body: ListView( - padding: EdgeInsets.all(32.w), + padding: EdgeInsets.only(left:32.w,right: 32.w,bottom: 40.w), children: [ _messageList('2020-10-23 10:00', '杨建', '四星'), _messageList('2020-10-24 11:00', '刘能', '四星'), diff --git a/lib/ui/home/messages/system_message.dart b/lib/ui/home/messages/system_message.dart index 5fede7a..8eac30e 100644 --- a/lib/ui/home/messages/system_message.dart +++ b/lib/ui/home/messages/system_message.dart @@ -1,4 +1,5 @@ import 'package:aku_community_manager/style/app_style.dart'; +import 'package:aku_community_manager/tools/widget_tool.dart'; import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart'; import 'package:aku_ui/aku_ui.dart'; import 'package:flutter/material.dart'; @@ -17,9 +18,9 @@ class _SystemMessageState extends State { return Column( children: [ Container( - alignment: Alignment.topCenter, + margin: EdgeInsets.only(top:24.w,bottom: 24.w), + alignment: Alignment.center, width: double.infinity, - height: 24.w + 33.w, child: Text( date, style: TextStyle(color: AppStyle.minorTextColor, fontSize: 24.sp), @@ -148,6 +149,7 @@ class _SystemMessageState extends State { ], ), ), + AkuBox.h(16), ], ); } @@ -157,7 +159,7 @@ class _SystemMessageState extends State { return AkuScaffold( title: '系统消息', body: ListView( - padding: EdgeInsets.only(top:24.w,left:32.w,right:32.w), + padding: EdgeInsets.only(left:32.w,right:32.w,bottom: 40.w), children: [ _messageList('2020-10-23 10:00', '杨建', '17867665666', '共区'), _messageList('2020-10-22 10:00', '刘能', '17855823545', '共区'), diff --git a/lib/ui/sub_pages/items_outdoor/items_outdoor_details_page.dart b/lib/ui/sub_pages/items_outdoor/items_outdoor_details_page.dart index a233a0f..0d76b9e 100644 --- a/lib/ui/sub_pages/items_outdoor/items_outdoor_details_page.dart +++ b/lib/ui/sub_pages/items_outdoor/items_outdoor_details_page.dart @@ -1,11 +1,20 @@ import 'package:aku_community_manager/mock_models/outdoor_models/outdoor_model.dart'; +import 'package:aku_community_manager/mock_models/users/user_info_model.dart'; +import 'package:aku_community_manager/provider/outdoor_provider.dart'; +import 'package:aku_community_manager/provider/user_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/sub_pages/items_outdoor/items_outdoor_card.dart'; +import 'package:aku_community_manager/ui/sub_pages/items_outdoor/outdoor_notpass_page.dart'; +import 'package:aku_community_manager/ui/sub_pages/items_outdoor/outdoor_pass_page.dart'; import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart'; +import 'package:aku_ui/aku_ui.dart'; +import 'package:aku_ui/common_widgets/aku_material_button.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:aku_community_manager/const/resource.dart'; +import 'package:get/get.dart'; +import 'package:provider/provider.dart'; class ItemsOutdoorDetailsPage extends StatefulWidget { final ItemsOutdoorModel cardMedel; @@ -20,6 +29,9 @@ class ItemsOutdoorDetailsPage extends StatefulWidget { class _ItemsOutdoorDetailsPageState extends State { @override Widget build(BuildContext context) { + UserProvider _userprovider = + Provider.of(context, listen: false); + USER_ROLE userRole = _userprovider.userInfoModel.role; return AkuScaffold( title: '出户详情', body: ListView( @@ -31,7 +43,8 @@ class _ItemsOutdoorDetailsPageState extends State { Container( color: Color(0xFFFFFFFF), margin: EdgeInsets.only(top: 16.w), - padding: EdgeInsets.only(top: 24.w, left: 32.w, right: 32.w), + padding: EdgeInsets.only( + top: 24.w, left: 32.w, right: 32.w, bottom: 40.w), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -137,6 +150,183 @@ class _ItemsOutdoorDetailsPageState extends State { ), ], ), + bottom:_bottomCard(userRole) , ); } + + Widget _bottomCard(USER_ROLE userRole) { + switch (widget.cardMedel.status) { + case OUTDOORSTATUS.NOT_OUT: + return userRole == USER_ROLE.SECURITY + ? Container( + height: 98.w, + decoration: BoxDecoration( + boxShadow: [ + BoxShadow( + color: Color(0xFFF9F9F9), + offset: Offset(0, -10.w), + blurRadius: 10.w, + spreadRadius: 0, + ), + ], + ), + margin: EdgeInsets.only(top: 22.w), + padding: EdgeInsets.only( + top: 13.w, bottom: 13.w, left: 32.w, right: 32.w), + child: Row( + children: [ + AkuButton( + onPressed: () { + Get.to(OutdoorNotpassPage(model: widget.cardMedel,)); + }, + child: Container( + width: 304.w, + height: 72.w, + alignment: Alignment.center, + decoration: BoxDecoration( + border: + Border.all(color: Color(0xFFFFC40C), width: 2.w), + borderRadius: BorderRadius.circular(4.w), + ), + child: Text( + '不放行', + style: AppStyle().primaryStyle, + ), + ), + ), + Spacer(), + AkuMaterialButton( + onPressed: () { + Get.to(OutdoorPassPage( model: widget.cardMedel,)); + }, + radius: 4.w, + color: Color(0xFFFFC40C), + child: Text( + '放行', + style: AppStyle().primaryStyle, + ), + minWidth: 304.w, + height: 72.w, + ), + ], + ), + ) + : SizedBox(); + break; + case OUTDOORSTATUS.OUT_DONE: + return Container( + height: 226.w, + color: Color(0xFFFFFFFF), + margin: EdgeInsets.only(top: 16.w), + padding: + EdgeInsets.only(top: 24.w, left: 32.w, right: 32.w, bottom: 40.w), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text('放行信息', style: AppStyle().barTitleStyle), + Spacer(), + Row( + children: [ + Image.asset( + R.ASSETS_OUTDOOR_IC_TIME_PNG, + width: 40.w, + height: 40.w, + ), + AkuBox.w(4), + Text( + '出门时间', + style: AppStyle().secondaryTextStyle, + ), + Spacer(), + Text( + widget.cardMedel.finalOutTime, + style: AppStyle().primaryStyle, + ), + ], + ), + Spacer(), + Row( + children: [ + Image.asset( + R.ASSETS_OUTDOOR_IC_CHUHU_PNG, + width: 40.w, + height: 40.w, + ), + AkuBox.w(4), + Text( + '物品出门', + style: AppStyle().secondaryTextStyle, + ), + Spacer(), + Text( + widget.cardMedel.outPlace, + style: AppStyle().primaryStyle, + ), + ], + ), + ], + ), + ); + break; + case OUTDOORSTATUS.REJECTED: + + return Container( + height: 226.w, + color: Color(0xFFFFFFFF), + margin: EdgeInsets.only(top: 16.w), + padding: + EdgeInsets.only(top: 24.w, left: 32.w, right: 32.w, bottom: 40.w), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text('放行信息', style: AppStyle().barTitleStyle), + Spacer(), + Row( + children: [ + Image.asset( + R.ASSETS_OUTDOOR_IC_TIME_PNG, + width: 40.w, + height: 40.w, + ), + AkuBox.w(4), + Text( + '驳回时间', + style: AppStyle().secondaryTextStyle, + ), + Spacer(), + Text( + widget.cardMedel.finalOutTime, + style: AppStyle().primaryStyle, + ), + ], + ), + Spacer(), + Row( + children: [ + Image.asset( + R.ASSETS_OUTDOOR_IC_CHUHU_PNG, + width: 40.w, + height: 40.w, + ), + AkuBox.w(4), + Text( + '驳回理由', + style: AppStyle().secondaryTextStyle, + ), + Spacer(), + Text(widget.cardMedel.rejectReason, + style: TextStyle( + color: Color(0xFFFF4501), + fontSize: 28.sp, + fontWeight: FontWeight.bold)), + ], + ), + ], + ), + ); + break; + default: + return SizedBox(); + } + } } diff --git a/lib/ui/sub_pages/items_outdoor/outdoor_notpass_page.dart b/lib/ui/sub_pages/items_outdoor/outdoor_notpass_page.dart new file mode 100644 index 0000000..0a02d89 --- /dev/null +++ b/lib/ui/sub_pages/items_outdoor/outdoor_notpass_page.dart @@ -0,0 +1,209 @@ +import 'package:aku_community_manager/mock_models/outdoor_models/outdoor_model.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/widgets/common/aku_radio.dart'; +import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart'; +import 'package:aku_ui/common_widgets/aku_common_widgets.dart'; +import 'package:bot_toast/bot_toast.dart'; +import 'package:common_utils/common_utils.dart'; +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; + +class OutdoorNotpassPage extends StatefulWidget { + final ItemsOutdoorModel model; + OutdoorNotpassPage({Key key, @required this.model}) : super(key: key); + + @override + _OutdoorNotpassPageState createState() => _OutdoorNotpassPageState(); +} + +class _OutdoorNotpassPageState extends State { + String _currentTime = DateUtil.formatDate(DateTime.now()); + List _rejectReason = ['业主不同意', '申报物品与实际不符', '该房子处于法院查封状态', '其他']; + int _select = 0; + TextEditingController _textEditingController; + @override + void initState() { + super.initState(); + _textEditingController = TextEditingController(); + } + + @override + void dispose() { + _textEditingController?.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return AkuScaffold( + title: '不放行', + body: Column( + children: [ + AkuBox.h(16), + Container( + padding: EdgeInsets.only( + left: 32.w, + ), + color: Color(0xFFFFFFFF), + alignment: Alignment.center, + width: double.infinity, + height: 96.w, + child: Row( + children: [ + Text( + '当前时间', + style: AppStyle().secondaryTextStyle, + ), + AkuBox.w(80), + Text( + _currentTime, + style: AppStyle().primaryStyle, + ), + Spacer(), + ], + ), + ), + Divider( + height: 1.w, + ), + Container( + padding: EdgeInsets.only(top: 28.w, left: 32.w), + color: Color(0xFFFFFFFF), + height: 328.w, + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + '不放行理由', + style: AppStyle().secondaryTextStyle, + ), + AkuBox.w(52), + Expanded( + child: Column( + children: [ + Row( + children: [ + AkuRadio( + size: 32.w, + value: 0, + grouvalue: _select, + onchanged: (newvalue) { + setState(() { + _select = newvalue; + }); + }, + ), + AkuBox.w(16), + Text( + _rejectReason[0], + style: AppStyle().primaryStyle, + ), + ], + ), + Spacer(), + Row( + children: [ + AkuRadio( + size: 32.w, + value: 1, + grouvalue: _select, + onchanged: (newvalue) { + setState(() { + _select = newvalue; + }); + }, + ), + AkuBox.w(16), + Text( + _rejectReason[1], + style: AppStyle().primaryStyle, + ), + ], + ), + Spacer(), + Row( + children: [ + AkuRadio( + size: 32.w, + value: 2, + grouvalue: _select, + onchanged: (newvalue) { + setState(() { + _select = newvalue; + }); + }, + ), + AkuBox.w(16), + Text( + _rejectReason[2], + style: AppStyle().primaryStyle, + ), + ], + ), + Spacer(), + Row( + children: [ + AkuRadio( + size: 32.w, + value: 3, + grouvalue: _select, + onchanged: (newvalue) { + setState(() { + _select = newvalue; + }); + }, + ), + AkuBox.w(16), + Text( + _rejectReason[3], + style: AppStyle().primaryStyle, + ), + ], + ), + Container( + height: 96.w, + child: TextFormField( + controller: _textEditingController, + style: TextStyle( + color: AppStyle.primaryTextColor, fontSize: 32.w), + decoration: InputDecoration( + border: InputBorder.none, + hintText: '请输入其他理由', + hintStyle: AppStyle().secondaryTextStyle), + )), + ], + )), + ], + ), + ), + ], + ), + bottom: AkuButton( + onPressed: () { + widget.model.finalOutTime = _currentTime; + widget.model.datetime = DateTime.now(); + _select == 3 + ? widget.model.rejectReason = _textEditingController.text + : widget.model.rejectReason = _rejectReason[_select]; + widget.model.status = OUTDOORSTATUS.REJECTED; + Get.back(); + Get.back(); + }, + child: Container( + color: Color(0xFFFFC40C), + height: 98.w, + alignment: Alignment.center, + child: Text( + '确认不放行', + style: TextStyle( + color: AppStyle.primaryTextColor, + fontSize: 32.sp, + fontWeight: FontWeight.bold), + ), + ), + ), + ); + } +} diff --git a/lib/ui/sub_pages/items_outdoor/outdoor_pass_page.dart b/lib/ui/sub_pages/items_outdoor/outdoor_pass_page.dart new file mode 100644 index 0000000..c1df76e --- /dev/null +++ b/lib/ui/sub_pages/items_outdoor/outdoor_pass_page.dart @@ -0,0 +1,137 @@ +import 'package:aku_community_manager/mock_models/outdoor_models/outdoor_model.dart'; +import 'package:aku_community_manager/provider/outdoor_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/sub_pages/items_outdoor/items_outdoor_details_page.dart'; +import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart'; +import 'package:aku_ui/common_widgets/aku_common_widgets.dart'; +import 'package:bot_toast/bot_toast.dart'; +import 'package:common_utils/common_utils.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; +import 'package:provider/provider.dart'; + +class OutdoorPassPage extends StatefulWidget { + final ItemsOutdoorModel model; + OutdoorPassPage({Key key,@required this.model}) : super(key: key); + + @override + _OutdoorPassPageState createState() => _OutdoorPassPageState(); +} + +class _OutdoorPassPageState extends State { + TextEditingController _textController; + @override + void initState() { + super.initState(); + _textController = TextEditingController(); + } + + @override + void dispose() { + _textController?.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + OutdoorProvider _outdoorModels = Provider.of(context); + String _currentTime = DateUtil.formatDate(DateTime.now()); + + return AkuScaffold( + title: '放行', + body: Column( + children: [ + AkuBox.h(16), + Container( + padding: EdgeInsets.only( + left: 32.w, + ), + color: Color(0xFFFFFFFF), + alignment: Alignment.center, + width: double.infinity, + height: 96.w, + child: Row( + children: [ + Text( + '当前时间', + style: AppStyle().secondaryTextStyle, + ), + AkuBox.w(80), + Text( + _currentTime, + style: AppStyle().primaryStyle, + ), + Spacer(), + ], + ), + ), + Divider( + height: 1.w, + ), + Container( + padding: EdgeInsets.only(left: 32.w), + color: Color(0xFFFFFFFF), + alignment: Alignment.center, + width: double.infinity, + height: 96.w, + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + '当前出口', + style: AppStyle().secondaryTextStyle, + ), + AkuBox.w(32), + Expanded( + child: Container( + height: double.infinity, + width: double.infinity, + padding: EdgeInsets.only(left: 48.w), + child: TextFormField( + controller: _textController, + maxLines: 1, + style: TextStyle( + color: AppStyle.primaryTextColor, + fontSize: 32.sp, + ), + decoration: InputDecoration( + hintText: '请输入当前入口', + hintStyle: AppStyle().secondaryTextStyle, + border: InputBorder.none), + ), + ), + ), + ], + ), + ), + ], + ), + bottom: AkuButton( + onPressed:_textController.text==null?(){ + BotToast.showText(text: '出口不能为空!'); + }: () { + widget.model.finalOutTime=_currentTime; + widget.model.outPlace=_textController.text; + widget.model.datetime=DateTime.now(); + widget.model.status=OUTDOORSTATUS.OUT_DONE; + Get.back(); + Get.back(); + }, + child: Container( + color: Color(0xFFFFC40C), + height: 98.w, + alignment: Alignment.center, + child: Text( + '确认放行', + style: TextStyle( + color: AppStyle.primaryTextColor, + fontSize: 32.sp, + fontWeight: FontWeight.bold), + ), + ), + ), + ); + } +} diff --git a/lib/ui/widgets/common/aku_radio.dart b/lib/ui/widgets/common/aku_radio.dart new file mode 100644 index 0000000..38a0359 --- /dev/null +++ b/lib/ui/widgets/common/aku_radio.dart @@ -0,0 +1,49 @@ +import 'dart:ffi'; + +import 'package:aku_community_manager/style/app_style.dart'; +import 'package:flutter/material.dart'; + +class AkuRadio extends StatefulWidget { + final double size; + final int grouvalue; + final int value; + final AkuValueChange onchanged; + AkuRadio({Key key, this.size, this.grouvalue, this.value, this.onchanged}) + : super(key: key); + + @override + _AkuRadioState createState() => _AkuRadioState(); +} + +class _AkuRadioState extends State { + @override + Widget build(BuildContext context) { + return GestureDetector( + onTap: () { + widget.onchanged(widget.value); + }, + child: Container( + alignment: Alignment.center, + width: widget.size, + height: widget.size, + decoration: BoxDecoration( + border: Border.all(color: Color(0xFFE8E8E8),width: 2.w), + borderRadius: BorderRadius.circular(widget.size / 2), + gradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: widget.grouvalue == widget.value + ? [Color(0xFFFFE080), Color(0xFFFFC40C)] + : [Color(0xFFFFFFFF), Color(0xFFFFFFFF)])), + child: widget.grouvalue == widget.value + ? Icon( + Icons.check, + size: widget.size * 0.8, + ) + : SizedBox(), + ), + ); + } +} + +typedef AkuValueChange = void Function(int);