wear
1.1.0, released 5 years ago by fluttercommunity.dev
Flutter plugin for Wear OS support, providing watch shape and ambient mode widgets.
What it does
Offers Flutter support for Wear OS by Google. It provides specific widgets like WatchShape to determine if a watch is square or round, and AmbientMode to handle active and ambient watch face states.
AI-written summary of version 1.1.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are building a Flutter application specifically for Wear OS devices.
- You need to detect whether a watch screen is square or round.
- You need to handle active and ambient watch modes.
Skip it when
- You are building a standard mobile or desktop application.
- Your target Android minSdkVersion cannot be set to at least 23.
Strengths
- Simplifies Wear OS development by handling old native boilerplate references automatically.
- Provides intuitive widgets for watch shape and ambient mode state management.
Weaknesses
- Requires a minimum SDK version of 23.
- Limited to specific Wear OS capabilities documented in the plugin.
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
You must set your minSdkVersion to 23.
class WatchScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return WatchShape(
builder: (BuildContext context, WearShape shape, Widget? child) {
return AmbientMode(
builder: (context, mode, child) {
return mode == Mode.active ? ActiveWatchFace() : AmbientWatchFace();
},
);
},
);
}
}Alternatives
Packages that do the same job and could replace wear.
- wear_plus
Flutter support and widgets for Wear OS devices.
60Compare - health
Wrapper for Apple's HealthKit and Google's Health Connect.
91Compare - google_api_availability
Check the availability of Google Play services on an Android device.
88Compare - play_install_referrer
Flutter plugin to fetch Android Play Store install referrer details
81Compare