blob: f5ea0f78fb0db09ad04cb14bae42d9e1845038bc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter_homescreen/homescreen.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_homescreen/vehicle-signals/viss_config.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
HttpClient client = await initializeClient();
runApp(ProviderScope(child: MyApp(client: client)));
}
class MyApp extends ConsumerWidget {
MyApp({Key? key, required this.client}) : super(key: key);
final HttpClient client;
// This widget is the root of your application.
@override
Widget build(BuildContext context, WidgetRef ref) {
const navBarColor = const Color(0xff181818);
const navBarIconColor = Colors.white;
return MaterialApp(
title: 'Homescreen',
theme: ThemeData(
navigationBarTheme: NavigationBarThemeData(
backgroundColor: navBarColor,
labelTextStyle: MaterialStateProperty.all(const TextStyle(
color: navBarIconColor,
)),
iconTheme: MaterialStateProperty.all(const IconThemeData(
color: navBarIconColor,
))),
),
home: Homescreen(client: client),
);
}
}
|