mirror of
https://github.com/jagandeepbrar/lunasea.git
synced 2026-08-31 12:42:34 +00:00
17 lines
477 B
Dart
17 lines
477 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:lunasea/core.dart';
|
|
|
|
extension ScrollControllerExtension on ScrollController {
|
|
/// Animate a [Scrollable] back to 1.00, with a predefined duration and curve.
|
|
Future<void> lunaAnimateToStart() async {
|
|
if (this.hasClients)
|
|
this.animateTo(
|
|
0.00,
|
|
duration: const Duration(
|
|
milliseconds: LunaUI.ANIMATION_SPEED_SCROLLING,
|
|
),
|
|
curve: Curves.easeInOutQuart,
|
|
);
|
|
}
|
|
}
|