firstOrNull property
String?
firstOrNull
- return the first character
- return
null
if isEmpty
Implementation
String? get firstOrNull => isEmpty ? null : this[0];
null
if isEmptyString? get firstOrNull => isEmpty ? null : this[0];