animatedDefaultTextStyle method

Widget animatedDefaultTextStyle({
  1. required TextStyle style,
  2. required Duration duration,
  3. Key? key,
  4. TextAlign? textAlign,
  5. bool softWrap = true,
  6. TextOverflow overflow = TextOverflow.clip,
  7. int? maxLines,
  8. TextWidthBasis textWidthBasis = TextWidthBasis.parent,
  9. TextHeightBehavior? textHeightBehavior,
  10. Curve curve = Curves.linear,
  11. VoidCallback? onEnd,
})

Animated version of DefaultTextStyle which automatically transitions the default text style (the text style to apply to descendant Text widgets without explicit style) over a given duration whenever the given style changes.

Implementation

Widget animatedDefaultTextStyle({
  required TextStyle style,
  required Duration duration,
  Key? key,
  TextAlign? textAlign,
  bool softWrap = true,
  TextOverflow overflow = TextOverflow.clip,
  int? maxLines,
  TextWidthBasis textWidthBasis = TextWidthBasis.parent,
  TextHeightBehavior? textHeightBehavior,
  Curve curve = Curves.linear,
  VoidCallback? onEnd,
}) {
  return AnimatedDefaultTextStyle(
    key: key,
    style: style,
    textAlign: textAlign,
    softWrap: softWrap,
    overflow: overflow,
    maxLines: maxLines,
    textWidthBasis: textWidthBasis,
    textHeightBehavior: textHeightBehavior,
    curve: curve,
    duration: duration,
    onEnd: onEnd,
    child: this,
  );
}