autoSelect method

void autoSelect(
  1. dynamic pageInfo, {
  2. Duration? duration,
  3. Curve curve = Curves.easeInOutCubicEmphasized,
})

Implementation

void autoSelect(
  dynamic pageInfo, {
  Duration? duration,
  Curve curve = Curves.easeInOutCubicEmphasized,
}) {
  if (pageInfo is Symbol) {
    pageInfo = albums.indexWhere((e) => e.iD == pageInfo);
  }
  $def(() {
    $set(#control.selection, pageInfo is int ? pageInfo : selection);
    $set(#control.duration, duration ?? Timer.secs(.5));
    capture.$set(#control.curve, curve); // refresh
  });
}