wearable_rotary 1.0.1 copy "wearable_rotary: ^1.0.1" to clipboard
wearable_rotary: ^1.0.1 copied to clipboard

outdated

Flutter plugin that can listen to rotary events on Galaxy watch devices.

example/lib/main.dart

import 'package:flutter/material.dart';

import './custom_page_view.dart';

void main() => runApp(
      MaterialApp(
        title: 'Rotary example app',
        home: MyApp(),
      ),
    );

class MyApp extends StatelessWidget {
  final CustomPageView _horizontalPageView =
      const CustomPageView(Axis.horizontal);
  final CustomPageView _verticalPageView = const CustomPageView(Axis.vertical);
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Rotary example app'),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            ElevatedButton(
              child: const Text(
                'HorizontalPageView',
                style: TextStyle(fontSize: 15),
              ),
              onPressed: () {
                Navigator.push<dynamic>(
                  context,
                  MaterialPageRoute<dynamic>(
                      builder: (BuildContext context) => _horizontalPageView),
                );
              },
            ),
            ElevatedButton(
              child: const Text(
                'VerticalPageView',
                style: TextStyle(fontSize: 15),
              ),
              onPressed: () {
                Navigator.push<dynamic>(
                  context,
                  MaterialPageRoute<dynamic>(
                      builder: (BuildContext context) => _verticalPageView),
                );
              },
            ),
          ],
        ),
      ),
    );
  }
}
15
likes
0
pub points
80%
popularity

Publisher

verified publishertizen.org

Flutter plugin that can listen to rotary events on Galaxy watch devices.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on wearable_rotary