toTop method

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

Implementation

Future<void> toTop({
  Duration duration = const Duration(milliseconds: 500),
  Curve curve = Curves.easeInOut,
}) async {
  if (!hasClients) return;
  await animateTo(0, duration: duration, curve: curve);
}