createTextBuffer method

Pointer<TextBufferHandle> createTextBuffer(
  1. int length,
  2. int widthMethod
)

Creates a text buffer with capacity length using width method widthMethod, and returns its handle. Throws FFIException on failure.

Implementation

Pointer<TextBufferHandle> createTextBuffer(int length, int widthMethod) =>
    _guard(
      'Failed to create text buffer',
      () => _generated
          .createTextBuffer(length, widthMethod)
          .cast<TextBufferHandle>(),
    );