animatedDefaultTextStyle method
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,
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,
);
}