spacing static method

EdgeInsets spacing(
  1. UBlockType type
)

Vertical breathing room above/below a block of type.

Implementation

static EdgeInsets spacing(UBlockType type) {
  switch (type) {
    case UBlockType.h1:
    case UBlockType.h2:
      return const EdgeInsets.only(top: 16, bottom: 6);
    case UBlockType.h3:
    case UBlockType.h4:
    case UBlockType.h5:
    case UBlockType.h6:
      return const EdgeInsets.only(top: 12, bottom: 4);
    case UBlockType.divider:
    case UBlockType.image:
    case UBlockType.table:
      return const EdgeInsets.symmetric(vertical: 10);
    case UBlockType.paragraph:
    case UBlockType.quote:
    case UBlockType.code:
    case UBlockType.bulleted:
    case UBlockType.numbered:
    case UBlockType.checklist:
      return const EdgeInsets.symmetric(vertical: 4);
  }
}