wear 0.0.2 copy "wear: ^0.0.2" to clipboard
wear: ^0.0.2 copied to clipboard

outdated

A plugin that offers widgets for Wear OS by Google

example/lib/main.dart

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(
        appBar: AppBar(
          title: Text('Wear example app'),
        ),
        body: new Center(
          child: new WatchShape(
              builder: (context, shape) => Directionality(
                    textDirection: TextDirection.ltr,
                    child: Column(
                      mainAxisAlignment: MainAxisAlignment.center,
                      children: <Widget>[
                        Text(
                          'Shape: ${shape == Shape.round ? 'round' : 'square'}',
                        ),
                        AmbientMode(
                            builder: (context, mode) => new Text(
                                  'Mode: ${mode == Mode.active ? "Active" : "Ambient"}',
                                )),
                      ],
                    ),
                  )),
        ),
      ),
    );
  }
}
145
likes
0
pub points
88%
popularity

Publisher

verified publisherfluttercommunity.dev

A plugin that offers widgets for Wear OS by Google

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, meta

More

Packages that depend on wear