55 lines
2.1 KiB
Dart
55 lines
2.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:google_fonts/google_fonts.dart';
|
|
import 'package:p_tits_pas/screens/auth/login_screen.dart';
|
|
import 'package:p_tits_pas/screens/auth/register_choice_screen.dart';
|
|
import 'package:p_tits_pas/screens/auth/parent_register_step1_screen.dart';
|
|
import 'package:p_tits_pas/screens/auth/parent_register_step2_screen.dart';
|
|
import 'package:p_tits_pas/screens/auth/parent_register_step3_screen.dart';
|
|
|
|
void main() {
|
|
// TODO: Initialiser SharedPreferences, Provider, etc.
|
|
runApp(const MyApp());
|
|
}
|
|
|
|
class MyApp extends StatelessWidget {
|
|
const MyApp({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp(
|
|
title: 'P\'titsPas',
|
|
theme: ThemeData(
|
|
primarySwatch: Colors.blue, // TODO: Utiliser la palette de la charte graphique
|
|
textTheme: GoogleFonts.merriweatherTextTheme(
|
|
Theme.of(context).textTheme,
|
|
),
|
|
visualDensity: VisualDensity.adaptivePlatformDensity,
|
|
),
|
|
// Gestionnaire de routes initial (simple pour l'instant)
|
|
initialRoute: '/', // Ou '/login' selon le point d'entrée désiré
|
|
routes: {
|
|
'/': (context) => const LoginScreen(), // Exemple, pourrait être RegisterChoiceScreen aussi
|
|
'/login': (context) => const LoginScreen(),
|
|
'/register-choice': (context) => const RegisterChoiceScreen(),
|
|
'/parent-register/step1': (context) => const ParentRegisterStep1Screen(),
|
|
'/parent-register/step2': (context) => const ParentRegisterStep2Screen(),
|
|
'/parent-register/step3': (context) => const ParentRegisterStep3Screen(),
|
|
// TODO: Ajouter les autres routes (step 4, etc., dashboard...)
|
|
},
|
|
// Gestion des routes inconnues
|
|
onUnknownRoute: (settings) {
|
|
return MaterialPageRoute(
|
|
builder: (context) => Scaffold(
|
|
body: Center(
|
|
child: Text(
|
|
'Route inconnue :\n${settings.name}',
|
|
style: GoogleFonts.merriweather(fontSize: 20, color: Colors.red),
|
|
textAlign: TextAlign.center,
|
|
),
|
|
),
|
|
),
|
|
);
|
|
},
|
|
);
|
|
}
|
|
} |