Unverified Commit 34d4c7fe authored by Justin McCandless's avatar Justin McCandless Committed by GitHub

Migrated docs to nnbd (#72305)

Simply part of the movement to get our docs aligned with NNBD.
parent eb01b7e5
......@@ -34,7 +34,7 @@ import 'ticker_provider.dart';
/// * The [Flutter Gallery's transformations demo](https://github.com/flutter/gallery/blob/master/lib/demos/reference/transformations_demo.dart),
/// which includes the use of InteractiveViewer.
///
/// {@tool dartpad --template=stateless_widget_scaffold_no_null_safety}
/// {@tool dartpad --template=stateless_widget_scaffold}
/// This example shows a simple Container that can be panned and zoomed.
///
/// ```dart
......@@ -151,7 +151,7 @@ class InteractiveViewer extends StatefulWidget {
///
/// Defaults to true.
///
/// {@tool dartpad --template=stateless_widget_scaffold_no_null_safety}
/// {@tool dartpad --template=stateless_widget_scaffold}
/// This example shows how to create a pannable table. Because the table is
/// larger than the entire screen, setting `constrained` to false is necessary
/// to allow it to be drawn to its full size. The parts of the table that
......@@ -305,19 +305,19 @@ class InteractiveViewer extends StatefulWidget {
/// listeners are notified. If the value is set, InteractiveViewer will update
/// to respect the new value.
///
/// {@tool dartpad --template=stateful_widget_material_ticker_no_null_safety}
/// {@tool dartpad --template=stateful_widget_material_ticker}
/// This example shows how transformationController can be used to animate the
/// transformation back to its starting position.
///
/// ```dart
/// final TransformationController _transformationController = TransformationController();
/// Animation<Matrix4> _animationReset;
/// AnimationController _controllerReset;
/// Animation<Matrix4>? _animationReset;
/// late final AnimationController _controllerReset;
///
/// void _onAnimateReset() {
/// _transformationController.value = _animationReset.value;
/// _transformationController.value = _animationReset!.value;
/// if (!_controllerReset.isAnimating) {
/// _animationReset?.removeListener(_onAnimateReset);
/// _animationReset!.removeListener(_onAnimateReset);
/// _animationReset = null;
/// _controllerReset.reset();
/// }
......@@ -329,7 +329,7 @@ class InteractiveViewer extends StatefulWidget {
/// begin: _transformationController.value,
/// end: Matrix4.identity(),
/// ).animate(_controllerReset);
/// _animationReset.addListener(_onAnimateReset);
/// _animationReset!.addListener(_onAnimateReset);
/// _controllerReset.forward();
/// }
///
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment