Migrated docs to nnbd (#72305)
Simply part of the movement to get our docs aligned with NNBD.
This commit is contained in:
parent
eb01b7e5bd
commit
34d4c7fe01
@ -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();
|
||||
/// }
|
||||
///
|
||||
|
Loading…
x
Reference in New Issue
Block a user