Flutter BLoC setup for network API access. Tutorial can be used with or without a RICOH THETA camera.
GitHub code repository of BLoC and Chopper example for RICOH THETA.
Does not follow the tutorial exactly as I’m still working on it. However, it will give you an idea of how to configure the BLoC and chopper files.
BLoC was announced at Google IO in 2018. It is a state management solution, allowing you to keep track of changes to the app state. Examples of changes include:
- initial state prior to any command sent to the camera
- press a button and an HTTP command for
/osc/info
is set to the camera which triggers a change in state to a loading state as it waits for the camera to respond. - app moved to a loaded _ state
If there is an error such as the Wi-Fi connection to the camera is dropped, it moves to an error state.
This is part of a tutorial series on Flutter BLoC. The previous tutorial was:
The next tutorial will focus on chopper for the HTTP connection to the camera.