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

50 lines
1.2 KiB
Dart
Raw Normal View History

2024-02-07 17:25:58 +00:00
import 'package:flutter/material.dart';
import 'package:solaragent/auth.dart';
import 'package:solaragent/router.dart';
import 'package:solaragent/widgets/navigation.dart';
2024-02-07 17:25:58 +00:00
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await authClient.pickClient();
2024-02-07 17:25:58 +00:00
runApp(const SolarAgent());
2024-02-07 17:25:58 +00:00
}
class SolarAgent extends StatelessWidget {
const SolarAgent({super.key});
2024-02-07 17:25:58 +00:00
@override
Widget build(BuildContext context) {
return MaterialApp.router(
title: 'SolarAgent',
2024-02-08 12:30:19 +00:00
theme: ThemeData(
2024-02-10 12:08:25 +00:00
colorScheme: ColorScheme.fromSwatch(
primarySwatch: Colors.indigo,
accentColor: Colors.indigoAccent,
backgroundColor: Colors.white,
brightness: Brightness.light,
2024-02-10 13:09:15 +00:00
),
2024-02-10 12:08:25 +00:00
useMaterial3: true,
),
routerConfig: router,
builder: (context, child) => Overlay(
initialEntries: [
OverlayEntry(
2024-03-24 07:49:20 +00:00
builder: (context) => Container(
color: Colors.white,
2024-03-23 15:05:04 +00:00
child: SafeArea(
2024-03-24 07:49:20 +00:00
bottom: false,
2024-03-23 15:05:04 +00:00
child: Scaffold(
body: child,
bottomNavigationBar: const AgentNavigation(),
),
),
),
)
],
),
2024-02-07 17:25:58 +00:00
);
}
}