wear 0.0.3 wear: ^0.0.3 copied to clipboard
A plugin that offers widgets for Wear OS by Google
import 'package:flutter/material.dart';
import 'package:wear/wear.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(
child: WatchShape(
builder: (context, shape) => Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
'Shape: ${shape == Shape.round ? 'round' : 'square'}',
),
AmbientMode(
builder: (context, mode) => Text(
'Mode: ${mode == Mode.active ? 'Active' : 'Ambient'}',
)),
],
)),
),
),
);
}
}