toString method

  1. @override
String toString()
override

Returns the string representation of the dropdown item value. If the value is null, it returns the label, or 'n/a' if label is null.

Implementation

@override
String toString() => value?.toString() ?? label ?? 'n/a';