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';
41
41
part 'tree_sliver_controller.dart' ;
42
42
part 'widget_states_controller.dart' ;
43
43
part 'widgets_binding_observer.dart' ;
44
- part 'snapshot_controller.dart' ;
44
+ part 'snapshot_controller.dart' ;
Original file line number Diff line number Diff line change 1
1
part of 'hooks.dart' ;
2
2
3
3
/// Creates and disposes a [SnapshotController] .
4
- ///
4
+ ///
5
5
/// Note that [allowSnapshotting] must be set to `true`
6
6
/// in order for this controller to actually do anything.
7
7
/// This is consistent with [SnapshotController.new] .
8
- ///
8
+ ///
9
9
/// If [allowSnapshotting] changes on subsequent calls to [useSnapshotController] ,
10
10
/// [SnapshotController.allowSnapshotting] will be called to update accordingly.
11
- ///
11
+ ///
12
12
/// ```dart
13
13
/// final controller = useSnapshotController(allowSnapshotting: true);
14
14
/// // is equivalent to
@@ -36,13 +36,14 @@ class _SnapshotControllerHook extends Hook<SnapshotController> {
36
36
final bool allowSnapshotting;
37
37
38
38
@override
39
- HookState <SnapshotController , Hook <SnapshotController >>
40
- createState () => _SnapshotControllerHookState ();
39
+ HookState <SnapshotController , Hook <SnapshotController >> createState () =>
40
+ _SnapshotControllerHookState ();
41
41
}
42
42
43
43
class _SnapshotControllerHookState
44
44
extends HookState <SnapshotController , _SnapshotControllerHook > {
45
- late final controller = SnapshotController (allowSnapshotting: hook.allowSnapshotting);
45
+ late final controller =
46
+ SnapshotController (allowSnapshotting: hook.allowSnapshotting);
46
47
47
48
@override
48
49
void didUpdateHook (_SnapshotControllerHook oldHook) {
You can’t perform that action at this time.
0 commit comments