expand method

Future<void> expand(
  1. int index, {
  2. Curve curve = Curves.easeInOut,
  3. Duration duration = const Duration(milliseconds: 150),
})

expand the index to occupy the opened action panel according to the openedPosition if the openedPosition is null, it would do nothing

Implementation

Future<void> expand(
  int index, {
  Curve curve = Curves.easeInOut,
  Duration duration = const Duration(milliseconds: 150),
}) async {
  switch (openedPosition) {
    case ActionPosition.pre:
      await preActionController?.expand(
        index,
        curve: curve,
        duration: duration,
      );
      break;
    case ActionPosition.post:
      await postActionController?.expand(
        index,
        curve: curve,
        duration: duration,
      );
      break;
    default:
      break;
  }
}