toPercent method
Implementation
Future<void> toPercent(
double percent, {
Duration duration = const Duration(milliseconds: 300),
Curve curve = Curves.easeInOut,
}) async {
if (!hasClients) return;
final target = position.maxScrollExtent * percent.clamp(0.0, 1.0);
await animateTo(target, duration: duration, curve: curve);
}