html_server 0.0.1
html_server: ^0.0.1

Flutter Android iOS

Start http service, visit url to get html string

html_server #

Start http service, visit url to get html string

Getting Started #


class Example extends StatefulWidget {
  @override
  _ExampleState createState() => _ExampleState();
}

class _ExampleState extends State<Example> {
  HtmlServer server;

  @override
  Widget build(BuildContext context) {
    return Container(
      child: server == null ? CircularProgressIndicator() : WebView(
        initialUrl: server.url,
      ),
    );
  }

  initWeb() async {
    String html = "<html><p>hello my friend</p></html>";
    server = await HtmlServer.serve(html);
    setState(() {});
  }
  
  @override
  void initState() {
    initWeb();
    super.initState();
  }
  
  @override
  void dispose() {
    server.dispose();
    super.dispose();
  }
}
0
likes
70
pub points
0%
popularity

Start http service, visit url to get html string

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

jethrocup@gmail.com

License

Apache 2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on html_server