handleMargin method

  1. @protected
Widget handleMargin(
  1. BuildContext context,
  2. Widget widget,
  3. WidgetNodeSpec spec
)

Handles convenience 'margin' property.

Implementation

@protected
Widget handleMargin(
    BuildContext context, Widget widget, WidgetNodeSpec spec) {
  final insets =
      properties.getInsets(spec.props["wrapPadding"] ?? spec.props["margin"]);
  if (insets != null) {
    widget = Padding(padding: insets, child: widget);
  }
  return widget;
}