sizeForNumberOfPages method

CGSize sizeForNumberOfPages(
  1. int pageCount
)

Returns the minimum size required to display indicators for the given page count. Can be used to size the control if the page count could change.

Implementation

objc.CGSize sizeForNumberOfPages(int pageCount) {
  final _$$ref = object$.ref;
  objc.checkOsVersionInternal('UIPageControl.sizeForNumberOfPages:', iOS: (false, (2, 0, 0)));
  final $ptr = pkg_ffi.calloc<objc.CGSize>();
  objc.useMsgSendVariants
      ? _objc_msgSend_17w0i2jStret($ptr, _$$ref.pointer, _sel_sizeForNumberOfPages_, pageCount)
      : $ptr.ref = _objc_msgSend_17w0i2j(_$$ref.pointer, _sel_sizeForNumberOfPages_, pageCount);
  final $finalizable = $ptr.cast<ffi.Uint8>().asTypedList(
    ffi.sizeOf<objc.CGSize>(),
    finalizer: pkg_ffi.calloc.nativeFree,
  );
  return ffi.Struct.create<objc.CGSize>($finalizable);
}