GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - stepanic/flutterflow-socket: Hot Reload of Flutter app after Push to repository at FlutterFlow

BranchesTags
Open more actions menu

Latest commit

 

History

73 Commits
73 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
screenshots
screenshots
 
 
tools
tools
 
 
.gitignore
.gitignore
 
 
FlutterFlowSocket.bttpreset.bttpreset
FlutterFlowSocket.bttpreset.bttpreset
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
installer.sh
installer.sh
 
 
run
run
 
 
watch
watch
 
 

Repository files navigation

flutterflow-socket

Automatic Hot Reload of Flutter app after Push to repository at FlutterFlow without any manual source pull and app reload, because every development second matter!

If this project help you reduce time to develop, you can give me a cup of coffee :)

Donate

Demo

demo

1. Installation

  1. position to your FlutterFlow project in terminal cd /path/to/your/ff/project
  2. copy directory ./tools and scripts ./run and ./watch from this repository to your existing FlutterFlow app with this command
curl -sSL https://raw.githubusercontent.com/stepanic/flutterflow-socket/main/installer.sh | sh

Installation

  1. follow the Setup instructions

2. Setup

  1. install entr (for MacOS brew install entr) brew install entr
  2. copy Webhook Proxy URL from installation output or read it from the GITHUB_WEBHOOK_URL variable in ./watch script
  3. OPTIONAL: change GITHUB_WEBHOOK_SECRET at ./watch or leave it to default ff-my-github-webhook-secret setup ENV variables
  4. add a new Webhook at GitHub https://github.com/<ORG_ID|USERNAME>/<REPO_ID>/settings/hooks/new
  • Payload URL = Webhook Proxy URL from 2nd step
  • Content type = application/json
  • Secret = GITHUB_WEBHOOK_SECRET from ./watch new webhook at github

3. Usage

  1. get a <DEVICE_ID> with flutter devices
  2. run the Flutter app on the device with ./run <DEVICE_ID> run 000
  3. open another terminal window/tab and watch for local and remote changes with ./watch watch
  4. make some changes in the FlutterFlow project and click to Push to Repository Push to Repository Pushed to Repository Reloaded on device
  5. repeat 4th step multiple times :))

Example

If you want to try how it works before installation at your project then clone this repository https://github.com/stepanic/flutterflow-socket-example and in one terminal execute ./run <DEVICE_ID> and ./watch in another.

How it works

  1. Flutter app should be run with --pid-file
  • look at https://github.com/stepanic/flutterflow-socket/blob/main/run#L13
  1. ./watch script internally is calling ./tools/hotreloader.sh which is sending a signal to Flutter process(es)
  • look at https://github.com/stepanic/flutterflow-socket/blob/main/watch#L25-L30
  • and https://github.com/stepanic/flutterflow-socket/blob/main/tools/hotreloader.sh
  • inspired by https://medium.com/@kikap/how-to-automatically-hot-reload-flutter-when-dart-source-files-change-6e8fdb523004
  1. ./watch script internally starts background Node.js process ./tools/github/listen which is listening for new GitHub commits from Webhook via smee.io channel
  • look at https://github.com/stepanic/flutterflow-socket/blob/main/tools/github/listen#L28-L35
  1. ./tools/github/listen Node.js script internally is calling ./tools/sync for automatic pulling the newest commits from flutterflow branch and merge them to the currently active branch
  • look at https://github.com/stepanic/flutterflow-socket/blob/main/tools/github/listen#L44-L57

Advanced

When adding widgets in FlutterFlow which is changing dependencies in the pubspac.yaml or there are modification at Firestore schema or app icon is changed then add DEEP to the commit message before pushing to the repository. For more details please check this https://github.com/stepanic/flutterflow-socket/blob/main/tools/sync#L14-L20

  • look at https://github.com/stepanic/flutterflow-socket/blob/main/tools/github/listen#L44-L57 advanced DEEP sync

Buy me a coffee :))

If this project help you reduce time to develop, you can give me a cup of coffee :)

Donate

Author

Please find the the tool author at https://experts.flutterflow.io/, and check references at https://www.toptal.com/resume/matija-stepanic/N8zLEO/worlds-top-talent

About

Hot Reload of Flutter app after Push to repository at FlutterFlow

Resources

Readme
MIT license
Activity

Stars

10 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Sponsor this project

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.