display method

  1. @override
String display()
override

Implementation

@override
String display() {
  final fields = _fields.map(
    (entry) {
      final sb = StringBuffer(entry.key);
      if (entry.value.name.isNotEmpty && entry.value.name != 'null') {
        sb.write(':${entry.value.display()}');
      }
      return sb.toString();
    },
  );
  return "variant {${fields.join('; ')}}";
}