46 lines
1.2 KiB
Dart
46 lines
1.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter/src/foundation/key.dart';
|
|
import 'package:flutter/src/widgets/framework.dart';
|
|
|
|
class Quiz extends StatefulWidget {
|
|
const Quiz({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
State<Quiz> createState() => _QuizState();
|
|
}
|
|
|
|
class _QuizState extends State<Quiz> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Column(
|
|
children: [
|
|
Image.network(
|
|
"https://upload.wikimedia.org/wikipedia/commons/thumb/c/c1/Variegated_golden_frog_%28Mantella_baroni%29_Ranomafana.jpg/640px-Variegated_golden_frog_%28Mantella_baroni%29_Ranomafana.jpg?download"),
|
|
const AnswerButtons(),
|
|
],
|
|
);
|
|
}
|
|
}
|
|
|
|
class AnswerButtons extends StatelessWidget {
|
|
const AnswerButtons({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Row(
|
|
children: [
|
|
TextButton.icon(
|
|
onPressed: null,
|
|
icon: const Icon(Icons.how_to_vote),
|
|
label: const Text("Senator"),
|
|
),
|
|
TextButton.icon(
|
|
onPressed: null,
|
|
icon: const Icon(Icons.gavel),
|
|
label: const Text("Serial Killer"),
|
|
)
|
|
],
|
|
);
|
|
}
|
|
}
|