name method

String name()

Returns this enum name to be used over the wire with the native side. TODO(luan) other enums use toString(), we should unify.

Implementation

String name() {
  switch (this) {
    case PlayingRoute.speakers:
      return 'speakers';
    case PlayingRoute.earpiece:
      return 'earpiece';
  }
}