fromDirection method

IconPosition? fromDirection(
  1. DismissDirection direction
)

Implementation

IconPosition? fromDirection(DismissDirection direction){
  switch (direction) {
    case DismissDirection.endToStart:
      return IconPosition.LEFT;
    case DismissDirection.startToEnd:
      return IconPosition.RIGHT;
    case DismissDirection.down:
      return IconPosition.BOTTOM;
    case DismissDirection.up:
      return IconPosition.TOP;
    default:
      return null;
  }
}