Padding(
padding: EdgeInsets.only(top: 8),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
RawMaterialButton(
onPressed: () {},
// After pressing this Button a _random Text should be show in the center. (with the AnswerGenerator)
child: IconButton(
icon: new Icon(Icons.add, size: 22,),
color: Colors.white,
onPressed: () {},
),
This "AnswerGenerator" generates one of these answers (in a box), after I pressed the button, one of these answers should be displayed in the box (column).
abstract class AnswerGenerator {
String getQuestion();
String getDare();
}
class AnswerLocalGenerator implements AnswerGenerator {
final Random _random = Random();
final _questions = [
"Answer2",
"Answer3",
"Answer4",
"Answer5",
];
Aucun commentaire:
Enregistrer un commentaire