composeSymbol method

void composeSymbol(
  1. StringBuffer buffer,
  2. Symbol symbol
)

Implementation

void composeSymbol(StringBuffer buffer, Symbol symbol) {
  if (symbol.prefix != null) {
    buffer.write(symbol.prefix!.code);
  }
  buffer.write(symbol.unit?.code);
  if (symbol.exponent != 1) {
    buffer.write(symbol.exponent);
  }
}