twoLevelComplete method

Future<void> twoLevelComplete(
  1. {Duration duration = const Duration(milliseconds: 500),
  2. Curve curve = Curves.linear}
)

end twoLeveling,will return back first floor

Implementation

Future<void> twoLevelComplete(
    {Duration duration: const Duration(milliseconds: 500),
    Curve curve: Curves.linear}) {
  headerMode?.value = RefreshStatus.twoLevelClosing;
  WidgetsBinding.instance.addPostFrameCallback((_) {
    return position
        .animateTo(0.0, duration: duration, curve: curve)
        .whenComplete(() {
      headerMode.value = RefreshStatus.idle;
    });
  });
  return null;
}