Pārlūkot izejas kodu

Enabling UI Refresh on change the right list

if the selection of the right list is changed, the left and middle list is now refreshing the UI state.
TRi89 5 gadi atpakaļ
vecāks
revīzija
2a82660d8c
1 mainītis faili ar 6 papildinājumiem un 2 dzēšanām
  1. 6 2
      lib/flutter_datetime_picker.dart

+ 6 - 2
lib/flutter_datetime_picker.dart

@@ -412,8 +412,12 @@ class _DatePickerState extends State<_DatePickerComponent> {
                     rightScrollCtrl,
                     widget.pickerModel.layoutProportions()[2], (index) {
                     widget.pickerModel.setRightIndex(index);
-                    _notifyDateChanged();
-                  }, null)
+                  }, (index) {
+                    setState(() {
+                      refreshScrollOffset();
+                      _notifyDateChanged();
+                    });
+                  })
                 : null,
           ),
         ],