addMargins method
Implementation
Widget addMargins(Widget view)
{
if (model?.marginTop != null || model?.marginBottom != null || model?.marginRight != null || model?.marginLeft != null)
{
var inset = EdgeInsets.only(top: model?.marginTop ?? 0, right: model?.marginRight ?? 0, bottom: model?.marginBottom ?? 0, left: model?.marginLeft ?? 0);
view = Padding(child: view, padding: inset);
}
return view;
}