Magic8Ball constructor

const Magic8Ball({
  1. Key? key,
  2. required double radius,
  3. Duration durationOfTextAppearance = const Duration(milliseconds: 500),
  4. num numberOfShakes = 10,
  5. Duration durationOfShake = const Duration(milliseconds: 100),
  6. double shakeDistance = 20,
  7. List<String> answers = const ['It is certain', 'Without a doubt', 'You may rely on \n it', 'Yes, definitely', 'As I see it, yes', 'Most \n likely', 'Yes', 'Outlook good', 'Signs point to yes', 'Reply hazy, try again', 'Better not tell you\n now', 'Ask again later', 'Cannot predict\n now', 'Don\'t count on \n it', 'Outlook not so good', 'My sources say no', 'Very doubtful', 'My reply\n is no'],
  8. required MagicBallController controller,
  9. required VoidCallback onPressed,
})

Implementation

const Magic8Ball({
  super.key,
  required this.radius,
  this.durationOfTextAppearance = const Duration(milliseconds: 500),
  this.numberOfShakes = 10,
  this.durationOfShake = const Duration(milliseconds: 100),
  this.shakeDistance = 20,
  this.answers = const [
    'It is certain',
    'Without a doubt',
    'You may rely on \n it',
    'Yes, definitely',
    'As I see it, yes',
    'Most \n likely',
    'Yes',
    'Outlook good',
    'Signs point to yes',
    'Reply hazy, try again',
    'Better not tell you\n now',
    'Ask again later',
    'Cannot predict\n now',
    'Don\'t count on \n it',
    'Outlook not so good',
    'My sources say no',
    'Very doubtful',
    'My reply\n is no'
  ], required this.controller, required this.onPressed,
});