serialize method

dynamic serialize(
  1. XmlBuilder builder
)

Implementation

serialize(XmlBuilder builder) {
  if (offset != null) {
    if (offset!.x != 0 && offset!.x != null) {
      builder.attribute('x', offset!.x!);
    }
    if (offset!.y != 0 && offset!.y != null) {
      builder.attribute('y', offset!.y!);
    }
  }
  if (size != null) {
    if (size!.width != double.infinity && size!.width != null) {
      builder.attribute('width', size!.width!);
    }
    if (size!.height != double.infinity && size!.height != null) {
      builder.attribute('height', size!.height!);
    }
  }
  if (condition != null) {
    builder.attribute('if', condition!);
  }
}