Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

penetration on WebView #115

Open
mkbsugita opened this issue Jun 22, 2023 · 3 comments
Open

penetration on WebView #115

mkbsugita opened this issue Jun 22, 2023 · 3 comments

Comments

@mkbsugita
Copy link

Describe the bug

I put the flushbar on WebView (webview_flutter).
my tap penetrates the flushbar and taps button on WebView.

To Reproduce
Steps to reproduce the behavior:

    await Flushbar<dynamic>(
      padding: EdgeInsets.zero,
      messageText:
          Padding(
            padding: const EdgeInsets.all(16),
            child: Center(
              child: Text(
                message,
                textAlign: TextAlign.center,
                style: const TextStyle(
                  color: Colors.white,
                  fontSize: 16,
                  fontWeight: FontWeight.bold,
                ),
              ),
            ),
          ),
      duration: Duration(milliseconds: (showTime * 1000).toInt()),
      flushbarPosition: FlushbarPosition.TOP,
    ).show(context);

and call the showToast method.

Expected behavior

non-penetration

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: OS 14.7.1
  • Browser webview_flutter

Additional context

I made gard WebView below.

import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';

class WebViewGuard extends StatefulWidget {
  const WebViewGuard({super.key});

  @override
  WebViewGuardState createState() => WebViewGuardState();
}

class WebViewGuardState extends State<WebViewGuard> {
  WebViewController controller = WebViewController();
  @override
  void initState() {
    super.initState();

    Future(() async {
      await controller.setBackgroundColor(Colors.transparent);
    });
  }

  @override
  Widget build(BuildContext context) {
    return WebViewWidget(
      controller: controller,
    );
  }
}
    await Flushbar<dynamic>(
      padding: EdgeInsets.zero,
      messageText: Stack(
        alignment: AlignmentDirectional.center,
        children: [
          // I dded this.. but wired
          const SizedBox(height: 60, child: WebViewGuard()),
          Padding(
            padding: const EdgeInsets.all(16),
            child: Center(
              child: Text(
                message,
                textAlign: TextAlign.center,
                style: const TextStyle(
                  color: Colors.white,
                  fontSize: 16,
                  fontWeight: FontWeight.bold,
                ),
              ),
            ),
          ),
        ],
      ),
      duration: Duration(milliseconds: (showTime * 1000).toInt()),
      flushbarPosition: FlushbarPosition.TOP,
    ).show(context);
@mkbsugita
Copy link
Author

no answers. sigh sigh

@cmdrootaccess
Copy link
Owner

which webview_flutter version are you using ?

@mkbsugita
Copy link
Author

@cmdrootaccess
Thank you for replying.
I use 4.0.7 version.
Is your webview guards from it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants