applyStyle method

Widget applyStyle({
  1. Color color = Colors.white,
  2. FontWeight fontWeight = FontWeight.normal,
  3. double fontSize = 14,
})

Implementation

Widget applyStyle({
  Color color = Colors.white,
  FontWeight fontWeight = FontWeight.normal,
  double fontSize = 14,
}) {
  if (this is Text) {
    return DefaultTextStyle.merge(
      style: TextStyle(
        color: color,
        fontWeight: fontWeight,
        fontSize: fontSize,
      ),
      child: this,
    );
  }
  return this;
}