AnchorlableController constructor

AnchorlableController({
  1. GlobalKey<State<StatefulWidget>>? initialAnchorKey,
  2. String? debugLabel,
  3. bool keepScrollOffset = true,
})

Implementation

AnchorlableController({
  this.initialAnchorKey,
  String? debugLabel,
  bool keepScrollOffset = true,
}) : super(debugLabel: debugLabel, keepScrollOffset: keepScrollOffset) {
  if (initialAnchorKey != null) {
    WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
      jumpToAnchor(initialAnchorKey!);
    });
  }
}