This repository has been archived on 2024-06-08. You can view files and clone it, but cannot push or open issues or pull requests.
SolarAgent/lib/main.dart

57 lines
1.5 KiB
Dart
Raw Normal View History

2024-02-07 17:25:58 +00:00
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:goatagent/auth.dart';
import 'package:goatagent/firebase.dart';
2024-02-08 12:30:19 +00:00
import 'package:goatagent/screens/about.dart';
2024-02-07 17:25:58 +00:00
import 'package:goatagent/screens/account.dart';
import 'package:goatagent/screens/dashboard.dart';
2024-02-08 07:19:37 +00:00
import 'package:goatagent/screens/notifications.dart';
2024-02-07 17:25:58 +00:00
import 'layouts/navigation.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
2024-02-08 12:30:19 +00:00
try {
await initializeFirebase();
} catch (e) {
print(e);
}
await AuthGuard().pickClient();
2024-02-07 17:25:58 +00:00
2024-02-10 12:08:25 +00:00
runApp(const GoatAgent());
2024-02-07 17:25:58 +00:00
}
class GoatAgent extends StatelessWidget {
2024-02-10 12:08:25 +00:00
const GoatAgent({super.key});
2024-02-07 17:25:58 +00:00
@override
Widget build(BuildContext context) {
2024-02-10 12:08:25 +00:00
return MaterialApp(
2024-02-08 12:30:19 +00:00
title: 'GoatAgent',
theme: ThemeData(
2024-02-10 12:08:25 +00:00
brightness: Brightness.light,
colorScheme: ColorScheme.fromSwatch(
primarySwatch: Colors.indigo,
accentColor: Colors.indigoAccent,
backgroundColor: Colors.white,
2024-02-10 13:09:15 +00:00
brightness: Brightness.light,
),
2024-02-10 12:08:25 +00:00
useMaterial3: true,
),
darkTheme: ThemeData(
brightness: Brightness.dark,
colorScheme: ColorScheme.fromSwatch(
primarySwatch: Colors.indigo,
accentColor: Colors.indigoAccent,
2024-02-10 13:09:15 +00:00
backgroundColor: Colors.black,
brightness: Brightness.dark,
),
2024-02-08 12:30:19 +00:00
useMaterial3: true,
),
2024-02-10 12:08:25 +00:00
home: const AgentNavigation(),
2024-02-07 17:25:58 +00:00
);
}
}