getEdge static method
Implementation
static EdgeInsets getEdge(EdgeInfo edgeInfo){
double top=0;
double left=0;
double right=0;
double bottom=0;
if(edgeInfo.right!=null&&edgeInfo.right!>0){
right = edgeInfo.right!;
}
if(edgeInfo.left!=null&&edgeInfo.left!>0){
left = edgeInfo.left!;
}
if(edgeInfo.bottom!=null&&edgeInfo.bottom!>0){
bottom = edgeInfo.bottom!;
}
if(edgeInfo.top!=null&&edgeInfo.top!>0){
top = edgeInfo.top!;
}
if(top==0&&left==0&&right==0&&bottom==0){
return EdgeInsets.all(edgeInfo.all);
}else{
return EdgeInsets.fromLTRB(left, top, right, bottom);
}
}