StacClipRRect class

A Stac model representing Flutter's ClipRRect widget.

Clips its child using a rounded-rectangle shape defined by borderRadius.

{@tool snippet} Dart Example:

StacClipRRect(
  borderRadius: StacBorderRadius.only(topLeft: 12, topRight: 12),
  clipBehavior: StacClip.antiAlias,
  child: StacContainer(color: '#FF0000'),
)

{@end-tool}

{@tool snippet} JSON Example:

{
  "type": "clipRRect",
  "borderRadius": {"topLeft": 12, "topRight": 12},
  "clipBehavior": "antiAlias",
  "child": {"type": "container", "color": "#FF0000"}
}

{@end-tool}

See also:

  • Flutter's ClipRRect documentation (https://api.flutter.dev/flutter/widgets/ClipRRect-class.html)
Inheritance
Annotations
  • @JsonSerializable(explicitToJson: true)

Constructors

StacClipRRect.new({StacBorderRadius? borderRadius, StacClip? clipBehavior, StacWidget? child})
Creates a StacClipRRect.
const
StacClipRRect.fromJson(Map<String, dynamic> json)
Creates a StacClipRRect from a JSON map.
factory

Properties

borderRadius StacBorderRadius?
The border radius of the rounded-rectangle clip.
final
child StacWidget?
The widget to be clipped.
final
clipBehavior StacClip?
The clipping behavior to use.
final
hashCode int
The hash code for this object.
no setterinherited
jsonData Map<String, dynamic>?
Raw JSON data for this widget
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type String
Widget type identifier.
no setteroverride

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts this StacClipRRect instance to a JSON map.
override
toString() String
A string representation of this object.
inherited

Operators

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