From 5e4df715e571aef032fa9c8b125f45ba835dc064 Mon Sep 17 00:00:00 2001 From: fzyzcjy <5236035+fzyzcjy@users.noreply.github.com> Date: Fri, 28 Apr 2023 11:05:32 +0800 Subject: [PATCH] Add `fit` field, since making fit=passthrough is necessary sometimes for UI --- lib/src/portal_target.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/src/portal_target.dart b/lib/src/portal_target.dart index d3f2a5e..2eda736 100644 --- a/lib/src/portal_target.dart +++ b/lib/src/portal_target.dart @@ -205,6 +205,7 @@ class PortalTarget extends StatefulWidget { this.portalFollower, this.portalCandidateLabels = const [PortalLabel.main], this.debugName, + this.fit = StackFit.loose, required this.child, }) : assert(visible == false || portalFollower != null), super(key: key); @@ -216,6 +217,7 @@ class PortalTarget extends StatefulWidget { final PortalFollower? portalFollower; final List> portalCandidateLabels; final String? debugName; + final StackFit fit; final Widget child; @override @@ -276,6 +278,7 @@ class _PortalTargetState extends State { _sanityCheckNestedPortalTarget(context, scope); return Stack( + fit: widget.fit, children: [ EnhancedCompositedTransformTarget( link: _link,