You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
765 B
Dart
32 lines
765 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class AnswerButton extends StatelessWidget {
|
|
AnswerButton({
|
|
super.key,
|
|
required this.answerText,
|
|
required this.onTap,
|
|
});
|
|
|
|
final String answerText;
|
|
final void Function() onTap;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return ElevatedButton(
|
|
onPressed: onTap,
|
|
style: ElevatedButton.styleFrom(
|
|
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 40),
|
|
backgroundColor: const Color.fromARGB(255, 33, 1, 95),
|
|
foregroundColor: Colors.white,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(40),
|
|
),
|
|
),
|
|
child: Text(
|
|
answerText,
|
|
textAlign: TextAlign.center,
|
|
),
|
|
);
|
|
}
|
|
}
|