FPortal constructor

const FPortal({
  1. required Widget portalBuilder(
    1. BuildContext,
    2. OverlayPortalController
    ),
  2. OverlayPortalController? controller,
  3. FPortalConstraints constraints = const FPortalConstraints(),
  4. AlignmentGeometry portalAnchor = Alignment.topCenter,
  5. AlignmentGeometry childAnchor = Alignment.bottomCenter,
  6. FPortalSpacing spacing = FPortalSpacing.zero,
  7. Offset shift(
    1. Size,
    2. FPortalChildBox,
    3. FPortalBox
    ) = FPortalShift.flip,
  8. Offset 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 = Alignment.topCenter,
  this.childAnchor = Alignment.bottomCenter,
  this.spacing = FPortalSpacing.zero,
  this.shift = FPortalShift.flip,
  this.offset = 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');