AnimatedHeadline constructor

const AnimatedHeadline({
  1. Key? key,
  2. required List<String> texts,
  3. required List<Color> colors,
  4. required int index,
})

Creates an animated headline while the switch between two tabs.

Implementation

const AnimatedHeadline(
    {Key? key,
    required this.texts,
    required this.colors,
    required this.index})
    : assert(texts.length > 1),
      assert(colors.length > 1),
      assert(texts.length == colors.length),
      assert(index >= 0 && index < texts.length),
      super(key: key, duration: const Duration(milliseconds: 400));