How to load a HTML in String to WebView in Flutter


I have some HTML code which is in String variable, not in a file. I want to load this String-HTML on WebView


use this package flutter_html: ^1.0.0

import 'package:flutter_html/flutter_html.dart';

       child: Html(
               data: "<div></div>", // Your Html code over here
                padding: EdgeInsets.all(8.0),

Answered By – Bhargav Sejpal

Answer Checked By – Gilberto Lyons (FlutterFixes Admin)

Leave a Reply

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