size method

Text size(
  1. double? size
)

Applies the specified fontSize to the text, same as Text("data", style: TextStyle(fontSize: size)

Implementation

Text size(double? size) {
  return Text(
    data ?? "",
    style: (style ?? const TextStyle()).copyWith(fontSize: size),
  );
}