handleSafeArea method
Handles convenience 'safeArea' property.
Implementation
@protected
Widget handleSafeArea(
BuildContext context, Widget widget, WidgetNodeSpec spec) {
final prop = spec.props["wrapSafeArea"] ?? spec.props["safeArea"];
if (prop is Map) {
return SafeArea(
left: parseBool(prop["left"], defaultValue: true),
top: parseBool(prop["top"], defaultValue: true),
right: parseBool(prop["right"], defaultValue: true),
bottom: parseBool(prop["bottom"], defaultValue: true),
minimum: properties.getInsets(prop["minimum"]) ?? EdgeInsets.zero,
child: widget,
);
} else if (parseBool(prop)) {
return SafeArea(child: widget);
}
return widget;
}