feat: Version 3.6.3 - Carte IGN, mode boussole, corrections Flutter analyze
Nouvelles fonctionnalités: - #215 Mode boussole + carte IGN/satellite (Mode terrain) - #53 Définition zoom maximal pour éviter sur-zoom - #14 Correction bug F5 déconnexion - #204 Design couleurs flashy - #205 Écrans utilisateurs simplifiés Corrections Flutter analyze: - Suppression warnings room.g.dart, chat_service.dart, api_service.dart - 0 error, 0 warning, 30 infos (suggestions de style) Autres: - Intégration tuiles IGN Plan et IGN Ortho (geopf.fr) - flutter_compass pour Android/iOS - Réorganisation assets store Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -40,17 +40,19 @@ class _HomeContentState extends State<HomeContent> {
|
||||
final isDesktop = screenWidth > 800;
|
||||
|
||||
// Retourner seulement le contenu (sans scaffold)
|
||||
return SingleChildScrollView(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: isDesktop ? AppTheme.spacingL : AppTheme.spacingS,
|
||||
vertical: AppTheme.spacingL,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// Widget BtnPassages
|
||||
const BtnPassages(),
|
||||
const SizedBox(height: AppTheme.spacingL),
|
||||
return Column(
|
||||
children: [
|
||||
// Widget BtnPassages collé en haut/gauche/droite
|
||||
const BtnPassages(),
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: isDesktop ? AppTheme.spacingL : AppTheme.spacingS,
|
||||
vertical: AppTheme.spacingL,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
|
||||
// LIGNE 1 : Graphiques de répartition (type de passage et mode de paiement)
|
||||
isDesktop
|
||||
@@ -172,9 +174,12 @@ class _HomeContentState extends State<HomeContent> {
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
// Construit la carte de répartition par type de passage
|
||||
|
||||
@@ -123,6 +123,9 @@ class _MapPageContentState extends State<MapPageContent> {
|
||||
// État pour bloquer la sauvegarde du zoom lors du centrage sur secteur
|
||||
bool _isCenteringOnSector = false;
|
||||
|
||||
// Source des tuiles de la carte (IGN Plan ou IGN Ortho)
|
||||
TileSource _tileSource = TileSource.ignPlan;
|
||||
|
||||
// Comptages des secteurs (calculés uniquement lors de création/modification de secteurs)
|
||||
Map<int, int> _sectorPassageCount = {};
|
||||
Map<int, int> _sectorMemberCount = {};
|
||||
@@ -215,6 +218,16 @@ class _MapPageContentState extends State<MapPageContent> {
|
||||
_settingsBox.put('mapZoom', 15.0);
|
||||
debugPrint('🔍 MapPage: Aucun zoom sauvegardé, utilisation du défaut = 15.0');
|
||||
}
|
||||
|
||||
// Charger la source des tuiles (IGN Plan par défaut)
|
||||
final savedTileSource = _settingsBox.get('mapTileSource');
|
||||
if (savedTileSource != null) {
|
||||
_tileSource = TileSource.values.firstWhere(
|
||||
(t) => t.name == savedTileSource,
|
||||
orElse: () => TileSource.ignPlan,
|
||||
);
|
||||
debugPrint('🗺️ MapPage: Source tuiles chargée = $_tileSource');
|
||||
}
|
||||
}
|
||||
|
||||
// Méthode pour gérer les changements de sélection de secteur
|
||||
@@ -4151,8 +4164,8 @@ class _MapPageContentState extends State<MapPageContent> {
|
||||
initialZoom: _currentZoom,
|
||||
mapController: _mapController,
|
||||
disableDrag: _isDraggingPoint,
|
||||
// Utiliser OpenStreetMap temporairement sur mobile si Mapbox échoue
|
||||
useOpenStreetMap: !kIsWeb, // true sur mobile, false sur web
|
||||
// Utiliser les tuiles IGN (Plan ou Ortho selon le choix utilisateur)
|
||||
tileSource: _tileSource,
|
||||
labelMarkers: _buildSectorLabels(),
|
||||
markers: [
|
||||
..._buildMarkers(),
|
||||
@@ -4199,14 +4212,38 @@ class _MapPageContentState extends State<MapPageContent> {
|
||||
),
|
||||
)),
|
||||
|
||||
// Boutons d'action en haut à droite (Web uniquement et admin seulement)
|
||||
if (kIsWeb && canEditSectors)
|
||||
Positioned(
|
||||
right: 16,
|
||||
top: 16,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
// Bouton switch IGN Plan / Ortho en haut à droite (visible pour tous)
|
||||
Positioned(
|
||||
right: 16,
|
||||
top: 16,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
// Bouton switch IGN Plan / Ortho
|
||||
// L'icône montre l'action (vers quoi on bascule), pas l'état actuel
|
||||
_buildActionButton(
|
||||
icon: _tileSource == TileSource.ignPlan
|
||||
? Icons.satellite_alt // En mode plan → afficher satellite pour basculer
|
||||
: Icons.map_outlined, // En mode ortho → afficher plan pour basculer
|
||||
tooltip: _tileSource == TileSource.ignPlan
|
||||
? 'Passer en vue satellite'
|
||||
: 'Passer en vue plan',
|
||||
color: Colors.white,
|
||||
iconColor: Colors.blueGrey[700],
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
_tileSource = _tileSource == TileSource.ignPlan
|
||||
? TileSource.ignOrtho
|
||||
: TileSource.ignPlan;
|
||||
_settingsBox.put('mapTileSource', _tileSource.name);
|
||||
debugPrint('🗺️ MapPage: Source tuiles changée = $_tileSource');
|
||||
});
|
||||
},
|
||||
),
|
||||
// Espacement avant les boutons admin
|
||||
if (kIsWeb && canEditSectors) const SizedBox(height: 16),
|
||||
// Boutons admin (création, modification, suppression de secteurs)
|
||||
if (kIsWeb && canEditSectors) ...[
|
||||
// Bouton Créer
|
||||
_buildActionButton(
|
||||
icon: Icons.pentagon_outlined,
|
||||
@@ -4246,8 +4283,9 @@ class _MapPageContentState extends State<MapPageContent> {
|
||||
: null,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
// Menu contextuel (apparaît selon le mode) - Web uniquement et admin seulement
|
||||
if (kIsWeb && canEditSectors && _mapMode != MapMode.view)
|
||||
|
||||
Reference in New Issue
Block a user