toolheim/mobile-app/lib/main.dart

32 lines
910 B
Dart

import 'package:flutter/material.dart';
import 'package:preferences/preferences.dart';
import 'package:provider/provider.dart';
import 'package:toolheim/data/github_adapter.dart';
import 'package:toolheim/screens/settings_screen.dart';
import 'package:toolheim/screens/warband_roster_screen.dart';
void main() async {
await PrefService.init(prefix: 'toolheim_');
runApp(Toolheim());
}
class Toolheim extends StatelessWidget {
@override
Widget build(BuildContext context) {
return ChangeNotifierProvider(
builder: (context) => GitHubAdapter(),
child: MaterialApp(
title: 'Toolheim',
theme: ThemeData(
primarySwatch: Colors.brown,
accentColor: Colors.grey,
),
initialRoute: '/',
routes: {
'/': (context) => WarbandRosterScreen(),
'/settings': (context) => SettingsScreen()
},
),
);
}
}