FloatingOverlayController.relativeSize constructor
FloatingOverlayController.relativeSize({})
The controller for the FloatingOverlay.
Be sure to initialize this only once (probably inside initState
method)
when inside a Stateful Widget that has an AnimationController inside.
Implementation
FloatingOverlayController.relativeSize({
/// Minimum scale to resize the floating child.
double? minScale,
/// Maximum scale to resize the floating child.
double? maxScale,
/// Padding inside the constraints of the floating child's space to float.
EdgeInsets? padding,
/// Offset inside the constraints of the floating child's space to float.
Offset? start,
/// If the floating child's space to float will be limited by the maximum
/// size that the FloatingOverlay can be.
bool constrained = false,
/// Cursor detection pixel area.
double? cursorArea,
}) : _cursorArea = cursorArea,
_offset = _FloatingOverlayOffset(
start: start,
padding: padding,
constrained: constrained,
),
_scale = _FloatingOverlayScale.relative(
minScale: minScale,
maxScale: maxScale,
),
super(
FloatingOverlayData(
childSize: Size.zero,
scale: 1.0,
position: _FloatingOverlayOffset(
start: start,
padding: padding,
).state,
),
) {
_cursorController = _FloatingOverlayCursor(scale: _scale, offset: _offset);
_streamProcess();
}