wrapWithDefaultStyle function

Widget? wrapWithDefaultStyle(
  1. Widget? widget,
  2. TextStyle? style
)

Implementation

Widget? wrapWithDefaultStyle(Widget? widget, TextStyle? style) {
  if (style == null || widget == null) {
    return widget;
  } else {
    return DefaultTextStyle(style: style, child: widget);
  }
}