DefaultTextStyle.merge({Key key, @required BuildContext context, TextStyle style, TextAlign textAlign, bool softWrap, TextOverflow overflow, Widget child })

Creates a default text style that inherits from the given BuildContext.

The given style is merged with the style from the default text style for the given BuildContext and, if non-null, the given textAlign replaces the textAlign from the default text style for the given BuildContext.

Source

factory DefaultTextStyle.merge({
  Key key,
  @required BuildContext context,
  TextStyle style,
  TextAlign textAlign,
  bool softWrap,
  TextOverflow overflow,
  Widget child
}) {
  assert(context != null);
  assert(child != null);
  DefaultTextStyle parent = DefaultTextStyle.of(context);
  return new DefaultTextStyle(
    key: key,
    style: parent.style.merge(style),
    textAlign: textAlign ?? parent.textAlign,
    softWrap: softWrap ?? parent.softWrap,
    overflow: overflow ?? parent.overflow,
    child: child
  );
}