toMethodChannelMap method

Map<String, dynamic> toMethodChannelMap()

Converts the options into a flat map that the method channel expects.

Implementation

Map<String, dynamic> toMethodChannelMap() {
  final Map<String, dynamic> map = {
    'payload': payload,
    if (promptMessage != null) 'promptMessage': promptMessage,
    'keyFormat': keyFormat.wireValue,
  };

  if (androidOptions != null) {
    map.addAll(androidOptions!.toMethodChannelMap());
  }

  if (iosOptions != null) {
    map.addAll(iosOptions!.toMethodChannelMap());
  }

  return map;
}