containerSize property Null safety

Size containerSize

Gets the size of the SelectionContainer of this delegate.

Can only be called after SelectionContainer is laid out.

Implementation

Size get containerSize {
  assert(
    _selectionContainerContext?.findRenderObject() != null,
    'containerSize cannot be called before SelectionContainer is laid out.',
  );
  final RenderBox box = _selectionContainerContext!.findRenderObject()! as RenderBox;
  return box.size;
}