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