title: Flutter matrix gesture get size and position
body: <p>I'm using with matrix_gesture_detector: ^0.1.0, after zoom in or zoom out, rotate,...</p>
  <p>And i need to know the position and size of the widget. Is there anyway to do that.</p>
  <p>I tried with globalkey but it only get the size the first time widget created.</p>
  <p><a href="https://i.stack.imgur.com/qZGJW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qZGJW.png" alt="Size and position?" /></a></p>
  <p>Using matrix to get size and position</p>
  <p><a href="https://i.stack.imgur.com/UhYQZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UhYQZ.png" alt="Size and position?" /></a></p>
  <p>Please help!
  Thanks in advance!!!</p>
  <p><strong>UPDATE:</strong></p>
  <p>This is my code</p>
  <pre><code>LayoutBuilder(
      builder: (ctx, constraints) {
        Size s = constraints.biggest;
        double side = s.shortestSide * 0.666;
        matrix.leftTranslate((s.width - side) / 2, (s.height - side) / 2);
        TweenSequence colorTween = TweenSequence(
          [
            TweenSequenceItem(
                    tween: ColorTween(begin: color0, end: color1), weight: 1),
            TweenSequenceItem(
                tween: ColorTween(begin: color1, end: color2), weight: 1),
          ],
        );
        Tween radiusTween = Tween&lt;double&gt;(begin: radius0, end: side / 2);
        return MatrixGestureDetector(
          onMatrixUpdate: (m, tm, sm, rm) {
            matrix = MatrixGestureDetector.compose(matrix, tm, sm, null);
  
        var angle = MatrixGestureDetector.decomposeToValues(m).rotation;
            double t = (1 - cos(2 * angle)) / 2;
  
            radius = radiusTween.transform(t);
            color = colorTween.transform(t);
            notifier.value++;
          },
          child: Container(
            width: double.infinity,
            height: double.infinity,
            alignment: Alignment.topLeft,
            color: Color(0xff444444),
            child: AnimatedBuilder(
              animation: notifier,
              builder: (ctx, child) {
                return Transform(
                  transform: matrix,
                  child: Container(
                    key: _key,
                    width: side,
                    height: side,
                    decoration: BoxDecoration(
                      color: color,
                      border: Border.all(
                        color: Colors.white30,
                        width: 20,
                      ),
                      borderRadius: BorderRadius.all(Radius.circular(radius)),
                    ),
                    child: Center(
                      child: Text(
                        'you can move &amp; scale me (and &quot;rotate&quot; too)',
                        textAlign: TextAlign.center,
                        style: Theme.of(ctx).textTheme.display1.apply(
                              color: Colors.white,
                            ),
                      ),
                    ),
                  ),
                );
              },
            ),
          ),
        );
      },
    ),
  </code></pre>