title: Flutter - Unable to maintain zoom on Transform.scale widget
body: <p>I'm trying to build some zoom functionality into the flutter camera package for my app. Currently I am able to use the zoom feature by wrapping the <code>CameraPreview</code> widget in a <code>Transform.scale</code> and a <code>GestureDetector</code>. However whenever I am zooming in it is not maintaining the zoom. Currently it is snapping back to 1.0 scale when letting go after pinching and zooming.</p>
  
  <p>Is there something I am doing wrong here? I am able to maintain the scale using the onDoubleTap function but not using the onScaleUpdate function.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>                  ClipRect(
                      child: AspectRatio(
                        aspectRatio: controller.value.aspectRatio,
                        child: LayoutBuilder(builder:
                            (BuildContext context, BoxConstraints constraints) {
                          return GestureDetector(
                            onDoubleTap: () {
                              setState(() {
                                scale = 4.0;
                              });
                            },
                            onScaleUpdate: (ScaleUpdateDetails details) {
                              print(details.scale);
  
                              setState(() {
                                scale = details.scale;
                              });
                            },
                            child: Transform.scale(
                              scale: scale,
                              child: AspectRatio(
                                aspectRatio: controller.value.aspectRatio,
                                child: CameraPreview(controller),
                              ),
                            ),
                          );
                        }),
                      ),
                    )
  </code></pre>