mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-07 21:48:14 -08:00
16 lines
392 B
Dart
16 lines
392 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
extension EnsureVisibleHelper on BuildContext {
|
|
Future<void> ensureVisible({
|
|
Duration duration = const Duration(milliseconds: 225),
|
|
double? alignment,
|
|
Curve curve = Curves.fastOutSlowIn,
|
|
}) {
|
|
return Scrollable.ensureVisible(
|
|
this,
|
|
duration: duration,
|
|
alignment: alignment ?? 0.5,
|
|
curve: curve,
|
|
);
|
|
}
|
|
}
|