StacSafeArea class

A Stac model representing Flutter's SafeArea widget.

A widget that insets its child by sufficient padding to avoid intrusions by the operating system.

StacSafeArea(
  left: true,
  top: true,
  right: true,
  bottom: true,
  minimum: StacEdgeInsets.all(8.0),
  maintainBottomViewPadding: false,
  child: StacText(data: 'Content within safe area'),
)
{
  "type": "safeArea",
  "left": true,
  "top": true,
  "right": true,
  "bottom": true,
  "minimum": {
    "type": "edge_insets",
    "value": {"all": 8.0}
  },
  "maintainBottomViewPadding": false,
  "child": {"type": "text", "data": "Content within safe area"}
}
Inheritance
Annotations
  • @JsonSerializable()

Constructors

StacSafeArea.new({bool? left, bool? top, bool? right, bool? bottom, StacEdgeInsets? minimum, bool? maintainBottomViewPadding, StacWidget? child})
Creates a StacSafeArea with the given properties.
const
StacSafeArea.fromJson(Map<String, dynamic> json)
Creates a StacSafeArea from JSON.
factory

Properties

bottom bool?
Whether to avoid system intrusions on the bottom.
final
child StacWidget?
The widget below this widget in the tree.
final
hashCode int
The hash code for this object.
no setterinherited
jsonData Map<String, dynamic>?
Raw JSON data for this widget
finalinherited
left bool?
Whether to avoid system intrusions on the left.
final
maintainBottomViewPadding bool?
Specifies whether the SafeArea should maintain the MediaQueryData.viewPadding instead of the MediaQueryData.padding when consumed by the MediaQueryData.viewInsets of the current context's MediaQuery, defaults to false.
final
minimum StacEdgeInsets?
This minimum padding to apply.
final
Whether to avoid system intrusions on the right.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
top bool?
Whether to avoid system intrusions on the top.
final
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 StacSafeArea to JSON.
override
toString() String
A string representation of this object.
inherited

Operators

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