wear_plus 1.2.0 copy "wear_plus: ^1.2.0" to clipboard
wear_plus: ^1.2.0 copied to clipboard

PlatformAndroid

An actively maintained plugin that offers Flutter support for Wear OS by Google

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:wear_plus/wear_plus.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: WatchShape(
            builder: (context, shape, child) {
              return Column(
                mainAxisAlignment: MainAxisAlignment.center,
                children: <Widget>[
                  Text(
                    'Shape: ${shape == WearShape.round ? 'round' : 'square'}',
                  ),
                  child!,
                ],
              );
            },
            child: AmbientMode(
              builder: (context, mode, child) {
                return Text(
                  'Mode: ${mode == WearMode.active ? 'Active' : 'Ambient'}',
                );
              },
            ),
          ),
        ),
      ),
    );
  }
}
4
likes
160
pub points
78%
popularity

Publisher

verified publisherrexios.dev

An actively maintained plugin that offers Flutter support for Wear OS by Google

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on wear_plus