Files
unionflow-server-api/unionflow/unionflow-mobile-apps/lib/presentation/widgets/shared/mini_header_bar.dart
dahoud e8ad874015 feat: WebSocket temps réel + Finance Workflow + corrections
- Task #6: WebSocket /ws/dashboard + Kafka events (5 topics)
  * Backend: KafkaEventProducer, KafkaEventConsumer
  * Mobile: WebSocketService (reconnection, heartbeat, typed events)
  * DashboardBloc: Auto-refresh depuis WebSocket events

- Finance Workflow: approbations + budgets (backend + mobile)
  * Backend: entities, services, resources, migrations Flyway V6
  * Mobile: features finance_workflow complète avec BLoC

- Corrections DI: interfaces IRepository partout
  * IProfileRepository, IOrganizationRepository, IMembreRepository
  * GetIt configuré avec @injectable

- Spec-Kit: constitution + templates mis à jour
  * .specify/memory/constitution.md enrichie
  * Templates agent, plan, spec, tasks, checklist

- Nettoyage: fichiers temporaires supprimés

Signed-off-by: lions dev Team
2026-03-15 02:12:17 +00:00

64 lines
1.8 KiB
Dart

import 'package:flutter/material.dart';
import '../../../shared/design_system/tokens/app_colors.dart';
import '../../../shared/design_system/tokens/app_typography.dart';
import '../../../shared/widgets/mini_avatar.dart';
/// UnionFlow Mobile - Composant DRY : MiniHeaderBar
/// Remplace l'AppBar massive. Maximum 35-40px de hauteur.
class MiniHeaderBar extends StatelessWidget implements PreferredSizeWidget {
final String title;
final String? profileImageUrl;
final Widget? trailing;
const MiniHeaderBar({
Key? key,
required this.title,
this.profileImageUrl,
this.trailing,
}) : super(key: key);
@override
Widget build(BuildContext context) {
final isDark = Theme.of(context).brightness == Brightness.dark;
return Container(
color: Theme.of(context).scaffoldBackgroundColor,
padding: EdgeInsets.only(
top: MediaQuery.of(context).padding.top + 8, // Respecte la Status Bar
bottom: 8,
left: 16,
right: 16,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
// Bouton Menu/Profil à gauche
GestureDetector(
onTap: () {
Scaffold.of(context).openDrawer();
},
child: MiniAvatar(
imageUrl: profileImageUrl,
fallbackText: 'ME',
size: 28,
),
),
// Titre central (Petit)
Text(
title,
style: AppTypography.headerSmall.copyWith(
color: isDark ? AppColors.textPrimaryDark : AppColors.textPrimaryLight,
),
),
if (trailing != null) trailing! else const SizedBox(width: 28),
],
),
);
}
@override
Size get preferredSize => const Size.fromHeight(40.0);
}