Answers for "enum extention dart"

1

enum extention dart

enum SelectedColor {  primaryColor,  secondaryColor,}

extension SelectedColorExtension on SelectedColor 
{  
   String get textAsString => this.toString().split(".")[1];
}
Posted by: Guest on June-09-2021

Browse Popular Code Answers by Language