fwr

command module
v0.0.0-...-9f77719 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 1, 2021 License: MIT Imports: 12 Imported by: 0

README

Flutter web rebuilder

A development server for Flutter web

  • Automatic rebuild and reload in browser on changes
  • Multi devices autoreload

Usage

Get the server

Grab the Linux binary or compile with Go, and put the executable in the path or in your local Flutter project directory

Setup the autoreload

Add this to web/index.html in your project:

  <script type="text/javascript">
    const ip = "<server-ip>"; // The ip of the server: ex: 192.168.1.3 or localhost
    (function () {
      var conn = new WebSocket("ws://" + ip + ":8042/ws");
      conn.onmessage = function (evt) {
        window.location.reload();
      }
    })();
  </script>

ip is the ip of the machine running the server. Just set it to localhost if the same machine that runs the server is used to view the page. Use the ip of the machine running the server to see the page on other devices from the local network

Run

Cd to your Flutter web project folder and run:

fwr

This will rebuild the project for the web on any change in lib/ or web/ and reload the page in all the opened browsers

Go to http://<server-ip>:8085 to see the page

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL