See parameter useRootNavigator in showDatePicker.
useRootNavigator
Defaults to true.
true
final bool useRootNavigator;