customIcon function

Widget customIcon(
  1. BuildContext context, {
  2. required IconData icon,
  3. bool isEnable = false,
  4. double size = 18,
  5. bool isFontAwesomeSolid = false,
  6. Color? iconColor,
  7. double paddingIcon = 0,
})

Implementation

Widget customIcon(
    BuildContext context, {
      required IconData icon,
      bool isEnable = false,
      double size = 18,
      bool isFontAwesomeSolid = false,
      Color? iconColor,
      double paddingIcon = 0,
    }) {
  iconColor = iconColor ?? Theme.of(context).textTheme.caption!.color;
  return Padding(
    padding: EdgeInsets.only(bottom:  paddingIcon),
    child: Icon(
      icon,
      size: size,
      color: isEnable ? Theme.of(context).primaryColor : iconColor,
    ),
  );
}