title: How to represent ObjC enum AVAudioSessionPortOverride which has declaration of int and string using Dart ffi?
body: <p>I'm working on a cross platform sound API for Flutter.
  We're trying to stop using Objective C/Swift for the iOS portion of the API and we're using Dart ffi as a replacement.</p>
  <p>ffi(foreign function interface) allows dart to call into an Obj C API.</p>
  <p>This means we need to create a dart library which wraps the Obj C audio library.</p>
  <p>Whilst doing this we encountered the <code>AVAudioSessionPortOverride</code> enum which has two declarations; <code>AVAudioSessionPortOverrideSpeaker = 'spkr'</code> and <code>AVAudioSessionPortOverrideNone = 0</code>.</p>
  <p>I'm confused as to what's going on here as one of these declarations is an int whilst the other is a string.</p>
  <p>I note that <code>AVAudioSessionPortOverride</code> extends an NSUInteger so how is the string being handled. Is it somehow being converted to an int? if so any ideas on how I would do this in dart?</p>
  <p>Here's what we have so far:</p>
  <pre><code>class AVAudioSessionPortOverride extends NSUInteger {
    const AVAudioSessionPortOverride(int value) : super(value);
  
    static AVAudioSessionPortOverride None = AVAudioSessionPortOverride(0);
  
    static const AVAudioSessionPortOverride Speaker =
        AVAudioSessionPortOverride('spkr');
  }
  </code></pre>