StringParser constructor Null safety

StringParser(
  1. String newValue
)

Implementation

StringParser(String newValue)
    : value = newValue.length == 2
          ? ''
          : newValue.substring(1, newValue.length - 1);