builder method

MarginAttribute builder(
  1. SpaceProperty prop,
  2. int space
)
override

Implementation

MarginAttribute builder(SpaceProperty prop, int space) {
  switch (prop) {
    case SpaceProperty.all:
      return MarginAttribute(
        left: space,
        top: space,
        right: space,
        bottom: space,
      );
    case SpaceProperty.left:
      return MarginAttribute(
        left: space,
      );
    case SpaceProperty.top:
      return MarginAttribute(
        top: space,
      );
    case SpaceProperty.right:
      return MarginAttribute(
        right: space,
      );
    case SpaceProperty.bottom:
      return MarginAttribute(
        bottom: space,
      );
    case SpaceProperty.horizontal:
      return MarginAttribute(
        left: space,
        right: space,
      );
    case SpaceProperty.vertical:
      return MarginAttribute(
        top: space,
        bottom: space,
      );
    default:
      return MarginAttribute();
  }
}