2024-01-01 16:11:05 +00:00
|
|
|
import 'package:aurcache/components/routing/router.dart';
|
2023-12-30 21:23:42 +00:00
|
|
|
import 'package:aurcache/providers/build_provider.dart';
|
|
|
|
import 'package:aurcache/providers/builds_provider.dart';
|
|
|
|
import 'package:aurcache/providers/package_provider.dart';
|
|
|
|
import 'package:aurcache/providers/packages_provider.dart';
|
|
|
|
import 'package:aurcache/providers/stats_provider.dart';
|
2023-12-27 15:45:55 +00:00
|
|
|
import 'package:flutter/material.dart';
|
2023-12-30 15:46:13 +00:00
|
|
|
import 'package:go_router/go_router.dart';
|
2023-12-27 15:45:55 +00:00
|
|
|
import 'package:google_fonts/google_fonts.dart';
|
2023-12-30 21:23:42 +00:00
|
|
|
import 'package:provider/provider.dart';
|
2023-12-29 23:45:33 +00:00
|
|
|
import 'constants/color_constants.dart';
|
2023-12-27 15:45:55 +00:00
|
|
|
|
|
|
|
void main() {
|
2023-12-30 15:46:13 +00:00
|
|
|
GoRouter.optionURLReflectsImperativeAPIs = true;
|
2023-12-27 15:45:55 +00:00
|
|
|
runApp(const MyApp());
|
|
|
|
}
|
|
|
|
|
|
|
|
class MyApp extends StatelessWidget {
|
|
|
|
const MyApp({super.key});
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2023-12-30 21:23:42 +00:00
|
|
|
return MultiProvider(
|
|
|
|
providers: [
|
|
|
|
ChangeNotifierProvider<StatsProvider>(create: (_) => StatsProvider()),
|
|
|
|
ChangeNotifierProvider<PackagesProvider>(
|
|
|
|
create: (_) => PackagesProvider()),
|
|
|
|
ChangeNotifierProvider<BuildsProvider>(create: (_) => BuildsProvider()),
|
|
|
|
ChangeNotifierProvider<PackageProvider>(
|
|
|
|
create: (_) => PackageProvider()),
|
|
|
|
ChangeNotifierProvider<BuildProvider>(create: (_) => BuildProvider()),
|
|
|
|
],
|
|
|
|
child: MaterialApp.router(
|
|
|
|
routerConfig: appRouter,
|
|
|
|
debugShowCheckedModeBanner: false,
|
|
|
|
title: 'AURCache',
|
|
|
|
theme: ThemeData.dark().copyWith(
|
|
|
|
appBarTheme:
|
|
|
|
const AppBarTheme(backgroundColor: bgColor, elevation: 0),
|
|
|
|
scaffoldBackgroundColor: bgColor,
|
|
|
|
primaryColor: greenColor,
|
|
|
|
dialogBackgroundColor: secondaryColor,
|
|
|
|
textTheme: GoogleFonts.openSansTextTheme(Theme.of(context).textTheme)
|
|
|
|
.apply(bodyColor: Colors.white),
|
|
|
|
canvasColor: secondaryColor,
|
|
|
|
),
|
2023-12-27 15:45:55 +00:00
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|