textStyle method

Widget textStyle({
  1. Color color = Colors.black,
  2. double fontSize = 16.0,
  3. FontWeight fontWeight = FontWeight.normal,
})

Apply common text styles to text widgets.

Implementation

Widget textStyle({Color color = Colors.black, double fontSize = 16.0, FontWeight fontWeight = FontWeight.normal}) {
  return DefaultTextStyle(
    style: TextStyle(
      color: color,
      fontSize: fontSize,
      fontWeight: fontWeight,
    ),
    child: this,
  );
}