closeFooterSecondary method

Future closeFooterSecondary({
  1. Duration? duration = const Duration(milliseconds: 200),
  2. Curve curve = Curves.linear,
})

Close footer secondary. duration See ScrollPosition.animateTo. curve See ScrollPosition.animateTo.

Implementation

Future closeFooterSecondary({
  Duration? duration = const Duration(milliseconds: 200),
  Curve curve = Curves.linear,
}) async {
  if (_state == null) {
    return;
  }
  if (_state!._footer.secondaryTriggerOffset != null) {
    final footerNotifier = _state!._footerNotifier;
    if (footerNotifier.mode != IndicatorMode.secondaryOpen) {
      return;
    }
    await footerNotifier.animateToOffset(
      offset: 0,
      mode: IndicatorMode.inactive,
      duration: duration,
      curve: curve,
    );
  }
}