nullableStateType property

String get nullableStateType

Returns the nullable version of stateType. If stateType already ends with '?', returns it as-is to avoid 'Type??'.

Implementation

String get nullableStateType {
  final st = stateType;
  return st.endsWith('?') ? st : '$st?';
}