name property
String
get
name
Implementation
String get name {
if (this == TWSpacingValue.px || this == TWSpacingValue.size1) {
return 'px';
} else if (this.toString().contains('Half')) {
if (this == TWSpacingValue.sizeHalf) return '0.5';
if (this == TWSpacingValue.sizeOneAndHalf) return '1.5';
if (this == TWSpacingValue.sizeTwoAndHalf) return '2.5';
if (this == TWSpacingValue.sizeThreeAndHalf) return '3.5';
}
final number =
toString().split('.').last.substring(4); // remove 'span' prefix
return '$number';
}