# toDecorationComponentPosition function Null safety

DecorationComponentPosition toDecorationComponentPosition(

1. int? index

)

## Implementation

    DecorationComponentPosition toDecorationComponentPosition(int? index) {
      switch (index) {
        case 0:
          return DecorationComponentPosition.leftIfSpaceAvailableOtherwiseTop;
        case 1:
          return DecorationComponentPosition.leftIfSpaceAvailableOtherwiseDrop;
        case 2:
          return DecorationComponentPosition.leftIfSpaceAvailableOtherwiseBottom;
        case 3:
          return DecorationComponentPosition.rightIfSpaceAvailableOtherwiseTop;
        case 4:
          return DecorationComponentPosition.rightIfSpaceAvailableOtherwiseDrop;
        case 5:
          return DecorationComponentPosition.rightIfSpaceAvailableOtherwiseBottom;
      }
      return DecorationComponentPosition.unknown;
    }