Since Google Flutter is already in Beta it will be nice to amplify Tarantool Cartridge with the ease and power of Google Flutter for Web.
This simple stub project allows to embed Flutter Web application into Tarantool Cartridge Web UI.
Its look like:
This repo has a preconfigured webpack config and setup for generate rock and lua bundle in it. Also it has a simple Flutter Web Application.
Based on:
- Tarantool 2.6.0
- Tarantool Cartridge 2.3.0
- Tarantool Front-end Core 7.3.0
- Flutter SDK 1.22.0-12.1pre (beta, dev or master channels)
Known issues:
- Flutter Web Application iframe reloads when navigating by main menu, so your Flutter Web Application must persist the state. For example you may use: hydrated or/and hydrated_bloc packages to persist Webb App state.
- No integration tests
- Building is not tested on non-GNU environments (may be some problems with sed)
- Tarantool 2.x.x
- Tarantool Cartridge 2.x.0
- Flutter SDK >1.20.0 (beta, dev or master channels)
- Nodejs 12.x or better
- gzip, make
git clone [email protected]:tarantool/frontend-stub.git name-as-you-wish
cd name-as-you-wish
npm ci
Run the following command to setup your project's: "name", "Git repository path", and "path to Fluter Web App Project" (Note: Flutter App project must be in "name-as-you-wish" folder):
npm run config
npm run build-rock
For developing purposes use the following command:
npm run start
Don't forget change package.json name of your project.
cd <Tarantool Cartridge application dir>
tarantoolctl rocks install <path to rock file>/graphqlide-scm-1.all.rock
To get it work just add to Tarantool Cartridge application init.lua the following code:
require('flutter').init()
After it - reload your Tarantool Cartridge:
cartridge stop && cartridge start -d