@@ -205,13 +205,18 @@ class ChatBoxState extends State<ChatBox> {
205205 initialSettings: InAppWebViewSettings (
206206 useHybridComposition: true ,
207207 disableInputAccessoryView: true ,
208+ transparentBackground: true ,
208209 useShouldOverrideUrlLoading: true ,
209210 ),
210211 onWebViewCreated: _onWebViewCreated,
211212 onLoadStop: _onLoadStop,
212213 onConsoleMessage: (InAppWebViewController controller, ConsoleMessage message) {
213214 print ("chatbox [${message .messageLevel }] ${message .message }" );
214215 },
216+ gestureRecognizers: {
217+ // We need only the VerticalDragGestureRecognizer in order to be able to scroll through the messages
218+ Factory (() => VerticalDragGestureRecognizer ()),
219+ },
215220 onGeolocationPermissionsShowPrompt: (InAppWebViewController controller, String origin) async {
216221 print ("📘 chatbox onGeolocationPermissionsShowPrompt ($origin )" );
217222
@@ -230,10 +235,6 @@ class ChatBoxState extends State<ChatBox> {
230235
231236 return PermissionResponse (resources: permissionRequest.resources, action: granted ? PermissionResponseAction .GRANT : PermissionResponseAction .DENY );
232237 },
233- gestureRecognizers: {
234- // We need only the VerticalDragGestureRecognizer in order to be able to scroll through the messages
235- Factory (() => VerticalDragGestureRecognizer ()),
236- },
237238 shouldOverrideUrlLoading: (InAppWebViewController controller, NavigationAction navigationAction) async {
238239 if (navigationAction.navigationType == NavigationType .LINK_ACTIVATED ) {
239240 if (await launchUrl (navigationAction.request.url! )) {
0 commit comments