matrix_gesture_detector 0.0.1 copy "matrix_gesture_detector: ^0.0.1" to clipboard
matrix_gesture_detector: ^0.0.1 copied to clipboard

outdated

A gesture detector mapping translation/rotation/scale gestures to a Matrix4 object.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'custom_painter_demo.dart';
import 'transform_demo.dart';

void main() => runApp(MaterialApp(
      title: 'MatrixGestureDetector Demo',
      routes: {
        'customPainterDemo': (ctx) => CustomPainterDemo(),
        'transformDemo': (ctx) => TransformDemo(),
      },
      home: Scaffold(
        appBar: AppBar(
          title: Text('MatrixGestureDetector Demo'),
        ),
        body: Builder(
          builder: (BuildContext context) {
            return Center(
              child: SingleChildScrollView(
                child: Column(
                  children: <Widget>[
                    ListTile(
                      onTap: () => showDemo(context, 'customPainterDemo'),
                      leading: Icon(Icons.image),
                      title: Text(
                        'CustomPainter Demo',
                      ),
                      subtitle: Text(
                          'this demo shows how to use a matrix for a custom canvas drawing'),
                    ),
                    ListTile(
                      onTap: () => showDemo(context, 'transformDemo'),
                      leading: Icon(Icons.image),
                      title: Text(
                        'Transform Demo',
                      ),
                      subtitle: Text(
                          'this demo shows how to use a matrix with a standard Transform widget'),
                    ),
                  ],
                ),
              ),
            );
          },
        ),
      ),
    ));

showDemo(BuildContext context, String routeName) {
  print('showing $routeName...');
  Navigator.of(context).pushNamed(routeName);
}
75
likes
0
pub points
92%
popularity

Publisher

unverified uploader

A gesture detector mapping translation/rotation/scale gestures to a Matrix4 object.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, vector_math

More

Packages that depend on matrix_gesture_detector