How to get a pop-up window for flutter web app?

Issue

I have been looking for a flutter web app pop-up window but all I could find so far, is a pop-up dart package that just acts like a stack on top on my app, that’s not what I want, I want a complete new pop-up window that loads a web page , any help?

Solution

As I understand:- you want to launch another web page.

dart:js enables interoperability between Dart and JS

Sample code :-

import 'dart:js' as js;

  FlatButton(
  child: Text('launch another window'),
  onPressed: () {
    js.context.callMethod('open', ['https://google.com/']);
  },
 ),

Answered By – Piyush Kumar

Answer Checked By – Katrina (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *