
Flutter Code
The app for receiving and storing the data from the microcontroller was written in Flutter with the Dart programming language.
The app has support for:
- Windows
- macOS
- Linux
- Android
- iOS
Setup
-
Grab the project files:
Terminal window git clone https://avoid.sh/PetActivityMonitor/xiao_pet_tracker.git -
Run
flutter pub get
to load the dependencies. -
The project contains 3 flavors:
- development
- staging
- production
To run the desired flavor either use the launch configuration in VSCode/Android Studio or use the following commands:
Terminal window # Development$ flutter run --flavor development --target lib/main_development.dart# Staging$ flutter run --flavor staging --target lib/main_staging.dart# Production$ flutter run --flavor production --target lib/main_production.dartThe
development
flavor is used for developing, it includes Dart’s Hot Reload feature where you can make live changes to the code and immediately use these changes in the running app without restarting it.When using the app the
production
flavor is recommended. This will compile the app natively with much deeper optimizations.The
staging
flavor is not needed to be used in the current state of the app.