TextOption constructor

const TextOption({
  1. List<String> fontFamilies = const ['Roboto', 'Arial', 'Times New Roman', 'Courier', 'Georgia', 'Verdana', 'Helvetica'],
  2. List<Color> textColors = const [Colors.white, Colors.black, Colors.red, Colors.blue, Colors.green, Colors.yellow, Colors.purple, Colors.orange, Colors.pink, Colors.teal, Colors.indigo, Colors.cyan],
  3. List<Gradient> textGradients = const [LinearGradient(colors: [Colors.purple, Colors.blue], begin: Alignment.topLeft, end: Alignment.bottomRight), LinearGradient(colors: [Colors.orange, Colors.pink], begin: Alignment.topLeft, end: Alignment.bottomRight), LinearGradient(colors: [Colors.green, Colors.teal], begin: Alignment.topLeft, end: Alignment.bottomRight), LinearGradient(colors: [Colors.red, Colors.yellow], begin: Alignment.topLeft, end: Alignment.bottomRight), LinearGradient(colors: [Colors.indigo, Colors.cyan], begin: Alignment.topCenter, end: Alignment.bottomCenter)],
  4. List<Gradient> backgroundGradients = const [LinearGradient(colors: [Colors.black54, Colors.transparent], begin: Alignment.centerLeft, end: Alignment.centerRight), LinearGradient(colors: [Colors.purple, Colors.blue], begin: Alignment.topLeft, end: Alignment.bottomRight), LinearGradient(colors: [Colors.orange, Colors.pink], begin: Alignment.topLeft, end: Alignment.bottomRight), RadialGradient(colors: [Colors.yellow, Colors.red], center: Alignment.center, radius: 0.8), LinearGradient(colors: [Colors.green, Colors.teal], begin: Alignment.topLeft, end: Alignment.bottomRight)],
  5. List<TextAnimation> animations = const [TextAnimation.fade, TextAnimation.slide, TextAnimation.bounce, TextAnimation.rotate, TextAnimation.scale, TextAnimation.pulse],
  6. bool enableFontFamily = true,
  7. bool enableTextGradient = true,
  8. bool enableBackgroundGradient = true,
  9. bool enableAnimations = true,
})

Implementation

const TextOption({
  this.fontFamilies = const [
    'Roboto',
    'Arial',
    'Times New Roman',
    'Courier',
    'Georgia',
    'Verdana',
    'Helvetica',
  ],
  this.textColors = const [
    Colors.white,
    Colors.black,
    Colors.red,
    Colors.blue,
    Colors.green,
    Colors.yellow,
    Colors.purple,
    Colors.orange,
    Colors.pink,
    Colors.teal,
    Colors.indigo,
    Colors.cyan,
  ],
  this.textGradients = const [
    LinearGradient(
      colors: [Colors.purple, Colors.blue],
      begin: Alignment.topLeft,
      end: Alignment.bottomRight,
    ),
    LinearGradient(
      colors: [Colors.orange, Colors.pink],
      begin: Alignment.topLeft,
      end: Alignment.bottomRight,
    ),
    LinearGradient(
      colors: [Colors.green, Colors.teal],
      begin: Alignment.topLeft,
      end: Alignment.bottomRight,
    ),
    LinearGradient(
      colors: [Colors.red, Colors.yellow],
      begin: Alignment.topLeft,
      end: Alignment.bottomRight,
    ),
    LinearGradient(
      colors: [Colors.indigo, Colors.cyan],
      begin: Alignment.topCenter,
      end: Alignment.bottomCenter,
    ),
  ],
  this.backgroundGradients = const [
    LinearGradient(
      colors: [Colors.black54, Colors.transparent],
      begin: Alignment.centerLeft,
      end: Alignment.centerRight,
    ),
    LinearGradient(
      colors: [Colors.purple, Colors.blue],
      begin: Alignment.topLeft,
      end: Alignment.bottomRight,
    ),
    LinearGradient(
      colors: [Colors.orange, Colors.pink],
      begin: Alignment.topLeft,
      end: Alignment.bottomRight,
    ),
    RadialGradient(
      colors: [Colors.yellow, Colors.red],
      center: Alignment.center,
      radius: 0.8,
    ),
    LinearGradient(
      colors: [Colors.green, Colors.teal],
      begin: Alignment.topLeft,
      end: Alignment.bottomRight,
    ),
  ],
  this.animations = const [
    TextAnimation.fade,
    TextAnimation.slide,
    TextAnimation.bounce,
    TextAnimation.rotate,
    TextAnimation.scale,
    TextAnimation.pulse,
  ],
  this.enableFontFamily = true,
  this.enableTextGradient = true,
  this.enableBackgroundGradient = true,
  this.enableAnimations = true,
});