Movatterモバイル変換


[0]ホーム

URL:


menu
  1. flutter_hooks package
  2. documentation
  3. flutter_hooks.dart
  4. useAnimationController function
useAnimationController function

useAnimationController function

AnimationControlleruseAnimationController({
  1. Duration?duration,
  2. Duration?reverseDuration,
  3. String?debugLabel,
  4. doubleinitialValue =0,
  5. doublelowerBound =0,
  6. doubleupperBound =1,
  7. TickerProvider?vsync,
  8. AnimationBehavioranimationBehavior =AnimationBehavior.normal,
  9. List<Object?>?keys,
})

Creates anAnimationController and automatically disposes it when necessary.

If novsync is provided, theTickerProvider is implicitly obtained usinguseSingleTickerProvider.If avsync is specified, changing the instance ofvsync will result in a call toAnimationController.resync.It is not possible to switch between implicit and explicitvsync.

Changing theduration parameter automatically updates theAnimationController.duration.

initialValue,lowerBound,upperBound anddebugLabel are ignored after the first call.

See also:

Implementation

AnimationController useAnimationController({  Duration? duration,  Duration? reverseDuration,  String? debugLabel,  double initialValue = 0,  double lowerBound = 0,  double upperBound = 1,  TickerProvider? vsync,  AnimationBehavior animationBehavior = AnimationBehavior.normal,  List<Object?>? keys,}) {  vsync ??= useSingleTickerProvider(keys: keys);  return use(    _AnimationControllerHook(      duration: duration,      reverseDuration: reverseDuration,      debugLabel: debugLabel,      initialValue: initialValue,      lowerBound: lowerBound,      upperBound: upperBound,      vsync: vsync,      animationBehavior: animationBehavior,      keys: keys,    ),  );}
  1. flutter_hooks package
  2. documentation
  3. flutter_hooks
  4. useAnimationController function
flutter_hooks library

[8]ページ先頭

©2009-2025 Movatter.jp