I have a page with TextFormField. (autofocus:true). When pressing the Continue button, the user is taken to the next screen, the keyboard should close before that
FocusManager.instance.primaryFocus?.unfocus();
Navigator.push(context,
CupertinoPageRoute(
builder: (context) => const OnBoarding6(),
));
But when I go to the next page, I get an error 'A RenderFlex overflowed by 68 pixels on the bottom' because the keyboard is still closing while the next screen is appearing.
How to avoid this?

SingleChildScrollView.