37 lines
1020 B
Dart
37 lines
1020 B
Dart
import 'package:flutter/material.dart';
|
|
import './quiz.dart';
|
|
import './heading.dart';
|
|
import './person.dart';
|
|
import './about.dart';
|
|
|
|
void main() async {
|
|
// refuses to do anything in browser unless this is called
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
List<Person> people = await getPeopleList();
|
|
runApp(Senatorialkillers(
|
|
people: people,
|
|
));
|
|
}
|
|
|
|
class Senatorialkillers extends StatelessWidget {
|
|
const Senatorialkillers({required this.people, Key? key}) : super(key: key);
|
|
final List<Person> people;
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp(
|
|
home: Scaffold(
|
|
floatingActionButton: const AboutButton(),
|
|
body: SingleChildScrollView(
|
|
child: Center(
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
children: [const Heading(), Quiz(fullPeopleList: people)],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|