Skip to content

Commit

Permalink
Add fit field, since making fit=passthrough is necessary sometimes …
Browse files Browse the repository at this point in the history
…for UI
  • Loading branch information
fzyzcjy authored Apr 28, 2023
1 parent 64d0f1a commit 5e4df71
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/src/portal_target.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -216,6 +217,7 @@ class PortalTarget extends StatefulWidget {
final PortalFollower? portalFollower;
final List<PortalLabel<dynamic>> portalCandidateLabels;
final String? debugName;
final StackFit fit;
final Widget child;

@override
Expand Down Expand Up @@ -276,6 +278,7 @@ class _PortalTargetState extends State<PortalTarget> {
_sanityCheckNestedPortalTarget(context, scope);

return Stack(
fit: widget.fit,
children: <Widget>[
EnhancedCompositedTransformTarget(
link: _link,
Expand Down

0 comments on commit 5e4df71

Please sign in to comment.