MovaMiniWindow class

The draggable mini window itself, holding a MovaPlayer on the borrowed api.

Mount-agnostic by design: it fills whatever box it is given and does its own positioning inside, so the very same widget works as an OverlayEntry's child (in-page floating, via MovaMini.showInPage) and as a Positioned.fill child of a host-level Stack (persistent floating, via MovaMiniHost). It must never assume which one it is in, and must never be a Positioned itself.

Drag moves it (clamped every frame); release hands the rect to MovaMiniOpts.effectivePlacement and animates to the result. Tapping the picture invokes MovaMini.onTapContent (a no-op unless the host sets it); tapping the close affordance always calls MovaMini.close.

可拖拽的小窗本体,内部用借来的 api 挂一个 MovaPlayer。

设计上与挂载方式无关:它撑满外部给它的盒子,在盒子内部自行定位,因此同 一个 widget 既能当 OverlayEntry 的 child(页内悬浮,经 MovaMini.showInPage),也能当宿主级 Stack 的 Positioned.fill child (持久悬浮,经 MovaMiniHost)。它绝不许假设自己在哪一种里,也绝不许自己就 是 Positioned。

拖动即移动(每帧钳制);松手把矩形交给 MovaMiniOpts.effectivePlacement 并动画到结果。点画面触发 MovaMini.onTapContent(宿主未设置时是空操作); 点关闭按钮总是调 MovaMini.close。

Inheritance

Constructors

MovaMiniWindow({Key? key, required MovaMini mini, required IMovaApi api, required MovaMiniOpts opts})
Creates the mini window.
const

Properties

api → IMovaApi
The borrowed player this window plays.
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
mini → MovaMini
The route-independent holder this window reads/writes its rect through.
final
opts → MovaMiniOpts
Sizing/placement/dismiss options.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<MovaMiniWindow>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited