소스 검색

fix pop bug

Liu Yanbo 6 년 전
부모
커밋
034ac40bcc
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      lib/flutter_datetime_picker.dart

+ 1 - 1
lib/flutter_datetime_picker.dart

@@ -397,10 +397,10 @@ class _DatePickerState extends State<_DatePickerComponent> {
                 style: theme.doneStyle,
               ),
               onPressed: () {
+                Navigator.pop(context);
                 if (widget.route.onConfirm != null) {
                   widget.route.onConfirm(widget.pickerModel.finalTime());
                 }
-                Navigator.pop(context);
               },
             ),
           ),