Merge pull request #46 from zileyuan/master

修复单选模式下可以多选日期的问题
master
LXD312569496 5 years ago committed by GitHub
commit 2ca1935bc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -174,7 +174,7 @@ class ItemContainerState extends State<ItemContainer> {
/**
* item
*/
void refreshItem() {
void refreshItem(bool v) {
/**
Exception caught by gesture
The following assertion was thrown while handling a gesture:
@ -182,7 +182,7 @@ class ItemContainerState extends State<ItemContainer> {
*/
if (mounted) {
setState(() {
dateModel.isSelected = !dateModel.isSelected;
dateModel.isSelected = v;
// isSelected.value = !isSelected.value;
});
}
@ -237,12 +237,11 @@ class ItemContainerState extends State<ItemContainer> {
//item
if (calendarProvider.lastClickItemState != this) {
calendarProvider.lastClickItemState?.refreshItem();
calendarProvider.lastClickItemState?.refreshItem(false);
calendarProvider.lastClickItemState = this;
}
}
refreshItem();
refreshItem(!this.dateModel.isSelected);
},
child: configuration.dayWidgetBuilder(dateModel),
);

@ -10,7 +10,7 @@ environment:
dependencies:
flutter:
sdk: flutter
provider: ^3.1.0+1
provider: ^4.0.4
dev_dependencies:
flutter_test:
sdk: flutter

Loading…
Cancel
Save