2019-06-24 00:53:43 +02:00
|
|
|
import 'package:flutter/material.dart';
|
2019-07-16 23:37:18 +02:00
|
|
|
import 'package:preferences/preferences.dart';
|
2019-07-10 14:16:13 +02:00
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
import 'package:toolheim/data/github_adapter.dart';
|
|
|
|
import 'package:toolheim/screens/settings_screen.dart';
|
2019-07-16 23:37:18 +02:00
|
|
|
import 'package:toolheim/screens/warband_roster_screen.dart';
|
2019-06-24 00:53:43 +02:00
|
|
|
|
2019-07-16 23:37:18 +02:00
|
|
|
void main() async {
|
|
|
|
await PrefService.init(prefix: 'toolheim_');
|
2019-07-10 14:16:13 +02:00
|
|
|
runApp(Toolheim());
|
|
|
|
}
|
2019-06-24 00:53:43 +02:00
|
|
|
|
|
|
|
class Toolheim extends StatelessWidget {
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2019-07-10 14:16:13 +02:00
|
|
|
return ChangeNotifierProvider(
|
|
|
|
builder: (context) => GitHubAdapter(),
|
|
|
|
child: MaterialApp(
|
|
|
|
title: 'Toolheim',
|
|
|
|
theme: ThemeData(
|
|
|
|
primarySwatch: Colors.brown,
|
|
|
|
accentColor: Colors.grey,
|
2019-07-09 23:43:57 +02:00
|
|
|
),
|
2019-07-10 14:16:13 +02:00
|
|
|
initialRoute: '/',
|
|
|
|
routes: {
|
2019-07-16 23:37:18 +02:00
|
|
|
'/': (context) => WarbandRosterScreen(),
|
2019-07-10 14:16:13 +02:00
|
|
|
'/settings': (context) => SettingsScreen()
|
|
|
|
},
|
2019-06-27 00:16:58 +02:00
|
|
|
),
|
2019-07-10 14:16:13 +02:00
|
|
|
);
|
2019-06-24 00:53:43 +02:00
|
|
|
}
|
|
|
|
}
|