반응형
Drawer을 열 때 키보드가 올라오며 겹치는 경우가 있었다. 포커스 문제이니 드라워를 관리하는 화면에서 보통 onTap을 걸어서 포커스를 해제할텐데 그걸로는 부족하다. 아래 코드처럼 해주자.
"Keyboard comes up when you open drawer"
복붙을 위해 onTap 코드 첨부
onTap: () {
final FocusScopeNode currentscope = FocusScope.of(context);
if (!currentscope.hasPrimaryFocus && currentscope.hasFocus) {
FocusManager.instance.primaryFocus?.unfocus();
}
},