DVModifier class

Constructors

DVModifier({DVDropTargetSpec? dropTargetValue, DVDragPayload? draggableValue, String? dragDropSite, EdgeInsetsGeometry? paddingValue, EdgeInsetsGeometry? marginValue, BorderRadiusGeometry? borderRadius, BoxBorder? borderValue, Color? textColor, double? fontSizeValue, FontWeight? fontWeightValue, double? letterSpacingValue, String? fontFamilyValue, double? lineHeightValue, int? maxLinesValue, TextOverflow? overflowValue, TextDecoration? decorationValue, Color? boxColor, Gradient? gradientValue, BoxConstraints? constraintsValue, Duration? animateDuration, Curve animateCurve = Curves.easeOut, double? opacityValue, double? rotateDegrees, Offset? offsetValue, double? blurSigma, double? backdropBlurSigma, bool centeredValue = false, bool fillValue = false, bool clipValue = false, ValueChanged<bool>? onHoverChangedCallback, DVModifier? hoverValue, bool revealValue = false, Duration revealDelay = Duration.zero, double? widthValue, double? heightValue, AlignmentGeometry? alignmentValue, List<BoxShadow>? shadows, VoidCallback? onTapCallback, VoidCallback? onLongPressCallback, DVGestureSet? gestureSet, DecorationImage? bgImage, DVMediaSource? bgVideo, String? semanticLabelValue, String? tooltipValue, String? tapSite, String? semanticHintValue, bool? semanticButtonValue, int? semanticHeadingValue, String? semanticRoleValue, Size? minimumTapTargetValue, bool inputValue = false, String? inputLabelValue, String? inputHintValue, String? inputHelperValue, bool inputObscureText = false, DVVisibilityToggle inputVisibilityToggle = DVVisibilityToggle.none, bool inputMultiline = false, VoidCallback? inputSubmitted, String? inputErrorText, ValueChanged<String>? inputChanged})
const
DVModifier.fromStyle()
const

Properties

alignmentValue → AlignmentGeometry?
final
animateCurve → Curve
final
animateDuration → Duration?
How long a change to this box's decoration takes to arrive. Null means no animation at all, which is what almost every box wants.
final
backdropBlurSigma → double?
How far whatever is behind the box is blurred.
final
bgImage → DecorationImage?
final
bgVideo → DVMediaSource?
A video behind the box's content, muted and looping.
final
blurSigma → double?
How far the box and its contents are blurred.
final
borderRadius → BorderRadiusGeometry?
final
borderValue → BoxBorder?
A border drawn round the box.
final
boxColor → Color?
final
centeredValue → bool
Whether the box is centred within its parent.
final
clipValue → bool
Whether the box crops whatever is in it to its own bounds.
final
constraintsValue → BoxConstraints?
A maximum or minimum the box is laid out within.
final
decorationValue → TextDecoration?
An underline or a strike-through, or null for whatever the text already had.
final
dragDropSite → String?
The application file and line that wrote .dropTarget or .draggable, kept in debug builds so a drop zone or a draggable with no name can be reported where it was drawn.
final
draggableValue → DVDragPayload?
What .draggable(...) carries.
final
dropTargetValue → DVDropTargetSpec?
What .dropTarget(...) was given.
final
fillValue → bool
Whether the box takes the room its DVBox.list or DVBox.row leaves: the height left in a list, the width left in a row. See fill.
final
fontFamilyValue → String?
The typeface, by the family name a design names it by.
final
fontSizeValue → double?
final
fontWeightValue → FontWeight?
final
gestureSet → DVGestureSet?
Double tap, swipes and a custom gesture (see onDoubleTap, onSwipeUp, onGesture).
final
gradientValue → Gradient?
A gradient behind the box, painted instead of boxColor where both are set. The one thing a hero band needs that a flat colour cannot give it.
final
hasBoxStyling → bool
Fades the whole box, children included. Whether this modifier says anything about the box round a widget.
no setter
hashCode → int
The hash code for this object.
no setterinherited
heightValue → double?
final
hoverValue → DVModifier?
Applied on top of this modifier while the pointer is over the box.
final
inputChanged → ValueChanged<String>?
final
inputErrorText → String?
What is wrong with what was typed here, shown under the field and read out with it.
final
inputHelperValue → String?
final
inputHintValue → String?
final
inputLabelValue → String?
final
inputMultiline → bool
A field that takes more than one line: Enter is a newline in it, and never a submit.
final
inputObscureText → bool
final
inputSubmitted → VoidCallback?
Called when Enter arrives in this field and the form has been asked to do something about it.
final
inputValue → bool
final
inputVisibilityToggle → DVVisibilityToggle
What reveals an obscured value in this field. DVVisibilityToggle.none until .input() says otherwise, which is .eye on a password field.
final
letterSpacingValue → double?
final
lineHeightValue → double?
Line height as a multiple of the font size, which is how Flutter reads it. A design says it in points; the multiple is what survives a change of size.
final
marginValue → EdgeInsetsGeometry?
final
maxLinesValue → int?
How many lines the text may take, and what happens to the rest.
final
minimumTapTargetValue → Size?
final
offsetValue → Offset?
How far the box is moved from where layout put it, in logical pixels: right and down are positive. Moved after layout, so the box keeps its size, the boxes around it keep their places, and taps land where it is drawn. A panel that waits off-screen sits there whole this way; pushed by a margin it is squeezed to nothing instead.
final
onHoverChangedCallback → ValueChanged<bool>?
Told whether the pointer is over the box.
final
onLongPressCallback → VoidCallback?
The second thing a control does, on a long press (see onLongPress).
final
onTapCallback → VoidCallback?
final
opacityValue → double?
final
overflowValue → TextOverflow?
final
paddingValue → EdgeInsetsGeometry?
final
revealDelay → Duration
A stagger, so a row of cards does not all arrive at once.
final
revealValue → bool
Fade and rise into view the first time the box is scrolled to.
final
rotateDegrees → double?
How far the box is turned, in degrees, clockwise.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
semanticButtonValue → bool?
final
semanticHeadingValue → int?
1 to 6, matching HTML's six heading levels and every platform's accessibility notion of one.
final
semanticHintValue → String?
final
semanticLabelValue → String?
final
semanticRoleValue → String?
A Dartvel role, namespaced, travelling as the node's identifier.
final
shadows → List<BoxShadow>?
final
tapSite → String?
The application file and line that wrote .onTap, kept in debug builds so a control with no name can be reported where it was drawn.
final
textColor → Color?
final
tooltipValue → String?
What the control is, shown on hover, keyboard focus and long press, and the same words as its screen-reader name. See DVTooltipTarget.
final
widthValue → double?
final

