buildCicleWidget static method
dynamic
buildCicleWidget({
- Key? key,
- double? width,
- double? height,
- EdgeInsetsGeometry? margin,
- EdgeInsetsGeometry? padding,
- Color? backgroundColor,
- bool isCircle = true,
- double roundRadius = 5,
- Widget? child,
Implementation
static buildCicleWidget(
{
Key? key,
double? width,
double? height,
EdgeInsetsGeometry? margin,
EdgeInsetsGeometry? padding,
Color? backgroundColor,
bool isCircle:true,
double roundRadius:5,
Widget? child
}){
return
isCircle?
Container(
margin:margin,
padding: padding,
width: PxUtils.setSize(width??0),
height: PxUtils.setSize(height??0),
decoration: BoxDecoration(
color: backgroundColor,
borderRadius: BorderRadius.all(Radius.circular(width??0))
),
child:
ClipOval(
child: child,
)
):Container(
margin:margin,
padding: padding,
width: PxUtils.setSize(width??0),
height: PxUtils.setSize(height??0),
child:
ClipRRect(
borderRadius: BorderRadius.circular(roundRadius),
child: child,
)
)
;
}