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
2024-02-10 22:18:49 +08:00

52 lines
1.2 KiB
Dart

import 'package:flutter/material.dart';
import 'package:goatagent/auth.dart';
import 'package:goatagent/firebase.dart';
import 'layouts/navigation.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
try {
await initializeFirebase();
} catch (e) {
print(e);
}
await AuthGuard().pickClient();
runApp(const GoatAgent());
}
class GoatAgent extends StatelessWidget {
const GoatAgent({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'GoatAgent',
theme: ThemeData(
brightness: Brightness.light,
colorScheme: ColorScheme.fromSwatch(
primarySwatch: Colors.indigo,
accentColor: Colors.indigoAccent,
backgroundColor: Colors.white,
brightness: Brightness.light,
),
useMaterial3: true,
),
darkTheme: ThemeData(
brightness: Brightness.dark,
colorScheme: ColorScheme.fromSwatch(
primarySwatch: Colors.indigo,
accentColor: Colors.indigoAccent,
backgroundColor: Colors.black,
brightness: Brightness.dark,
),
useMaterial3: true,
),
home: AgentNavigation(),
);
}
}