matrix_gesture_detector_pro

Last updated:

0 purchases

matrix_gesture_detector_pro Image
matrix_gesture_detector_pro Images
Add to Cart

Description:

matrix gesture detector pro

class TransformDemo extends StatelessWidget {
@override
Widget build(BuildContext context) {
final ValueNotifier<Matrix4> notifier = ValueNotifier(Matrix4.identity());
return Scaffold(
backgroundColor: Colors.grey,
appBar: AppBar(
title: Text('Transform Demo'),
),
body: MatrixGestureDetector(
onMatrixUpdate: (m, tm, sm, rm) {
notifier.value = m;
},
child: AnimatedBuilder(
animation: notifier,
builder: (ctx, child) {
return Transform(
transform: notifier.value,
child: Stack(
children: <Widget>[
Container(
color: Colors.white30,
),
Positioned.fill(
child: Container(
transform: notifier.value,
child: FittedBox(
fit: BoxFit.contain,
child: Icon(
Icons.favorite,
color: Colors.deepPurple.withOpacity(0.5),
),
),
),
),
Container(
decoration: FlutterLogoDecoration(),
padding: EdgeInsets.all(32),
alignment: Alignment(0, -0.5),
child: Text(
'use your two fingers to translate / rotate / scale ...',
style: Theme.of(context).textTheme.bodyText1,
textAlign: TextAlign.center,
),
),
],
),
);
},
),
),
);
}
}
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.