The issue was fixed by https://github.com/flutter/flutter/pull/148616
CupertinoModalPopupRoute
if
switch