This is a sample project that supports a Wear OS app and utilizes the BLoC architecture pattern, Dio for network management, and Drift for database handling.
Important
NOTE: EXAMPLE FOR ANDROID ONLY.
Wear OS support refers to adapting an app for
use on smartwatches, ensuring it works well with small
screens, conserves battery life, and utilizes features such as notifications and fitness tracking
specific to wearable devices.
Bloc Patterns along with repositories
and services, separates business logic, data access, and UI by using streams to handle state and
manage data flow. (Bloc Pattern Documentation)
Dio Network Manager is responsible for making requests and
retrieving data from the remote server.
Drift Database is responsible for saving the
retrieved data from the remote server, querying data from the local database, and supporting offline
functionality. (Drift Database Documentation)
<manifest>
<uses-feature android:name="android.hardware.type.watch" />
<application>
<!--other code here-->
<!--Optional - Depend if the Wear OS App need app or note-->
<meta-data android:name="com.google.android.wearable.standalone" android:value="true" />
<!--other code here-->
</application>
</manifest>
Important
Check my article for the setup 👉 Standalone Wear OS Application (Setup for Jetpack Compose and Flutter) - Medium 👈
Important
Similar project with (Kotlin Language) 👉 SampleWearOSComposeWithList 👈
Flutter SDK version: 3.27.1
Dart Version: 3.6.0
https://github.com/r-spacex/SpaceX-API (GitHub)
https://docs.spacexdata.com/?version=latest (Postman)
https://medium.com/flutter-community/flutter-building-wearos-app-fedf0f06d1b4
https://pub.dev/packages/wear
https://github.com/fluttercommunity/flutter_wear_plugin
https://developer.android.com/training/wearables/compose