getBadgeMaterial function

dynamic getBadgeMaterial(
  1. String item, {
  2. Color materialColors = Colors.deepOrange,
  3. Color materialShadowColor = Colors.red,
  4. Color textColor = Colors.white,
  5. double materialElevation = 5.0,
  6. double fontSize = 12.0,
  7. FontWeight fontWeight = FontWeight.bold,
  8. double width = 25,
})

Implementation

getBadgeMaterial(String item,
    {Color materialColors = Colors.deepOrange,
      Color materialShadowColor = Colors.red,
      Color textColor = Colors.white,
      double materialElevation = 5.0,
      double fontSize= 12.0,
      FontWeight fontWeight= FontWeight.bold,
      double width= 25
    })
{
  return Material(
    color: materialColors,
    elevation: materialElevation,
    shadowColor: materialShadowColor,
    borderRadius: BorderRadius.circular(5.0),
    child: Container(
      width: width,
      height: 25,
      alignment: Alignment.center,
      decoration: BoxDecoration(
        color: materialColors,
        borderRadius: BorderRadius.circular(5.0),
      ),
      child: Text(
        item,
        style: TextStyle(
            color: textColor, fontSize: fontSize, fontWeight: fontWeight),
      ),
    ),
  );
}