getFormattingType property

Future<FormattingType> getFormattingType

Retrieves the formatting type used for presenting decoded barcode data.

Returns a Future that completes with a FormattingType enum value representing the formatting type.

Example usage:

FormattingType type = await _barkoder.getFormattingType;
print('Formatting type: $type');

Implementation

Future<FormattingType> get getFormattingType async {
  if (_isBarkoderViewNotMounted) {
    return Future.error(PlatformException(
        code: BarkoderErrors.barkoderViewNotMounted,
        message: BarkoderErrors.barkodeViewNotMountedDesc));
  }

  return await _methodChannel.invokeMethod('getFormattingType').then((index) {
    return FormattingType.values[index];
  });
}