I have the same problem as you, have you found a solution to this problem. If not, you can try my temporary solution below.I used Listener to listen position on touch and compare with keyboard height to decide if to scroll up or not
Widget buildInappWebView(double width, double height) {
return Listener(
onPointerMove: (PointerMoveEvent pointer) {
if (Platform.isAndroid) {
swipeDownKeyBoard(pointer);
}
},
child: ListView(
padding: EdgeInsets.zero,
physics: const NeverScrollableScrollPhysics(),
controller: _controllerL,
shrinkWrap: true,
children: [
SizedBox(
height: getHeightWebview(height),
child: InAppWebView(
key: webViewKey,
gestureRecognizers:
Platform.isIOS ? gestureRecognizersOne : null,
initialUrlRequest:
URLRequest(url: Uri.parse("about:blank")),
initialOptions: options,
onWebViewCreated: (controller) async {
},
androidOnRenderProcessGone: (controller, detail) async {
},
onLoadStart: (controller, url) {},
onLoadStop: (controller, url) async {
},
onLoadError: (controller, url, code, message) {
},
onProgressChanged: (controller, progress) async {
},
onUpdateVisitedHistory: (controller, url, androidIsReload) {
},
onConsoleMessage: (controller, consoleMessage) {},
),
),
],
));
void swipeDownKeyBoard(PointerMoveEvent pointer) {
Future.delayed(
const Duration(milliseconds: 550),
() {
double insets = MediaQueryData.fromWindow(window).viewInsets.bottom;
double screenHeight = MediaQueryData.fromWindow(window).size.height;
double position = pointer.position.dy;
double keyboardHeight = screenHeight - insets;
print('inset: $insets');
// print("keyHeight: $keyboardHeight");
// print("Position: $position");
if (position > keyboardHeight && insets > 0) {
_scrollUp();
}
},
);
}
void _scrollUp() {
_controllerL.animateTo(
//_controllerL.position.maxScrollExtent,
170,
duration: const Duration(milliseconds: 100),
curve: Curves.fastOutSlowIn,
);
}
final ScrollController _controllerL = ScrollController();