flutter starter kit – app store example
a starter kit for beginner learns with bloc pattern, rxdart, sqflite, fluro and dio to architect a flutter project. this starter kit build an app store app as a example
feature
- bloc pattern
- navigate pages by fluro
- local cache by using sqflite
- restful api call by using dio
- database debugging (android only) by using flutter_stetho
- loading network image
- localization by using gen_lang
and lang_table - environment variable & project config (like app name, bundle id) based on different project flavour (development, staging & production)
- build pojo by using json_serializable
- update each list item instead of re-rendering whole list view when data set has changed on a list item
- hero animation
- show empty view when the list view is empty
install
- follow flutter official setup guide to set up flutter environment
- download flutter version 1.17.3
remark: this starter kit support flutter version – 1.17.3. it is because flutter may have breaking change on latest version.
run config
- click ‘edit configuration’
- create different run configs for flavours
useful command
run flutter_starter_kit
for development,
flutter run --flavor development -t lib/config/main_development.dart
for staging,
flutter run --flavor staging -t lib/config/main_staging.dart
for production,
flutter run --flavor production -t lib/config/main_production.dart
generate json serialize and deserialize functions
flutter packages pub run build_runner build --delete-conflicting-outputs
lang_table
flutter packages pub run lang_table:generate --platform=airtable --input=https://api.airtable.com/v0/appzmh0wmg3y6apag/example --api-key={your api key} --target=flutter
gen_lang
flutter packages pub run gen_lang:generate
Comments are closed.