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
LittleSheep 8bb9c960c1 💄 Optimized notification page
⬇️ Remove firebase deps
2024-03-23 20:56:32 +08:00

57 lines
1.5 KiB
Dart

import 'package:flutter/material.dart';
import 'package:solaragent/auth.dart';
import 'package:solaragent/router.dart';
import 'package:solaragent/widgets/navigation.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await authClient.pickClient();
runApp(const SolarAgent());
}
class SolarAgent extends StatelessWidget {
const SolarAgent({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp.router(
title: 'SolarAgent',
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,
),
routerConfig: router,
builder: (context, child) => Overlay(
initialEntries: [
OverlayEntry(
builder: (context) => SafeArea(
child: Scaffold(
body: child,
bottomNavigationBar: const AgentNavigation(),
),
),
)
],
),
);
}
}