Answers for "how to load html in flutter"

1

flutter web load html

import 'dart:ui' as ui;
import 'dart:html';



ui.platformViewRegistry.registerViewFactory(
    'test-view-type',
    (int viewId) => IFrameElement()
      ..width = '640'
      ..height = '360'
      ..src = "https://www.youtube.com/embed/5VbAwhBBHsg"
      ..style.border = 'none');

//just an example if you know how to code then change then feel free to change the values
Posted by: Guest on May-10-2021
0

html to flutter

Add the following to your pubspec.yaml file:
  dependencies:
    flutter_html: ^1.3.0

Example Usage - Data:
  Widget html = Html(
  data: """<p>
   Linking to <a href='https://github.com'>websites</a> has never been easier.
  </p>""",
  onLinkTap: (String url) {
    //open URL in webview, or launch URL in browser, or any other logic here
  }
);
Posted by: Guest on April-16-2021

Code answers related to "how to load html in flutter"

Browse Popular Code Answers by Language