setPadding method

void setPadding(
  1. EdgeInsets padding, {
  2. Duration duration = const Duration(milliseconds: 100),
})

Sets the padding to be used for the subtitles.

The duration argument may be specified to set the duration of the animation.

Implementation

void setPadding(
  EdgeInsets padding, {
  Duration duration = const Duration(milliseconds: 100),
}) {
  if (this.duration != duration) {
    setState(() {
      this.duration = duration;
    });
  }
  setState(() {
    this.padding = padding;
  });
}