font method

Widget font(
  1. {double? size,
  2. String? family,
  3. FontWeight? weight,
  4. FontStyle? style}
)

Changes this widget's TextStyle.

Implementation

Widget font({
  double? size,
  String? family,
  FontWeight? weight,
  FontStyle? style,
}) {
  return DefaultTextStyle(
    style: TextStyle(
      fontFamily: family,
      fontSize: size,
      fontWeight: weight,
      fontStyle: style,
    ),
    child: this,
  );
}