File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed
packages/flutter_hooks/lib/src Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -41,4 +41,4 @@ part 'transformation_controller.dart';
4141part 'tree_sliver_controller.dart' ;
4242part 'widget_states_controller.dart' ;
4343part 'widgets_binding_observer.dart' ;
44- part 'snapshot_controller.dart' ;
44+ part 'snapshot_controller.dart' ;
Original file line number Diff line number Diff line change 11part of 'hooks.dart' ;
22
33/// Creates and disposes a [SnapshotController] .
4- ///
4+ ///
55/// Note that [allowSnapshotting] must be set to `true`
66/// in order for this controller to actually do anything.
77/// This is consistent with [SnapshotController.new] .
8- ///
8+ ///
99/// If [allowSnapshotting] changes on subsequent calls to [useSnapshotController] ,
1010/// [SnapshotController.allowSnapshotting] will be called to update accordingly.
11- ///
11+ ///
1212/// ```dart
1313/// final controller = useSnapshotController(allowSnapshotting: true);
1414/// // is equivalent to
@@ -36,13 +36,14 @@ class _SnapshotControllerHook extends Hook<SnapshotController> {
3636 final bool allowSnapshotting;
3737
3838 @override
39- HookState <SnapshotController , Hook <SnapshotController >>
40- createState () => _SnapshotControllerHookState ();
39+ HookState <SnapshotController , Hook <SnapshotController >> createState () =>
40+ _SnapshotControllerHookState ();
4141}
4242
4343class _SnapshotControllerHookState
4444 extends HookState <SnapshotController , _SnapshotControllerHook > {
45- late final controller = SnapshotController (allowSnapshotting: hook.allowSnapshotting);
45+ late final controller =
46+ SnapshotController (allowSnapshotting: hook.allowSnapshotting);
4647
4748 @override
4849 void didUpdateHook (_SnapshotControllerHook oldHook) {
You can’t perform that action at this time.
0 commit comments