diff --git a/assets/svg/flux_logo_dark.svg b/assets/svg/flux_logo_dark.svg
new file mode 100644
index 0000000..78d9eaa
--- /dev/null
+++ b/assets/svg/flux_logo_dark.svg
@@ -0,0 +1,70 @@
+
+
+
+
diff --git a/assets/svg/flux_logo_light.svg b/assets/svg/flux_logo_light.svg
new file mode 100644
index 0000000..11efda0
--- /dev/null
+++ b/assets/svg/flux_logo_light.svg
@@ -0,0 +1,70 @@
+
+
+
+
diff --git a/lib/core/widgets/flux_logo.dart b/lib/core/widgets/flux_logo.dart
new file mode 100644
index 0000000..15f2176
--- /dev/null
+++ b/lib/core/widgets/flux_logo.dart
@@ -0,0 +1,98 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_svg/flutter_svg.dart';
+
+// Classe privata per gestire i percorsi in modo ordinato
+class _FluxSvgPaths {
+ // Nota: Usa l'estensione .svg
+ static const String logoLight = 'assets/svg/flux_logo_light.svg';
+ static const String logoDark = 'assets/svg/flux_logo_dark.svg';
+}
+
+/// Widget base generico per il logo FLUX in formato SVG.
+/// Gestisce il dimensionamento vettoriale e la nitidezza.
+class _FluxLogoBase extends StatelessWidget {
+ final String assetPath;
+ final double? width;
+ final double? height;
+
+ const _FluxLogoBase({required this.assetPath, this.width, this.height});
+
+ @override
+ Widget build(BuildContext context) {
+ // Usiamo SvgPicture.asset per gli SVG
+ return SvgPicture.asset(
+ assetPath,
+ width: width,
+ height: height,
+ // BoxFit.contain assicura che il logo si adatti perfettamente
+ // alle dimensioni fornite senza mai distorcersi.
+ fit: BoxFit.contain,
+ // Opzionale: previene sfarfallii al caricamento
+ placeholderBuilder: (BuildContext context) => Container(
+ padding: const EdgeInsets.all(10.0),
+ child: const CircularProgressIndicator(),
+ ),
+ );
+ }
+}
+
+// --- I TUOI DUE WIDGET RICHIESTI ---
+
+/// Logo FLUX per sfondi CHIARI (testo nero).
+class FluxLogoLight extends StatelessWidget {
+ final double? width;
+ final double? height;
+
+ const FluxLogoLight({super.key, this.width, this.height});
+
+ @override
+ Widget build(BuildContext context) {
+ return _FluxLogoBase(
+ assetPath: _FluxSvgPaths.logoLight,
+ width: width,
+ height: height,
+ );
+ }
+}
+
+/// Logo FLUX per sfondi SCURI (testo bianco).
+class FluxLogoDark extends StatelessWidget {
+ final double? width;
+ final double? height;
+
+ const FluxLogoDark({super.key, this.width, this.height});
+
+ @override
+ Widget build(BuildContext context) {
+ return _FluxLogoBase(
+ assetPath: _FluxSvgPaths.logoDark,
+ width: width,
+ height: height,
+ );
+ }
+}
+
+// --- BONUS: IL WIDGET INTELLIGENTE PER LA TUA APP ---
+
+/// Un singolo widget che sceglie automaticamente il logo giusto
+/// in base al tema attuale (Light o Dark Mode) dell'app.
+/// Ideale per la dashboard o la splash screen.
+class FluxLogoAuto extends StatelessWidget {
+ final double? width;
+ final double? height;
+
+ const FluxLogoAuto({super.key, this.width, this.height});
+
+ @override
+ Widget build(BuildContext context) {
+ // Controlla se il tema attuale รจ scuro
+ final isDarkMode = Theme.of(context).brightness == Brightness.dark;
+
+ return _FluxLogoBase(
+ // Sceglie l'asset giusto
+ assetPath: isDarkMode ? _FluxSvgPaths.logoLight : _FluxSvgPaths.logoDark,
+ width: width,
+ height: height,
+ );
+ }
+}
diff --git a/lib/features/auth/bloc/auth_bloc.dart b/lib/features/auth/bloc/auth_bloc.dart
index b02c718..202136b 100644
--- a/lib/features/auth/bloc/auth_bloc.dart
+++ b/lib/features/auth/bloc/auth_bloc.dart
@@ -51,5 +51,8 @@ class AuthBloc extends Bloc {
);
}
});
+ on((event, emit) async {
+ await _supabase.auth.signOut();
+ });
}
}
diff --git a/lib/features/auth/bloc/auth_events.dart b/lib/features/auth/bloc/auth_events.dart
index 15ddeba..da08631 100644
--- a/lib/features/auth/bloc/auth_events.dart
+++ b/lib/features/auth/bloc/auth_events.dart
@@ -17,3 +17,5 @@ class LoginRequested extends AuthEvent {
@override
List