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

Unable to pop up in web build release #493

Open
jhembed opened this issue Feb 14, 2024 · 1 comment
Open

Unable to pop up in web build release #493

jhembed opened this issue Feb 14, 2024 · 1 comment

Comments

@jhembed
Copy link

jhembed commented Feb 14, 2024

My application runs on the web and can be used normally when debugging in a local browser. However, after compiling and distributing the version using

flutter build web release web extender canvas tree share icons

it cannot be used.

@jhembed
Copy link
Author

jhembed commented Feb 14, 2024

This is my usage:

enum ToastPosition {
  top,
  bottom,
  center,
  topLeft,
  topRight,
  bottomLeft,
  bottomFight,
  centerLeft,
  centerRight,
  snackbar,
  none,
}

  static showToast(String text,
      {ToastPosition position = ToastPosition.bottom}) async {
    if (!kIsWeb) {
      await Fluttertoast.cancel();
    }
    await Fluttertoast.showToast(
      gravity: ToastGravity.values[position.index],
      msg: text,
      backgroundColor: const Color.fromARGB(128, 50, 50, 50),
      textColor: Colors.white,
      webBgColor: "rgb(128 128 128 / 0.5)",
      webPosition: "center",
      webShowClose: false,
      timeInSecForIosWeb: 1,
    );
  }

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

1 participant