Magic8Ball constructor
const
Magic8Ball({
- Key? key,
- required double radius,
- Duration durationOfTextAppearance = const Duration(milliseconds: 500),
- num numberOfShakes = 10,
- Duration durationOfShake = const Duration(milliseconds: 100),
- double shakeDistance = 20,
- 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'], - required MagicBallController controller,
- 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,
});