alignment property

Alignment get alignment

Bu extension, her bir NotificationPosition değerini karşılık gelen Alignment değerine dönüştürür. This extension converts each NotificationPosition value to the corresponding Alignment value.

Implementation

Alignment get alignment {
  switch (this) {
    case NotificationPosition.center:
      return Alignment.center;
    case NotificationPosition.centerRight:
      return Alignment.centerRight;
    case NotificationPosition.centerLeft:
      return Alignment.centerLeft;
    case NotificationPosition.topCenter:
      return Alignment.topCenter;
    case NotificationPosition.topRight:
      return Alignment.topRight;
    case NotificationPosition.topLeft:
      return Alignment.topLeft;
    case NotificationPosition.bottomCenter:
      return Alignment.bottomCenter;
    case NotificationPosition.bottomRight:
      return Alignment.bottomRight;
    case NotificationPosition.bottomLeft:
      return Alignment.bottomLeft;
    default:
      return Alignment.topCenter;
  }
}