Methods

align(AlignmentGeometry value) → DVModifier
animate(Duration duration, {Curve curve = Curves.easeOut}) → DVModifier
Animates changes to this box's decoration and geometry over duration.
backdropBlur(double sigma) → DVModifier
Blurs whatever shows through the box, leaving the box sharp.
backgroundColor(Color value) → DVModifier
backgroundImage(Object source, {BoxFit fit = BoxFit.cover, double opacity = 1, ImageRepeat repeat = ImageRepeat.noRepeat}) → DVModifier
The image behind a box: a bundled one, or one a model holds.
backgroundVideo(Object source) → DVModifier
The video behind a box: a bundled file, or media a model holds.
blur(double sigma) → DVModifier
Blurs the box and everything in it by sigma.
border(BoxBorder value) → DVModifier
Draws value round the box.
card() → DVModifier
centered() → DVModifier
Centres the box within its parent.
clipContent() → DVModifier
Crops whatever is in the box to the box.
color(Color value) → DVModifier
decoration(TextDecoration value) → DVModifier
Underlines the text, strikes it through, or both.
draggable(DVDragPayload payload) → DVModifier
Carries payload to a drop target in this application, or out to another one where the platform has a drag out. Named like dropTarget: words inside, or .tooltip(...).
dropTarget({required void onDrop(DVDropEvent event), Set<DVDropType> types = const <DVDropType>{.files, .text, .urls}, void onHover(bool hovering)?}) → DVModifier
Takes files, links or text dropped on this widget: from another application where the platform has drag and drop, and from a .draggable(...) inside this one everywhere.
fill() → DVModifier
Takes the room the other children of its DVBox.list or DVBox.row leave: a header over a list that scrolls is the header at the height its contents need and the list with fill(), with nothing fixed that a larger font would overflow. Only for a direct child of a list or row whose own size is bounded; two filling children share the room.
fontFamily(String value) → DVModifier
The typeface, by family name.
fontSize(double value) → DVModifier
fontWeight(FontWeight value) → DVModifier
gradient(Gradient value) → DVModifier
Paints value behind the box.
heading(int level) → DVModifier
Shorthand alias for semanticHeading.
height(double value) → DVModifier
The box's height in points.
hover(DVModifier whenHovered) → DVModifier
What this box looks like while the pointer is over it.
input({String? label, String? hint, String? helper, bool obscureText = false, DVVisibilityToggle? visibilityToggle, bool multiline = false, String? error, VoidCallback? onSubmitted, ValueChanged<String>? onChanged}) → DVModifier
An editable text field. helper is shown under it at all times, where hint shows only while it is empty and focused.
letterSpacing(double value) → DVModifier
lineHeight(double value) → DVModifier
Line height as a multiple of the font size.
margin(double value) → DVModifier
marginOnly({double left = 0, double top = 0, double right = 0, double bottom = 0}) → DVModifier
Outer spacing on named edges, replacing the complete margin.
maxHeight(double value) → DVModifier
maxLines(int value) → DVModifier
The most lines the text may take.
maxWidth(double value) → DVModifier
The widest this box may be laid out, not the width it takes.
merge(DVModifier other) → DVModifier
This modifier with other's set fields layered over it.
minHeight(double value) → DVModifier
minimumTapTarget({double width = 48, double height = 48}) → DVModifier
minWidth(double value) → DVModifier
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
offset(double dx, double dy) → DVModifier
Moves the box dx right and dy down, in logical pixels, without changing its size or anything around it -- see offsetValue. With animate, a change of offset slides there.
onDoubleTap(VoidCallback callback) → DVModifier
A double tap.
onGesture(DVGesture gesture) → DVModifier
Anything the helpers above do not name: a drag, a pinch, a rotation, with its start, every update and its end.
onHoverChanged(ValueChanged<bool> onChanged) → DVModifier
Calls onChanged when the pointer enters or leaves the box.
onLongPress(VoidCallback callback) → DVModifier
The second thing a control does, on a long press: an app icon that opens on tap and offers pin, info and uninstall on a long press. A screen reader is offered it as a second action. The long press is the action's, so the tooltip shows on hover and keyboard focus only. Goes with onTap, which names the control and makes it reachable.
onPressed(VoidCallback callback) → DVModifier
Same as onTap.
onSwipeDown(VoidCallback callback) → DVModifier
A fling downward. Offered to a screen reader as scrolling down.
onSwipeLeft(VoidCallback callback) → DVModifier
A fling to the left, faster than dvSwipeVelocity. Offered to a screen reader as scrolling left.
onSwipeRight(VoidCallback callback) → DVModifier
A fling to the right. Offered to a screen reader as scrolling right.
onSwipeUp(VoidCallback callback) → DVModifier
A fling upward: an app drawer, a sheet. Offered to a screen reader as scrolling up.
onTap(VoidCallback callback) → DVModifier
Makes the box or text a control. The control must be named: by the words inside it, or by tooltip / semanticLabel. An icon with neither is an error naming the line that wrote this call.
opacity(double value) → DVModifier
overflow(TextOverflow value) → DVModifier
What happens to text past the limit.
padding(double value) → DVModifier
paddingOnly({double left = 0, double top = 0, double right = 0, double bottom = 0}) → DVModifier
Padding on named edges.
paddingSymmetric({double horizontal = 0, double vertical = 0}) → DVModifier
Padding per axis.
pageSlot(String name) → DVModifier
Mark this text as changing by request: a date, today's menu, an opening-hours line.
radius(BorderRadiusGeometry value) → DVModifier
Corners that are not all the same.
revealOnScroll({Duration delay = Duration.zero}) → DVModifier
Fades and rises into view the first time the box is scrolled to.
rotate(double degrees) → DVModifier
Turns the box by degrees, clockwise.
rounded(double value) → DVModifier
semanticButton([bool value = true]) → DVModifier
semanticHeading(int level) → DVModifier
Mark this as a heading at level.
semanticHint(String value) → DVModifier
semanticLabel(String value) → DVModifier
semanticRole(String role) → DVModifier
Declare what this is, beyond a label and a heading level.
shadow(List<BoxShadow> shadows) → DVModifier
tooltip(String value) → DVModifier
What this is, in words: the tooltip on mouse hover, keyboard focus and long press, and the screen-reader name, and (on the server-rendered page) the element's title and aria-label. Required of every control that is only a picture; a control with text takes it from the text.
toString() → String
A string representation of this object.
inherited
width(double value) → DVModifier

Operators

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