FPortal constructor

const FPortal({
  1. required Widget portalBuilder(
    1. BuildContext context,
    2. OverlayPortalController controller
    ),
  2. OverlayPortalController? controller,
  3. FPortalConstraints constraints = const FPortalConstraints(),
  4. AlignmentGeometry portalAnchor = .topCenter,
  5. AlignmentGeometry childAnchor = .bottomCenter,
  6. FPortalSpacing spacing = .zero,
  7. FPortalOverflow overflow = .flip,
  8. Offset offset = .zero,
  9. EdgeInsetsGeometry? viewInsets,
  10. Widget? barrier,
  11. ValueWidgetBuilder<OverlayPortalController> builder = _builder,
  12. Widget? child,
  13. Key? key,
})

Creates a portal.

Contract

Throws AssertionError if builder and child are both null.

Implementation

const FPortal({
  required this.portalBuilder,
  this.controller,
  this.constraints = const FPortalConstraints(),
  this.portalAnchor = .topCenter,
  this.childAnchor = .bottomCenter,
  this.spacing = .zero,
  this.overflow = .flip,
  this.offset = .zero,
  this.viewInsets,
  this.barrier,
  this.builder = _builder,
  this.child,
  super.key,
}) : assert(builder != _builder || child != null, 'Either builder or child must be provided');