Skip to content

Example repo showing how to run a flutter app in nerves on rpi4

Notifications You must be signed in to change notification settings

Spin42/nerves_flutter_example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NervesFlutterExample

A basic flutter demo using:

About

This is an implementation of the first Codelab you can find on the Flutter documentation, with the twist that all state is fetched from a backend app written in Phoenix.

Notice about fonts

The standard fonts are not included in the nerves system image, meaning that you always have to package your fonts in your flutter app and not rely on the presence of any default fonts on the system. Failure to do so will mean no text will be shown in your flutter app.

Dependencies

Getting Started

To setup the firmware locally:

  • cd firmware
  • export MIX_TARGET=nerves_system_flutter_rpi4
  • Install dependencies with mix deps.get

To launch the backend locally:

  • cd backend
  • Install dependencies with mix deps.get
  • Create database and run migrations with mix ecto.create & mix ecto.migrate
  • Launch phoenix with mix phx.server

To run the flutter app locally:

  • cd frontend
  • Launch app on host with flutter run

To build:

  • Simply execute ./build.sh

To burn on sd card:

  • Go to firmware folder after building with cd firmware
  • Run mix burn
  • Alternatively, run mix uploadif you already have a nerves device plugged-in

Disclaimer

This is very early stage. This is just to provide an example on how to get started with Flutter on Nerves with a Raspberry pi4.

About

Example repo showing how to run a flutter app in nerves on rpi4

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published