Compare commits

..
29 Commits
Author SHA1 Message Date
brontomark bc9e0769cd aggiunto download degli allegati e visualizzazione anteprime nella attachmentsection
Build and Release FLUX (Multi-Platform) / build-web (push) Successful in 2m39s
Build and Release FLUX (Multi-Platform) / build-macos (push) Successful in 3m10s
Build and Release FLUX (Multi-Platform) / build-windows (push) Successful in 10m45s
Build and Release FLUX (Multi-Platform) / build-linux (push) Successful in 1m25s
2026-10-13 11:31:13 +02:00
brontomark 7dd8a3ac71 aggiunto qr dati finanziamento
Build and Release FLUX (Multi-Platform) / build-linux (push) Successful in 1m21s
Build and Release FLUX (Multi-Platform) / build-web (push) Successful in 1m52s
Build and Release FLUX (Multi-Platform) / build-macos (push) Successful in 2m55s
Build and Release FLUX (Multi-Platform) / build-windows (push) Successful in 8m59s
2026-10-10 11:38:07 +02:00
brontomark 70db03066b aggiunto qr dati finanziamento 2026-10-10 11:37:34 +02:00
brontomark addb06a61a fix discriminante system_role / job_title
Build and Release FLUX (Multi-Platform) / build-windows (push) Canceled after 26s
Build and Release FLUX (Multi-Platform) / build-macos (push) Canceled after 0s
Build and Release FLUX (Multi-Platform) / build-web (push) Canceled after 31s
Build and Release FLUX (Multi-Platform) / build-linux (push) Canceled after 30s
2026-10-09 15:59:47 +02:00
brontomark 5e505d96b3 v
Build and Release FLUX (Multi-Platform) / build-web (push) Successful in 2m4s
Build and Release FLUX (Multi-Platform) / build-macos (push) Successful in 2m35s
Build and Release FLUX (Multi-Platform) / build-linux (push) Successful in 1m29s
Build and Release FLUX (Multi-Platform) / build-windows (push) Successful in 7m13s
2026-10-09 15:36:25 +02:00
brontomark 66c7094ada possibilità di disattivare staff e altre migliorie 2026-10-09 15:36:06 +02:00
brontomark bd496ad37f c
Build and Release FLUX (Multi-Platform) / build-linux (push) Successful in 1m29s
Build and Release FLUX (Multi-Platform) / build-web (push) Successful in 1m49s
Build and Release FLUX (Multi-Platform) / build-windows (push) Canceled after 0s
Build and Release FLUX (Multi-Platform) / build-macos (push) Canceled after 2m23s
2026-10-09 15:18:23 +02:00
brontomark 771f1f921b a
Build and Release FLUX (Multi-Platform) / build-windows (push) Canceled after 30s
Build and Release FLUX (Multi-Platform) / build-macos (push) Canceled after 0s
Build and Release FLUX (Multi-Platform) / build-web (push) Canceled after 36s
Build and Release FLUX (Multi-Platform) / build-linux (push) Canceled after 42s
2026-10-09 12:03:31 +02:00
brontomark 2c02dfcf8b sistemati bug 2026-10-09 12:02:48 +02:00
brontomark 89e5d4014d migliorato upload da mobile 2026-10-09 11:22:11 +02:00
brontomark 8e396a7885 passaggio a pdfrx al posto di pdfx finalmente. Ora i pdf in flux sono compatibili con tutte le piattaforme 2026-10-08 19:13:38 +02:00
brontomark 9b7b4beaa8 v
Build and Release FLUX (Multi-Platform) / build-web (push) Successful in 1m29s
Build and Release FLUX (Multi-Platform) / build-macos (push) Successful in 2m17s
Build and Release FLUX (Multi-Platform) / build-linux (push) Successful in 1m32s
Build and Release FLUX (Multi-Platform) / build-windows (push) Successful in 8m43s
2026-10-06 13:16:26 +02:00
brontomark 531b3ba3f2 o
Build and Release FLUX (Multi-Platform) / build-web (push) Successful in 1m31s
Build and Release FLUX (Multi-Platform) / build-linux (push) Failing after 10s
Build and Release FLUX (Multi-Platform) / build-macos (push) Successful in 2m17s
Build and Release FLUX (Multi-Platform) / build-windows (push) Canceled after 0s
2026-10-06 13:05:53 +02:00
brontomark d0036b729d cambiato tanto
Build and Release FLUX (Multi-Platform) / build-windows (push) Failing after 48s
Build and Release FLUX (Multi-Platform) / build-web (push) Successful in 1m28s
Build and Release FLUX (Multi-Platform) / build-macos (push) Successful in 2m16s
Build and Release FLUX (Multi-Platform) / build-linux (push) Failing after 11s
2026-10-06 12:10:50 +02:00
brontomark 4d791d2213 risolti diversi crash e aggiunta presa bollette
Build and Release FLUX (Multi-Platform) / build-linux (push) Failing after 3s
Build and Release FLUX (Multi-Platform) / build-windows (push) Canceled after 0s
Build and Release FLUX (Multi-Platform) / build-macos (push) Canceled after 0s
Build and Release FLUX (Multi-Platform) / build-web (push) Canceled after 1m1s
2026-10-06 11:59:17 +02:00
brontomark 19fc90b830 a 2026-10-05 13:42:11 +02:00
brontomark 4f0fe7bab5 a 2026-10-04 10:43:03 +02:00
brontomark 7323f68e62 version
Build and Release FLUX (Multi-Platform) / build-web (push) Successful in 1m59s
Build and Release FLUX (Multi-Platform) / build-linux (push) Successful in 1m24s
Build and Release FLUX (Multi-Platform) / build-windows (push) Successful in 9m47s
Build and Release FLUX (Multi-Platform) / build-macos (push) Failing after 11m15s
2026-09-24 10:41:53 +02:00
brontomark a33b08a0c3 fix(ci): set User-Agent on Invoke-RestMethod for Windows Supabase update and bump to 2.0.11
Build and Release FLUX (Multi-Platform) / build-web (push) Successful in 6m3s
Build and Release FLUX (Multi-Platform) / build-windows (push) Successful in 6m51s
Build and Release FLUX (Multi-Platform) / build-linux (push) Successful in 4m2s
Build and Release FLUX (Multi-Platform) / build-macos (push) Failing after 15m20s
2026-09-21 09:48:09 +02:00
brontomark c8fdd29cf4 v
Build and Release FLUX (Multi-Platform) / build-web (push) Successful in 1m55s
Build and Release FLUX (Multi-Platform) / build-linux (push) Successful in 1m26s
Build and Release FLUX (Multi-Platform) / build-windows (push) Failing after 9m48s
Build and Release FLUX (Multi-Platform) / build-macos (push) Failing after 11m3s
2026-09-21 09:30:44 +02:00
brontomark 00615b92a0 fix(windows): use {autopf} with PrivilegesRequired=lowest and bump to v2.0.9
Build and Release FLUX (Multi-Platform) / build-web (push) Successful in 1m50s
Build and Release FLUX (Multi-Platform) / build-linux (push) Successful in 1m21s
Build and Release FLUX (Multi-Platform) / build-windows (push) Failing after 12m2s
Build and Release FLUX (Multi-Platform) / build-macos (push) Successful in 2m59s
2026-09-19 19:24:11 +02:00
brontomark 832be3d797 feat: supporto latest_version, riga AppImage e gestione aggiornamento facoltativo/obbligatorio
Build and Release FLUX (Multi-Platform) / build-web (push) Successful in 1m53s
Build and Release FLUX (Multi-Platform) / build-linux (push) Successful in 1m20s
Build and Release FLUX (Multi-Platform) / build-windows (push) Failing after 6m18s
Build and Release FLUX (Multi-Platform) / build-macos (push) Failing after 14m10s
2026-09-19 18:42:34 +02:00
brontomark 72f9d88f96 auto update
Build and Release FLUX (Multi-Platform) / build-web (push) Successful in 1m58s
Build and Release FLUX (Multi-Platform) / build-linux (push) Successful in 1m22s
Build and Release FLUX (Multi-Platform) / build-windows (push) Failing after 7m41s
Build and Release FLUX (Multi-Platform) / build-macos (push) Has been cancelled
2026-09-19 18:25:30 +02:00
brontomark d4a6b142c5 v
Build and Release FLUX (Multi-Platform) / build-android (push) Successful in 3m5s
Build and Release FLUX (Multi-Platform) / build-web (push) Successful in 1m50s
Build and Release FLUX (Multi-Platform) / build-linux (push) Successful in 1m24s
Build and Release FLUX (Multi-Platform) / build-windows (push) Successful in 6m48s
Build and Release FLUX (Multi-Platform) / build-macos (push) Has been cancelled
2026-09-19 17:13:41 +02:00
brontomark 8da4dc9d75 prova
Build and Release FLUX (Multi-Platform) / build-android (push) Failing after 15s
Build and Release FLUX (Multi-Platform) / build-web (push) Successful in 1m46s
Build and Release FLUX (Multi-Platform) / build-linux (push) Failing after 1m15s
Build and Release FLUX (Multi-Platform) / build-windows (push) Successful in 8m44s
Build and Release FLUX (Multi-Platform) / build-macos (push) Failing after 10m4s
2026-09-19 16:51:35 +02:00
brontomark 6ad0aa3e23 v
Build and Release FLUX (Multi-Platform) / build-android (push) Failing after 38s
Build and Release FLUX (Multi-Platform) / build-web (push) Successful in 2m1s
Build and Release FLUX (Multi-Platform) / build-linux (push) Failing after 1m17s
Build and Release FLUX (Multi-Platform) / build-windows (push) Failing after 4m59s
Build and Release FLUX (Multi-Platform) / build-macos (push) Has been cancelled
2026-09-19 16:33:50 +02:00
brontomark 11c5352555 ritmo singolo addetto
Build and Release FLUX (Multi-Platform) / build-android (push) Successful in 2m40s
Build and Release FLUX (Multi-Platform) / build-web (push) Successful in 1m53s
Build and Release FLUX (Multi-Platform) / build-macos (push) Successful in 3m8s
Build and Release FLUX (Multi-Platform) / build-windows (push) Failing after 4m4s
Build and Release FLUX (Multi-Platform) / build-linux (push) Failing after 1m16s
2026-09-19 14:05:29 +02:00
brontomark a0bdb9a535 fix titolo hero target widget su mobile
Build and Release FLUX (Multi-Platform) / build-android (push) Successful in 2m49s
Build and Release FLUX (Multi-Platform) / build-web (push) Successful in 1m58s
Build and Release FLUX (Multi-Platform) / build-macos (push) Successful in 2m46s
Build and Release FLUX (Multi-Platform) / build-windows (push) Failing after 4m5s
Build and Release FLUX (Multi-Platform) / build-linux (push) Failing after 1m17s
2026-09-19 13:49:14 +02:00
brontomark 37d69e3ddc aggiunta navigazione al file viewer
Build and Release FLUX (Multi-Platform) / build-android (push) Successful in 3m26s
Build and Release FLUX (Multi-Platform) / build-web (push) Successful in 2m41s
Build and Release FLUX (Multi-Platform) / build-macos (push) Successful in 3m3s
Build and Release FLUX (Multi-Platform) / build-windows (push) Failing after 6m14s
Build and Release FLUX (Multi-Platform) / build-linux (push) Failing after 1m16s
2026-09-19 13:34:54 +02:00
96 changed files with 7273 additions and 1205 deletions

No files matched your search

+55 -36
View File
@@ -18,6 +18,11 @@ jobs:
run: |
Set-Content -Path ".env" -Value "${{ secrets.ENV_FILE_CONTENT }}"
- name: Pulizia Cache Dart e Download Dipendenze
run: |
if (Test-Path ".dart_tool") { Remove-Item -Recurse -Force ".dart_tool" }
flutter pub get
- name: Build Flutter Windows
run: flutter build windows --release
@@ -49,44 +54,24 @@ jobs:
files: "build/windows/installer/FluxInstaller.exe"
api_key: ${{ secrets.MYRELEASE_TOKEN }}
- name: Aggiorna Link Windows su Supabase
run: |
$TagVersion = "${{ github.ref_name }}".TrimStart('v')
$headers = @{
"apikey" = "${{ secrets.SUPABASE_SERVICE_KEY }}"
"Authorization" = "Bearer ${{ secrets.SUPABASE_SERVICE_KEY }}"
"Content-Type" = "application/json"
}
$body = (@{
download_url = "https://gitea.catelli.it/brontomark/flux/releases/download/${{ github.ref_name }}/FluxInstaller.exe"
latest_version = $TagVersion
} | ConvertTo-Json)
Invoke-RestMethod -Uri "https://pvqpjloswwvtfoxbkfbh.supabase.co/rest/v1/app_config?platform=eq.windows" -Method Patch -Headers $headers -Body $body -UserAgent "flux-runner"
- name: Pulisci Workspace Windows
if: always()
run: Remove-Item -Recurse -Force ./*
# -----------------------------------------------------------------
# JOB 2: ANDROID APPBUNDLE (Gira sul runner Fedora o Mac)
# -----------------------------------------------------------------
build-android:
runs-on: cross-runner
steps:
- name: Checkout del codice
uses: actions/checkout@v3
# Logica Bash per Mac/Linux: usiamo le virgolette singole forti per evitare escape strani
- name: Crea file .env
run: |
cat << 'EOF' > .env
${{ secrets.ENV_FILE_CONTENT }}
EOF
- name: Build Flutter AppBundle
run: flutter build appbundle --release
# Carichiamo l'AAB nelle release di Gitea per poi caricarlo su Google Play Console
- name: Upload Android Asset
uses: https://gitea.com/actions/release-action@main
with:
files: "build/app/outputs/bundle/release/app-release.aab"
api_key: ${{ secrets.MYRELEASE_TOKEN }}
- name: Aggiorna Link Android su Supabase
run: |
curl -X PATCH "https://pvqpjloswwvtfoxbkfbh.supabase.co/rest/v1/app_config?id=eq.49f18b19-2129-46c0-b690-a97db725b5a8" -H "apikey: ${{ secrets.SUPABASE_SERVICE_KEY }}" -H "Authorization: Bearer ${{ secrets.SUPABASE_SERVICE_KEY }}" -H "Content-Type: application/json" -d "{\"download_url\": \"https://gitea.catelli.it/brontomark/flux/releases/download/${{ github.ref_name }}/app-release.aab\"}"
- name: Aggiorna Link Windows su Supabase
run: |
curl -X PATCH "https://pvqpjloswwvtfoxbkfbh.supabase.co/rest/v1/app_config?id=eq.1f888b30-5cbf-4a16-820c-5036a3af0cf8" -H "apikey: ${{ secrets.SUPABASE_SERVICE_KEY }}" -H "Authorization: Bearer ${{ secrets.SUPABASE_SERVICE_KEY }}" -H "Content-Type: application/json" -d "{\"download_url\": \"https://gitea.catelli.it/brontomark/flux/releases/download/${{ github.ref_name }}/FluxInstaller.exe\"}"
# -----------------------------------------------------------------
# JOB 3: WEB & CLOUDFLARE DEPLOY (Gira sul runner Fedora o Mac)
@@ -103,6 +88,11 @@ jobs:
${{ secrets.ENV_FILE_CONTENT }}
EOF
- name: Pulizia Cache e Fetch Dipendenze
run: |
rm -rf .dart_tool
flutter pub get
- name: Build Flutter Web
run: flutter build web --release
@@ -114,6 +104,15 @@ jobs:
run: |
npx wrangler pages deploy build/web --project-name="flux" --branch="main"
- name: Aggiorna Versione Web su Supabase
run: |
TagVersion="${GITHUB_REF_NAME#v}"
curl -X PATCH "https://pvqpjloswwvtfoxbkfbh.supabase.co/rest/v1/app_config?platform=eq.web" \
-H "apikey: ${{ secrets.SUPABASE_SERVICE_KEY }}" \
-H "Authorization: Bearer ${{ secrets.SUPABASE_SERVICE_KEY }}" \
-H "Content-Type: application/json" \
-d "{\"latest_version\": \"$TagVersion\"}"
# -----------------------------------------------------------------
# JOB 4: LINUX APPIMAGE (Gira sul tuo PC Fedora / Linux Runner)
# -----------------------------------------------------------------
@@ -129,6 +128,11 @@ jobs:
${{ secrets.ENV_FILE_CONTENT }}
EOF
- name: Pulizia Cache e Fetch Dipendenze
run: |
rm -rf .dart_tool
flutter pub get
- name: Build Flutter Linux
run: flutter build linux --release
@@ -175,7 +179,12 @@ jobs:
- name: Aggiorna Link Linux su Supabase
run: |
curl -X PATCH "https://pvqpjloswwvtfoxbkfbh.supabase.co/rest/v1/app_config?platform=eq.linux" -H "apikey: ${{ secrets.SUPABASE_SERVICE_KEY }}" -H "Authorization: Bearer ${{ secrets.SUPABASE_SERVICE_KEY }}" -H "Content-Type: application/json" -d "{\"download_url\": \"https://gitea.catelli.it/brontomark/flux/releases/download/${{ github.ref_name }}/Flux-x86_64.AppImage\"}"
TagVersion="${GITHUB_REF_NAME#v}"
curl -X PATCH "https://pvqpjloswwvtfoxbkfbh.supabase.co/rest/v1/app_config?platform=eq.AppImage" \
-H "apikey: ${{ secrets.SUPABASE_SERVICE_KEY }}" \
-H "Authorization: Bearer ${{ secrets.SUPABASE_SERVICE_KEY }}" \
-H "Content-Type: application/json" \
-d "{\"download_url\": \"https://gitea.catelli.it/brontomark/flux/releases/download/${{ github.ref_name }}/Flux-x86_64.AppImage\", \"latest_version\": \"$TagVersion\"}"
# -----------------------------------------------------------------
# JOB 5: MACOS (Gira sul tuo Mac / macos-runner)
@@ -192,6 +201,11 @@ jobs:
${{ secrets.ENV_FILE_CONTENT }}
EOF
- name: Pulizia Cache e Fetch Dipendenze
run: |
rm -rf .dart_tool
flutter pub get
- name: Build Flutter macOS
run: flutter build macos --release
@@ -215,4 +229,9 @@ jobs:
- name: Aggiorna Link macOS su Supabase
run: |
curl -X PATCH "https://pvqpjloswwvtfoxbkfbh.supabase.co/rest/v1/app_config?platform=eq.macos" -H "apikey: ${{ secrets.SUPABASE_SERVICE_KEY }}" -H "Authorization: Bearer ${{ secrets.SUPABASE_SERVICE_KEY }}" -H "Content-Type: application/json" -d "{\"download_url\": \"https://gitea.catelli.it/brontomark/flux/releases/download/${{ github.ref_name }}/Flux-macOS.dmg\"}"
TagVersion="${GITHUB_REF_NAME#v}"
curl -X PATCH "https://pvqpjloswwvtfoxbkfbh.supabase.co/rest/v1/app_config?platform=eq.macos" \
-H "apikey: ${{ secrets.SUPABASE_SERVICE_KEY }}" \
-H "Authorization: Bearer ${{ secrets.SUPABASE_SERVICE_KEY }}" \
-H "Content-Type: application/json" \
-d "{\"download_url\": \"https://gitea.catelli.it/brontomark/flux/releases/download/${{ github.ref_name }}/Flux-macOS.dmg\", \"latest_version\": \"$TagVersion\"}"
+4
View File
@@ -11,6 +11,10 @@ analyzer:
- "ios/**"
- "macos/**"
- ".dart_tool/**"
- android/**
- web/**
- windows/**
- linux/**
linter:
rules:
+13 -8
View File
@@ -28,14 +28,19 @@ class SessionCubit extends Cubit<SessionState> {
: super(const SessionState(status: SessionStatus.initial)) {
initializeSession();
// Possiamo metterci in ascolto dei cambiamenti di Auth (Login/Logout)
_supabase.auth.onAuthStateChange.listen((data) {
final AuthChangeEvent event = data.event;
if (event == AuthChangeEvent.signedIn) {
initializeSession();
} else if (event == AuthChangeEvent.signedOut) {
emit(const SessionState(status: SessionStatus.unauthenticated));
}
});
_supabase.auth.onAuthStateChange.listen(
(data) {
final AuthChangeEvent event = data.event;
if (event == AuthChangeEvent.signedIn) {
initializeSession();
} else if (event == AuthChangeEvent.signedOut) {
emit(const SessionState(status: SessionStatus.unauthenticated));
}
},
onError: (error, stackTrace) {
debugPrint('Auth state change error: $error');
},
);
}
Future<void> initializeSession() async {
+30 -6
View File
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flux/core/routes/routes.dart';
import 'package:flux/core/utils/extensions.dart';
import 'package:flux/core/widgets/app_version_label.dart';
import 'package:go_router/go_router.dart';
// ==========================================
@@ -197,6 +198,12 @@ class _AppMenuState extends State<AppMenu> {
),
),
// --- VERSIONE APP CON HYPERLINK ---
Padding(
padding: const EdgeInsets.symmetric(vertical: 4.0),
child: AppVersionLabel(isCollapsed: effectivelyCollapsed),
),
// --- PULSANTE TOGGLE (Solo Desktop) ---
if (!widget.isDrawer)
Padding(
@@ -257,7 +264,9 @@ class _AppMenuState extends State<AppMenu> {
),
child: Icon(
icon,
color: isSelected ? theme.colorScheme.primary : null,
color: isSelected
? theme.colorScheme.primary
: theme.colorScheme.onSurfaceVariant,
),
),
),
@@ -270,11 +279,19 @@ class _AppMenuState extends State<AppMenu> {
alpha: 0.4,
),
selected: isSelected,
leading: Icon(icon, color: isSelected ? theme.colorScheme.primary : null),
leading: Icon(
icon,
color: isSelected
? theme.colorScheme.primary
: theme.colorScheme.onSurfaceVariant,
),
title: Text(
title,
style: TextStyle(
fontWeight: isSelected ? FontWeight.bold : FontWeight.normal,
color: isSelected
? theme.colorScheme.primary
: theme.colorScheme.onSurface,
),
maxLines: 1,
overflow: TextOverflow.clip,
@@ -321,7 +338,7 @@ class _AppMenuState extends State<AppMenu> {
: FontWeight.normal,
color: widget.currentPath == item.pathToCheck
? theme.colorScheme.primary
: null,
: theme.colorScheme.onSurface,
),
),
),
@@ -338,7 +355,9 @@ class _AppMenuState extends State<AppMenu> {
),
child: Icon(
icon,
color: isSelected ? theme.colorScheme.primary : null,
color: isSelected
? theme.colorScheme.primary
: theme.colorScheme.onSurfaceVariant,
),
),
);
@@ -352,12 +371,17 @@ class _AppMenuState extends State<AppMenu> {
tilePadding: const EdgeInsets.symmetric(horizontal: 16),
leading: Icon(
icon,
color: isSelected ? theme.colorScheme.primary : null,
color: isSelected
? theme.colorScheme.primary
: theme.colorScheme.onSurfaceVariant,
),
title: Text(
title,
style: TextStyle(
fontWeight: isSelected ? FontWeight.bold : FontWeight.normal,
color: isSelected
? theme.colorScheme.primary
: theme.colorScheme.onSurface,
),
maxLines: 1,
overflow: TextOverflow.clip,
@@ -383,7 +407,7 @@ class _AppMenuState extends State<AppMenu> {
: FontWeight.normal,
color: isSubSelected
? theme.colorScheme.primary
: theme.textTheme.bodyMedium?.color,
: theme.colorScheme.onSurface,
),
maxLines: 1,
overflow: TextOverflow.clip,
+30 -2
View File
@@ -18,6 +18,8 @@ import 'package:flux/features/customers/models/customer_model.dart';
import 'package:flux/features/customers/ui/customer_detail_screen.dart';
import 'package:flux/features/customers/ui/customer_form_screen.dart';
import 'package:flux/features/customers/ui/customers_list_screen.dart';
import 'package:flux/features/home/dashboard_daily_ricontatti/blocs/dashboard_daily_ricontatti_cubit.dart';
import 'package:flux/features/home/dashboard_expiring_contracts/bloc/dashboard_expiring_contracts_cubit.dart';
import 'package:flux/features/home/dashboard_note_list/blocs/dashboard_note_list_cubit.dart';
import 'package:flux/features/home/dashboard_store_operation_list/bloc/dashboard_store_operation_list_cubit.dart';
import 'package:flux/features/home/dashboard_store_ticket_list/blocs/dashboard_store_ticket_list_cubit.dart';
@@ -46,6 +48,7 @@ import 'package:flux/features/attachments/blocs/attachments_bloc.dart';
import 'package:flux/features/operations/blocs/operation_details_list_cubit.dart';
import 'package:flux/features/operations/blocs/operation_form_cubit.dart';
import 'package:flux/features/operations/models/operation_model.dart';
import 'package:flux/features/operations/ui/financing_form_screen.dart';
import 'package:flux/features/operations/ui/operation_form_screen.dart';
import 'package:flux/features/operations/ui/operation_list_screen.dart';
import 'package:flux/features/settings/blocs/reminder_defaults_cubit.dart';
@@ -95,8 +98,13 @@ class AppRouter {
final isGoingToSetPassword = state.matchedLocation == '/set-password';
// 1. LA PASSATOIA VIP (DEVE ESSERE IN CIMA)
// Usiamo state.uri.path perché state.matchedLocation a volte fa i capricci coi deep link iniziali
final isPublicRoute = state.uri.path.startsWith('/upload');
// Usiamo sia state.uri.path che state.matchedLocation per sicurezza con i deep link
final path = state.uri.path;
final matched = state.matchedLocation;
final isPublicRoute = path.startsWith('/upload') ||
path.startsWith('/financing') ||
matched.startsWith('/upload') ||
matched.startsWith('/financing');
if (isPublicRoute) {
// Ritorna null esplicitamente per dire al router "Rimani qui e non fare altri controlli"
@@ -152,6 +160,14 @@ class AppRouter {
child: const OnboardingScreen(),
),
),
GoRoute(
path: '/financing/:sessionId',
name: Routes.financing,
builder: (context, state) {
final sessionId = state.pathParameters['sessionId'] ?? '';
return FinancingFormScreen(sessionId: sessionId);
},
),
// --- CORE APP (DENTRO LA SHELL CON NAVIGATION BAR/RAIL) ---
ShellRoute(
@@ -197,6 +213,18 @@ class AppRouter {
staffId: sessionCubit.state.currentStaffMember?.id,
),
),
BlocProvider<DashboardExpiringContractsCubit>(
create: (context) => DashboardExpiringContractsCubit(
companyId: sessionCubit.state.company?.id,
storeId: sessionCubit.state.currentStore?.id,
),
),
BlocProvider<DashboardDailyRicontattiCubit>(
create: (context) => DashboardDailyRicontattiCubit(
companyId: sessionCubit.state.company?.id,
storeId: sessionCubit.state.currentStore?.id,
),
),
],
child: const HomeScreen(),
);
+1
View File
@@ -30,4 +30,5 @@ class Routes {
static const String targets = 'targets';
static const String targetForm = 'target-form';
static const String targetDetail = 'target-detail';
static const String financing = 'financing';
}
+36 -12
View File
@@ -104,11 +104,25 @@ ThemeData fluxDarkTheme = ThemeData(
),
),
drawerTheme: const DrawerThemeData(
backgroundColor: FluxColors.darkSurface,
surfaceTintColor: Colors.transparent,
),
expansionTileTheme: const ExpansionTileThemeData(
iconColor: FluxColors.accentTurquoise,
collapsedIconColor: FluxColors.darkTextSecondary,
textColor: FluxColors.darkTextPrimary,
collapsedTextColor: FluxColors.darkTextPrimary,
),
listTileTheme: ListTileThemeData(
// Definiamo la forma arrotondata (fondamentale per l'effetto moderno)
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
// Colore dell'icona (Turchese Flux)
iconColor: FluxColors.accentTurquoise,
selectedColor: FluxColors.primaryBlue,
selectedTileColor: FluxColors.primaryBlue.withValues(alpha: 0.15),
// Colore del testo
titleTextStyle: GoogleFonts.poppins(
color: FluxColors.darkTextPrimary,
@@ -121,9 +135,6 @@ ThemeData fluxDarkTheme = ThemeData(
),
// Per far apparire la "manina" su Web/Desktop
mouseCursor: WidgetStateProperty.all(SystemMouseCursors.click),
// NOTA: Se overlayColor non esiste, Flutter userà i colori
// di default del tema (splashColor e hoverColor) definiti nel ThemeData generale.
),
elevatedButtonTheme: ElevatedButtonThemeData(
@@ -189,26 +200,37 @@ ThemeData fluxLightTheme = ThemeData(
),
),
drawerTheme: const DrawerThemeData(
backgroundColor: FluxColors.lightSurface,
surfaceTintColor: Colors.transparent,
),
expansionTileTheme: const ExpansionTileThemeData(
iconColor: FluxColors.accentTurquoise,
collapsedIconColor: FluxColors.lightTextSecondary,
textColor: FluxColors.lightTextPrimary,
collapsedTextColor: FluxColors.lightTextPrimary,
),
listTileTheme: ListTileThemeData(
// Definiamo la forma arrotondata (fondamentale per l'effetto moderno)
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
// Colore dell'icona (Turchese Flux)
iconColor: FluxColors.accentTurquoise,
// Colore del testo
selectedColor: FluxColors.primaryBlue,
selectedTileColor: FluxColors.primaryBlue.withValues(alpha: 0.1),
// Colore del testo per il tema chiaro
titleTextStyle: GoogleFonts.poppins(
color: FluxColors.darkTextPrimary,
color: FluxColors.lightTextPrimary,
fontSize: 16,
fontWeight: FontWeight.w500,
),
subtitleTextStyle: GoogleFonts.poppins(
color: FluxColors.darkTextSecondary,
color: FluxColors.lightTextSecondary,
fontSize: 13,
),
// Per far apparire la "manina" su Web/Desktop
mouseCursor: WidgetStateProperty.all(SystemMouseCursors.click),
// NOTA: Se overlayColor non esiste, Flutter userà i colori
// di default del tema (splashColor e hoverColor) definiti nel ThemeData generale.
),
// Il pulsante principale rimane Blu Elettrico, molto visibile
@@ -260,12 +282,14 @@ extension FluxThemeContext on BuildContext {
// --- Testi (La parte mancante) ---
// Mappiamo primaryText sul colore del titolo e secondaryText su quello del corpo
Color get primaryText =>
Theme.of(this).textTheme.titleLarge?.color ?? Colors.white;
Theme.of(this).textTheme.titleLarge?.color ??
Theme.of(this).colorScheme.onSurface;
Color get secondaryText =>
Theme.of(this).textTheme.bodyMedium?.color ?? Colors.grey;
Theme.of(this).textTheme.bodyMedium?.color ??
Theme.of(this).colorScheme.onSurfaceVariant;
// Opzionale: un colore ancora più tenue per suggerimenti o icone disabilitate
Color get hintText =>
Theme.of(this).textTheme.bodySmall?.color ??
Colors.grey.withValues(alpha: 0.5);
Theme.of(this).colorScheme.onSurface.withValues(alpha: 0.5);
}
+164
View File
@@ -0,0 +1,164 @@
import 'dart:async';
import 'dart:io';
import 'package:flutter/foundation.dart';
class AutoUpdateService {
/// Verifica se la piattaforma corrente supporta l'aggiornamento automatico trasparente
static bool get isAutoUpdateSupported {
if (kIsWeb) return false;
if (Platform.isWindows) return true;
if (Platform.isLinux && Platform.environment['APPIMAGE'] != null) {
return true;
}
return false;
}
/// Scarica l'aggiornamento e lo applica in modo silenzioso
static Future<void> downloadAndApplyUpdate({
required String downloadUrl,
required void Function(double progress, String status) onProgress,
}) async {
if (kIsWeb) {
throw UnsupportedError("L'auto-update non è supportato su Web.");
}
if (Platform.isWindows) {
await _updateWindows(downloadUrl, onProgress);
} else if (Platform.isLinux) {
await _updateLinux(downloadUrl, onProgress);
} else {
throw UnsupportedError("Piattaforma non supportata per l'auto-update.");
}
}
/// Gestione aggiornamento Windows
static Future<void> _updateWindows(
String downloadUrl,
void Function(double progress, String status) onProgress,
) async {
final tempDir = Directory.systemTemp;
final installerFile = File('${tempDir.path}\\FluxInstaller_Update.exe');
if (installerFile.existsSync()) {
try {
installerFile.deleteSync();
} catch (_) {}
}
onProgress(0.0, "Download aggiornamento in corso...");
await _downloadFile(downloadUrl, installerFile, onProgress);
onProgress(1.0, "Installazione e riavvio in corso...");
await Future.delayed(const Duration(milliseconds: 500));
// Lancia l'installer in modalità silenziosa per utente singolo
// /VERYSILENT: nessuna interfaccia
// /SUPPRESSMSGBOXES: nessun popup
// /NORESTART: non riavvia il PC
await Process.start(
installerFile.path,
['/VERYSILENT', '/SUPPRESSMSGBOXES', '/NORESTART'],
mode: ProcessStartMode.detached,
);
// Chiude l'applicazione per consentire la sostituzione dei file
exit(0);
}
/// Gestione aggiornamento Linux (AppImage in-place)
static Future<void> _updateLinux(
String downloadUrl,
void Function(double progress, String status) onProgress,
) async {
final currentAppImagePath = Platform.environment['APPIMAGE'];
if (currentAppImagePath == null) {
throw StateError(
"L'applicazione non è in esecuzione come AppImage.",
);
}
final newAppImageFile = File('$currentAppImagePath.new');
if (newAppImageFile.existsSync()) {
try {
newAppImageFile.deleteSync();
} catch (_) {}
}
onProgress(0.0, "Download nuova versione in corso...");
await _downloadFile(downloadUrl, newAppImageFile, onProgress);
onProgress(1.0, "Finalizzazione e riavvio...");
await Future.delayed(const Duration(milliseconds: 300));
// Assegna il permesso di esecuzione
await Process.run('chmod', ['+x', newAppImageFile.path]);
// Sostituzione atomica del vecchio file AppImage con il nuovo
newAppImageFile.renameSync(currentAppImagePath);
// Rilancia la nuova versione
await Process.start(
currentAppImagePath,
[],
mode: ProcessStartMode.detached,
);
// Termina il processo attuale
exit(0);
}
/// Download in streaming con tracciamento del progresso
static Future<void> _downloadFile(
String url,
File destinationFile,
void Function(double progress, String status) onProgress,
) async {
final client = HttpClient();
client.autoUncompress = true;
try {
final uri = Uri.parse(url);
final request = await client.getUrl(uri);
final response = await request.close();
if (response.statusCode < 200 || response.statusCode >= 300) {
throw HttpException(
'Download fallito con codice di stato ${response.statusCode}',
uri: uri,
);
}
final contentLength = response.contentLength;
int downloadedBytes = 0;
final sink = destinationFile.openWrite();
await for (final chunk in response) {
sink.add(chunk);
downloadedBytes += chunk.length;
if (contentLength > 0) {
final progress = (downloadedBytes / contentLength).clamp(0.0, 1.0);
final percent = (progress * 100).toStringAsFixed(0);
final downloadedMb =
(downloadedBytes / (1024 * 1024)).toStringAsFixed(1);
final totalMb = (contentLength / (1024 * 1024)).toStringAsFixed(1);
onProgress(
progress,
'Scaricamento: $percent% ($downloadedMb MB di $totalMb MB)',
);
} else {
final downloadedMb =
(downloadedBytes / (1024 * 1024)).toStringAsFixed(1);
onProgress(0.5, 'Scaricamento in corso ($downloadedMb MB)...');
}
}
await sink.flush();
await sink.close();
} finally {
client.close();
}
}
}
+49
View File
@@ -0,0 +1,49 @@
import 'dart:typed_data';
import 'package:image/image.dart' as img;
/// Utilità per la gestione delle immagini e normalizzazione dell'orientamento EXIF.
class ImageUtils {
/// Verifica se l'estensione corrisponde a un'immagine supportata.
static bool isImageExtension(String? extension) {
if (extension == null) return false;
final ext = extension.toLowerCase().replaceAll('.', '');
return ['jpg', 'jpeg', 'png', 'webp', 'bmp'].contains(ext);
}
/// Verifica se un nome file o percorso è un'immagine supportata.
static bool isImagePath(String path) {
final dotIndex = path.lastIndexOf('.');
if (dotIndex == -1 || dotIndex == path.length - 1) return false;
return isImageExtension(path.substring(dotIndex + 1));
}
/// Ruota fisicamente i pixel dell'immagine se contiene metadati EXIF di orientamento
/// (tipico delle fotocamere degli smartphone), resettando l'orientamento a 1 (normale).
/// Se l'immagine è già dritta o non possiede metadati EXIF, restituisce i byte originali.
static Uint8List normalizeOrientation(Uint8List bytes, {String? extension}) {
try {
final image = img.decodeImage(bytes);
if (image == null) return bytes;
// Se non ha tag di orientamento o è già orientata dritta (1)
if (!image.exif.imageIfd.hasOrientation || image.exif.imageIfd.orientation == 1) {
return bytes;
}
// Applica la rotazione fisica dei pixel e resetta il tag EXIF
final baked = img.bakeOrientation(image);
final ext = extension?.toLowerCase().replaceAll('.', '');
final isPng = ext == 'png' || (ext == null && image.hasAlpha);
if (isPng) {
return Uint8List.fromList(img.encodePng(baked));
} else {
return Uint8List.fromList(img.encodeJpg(baked, quality: 92));
}
} catch (_) {
// In caso di errore di parsing/decodifica, restituisce i byte inalterati
return bytes;
}
}
}
+282
View File
@@ -0,0 +1,282 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flux/core/utils/auto_update_service.dart';
import 'package:flux/core/utils/version_check_service.dart';
import 'package:universal_html/html.dart' as html;
import 'package:url_launcher/url_launcher.dart';
class UpdatePromptHelper {
/// Avvia una verifica manuale degli aggiornamenti con feedback visivo immediato
static Future<void> showManualUpdateCheck(BuildContext context) async {
// Feedback immediato tramite SnackBar
final messenger = ScaffoldMessenger.of(context);
messenger.hideCurrentSnackBar();
messenger.showSnackBar(
const SnackBar(
content: Row(
children: [
SizedBox(
width: 16,
height: 16,
child: CircularProgressIndicator(
strokeWidth: 2,
color: Colors.white,
),
),
SizedBox(width: 12),
Text("Verifica aggiornamenti in corso..."),
],
),
duration: Duration(seconds: 2),
),
);
try {
final currentVersion = await VersionCheckService.getShortVersionString();
final updateInfo = await VersionCheckService().checkUpdate();
if (!context.mounted) return;
messenger.hideCurrentSnackBar();
if (updateInfo != null && updateInfo.hasUpdate) {
// Nuova versione disponibile: mostra il dialog informativo e di azione
showDialog(
context: context,
barrierDismissible: !updateInfo.isMandatory,
builder: (dialogContext) => _ManualUpdateDialog(
updateInfo: updateInfo,
currentVersion: currentVersion,
),
);
} else {
// Nessun aggiornamento: l'app è già all'ultima versione
messenger.showSnackBar(
SnackBar(
backgroundColor: Colors.green.shade700,
content: Row(
children: [
const Icon(Icons.check_circle_outline, color: Colors.white),
const SizedBox(width: 12),
Expanded(
child: Text(
"Flux è aggiornato all'ultima versione disponibile ($currentVersion).",
style: const TextStyle(color: Colors.white),
),
),
],
),
duration: const Duration(seconds: 4),
),
);
}
} catch (e) {
if (!context.mounted) return;
messenger.hideCurrentSnackBar();
messenger.showSnackBar(
SnackBar(
backgroundColor: Colors.red.shade700,
content: Row(
children: [
const Icon(Icons.error_outline, color: Colors.white),
const SizedBox(width: 12),
Expanded(
child: Text(
"Impossibile verificare gli aggiornamenti: $e",
style: const TextStyle(color: Colors.white),
),
),
],
),
duration: const Duration(seconds: 4),
),
);
}
}
}
class _ManualUpdateDialog extends StatefulWidget {
final UpdateInfo updateInfo;
final String currentVersion;
const _ManualUpdateDialog({
required this.updateInfo,
required this.currentVersion,
});
@override
State<_ManualUpdateDialog> createState() => _ManualUpdateDialogState();
}
class _ManualUpdateDialogState extends State<_ManualUpdateDialog> {
bool _isUpdating = false;
double _downloadProgress = 0.0;
String _statusMessage = "";
String? _errorMessage;
Future<void> _startUpdate() async {
setState(() {
_isUpdating = true;
_errorMessage = null;
_downloadProgress = 0.0;
_statusMessage = "Avvio aggiornamento...";
});
try {
await AutoUpdateService.downloadAndApplyUpdate(
downloadUrl: widget.updateInfo.downloadUrl,
onProgress: (progress, status) {
if (mounted) {
setState(() {
_downloadProgress = progress;
_statusMessage = status;
});
}
},
);
} catch (e) {
if (mounted) {
setState(() {
_isUpdating = false;
_errorMessage = "Errore durante l'aggiornamento: $e";
});
}
}
}
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
final updateInfo = widget.updateInfo;
return AlertDialog(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
title: Row(
children: [
Icon(
updateInfo.isMandatory
? Icons.warning_amber_rounded
: (kIsWeb ? Icons.cached : Icons.system_update),
color: updateInfo.isMandatory ? Colors.amber[700] : Colors.blue,
size: 28,
),
const SizedBox(width: 12),
Expanded(
child: Text(
updateInfo.isMandatory
? "Aggiornamento Obbligatorio"
: "Nuova Versione Disponibile",
style: const TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
),
),
],
),
content: ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 400),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text.rich(
TextSpan(
style: const TextStyle(fontSize: 14),
children: [
const TextSpan(text: "Versione installata: "),
TextSpan(
text: widget.currentVersion,
style: const TextStyle(fontWeight: FontWeight.bold),
),
const TextSpan(text: "\nNuova versione disponibile: "),
TextSpan(
text: "v${updateInfo.latestVersion}",
style: TextStyle(
fontWeight: FontWeight.bold,
color: theme.colorScheme.primary,
),
),
],
),
),
const SizedBox(height: 12),
Text(
kIsWeb
? "È stata rilasciata una nuova versione. Ricarica la pagina per applicarla."
: (updateInfo.isMandatory
? "La versione attuale non è più supportata. Aggiorna all'ultima versione per continuare a lavorare."
: "Vuoi scaricare e installare l'aggiornamento adesso?"),
style: TextStyle(
fontSize: 14,
color: theme.colorScheme.onSurface.withValues(alpha: 0.8),
),
),
if (_errorMessage != null) ...[
const SizedBox(height: 16),
Container(
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
color: Colors.red.withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(8),
border: Border.all(color: Colors.red.withValues(alpha: 0.3)),
),
child: Text(
_errorMessage!,
style: const TextStyle(color: Colors.red, fontSize: 13),
),
),
],
if (_isUpdating) ...[
const SizedBox(height: 16),
ClipRRect(
borderRadius: BorderRadius.circular(8),
child: LinearProgressIndicator(
value: _downloadProgress > 0 ? _downloadProgress : null,
minHeight: 8,
),
),
const SizedBox(height: 8),
Text(
_statusMessage,
style: TextStyle(
fontSize: 12,
color: theme.colorScheme.onSurface.withValues(alpha: 0.7),
),
),
],
],
),
),
actions: _isUpdating
? []
: [
if (!updateInfo.isMandatory)
TextButton(
onPressed: () => Navigator.of(context).pop(),
child: const Text("PIÙ TARDI"),
),
if (kIsWeb)
FilledButton.icon(
icon: const Icon(Icons.refresh),
label: const Text("RICARICA ORA"),
onPressed: () {
html.window.location.reload();
},
)
else if (AutoUpdateService.isAutoUpdateSupported)
FilledButton.icon(
icon: const Icon(Icons.system_update_alt),
label: const Text("AGGIORNA ORA"),
onPressed: _startUpdate,
)
else
FilledButton.icon(
icon: const Icon(Icons.open_in_browser),
label: const Text("SCARICA"),
onPressed: () async {
final url = Uri.parse(updateInfo.downloadUrl);
await launchUrl(url, mode: LaunchMode.externalApplication);
if (context.mounted) Navigator.of(context).pop();
},
),
],
);
}
}
+122 -55
View File
@@ -3,46 +3,86 @@ import 'package:flutter/foundation.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:supabase_flutter/supabase_flutter.dart';
enum UpdateType {
none,
optional,
mandatory,
}
class UpdateInfo {
final UpdateType type;
final String latestVersion;
final String minVersion;
final String downloadUrl;
const UpdateInfo({
required this.type,
required this.latestVersion,
required this.minVersion,
required this.downloadUrl,
});
bool get isMandatory => type == UpdateType.mandatory;
bool get isOptional => type == UpdateType.optional;
bool get hasUpdate => type != UpdateType.none;
}
class VersionCheckService {
Future<String?> checkForceUpdate() async {
Future<UpdateInfo?> checkUpdate() async {
try {
// 1. Capiamo su che piattaforma sta girando l'app in questo istante
String currentPlatform = _getCurrentPlatform();
final platformAliases = _getPlatformAliases();
// 2. Recuperiamo SOLO la riga corrispondente alla nostra piattaforma
final dbResponse = await Supabase.instance.client
.from('app_config')
.select('min_version, download_url')
.eq('platform', currentPlatform)
.maybeSingle(); // Usiamo maybeSingle così se non c'è la riga non crasha
.select('platform, min_version, latest_version, download_url');
if (dbResponse == null) {
return null; // Nessuna regola per questa piattaforma
if (dbResponse.isEmpty) {
return null;
}
String minVersionFromDb = dbResponse['min_version'] as String;
String downloadUrl = dbResponse['download_url'] as String;
final rows = List<Map<String, dynamic>>.from(dbResponse);
final config = rows.firstWhere(
(r) {
final p = (r['platform'] as String?)?.toLowerCase().trim() ?? '';
return platformAliases.any((alias) => alias.toLowerCase() == p);
},
orElse: () => {},
);
// 3. Recuperiamo la versione locale di Flutter
PackageInfo packageInfo = await PackageInfo.fromPlatform();
String localVersionRaw = packageInfo.version;
if (config.isEmpty) {
return null;
}
// 🥷 TRUCCO 1: Pulizia totale dai build number (+37) o tag "v"
String cleanLocal = localVersionRaw
.split('+')
.first
.replaceAll('v', '')
.trim();
String cleanDb = minVersionFromDb
.split('+')
.first
.replaceAll('v', '')
.trim();
final minVersionRaw = (config['min_version'] as String?) ?? '0.0.0';
final latestVersionRaw =
(config['latest_version'] as String?) ?? minVersionRaw;
final downloadUrl = (config['download_url'] as String?) ?? '';
// 🥷 TRUCCO 2: Confronto Semantico Reale
if (_isVersionLower(current: cleanLocal, minimum: cleanDb)) {
// Ritorna il link VERO per questa specifica piattaforma preso dal CSV!
return downloadUrl;
final packageInfo = await PackageInfo.fromPlatform();
final localVersionRaw = packageInfo.version;
final cleanLocal = _cleanVersion(localVersionRaw);
final cleanMin = _cleanVersion(minVersionRaw);
final cleanLatest = _cleanVersion(latestVersionRaw);
// Se la versione locale è inferiore alla minima ammessa -> obbligatorio
if (_isVersionLower(current: cleanLocal, target: cleanMin)) {
return UpdateInfo(
type: UpdateType.mandatory,
latestVersion: latestVersionRaw,
minVersion: minVersionRaw,
downloadUrl: downloadUrl,
);
}
// Se è >= della minima ma inferiore all'ultima disponibile -> facoltativo
if (_isVersionLower(current: cleanLocal, target: cleanLatest)) {
return UpdateInfo(
type: UpdateType.optional,
latestVersion: latestVersionRaw,
minVersion: minVersionRaw,
downloadUrl: downloadUrl,
);
}
return null;
@@ -52,43 +92,70 @@ class VersionCheckService {
}
}
// Helper ninja per mappare le piattaforme in base alle stringhe del tuo DB
String _getCurrentPlatform() {
if (kIsWeb) return 'web';
if (Platform.isAndroid) return 'android';
if (Platform.isIOS) return 'ios';
if (Platform.isWindows) return 'windows';
if (Platform.isMacOS) return 'macos';
if (Platform.isLinux) return 'linux';
return 'unknown';
Future<String?> checkForceUpdate() async {
final info = await checkUpdate();
return info?.isMandatory == true ? info?.downloadUrl : null;
}
// Il motore matematico (resta invariato)
bool _isVersionLower({required String current, required String minimum}) {
if (current == minimum) return false;
static Future<String> getAppVersionString() async {
try {
final info = await PackageInfo.fromPlatform();
return info.buildNumber.isNotEmpty
? 'v${info.version}+${info.buildNumber}'
: 'v${info.version}';
} catch (_) {
return '';
}
}
List<int> currentParts = current
static Future<String> getFullVersionString() => getAppVersionString();
static Future<String> getShortVersionString() async {
try {
final info = await PackageInfo.fromPlatform();
return 'v${info.version}';
} catch (_) {
return '';
}
}
String _cleanVersion(String raw) {
return raw.split('+').first.replaceAll('v', '').trim();
}
List<String> _getPlatformAliases() {
if (kIsWeb) return const ['web'];
if (Platform.isAndroid) return const ['android'];
if (Platform.isIOS) return const ['ios'];
if (Platform.isWindows) return const ['windows'];
if (Platform.isMacOS) return const ['macos'];
if (Platform.isLinux) return const ['AppImage', 'linux'];
return const ['unknown'];
}
bool _isVersionLower({required String current, required String target}) {
if (current == target) return false;
final currentParts = current
.split('.')
.map((e) => int.tryParse(e) ?? 0)
.toList();
List<int> minParts = minimum
final targetParts = target
.split('.')
.map((e) => int.tryParse(e) ?? 0)
.toList();
while (currentParts.length < 3) {
currentParts.add(0);
}
while (minParts.length < 3) {
minParts.add(0);
}
final maxLength = currentParts.length > targetParts.length
? currentParts.length
: targetParts.length;
if (currentParts[0] != minParts[0]) {
return currentParts[0] < minParts[0];
for (int i = 0; i < maxLength; i++) {
final c = i < currentParts.length ? currentParts[i] : 0;
final t = i < targetParts.length ? targetParts[i] : 0;
if (c != t) {
return c < t;
}
}
if (currentParts[1] != minParts[1]) {
return currentParts[1] < minParts[1];
}
return currentParts[2] < minParts[2];
return false;
}
}
+99
View File
@@ -0,0 +1,99 @@
import 'package:flutter/material.dart';
import 'package:flux/core/utils/update_prompt_helper.dart';
import 'package:flux/core/utils/version_check_service.dart';
class AppVersionLabel extends StatefulWidget {
final bool isCollapsed;
final bool showIcon;
const AppVersionLabel({
super.key,
this.isCollapsed = false,
this.showIcon = true,
});
@override
State<AppVersionLabel> createState() => _AppVersionLabelState();
}
class _AppVersionLabelState extends State<AppVersionLabel> {
String _version = "";
@override
void initState() {
super.initState();
_loadVersion();
}
Future<void> _loadVersion() async {
final v = await VersionCheckService.getShortVersionString();
if (mounted) {
setState(() {
_version = v;
});
}
}
@override
Widget build(BuildContext context) {
if (_version.isEmpty) return const SizedBox.shrink();
final theme = Theme.of(context);
final textMuted = theme.colorScheme.onSurface.withValues(alpha: 0.5);
if (widget.isCollapsed) {
return Tooltip(
message: "Flux $_version\nClicca per verificare aggiornamenti",
child: InkWell(
borderRadius: BorderRadius.circular(8),
onTap: () => UpdatePromptHelper.showManualUpdateCheck(context),
child: Container(
height: 36,
width: 36,
alignment: Alignment.center,
child: Icon(
Icons.info_outline,
size: 16,
color: textMuted,
),
),
),
);
}
return Tooltip(
message: "Clicca per verificare se ci sono aggiornamenti",
child: InkWell(
borderRadius: BorderRadius.circular(6),
onTap: () => UpdatePromptHelper.showManualUpdateCheck(context),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 10.0, vertical: 6.0),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
if (widget.showIcon) ...[
Icon(
Icons.info_outline,
size: 13,
color: textMuted,
),
const SizedBox(width: 6),
],
Text(
"Flux $_version",
style: TextStyle(
fontSize: 11,
fontWeight: FontWeight.w500,
color: textMuted,
decoration: TextDecoration.underline,
decorationColor: textMuted.withValues(alpha: 0.4),
decorationStyle: TextDecorationStyle.dotted,
),
),
],
),
),
),
);
}
}
@@ -1,6 +1,7 @@
import 'package:equatable/equatable.dart';
import 'package:file_picker/file_picker.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flux/core/utils/image_utils.dart';
import 'package:image_picker/image_picker.dart';
part 'image_upload_state.dart';
@@ -18,9 +19,29 @@ class ImageUploadCubit extends Cubit<ImageUploadState> {
);
}
void clearFiles() {
emit(state.copyWith(status: ImageUploadStatus.initial, stagedFiles: []));
}
void addFiles(List<PlatformFile> files) {
final List<PlatformFile> processedFiles = files.map((file) {
if (file.bytes != null && ImageUtils.isImagePath(file.name)) {
final normalizedBytes = ImageUtils.normalizeOrientation(
file.bytes!,
extension: file.extension,
);
return PlatformFile(
name: file.name,
size: normalizedBytes.length,
bytes: normalizedBytes,
path: file.path,
);
}
return file;
}).toList();
List<PlatformFile> newFiles = List.from(state.stagedFiles);
newFiles.addAll(files);
newFiles.addAll(processedFiles);
emit(
state.copyWith(status: ImageUploadStatus.success, stagedFiles: newFiles),
);
@@ -43,12 +64,19 @@ class ImageUploadCubit extends Cubit<ImageUploadState> {
stagedFiles: files,
),
);
final rawBytes = await photo.readAsBytes();
final normalizedBytes = ImageUtils.normalizeOrientation(
rawBytes,
extension: 'jpg',
);
final List<PlatformFile> newFiles = List.from(files);
newFiles.removeLast();
final PlatformFile loadedFile = PlatformFile(
name: photo.name,
size: await photo.length(),
bytes: await photo.readAsBytes(),
size: normalizedBytes.length,
bytes: normalizedBytes,
path: photo.path,
);
newFiles.add(loadedFile);
@@ -49,45 +49,77 @@ class ImageUploadScreen extends StatelessWidget {
},
child: Scaffold(
appBar: AppBar(
title: Text('Upload: $title'),
automaticallyImplyLeading:
state.status != ImageUploadStatus.uploading,
title: Text(title),
centerTitle: true,
automaticallyImplyLeading: false,
),
body: Stack(
children: [
Column(
children: [
// --- SEZIONE PULSANTI (Fotocamera / Galleria) ---
// --- BARRA SUPERIORE: ANNULLA / INVIA ---
Padding(
padding: const EdgeInsets.all(16.0),
padding: const EdgeInsets.symmetric(
horizontal: 16.0,
vertical: 10.0,
),
child: Row(
children: [
// ANNULLA
Expanded(
child: ElevatedButton.icon(
onPressed:
state.status == ImageUploadStatus.uploading
? null
: () => _handleCamera(context),
icon: const Icon(Icons.camera_alt),
label: const Text('SCATTA'),
style: ElevatedButton.styleFrom(
padding: const EdgeInsets.symmetric(
vertical: 16,
flex: 2,
child: SizedBox(
height: 48,
child: OutlinedButton.icon(
onPressed:
state.status == ImageUploadStatus.uploading
? null
: () => _handleCancel(context),
icon: const Icon(Icons.close, size: 20),
label: const Text(
'Annulla',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 15,
),
),
style: OutlinedButton.styleFrom(
foregroundColor: Colors.red.shade700,
side: BorderSide(color: Colors.red.shade300),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
),
),
),
),
const SizedBox(width: 12),
// INVIA
Expanded(
child: OutlinedButton.icon(
onPressed:
state.status == ImageUploadStatus.uploading
? null
: () => _handleFilePicker(context),
icon: const Icon(Icons.folder),
label: const Text("GALLERIA"),
style: OutlinedButton.styleFrom(
padding: const EdgeInsets.symmetric(
vertical: 16,
flex: 3,
child: SizedBox(
height: 48,
child: FilledButton.icon(
onPressed:
state.stagedFiles.isEmpty ||
state.status ==
ImageUploadStatus.uploading
? null
: () => _submitAllFiles(context),
icon: const Icon(Icons.cloud_upload, size: 20),
label: Text(
state.stagedFiles.isEmpty
? 'Invia'
: 'Invia (${state.stagedFiles.length})',
style: const TextStyle(
fontWeight: FontWeight.bold,
fontSize: 15,
),
),
style: FilledButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
),
),
),
@@ -96,27 +128,52 @@ class ImageUploadScreen extends StatelessWidget {
),
),
const Divider(),
const Divider(height: 1),
// --- SEZIONE ANTEPRIME (La GridView Magica) ---
// --- SEZIONE ANTEPRIME ---
Expanded(
child: state.stagedFiles.isEmpty
? const Center(
child: Text(
"Nessun file selezionato.\nScatta una foto o scegli dalla galleria.",
textAlign: TextAlign.center,
style: TextStyle(color: Colors.grey),
child: Padding(
padding: EdgeInsets.all(24.0),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Icon(
Icons.add_photo_alternate_outlined,
size: 64,
color: Colors.grey,
),
SizedBox(height: 16),
Text(
"Nessun file selezionato",
style: TextStyle(
fontSize: 17,
fontWeight: FontWeight.bold,
color: Colors.black87,
),
),
SizedBox(height: 8),
Text(
"Tocca 'Scatta' o 'Galleria' in basso per aggiungere foto o documenti.",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 14,
color: Colors.grey,
),
),
],
),
),
)
: GridView.builder(
padding: const EdgeInsets.all(16),
gridDelegate:
const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount:
3, // 3 colonne stile galleria
crossAxisSpacing: 12,
mainAxisSpacing: 12,
),
crossAxisCount: 3,
crossAxisSpacing: 12,
mainAxisSpacing: 12,
),
itemCount: state.stagedFiles.length,
itemBuilder: (context, index) {
final file = state.stagedFiles[index];
@@ -145,7 +202,6 @@ class ImageUploadScreen extends StatelessWidget {
return Stack(
clipBehavior: Clip.none,
children: [
// L'ANTEPRIMA
Container(
width: double.infinity,
height: double.infinity,
@@ -159,19 +215,10 @@ class ImageUploadScreen extends StatelessWidget {
child: ClipRRect(
borderRadius: BorderRadius.circular(12),
child: isImg
? (file.bytes != null
// Se abbiamo i bytes (es. scatto da fotocamera) usiamo quelli (a prova di Web!)
? Image.memory(
file.bytes!,
fit: BoxFit.cover,
)
// Altrimenti andiamo di file fisico
: const Center(
child:
CircularProgressIndicator(
color: Colors.blue,
),
))
? Image.memory(
file.bytes!,
fit: BoxFit.cover,
)
: const Column(
mainAxisAlignment:
MainAxisAlignment.center,
@@ -194,11 +241,9 @@ class ImageUploadScreen extends StatelessWidget {
),
),
),
// IL PULSANTE CESTINO (In alto a destra)
Positioned(
top: -8,
right: -8,
top: -6,
right: -6,
child: GestureDetector(
onTap: () => context
.read<ImageUploadCubit>()
@@ -222,42 +267,113 @@ class ImageUploadScreen extends StatelessWidget {
},
),
),
// --- SEZIONE INVIA E CHIUDI ---
// --- SEZIONE INFERIORE (A portata di pollice: Scatta e Galleria) ---
SafeArea(
child: Padding(
padding: const EdgeInsets.all(16.0),
child: SizedBox(
width: double.infinity,
height: 56,
child: ElevatedButton.icon(
// Il pulsante si accende SOLO se ci sono file nel carrello
onPressed:
state.stagedFiles.isEmpty ||
state.status == ImageUploadStatus.uploading
? null
: () => _submitAllFiles(context),
icon: const Icon(Icons.cloud_upload),
label: Text(
"INVIA ${state.stagedFiles.length} FILE E CHIUDI",
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
child: Container(
padding: const EdgeInsets.symmetric(
horizontal: 16.0,
vertical: 12.0,
),
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surface,
boxShadow: [
BoxShadow(
color: Colors.black.withValues(alpha: 0.06),
blurRadius: 8,
offset: const Offset(0, -2),
),
],
),
child: Row(
children: [
// SCATTA
Expanded(
child: SizedBox(
height: 56,
child: FilledButton.icon(
onPressed:
state.status ==
ImageUploadStatus.uploading
? null
: () => _handleCamera(context),
icon: const Icon(Icons.camera_alt, size: 24),
label: const Text(
'Scatta',
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
),
),
style: FilledButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16),
),
),
),
),
),
style: ElevatedButton.styleFrom(
backgroundColor: Theme.of(
context,
).colorScheme.primary,
foregroundColor: Theme.of(
context,
).colorScheme.onPrimary,
const SizedBox(width: 12),
// GALLERIA
Expanded(
child: SizedBox(
height: 56,
child: OutlinedButton.icon(
onPressed:
state.status ==
ImageUploadStatus.uploading
? null
: () => _handleFilePicker(context),
icon: const Icon(
Icons.photo_library,
size: 24,
),
label: const Text(
'Galleria',
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
),
),
style: OutlinedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16),
),
),
),
),
),
),
],
),
),
),
],
),
if (state.status == ImageUploadStatus.uploading)
Container(
color: Colors.black45,
child: const Center(
child: Card(
child: Padding(
padding: EdgeInsets.all(24.0),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
CircularProgressIndicator(),
SizedBox(height: 16),
Text(
'Caricamento in corso...',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16,
),
),
],
),
),
),
),
),
],
),
),
@@ -266,6 +382,40 @@ class ImageUploadScreen extends StatelessWidget {
);
}
void _handleCancel(BuildContext context) {
final cubit = context.read<ImageUploadCubit>();
if (cubit.state.stagedFiles.isNotEmpty) {
showDialog(
context: context,
builder: (ctx) => AlertDialog(
title: const Text('Annullare caricamento?'),
content: const Text('I file selezionati verranno rimossi.'),
actions: [
TextButton(
onPressed: () => Navigator.pop(ctx),
child: const Text('No, continua'),
),
ElevatedButton(
style: ElevatedButton.styleFrom(backgroundColor: Colors.red),
onPressed: () {
Navigator.pop(ctx);
cubit.clearFiles();
if (Navigator.of(context).canPop()) {
Navigator.of(context).pop();
}
},
child: const Text('Sì, annulla'),
),
],
),
);
} else {
if (Navigator.of(context).canPop()) {
Navigator.of(context).pop();
}
}
}
// --- LOGICA FOTOCAMERA E LIBRERIA ---
Future<void> _handleCamera(BuildContext context) async {
final ImageUploadCubit imageUploadCubit = context.read<ImageUploadCubit>();
@@ -43,6 +43,21 @@ class UploadSuccessScreen extends StatelessWidget {
textAlign: TextAlign.center,
style: TextStyle(fontSize: 16, color: Colors.black54),
),
const SizedBox(height: 24),
if (Navigator.of(context).canPop())
OutlinedButton.icon(
onPressed: () => Navigator.of(context).pop(),
icon: const Icon(Icons.add_photo_alternate),
label: const Text('Carica altri file per questa pratica'),
style: OutlinedButton.styleFrom(
foregroundColor: Colors.green.shade800,
side: BorderSide(color: Colors.green.shade600),
padding: const EdgeInsets.symmetric(
horizontal: 20,
vertical: 12,
),
),
),
],
),
),
+12 -14
View File
@@ -2,7 +2,7 @@ import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'package:flux/core/utils/extensions.dart';
import 'package:flux/core/utils/functions.dart';
import 'package:pdfx/pdfx.dart';
import 'package:pdfrx/pdfrx.dart';
import 'package:internet_file/internet_file.dart';
class PdfViewerWidget extends StatefulWidget {
@@ -20,7 +20,7 @@ class PdfViewerWidget extends StatefulWidget {
}
class _PdfViewerWidgetState extends State<PdfViewerWidget> {
late PdfControllerPinch _pdfController;
Uint8List? _pdfData;
bool _isLoading = true;
String? _errorMessage;
@@ -45,11 +45,12 @@ class _PdfViewerWidgetState extends State<PdfViewerWidget> {
throw Exception("Nessun documento trovato");
}
_pdfController = PdfControllerPinch(
document: PdfDocument.openData(pdfData),
);
if (mounted) setState(() => _isLoading = false);
if (mounted) {
setState(() {
_pdfData = pdfData;
_isLoading = false;
});
}
} catch (e) {
if (mounted) {
setState(() {
@@ -60,12 +61,6 @@ class _PdfViewerWidgetState extends State<PdfViewerWidget> {
}
}
@override
void dispose() {
_pdfController.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
if (_isLoading) {
@@ -87,7 +82,10 @@ class _PdfViewerWidgetState extends State<PdfViewerWidget> {
onPressed: () => Navigator.pop(context),
),
),
body: PdfViewPinch(controller: _pdfController),
body: PdfViewer.data(
_pdfData!,
sourceName: widget.storagePath ?? 'document.pdf',
),
);
}
}
+36 -17
View File
@@ -4,7 +4,7 @@ import 'package:flux/core/utils/extensions.dart';
import 'package:flux/features/attachments/blocs/attachments_bloc.dart';
import 'package:qr_flutter/qr_flutter.dart';
class QrUploadDialog extends StatelessWidget {
class QrUploadDialog extends StatefulWidget {
final String deepLinkUrl;
final String title;
@@ -14,20 +14,33 @@ class QrUploadDialog extends StatelessWidget {
required this.title,
});
@override
State<QrUploadDialog> createState() => _QrUploadDialogState();
}
class _QrUploadDialogState extends State<QrUploadDialog> {
int _initialFileCount = 0;
@override
void initState() {
super.initState();
// Memorizziamo quanti file c'erano al momento dell'apertura per contare solo i nuovi ricevuti
_initialFileCount = context.read<AttachmentsBloc>().state.allFiles.length;
}
@override
Widget build(BuildContext context) {
// Usiamo i colori del tema per renderlo coerente col tuo design
final theme = Theme.of(context);
return BlocConsumer<AttachmentsBloc, AttachmentsState>(
listenWhen: (previous, current) =>
previous.allFiles.length < current.allFiles.length,
current.allFiles.length > previous.allFiles.length,
listener: (context, state) {
final newCount = state.allFiles.length;
final sessionReceived = (state.allFiles.length - _initialFileCount).clamp(0, 99999);
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
'File caricato con successo via QR Code! 📄 ($newCount allegati in totale)',
'Nuovo file ricevuto via QR Code! 📄 ($sessionReceived in questa sessione)',
),
duration: const Duration(seconds: 2),
backgroundColor: Colors.green.shade700,
@@ -35,7 +48,7 @@ class QrUploadDialog extends StatelessWidget {
);
},
builder: (context, state) {
final fileCount = state.allFiles.length;
final sessionReceived = (state.allFiles.length - _initialFileCount).clamp(0, 99999);
return AlertDialog(
shape: RoundedRectangleBorder(
@@ -51,7 +64,7 @@ class QrUploadDialog extends StatelessWidget {
),
const SizedBox(height: 16),
Text(
title,
widget.title,
textAlign: TextAlign.center,
style: const TextStyle(fontWeight: FontWeight.bold),
),
@@ -62,7 +75,7 @@ class QrUploadDialog extends StatelessWidget {
width: 350,
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.min, // Fondamentale per i dialog
mainAxisSize: MainAxisSize.min,
children: [
const Text(
"Inquadra questo codice con la fotocamera del tuo telefono per scattare e caricare i documenti direttamente qui.",
@@ -73,12 +86,11 @@ class QrUploadDialog extends StatelessWidget {
Container(
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: Colors
.white, // Lo sfondo bianco salva la vita sui temi scuri
color: Colors.white,
borderRadius: BorderRadius.circular(16),
),
child: QrImageView(
data: deepLinkUrl,
data: widget.deepLinkUrl,
version: QrVersions.auto,
size: 200.0,
embeddedImage: const AssetImage(
@@ -94,31 +106,38 @@ class QrUploadDialog extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
fileCount > 0
sessionReceived > 0
? Icons.check_circle_outline
: Icons.hourglass_empty,
size: 18,
color: fileCount > 0
color: sessionReceived > 0
? Colors.green
: theme.colorScheme.primary,
),
const SizedBox(width: 8),
Text(
fileCount > 0
? "$fileCount file ricevuti! (In ascolto...)"
sessionReceived > 0
? "$sessionReceived file ricevuti! (In ascolto...)"
: "In attesa di file...",
style: TextStyle(
fontSize: 13,
fontWeight: FontWeight.bold,
color: fileCount > 0
color: sessionReceived > 0
? Colors.green
: theme.colorScheme.primary,
),
),
],
),
if (_initialFileCount > 0 && sessionReceived == 0) ...[
const SizedBox(height: 4),
Text(
"($_initialFileCount file già presenti nella pratica)",
style: const TextStyle(fontSize: 11, color: Colors.grey),
),
],
const SizedBox(height: 8),
const LinearProgressIndicator(), // Per far capire che è "in ascolto"
const LinearProgressIndicator(),
],
),
),
@@ -4,6 +4,7 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:file_picker/file_picker.dart';
import 'package:universal_html/html.dart' as html;
import 'package:flux/core/blocs/session/session_cubit.dart';
import 'package:flux/core/widgets/qr_upload_dialog.dart';
import 'package:flux/features/attachments/data/attachments_repository.dart';
@@ -13,8 +14,10 @@ import 'package:flux/features/attachments/blocs/attachments_bloc.dart';
import 'package:get_it/get_it.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flux/features/attachments/models/attachment_model.dart';
import 'dart:ui' as ui;
import 'package:pdf/widgets.dart' as pw;
import 'package:pdfx/pdfx.dart' as px; // Isoliamo pdfx
import 'package:flux/core/utils/image_utils.dart';
import 'package:pdfrx/pdfrx.dart' as pdfrx;
class _ExportItem {
final Uint8List bytes;
@@ -151,13 +154,55 @@ class _SharedAttachmentsSectionState extends State<SharedAttachmentsSection> {
if ((ext == 'jpg' || ext == 'jpeg' || ext == 'png') &&
file.bytes != null) {
previewWidget = Image.memory(file.bytes!, fit: BoxFit.contain);
} else if (ext == 'pdf') {
previewWidget = const Center(
child: Icon(Icons.picture_as_pdf, size: 80, color: Colors.red),
);
} else if (ext == 'pdf' && file.bytes != null) {
Widget pdfThumb;
try {
final doc = await pdfrx.PdfDocument.openData(
file.bytes!,
sourceName: file.name,
);
if (doc.pages.isNotEmpty) {
final page = doc.pages.first;
final pageImg = await page.render(
fullWidth: 300,
fullHeight: (300.0 * (page.height / page.width)).roundToDouble(),
);
if (pageImg != null) {
final uiImg = await pageImg.createImage();
final bd = await uiImg.toByteData(format: ui.ImageByteFormat.png);
if (bd != null) {
pdfThumb = Image.memory(bd.buffer.asUint8List(), fit: BoxFit.contain);
} else {
pdfThumb = const Center(
child: Icon(Icons.picture_as_pdf, size: 80, color: Colors.red),
);
}
uiImg.dispose();
pageImg.dispose();
} else {
pdfThumb = const Center(
child: Icon(Icons.picture_as_pdf, size: 80, color: Colors.red),
);
}
} else {
pdfThumb = const Center(
child: Icon(Icons.picture_as_pdf, size: 80, color: Colors.red),
);
}
await doc.dispose();
} catch (_) {
pdfThumb = const Center(
child: Icon(Icons.picture_as_pdf, size: 80, color: Colors.red),
);
}
previewWidget = pdfThumb;
} else {
previewWidget = const Center(
child: Icon(Icons.insert_drive_file, size: 80, color: Colors.blue),
previewWidget = Center(
child: Icon(
ext == 'pdf' ? Icons.picture_as_pdf : Icons.insert_drive_file,
size: 80,
color: ext == 'pdf' ? Colors.red : Colors.blue,
),
);
}
@@ -171,6 +216,8 @@ class _SharedAttachmentsSectionState extends State<SharedAttachmentsSection> {
? widget.titleForUpload
: '${widget.titleForUpload}_${i + 1}';
if (!mounted) return;
final finalName = await showDialog<String>(
context: context,
barrierDismissible: false,
@@ -283,22 +330,35 @@ class _SharedAttachmentsSectionState extends State<SharedAttachmentsSection> {
}
// --- APERTURA VIEWER ---
void _openFile(AttachmentModel file) {
void _openFile(
AttachmentModel file, {
List<AttachmentModel>? files,
int? initialIndex,
}) {
// 1. Catturiamo il BLoC dalla pagina corrente prima di navigare
final operationFilesBloc = context.read<AttachmentsBloc>();
final allFilesList = files ?? operationFilesBloc.state.allFiles;
final index = initialIndex ??
(allFilesList.isNotEmpty ? allFilesList.indexOf(file) : 0);
Navigator.push(
context,
MaterialPageRoute(
builder: (viewerContext) => BlocProvider.value(
value: operationFilesBloc,
child: AttachmentViewerScreen(
attachment: file,
onRename: (newName) {
attachments: allFilesList.isNotEmpty ? allFilesList : [file],
initialIndex: index >= 0 ? index : 0,
onRenameAttachment: (targetFile, newName) {
// Spara l'evento al BLoC e lui farà il resto!
operationFilesBloc.add(RenameAttachmentEvent(file, newName));
operationFilesBloc.add(
RenameAttachmentEvent(targetFile, newName),
);
},
onDelete: () {
operationFilesBloc.add(DeleteSpecificAttachmentEvent(file));
onDeleteAttachment: (targetFile) {
operationFilesBloc.add(
DeleteSpecificAttachmentEvent(targetFile),
);
},
),
),
@@ -306,6 +366,151 @@ class _SharedAttachmentsSectionState extends State<SharedAttachmentsSection> {
);
}
void _downloadFileWeb(String fileName, Uint8List bytes) {
final blob = html.Blob([bytes]);
final url = html.Url.createObjectUrlFromBlob(blob);
html.AnchorElement(href: url)
..setAttribute('download', fileName)
..click();
html.Url.revokeObjectUrl(url);
}
Future<void> _downloadSelectedFiles(
List<AttachmentModel> selectedFiles,
) async {
if (selectedFiles.isEmpty) return;
showDialog(
context: context,
barrierDismissible: false,
builder: (_) => const Center(
child: Card(
child: Padding(
padding: EdgeInsets.all(24.0),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
CircularProgressIndicator(),
SizedBox(height: 16),
Text('Download allegati in corso...'),
],
),
),
),
),
);
try {
final repository = GetIt.I.get<AttachmentsRepository>();
final List<({String name, Uint8List bytes})> downloadedList = [];
for (final file in selectedFiles) {
Uint8List? fileBytes;
if (file.localBytes != null) {
fileBytes = file.localBytes;
} else if (file.storagePath != null && file.storagePath!.isNotEmpty) {
fileBytes = await repository.downloadAttachmentBytes(
storagePath: file.storagePath!,
bucket: Bucket.documents,
);
}
if (fileBytes != null && fileBytes.isNotEmpty) {
String fullName = file.name;
final ext = file.extension.toLowerCase().replaceAll('.', '');
if (ext.isNotEmpty && !fullName.toLowerCase().endsWith('.$ext')) {
fullName = '$fullName.$ext';
}
downloadedList.add((name: fullName, bytes: fileBytes));
}
}
if (mounted) {
Navigator.pop(context); // Chiude il loader
}
if (downloadedList.isEmpty) {
if (mounted) {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(content: Text('Nessun file scaricabile trovato.')),
);
}
return;
}
if (kIsWeb) {
for (int i = 0; i < downloadedList.length; i++) {
final item = downloadedList[i];
_downloadFileWeb(item.name, item.bytes);
if (downloadedList.length > 1) {
await Future.delayed(const Duration(milliseconds: 300));
}
}
if (mounted) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
downloadedList.length == 1
? 'Download avviato: ${downloadedList.first.name}'
: '${downloadedList.length} file scaricati!',
),
),
);
}
} else {
// Desktop / Mobile
if (downloadedList.length == 1) {
final item = downloadedList.first;
final String? savePath = await FilePicker.saveFile(
dialogTitle: 'Salva file',
fileName: item.name,
initialDirectory: _exportDirectory,
bytes: item.bytes,
);
if (savePath != null) {
final targetFile = File(savePath);
await targetFile.writeAsBytes(item.bytes);
if (mounted) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text('File salvato in: $savePath')),
);
}
}
} else {
final String? selectedDirectory = await FilePicker.getDirectoryPath(
dialogTitle:
'Seleziona cartella dove salvare i file (${downloadedList.length})',
initialDirectory: _exportDirectory,
);
if (selectedDirectory != null) {
for (final item in downloadedList) {
final targetFile = File('$selectedDirectory/${item.name}');
await targetFile.writeAsBytes(item.bytes);
}
if (mounted) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
'${downloadedList.length} file salvati in: $selectedDirectory',
),
),
);
}
}
}
}
} catch (e) {
if (mounted) {
if (Navigator.canPop(context)) Navigator.pop(context);
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text('Errore durante il download: $e')),
);
}
}
}
Future<void> _exportMergedPdf(List<AttachmentModel> selectedFiles) async {
if (!kIsWeb && (_exportDirectory == null || _exportDirectory!.isEmpty)) {
ScaffoldMessenger.of(context).showSnackBar(
@@ -340,23 +545,35 @@ class _SharedAttachmentsSectionState extends State<SharedAttachmentsSection> {
if (fileBytes == null) continue;
if (file.extension == 'pdf') {
final document = await px.PdfDocument.openData(fileBytes);
for (int i = 1; i <= document.pagesCount; i++) {
final page = await document.getPage(i);
final document = await pdfrx.PdfDocument.openData(
fileBytes,
sourceName: file.name,
);
for (final page in document.pages) {
final pageImage = await page.render(
width: page.width * 2,
height: page.height * 2,
format: px.PdfPageImageFormat.jpeg,
fullWidth: page.width * 2,
fullHeight: page.height * 2,
);
if (pageImage != null) {
allPagesAsImages.add(pageImage.bytes);
final uiImage = await pageImage.createImage();
final byteData = await uiImage.toByteData(
format: ui.ImageByteFormat.png,
);
if (byteData != null) {
allPagesAsImages.add(byteData.buffer.asUint8List());
}
uiImage.dispose();
pageImage.dispose();
}
await page.close();
}
await document.close();
await document.dispose();
} else {
// È un'immagine
allPagesAsImages.add(fileBytes);
// È un'immagine: normalizziamo l'orientamento EXIF per il PDF
final safeBytes = ImageUtils.normalizeOrientation(
fileBytes,
extension: file.extension,
);
allPagesAsImages.add(safeBytes);
}
}
@@ -413,7 +630,7 @@ class _SharedAttachmentsSectionState extends State<SharedAttachmentsSection> {
// 5. SALVATAGGIO SUL DISCO
if (kIsWeb) {
// Trigger download web
_downloadFileWeb('$finalName.pdf', mergedPdfBytes);
} else {
final fileToSave = File('$_exportDirectory/$finalName.pdf');
await fileToSave.writeAsBytes(mergedPdfBytes);
@@ -474,38 +691,49 @@ class _SharedAttachmentsSectionState extends State<SharedAttachmentsSection> {
final baseName = file.name;
if (file.extension == 'pdf') {
final document = await px.PdfDocument.openData(fileBytes);
final document = await pdfrx.PdfDocument.openData(
fileBytes,
sourceName: file.name,
);
final isMulti =
document.pagesCount > 1; // Controlliamo se è multipagina!
for (int i = 1; i <= document.pagesCount; i++) {
final page = await document.getPage(i);
document.pages.length > 1; // Controlliamo se è multipagina!
for (final page in document.pages) {
final pageImage = await page.render(
width: page.width * 2,
height: page.height * 2,
format: px.PdfPageImageFormat.jpeg,
fullWidth: page.width * 2,
fullHeight: page.height * 2,
);
if (pageImage != null) {
// Salviamo l'immagine CON il suo contesto storico
itemsToExport.add(
_ExportItem(
bytes: pageImage.bytes,
sourceName: baseName,
isMultiPage: isMulti,
pageIndex: i,
),
final uiImage = await pageImage.createImage();
final byteData = await uiImage.toByteData(
format: ui.ImageByteFormat.png,
);
if (byteData != null) {
// Salviamo l'immagine CON il suo contesto storico
itemsToExport.add(
_ExportItem(
bytes: byteData.buffer.asUint8List(),
sourceName: baseName,
isMultiPage: isMulti,
pageIndex: page.pageNumber,
),
);
}
uiImage.dispose();
pageImage.dispose();
}
await page.close();
}
await document.close();
await document.dispose();
} else {
// SE È UN'IMMAGINE, la salviamo come singola pagina
// SE È UN'IMMAGINE, la salviamo normalizzando l'orientamento
final safeBytes = ImageUtils.normalizeOrientation(
fileBytes,
extension: file.extension,
);
itemsToExport.add(
_ExportItem(
bytes: fileBytes,
bytes: safeBytes,
sourceName: baseName,
isMultiPage: false,
pageIndex: 1,
@@ -554,7 +782,7 @@ class _SharedAttachmentsSectionState extends State<SharedAttachmentsSection> {
final singlePdfBytes = await pdf.save();
if (kIsWeb) {
// Trigger download web
_downloadFileWeb('$finalName.pdf', singlePdfBytes);
} else {
final fileToSave = File('$_exportDirectory/$finalName.pdf');
await fileToSave.writeAsBytes(singlePdfBytes);
@@ -749,12 +977,56 @@ class _SharedAttachmentsSectionState extends State<SharedAttachmentsSection> {
],
const SizedBox(width: 12),
// Loader di upload
// Indicatori di stato nell'action bar
if (state.status == AttachmentsStatus.uploading)
const SizedBox(
width: 24,
height: 24,
child: CircularProgressIndicator(strokeWidth: 2),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8.0),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
const SizedBox(
width: 16,
height: 16,
child: CircularProgressIndicator(strokeWidth: 2),
),
const SizedBox(width: 8),
Text(
'Caricamento file...',
style: TextStyle(
fontSize: 13,
color: theme.colorScheme.primary,
fontWeight: FontWeight.w500,
),
),
],
),
)
else if (state.status == AttachmentsStatus.loading &&
allFiles.isNotEmpty)
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8.0),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(
width: 14,
height: 14,
child: CircularProgressIndicator(
strokeWidth: 2,
color: theme.colorScheme.primary,
),
),
const SizedBox(width: 6),
Text(
'Aggiornamento...',
style: TextStyle(
fontSize: 12,
color: theme.colorScheme.primary,
fontStyle: FontStyle.italic,
),
),
],
),
),
// Azioni visibili SOLO se c'è una selezione!
@@ -788,6 +1060,15 @@ class _SharedAttachmentsSectionState extends State<SharedAttachmentsSection> {
);
},
),
// Bottone Scarica Selezionati
FilledButton.icon(
style: FilledButton.styleFrom(
backgroundColor: Colors.teal,
),
icon: const Icon(Icons.download),
label: Text('Scarica (${selectedFiles.length})'),
onPressed: () => _downloadSelectedFiles(selectedFiles),
),
// IL NUOVO BOTTONE ESPORTA CON MENU A TENDINA
PopupMenuButton<String>(
tooltip: 'Opzioni di esportazione',
@@ -842,8 +1123,115 @@ class _SharedAttachmentsSectionState extends State<SharedAttachmentsSection> {
),
const SizedBox(height: 16),
// 3. GRIGLIA DEI FILE
if (allFiles.isEmpty)
// 3. GRIGLIA DEI FILE O STATO DI CARICAMENTO
if (state.status == AttachmentsStatus.loading ||
(state.status == AttachmentsStatus.initial &&
widget.parentId != null &&
widget.parentId!.isNotEmpty))
Container(
width: double.infinity,
padding: const EdgeInsets.symmetric(
vertical: 36,
horizontal: 24,
),
decoration: BoxDecoration(
color: theme.colorScheme.surfaceContainerHighest.withValues(
alpha: 0.35,
),
border: Border.all(
color: theme.dividerColor.withValues(alpha: 0.6),
style: BorderStyle.solid,
),
borderRadius: BorderRadius.circular(12),
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(
width: 32,
height: 32,
child: CircularProgressIndicator(
strokeWidth: 3,
color: theme.colorScheme.primary,
),
),
const SizedBox(height: 16),
Text(
'Caricamento allegati in corso...',
style: TextStyle(
fontWeight: FontWeight.w600,
color: theme.colorScheme.onSurface,
fontSize: 15,
),
),
const SizedBox(height: 6),
Text(
'Sincronizzazione documenti in archivio',
style: TextStyle(
fontSize: 12,
color: theme.colorScheme.onSurfaceVariant.withValues(
alpha: 0.8,
),
),
),
],
),
)
else if (state.status == AttachmentsStatus.failure &&
allFiles.isEmpty)
Container(
width: double.infinity,
padding: const EdgeInsets.all(24),
decoration: BoxDecoration(
color: theme.colorScheme.errorContainer.withValues(
alpha: 0.25,
),
border: Border.all(
color: theme.colorScheme.error.withValues(alpha: 0.5),
),
borderRadius: BorderRadius.circular(12),
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Icon(
Icons.error_outline,
size: 36,
color: theme.colorScheme.error,
),
const SizedBox(height: 8),
Text(
'Errore durante il recupero degli allegati',
style: TextStyle(
fontWeight: FontWeight.bold,
color: theme.colorScheme.error,
),
),
if (state.error != null) ...[
const SizedBox(height: 4),
Text(
state.error!,
style: TextStyle(
fontSize: 12,
color: theme.colorScheme.error,
),
textAlign: TextAlign.center,
),
],
const SizedBox(height: 12),
TextButton.icon(
onPressed: () {
context.read<AttachmentsBloc>().add(
LoadAttachmentsEvent(parentId: widget.parentId),
);
},
icon: const Icon(Icons.refresh),
label: const Text('Riprova'),
),
],
),
)
else if (allFiles.isEmpty)
Container(
width: double.infinity,
padding: const EdgeInsets.all(32),
@@ -880,7 +1268,6 @@ class _SharedAttachmentsSectionState extends State<SharedAttachmentsSection> {
itemCount: allFiles.length,
itemBuilder: (context, index) {
final file = allFiles[index];
final isPdf = file.extension == 'pdf';
final isSelected = selectedFiles.contains(file);
final isLocal =
file.localBytes !=
@@ -890,7 +1277,11 @@ class _SharedAttachmentsSectionState extends State<SharedAttachmentsSection> {
children: [
// CARD DEL FILE
InkWell(
onTap: () => _openFile(file),
onTap: () => _openFile(
file,
files: allFiles,
initialIndex: index,
),
onLongPress: () {
// Selezione rapida con long press!
context.read<AttachmentsBloc>().add(
@@ -922,28 +1313,12 @@ class _SharedAttachmentsSectionState extends State<SharedAttachmentsSection> {
top: Radius.circular(8),
),
),
child: isPdf
? const Icon(
Icons.picture_as_pdf,
size: 48,
color: Colors.red,
)
: isLocal
? ClipRRect(
borderRadius:
const BorderRadius.vertical(
top: Radius.circular(8),
),
child: Image.memory(
file.localBytes!,
fit: BoxFit.cover,
),
)
: const Icon(
Icons.image,
size: 48,
color: Colors.blue,
), // Da remoto metterai il tuo NetworkImage se vuoi
child: ClipRRect(
borderRadius: const BorderRadius.vertical(
top: Radius.circular(8),
),
child: _AttachmentThumbnail(file: file),
),
),
),
// Nome File
@@ -1030,3 +1405,209 @@ class _SharedAttachmentsSectionState extends State<SharedAttachmentsSection> {
);
}
}
class _AttachmentThumbnail extends StatefulWidget {
final AttachmentModel file;
const _AttachmentThumbnail({required this.file});
@override
State<_AttachmentThumbnail> createState() => _AttachmentThumbnailState();
}
class _AttachmentThumbnailState extends State<_AttachmentThumbnail> {
static final Map<String, Uint8List> _thumbnailCache = {};
Uint8List? _bytes;
bool _isLoading = true;
String get _cacheKey {
return widget.file.id ??
widget.file.storagePath ??
'${widget.file.name}_${widget.file.fileSize}';
}
@override
void initState() {
super.initState();
_loadThumbnail();
}
@override
void didUpdateWidget(covariant _AttachmentThumbnail oldWidget) {
super.didUpdateWidget(oldWidget);
if (widget.file.id != oldWidget.file.id ||
widget.file.storagePath != oldWidget.file.storagePath ||
widget.file.localBytes != oldWidget.file.localBytes) {
_loadThumbnail();
}
}
Future<void> _loadThumbnail() async {
final key = _cacheKey;
if (_thumbnailCache.containsKey(key)) {
if (mounted) {
setState(() {
_bytes = _thumbnailCache[key];
_isLoading = false;
});
}
return;
}
try {
final file = widget.file;
Uint8List? sourceBytes;
if (file.localBytes != null) {
sourceBytes = file.localBytes;
} else if (file.storagePath != null && file.storagePath!.isNotEmpty) {
final repository = GetIt.I.get<AttachmentsRepository>();
sourceBytes = await repository.downloadAttachmentBytes(
storagePath: file.storagePath!,
bucket: Bucket.documents,
);
}
if (sourceBytes == null || sourceBytes.isEmpty) {
if (mounted) {
setState(() {
_isLoading = false;
});
}
return;
}
Uint8List? finalThumbnailBytes;
final isPdf =
file.extension.toLowerCase().replaceAll('.', '') == 'pdf';
if (isPdf) {
final document = await pdfrx.PdfDocument.openData(
sourceBytes,
sourceName: file.name,
);
if (document.pages.isNotEmpty) {
final page = document.pages.first;
const renderWidth = 300.0;
final renderHeight =
(300.0 * (page.height / page.width)).roundToDouble();
final pageImage = await page.render(
fullWidth: renderWidth,
fullHeight: renderHeight,
);
if (pageImage != null) {
final uiImage = await pageImage.createImage();
final byteData = await uiImage.toByteData(
format: ui.ImageByteFormat.png,
);
if (byteData != null) {
finalThumbnailBytes = byteData.buffer.asUint8List();
}
uiImage.dispose();
pageImage.dispose();
}
}
await document.dispose();
} else {
finalThumbnailBytes = ImageUtils.normalizeOrientation(
sourceBytes,
extension: file.extension,
);
}
if (finalThumbnailBytes != null) {
_thumbnailCache[key] = finalThumbnailBytes;
}
if (mounted) {
setState(() {
_bytes = finalThumbnailBytes;
_isLoading = false;
});
}
} catch (_) {
if (mounted) {
setState(() {
_isLoading = false;
});
}
}
}
@override
Widget build(BuildContext context) {
final isPdf =
widget.file.extension.toLowerCase().replaceAll('.', '') == 'pdf';
if (_bytes != null) {
return Stack(
fit: StackFit.expand,
children: [
Image.memory(
_bytes!,
fit: BoxFit.cover,
filterQuality: FilterQuality.medium,
),
if (isPdf)
Positioned(
bottom: 6,
left: 6,
child: Container(
padding:
const EdgeInsets.symmetric(horizontal: 5, vertical: 2),
decoration: BoxDecoration(
color: Colors.red.withValues(alpha: 0.9),
borderRadius: BorderRadius.circular(4),
boxShadow: const [
BoxShadow(
color: Colors.black26,
blurRadius: 3,
offset: Offset(0, 1),
),
],
),
child: const Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(Icons.picture_as_pdf, size: 10, color: Colors.white),
SizedBox(width: 3),
Text(
'PDF',
style: TextStyle(
color: Colors.white,
fontSize: 9,
fontWeight: FontWeight.bold,
letterSpacing: 0.5,
),
),
],
),
),
),
],
);
}
if (_isLoading) {
return Center(
child: SizedBox(
width: 24,
height: 24,
child: CircularProgressIndicator(
strokeWidth: 2,
color: isPdf ? Colors.red : Theme.of(context).colorScheme.primary,
),
),
);
}
return Center(
child: Icon(
isPdf ? Icons.picture_as_pdf : Icons.image,
size: 48,
color: isPdf ? Colors.red : Colors.blue,
),
);
}
}
@@ -27,13 +27,26 @@ class SharedModelSection extends StatelessWidget {
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
final hasModel = modelId != null && modelId!.isNotEmpty;
final currentModelId = modelId;
final currentModelName = modelName;
final hasModelId = currentModelId != null && currentModelId.isNotEmpty;
final hasModelName = currentModelName != null && currentModelName.isNotEmpty;
final hasModel = hasModelId || hasModelName;
final String subtitleText;
if (hasModelName) {
subtitleText = currentModelName;
} else if (hasModelId) {
subtitleText = 'Modello selezionato';
} else {
subtitleText = 'Nessun modello selezionato';
}
return ListTile(
tileColor: backgroundColor,
title: Text(label),
subtitle: Text(
hasModel ? modelName! : 'Nessun modello selezionato',
subtitleText,
style: TextStyle(
color: hasModel ? null : Colors.grey,
fontWeight: hasModel ? FontWeight.bold : FontWeight.normal,
@@ -124,8 +137,12 @@ class SharedModelSection extends StatelessWidget {
);
if (newModel != null) {
// CHIAMIAMO LA CALLBACK!
onModelSelected(newModel.id, newModel.nameWithBrand);
final selectedId = newModel.id ?? '';
final selectedName =
newModel.nameWithBrand.isNotEmpty
? newModel.nameWithBrand
: newModel.name;
onModelSelected(selectedId, selectedName);
if (context.mounted) Navigator.pop(modalContext);
}
},
@@ -149,11 +166,12 @@ class SharedModelSection extends StatelessWidget {
),
),
onTap: () {
// CHIAMIAMO LA CALLBACK!
onModelSelected(
deviceModel.id!,
deviceModel.nameWithBrand,
);
final selectedId = deviceModel.id ?? '';
final selectedName =
deviceModel.nameWithBrand.isNotEmpty
? deviceModel.nameWithBrand
: deviceModel.name;
onModelSelected(selectedId, selectedName);
Navigator.pop(modalContext);
},
);
@@ -53,7 +53,9 @@ class StaffSection extends StatelessWidget {
);
}
final staffMembers = state.storeStaff;
final staffMembers = state.storeStaff
.where((staff) => staff.isActive || staff.id == selectedStaffId)
.toList();
// FIX: Feedback visivo se la lista è vuota
if (staffMembers.isEmpty) {
+15 -1
View File
@@ -61,7 +61,21 @@ class StaffSelectorModal extends StatelessWidget {
if (state.status == StaffStatus.loading) {
return const CircularProgressIndicator();
}
final staffList = state.storeStaff;
final rawList = state.storeStaff.isNotEmpty
? state.storeStaff
: state.allStaff;
final staffList = rawList.where((s) => s.isActive).toList();
if (staffList.isEmpty) {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 24.0),
child: Text(
'Nessun collaboratore attivo trovato.',
style: TextStyle(color: Colors.grey.shade600),
),
);
}
return _buildStaffGrid(context, staffList);
},
),
@@ -1,110 +1,191 @@
import 'dart:typed_data';
import 'dart:io';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:file_picker/file_picker.dart';
import 'package:universal_html/html.dart' as html;
import 'package:flux/core/utils/functions.dart';
import 'package:flux/features/attachments/models/attachment_model.dart';
import 'package:pdfx/pdfx.dart';
import 'package:flux/core/utils/image_utils.dart';
import 'package:pdfrx/pdfrx.dart';
import 'package:internet_file/internet_file.dart';
class AttachmentViewerScreen extends StatefulWidget {
final AttachmentModel attachment;
final AttachmentModel? attachment;
final List<AttachmentModel>? attachments;
final int initialIndex;
final Function(String newName)? onRename;
final Function(AttachmentModel attachment, String newName)? onRenameAttachment;
final VoidCallback? onDelete;
final Function(AttachmentModel attachment)? onDeleteAttachment;
const AttachmentViewerScreen({
super.key,
required this.attachment,
this.attachment,
this.attachments,
this.initialIndex = 0,
this.onRename,
this.onRenameAttachment,
this.onDelete,
});
this.onDeleteAttachment,
}) : assert(
attachment != null || (attachments != null && attachments.length > 0),
'Devi fornire un allegato o una lista di allegati non vuota.',
);
@override
State<AttachmentViewerScreen> createState() => _AttachmentViewerScreenState();
}
class _AttachmentViewerScreenState extends State<AttachmentViewerScreen> {
PdfControllerPinch? _pdfController;
late List<AttachmentModel> _items;
late int _currentIndex;
final FocusNode _focusNode = FocusNode();
bool _isLoading = true;
String? _errorMessage;
Uint8List? _fileBytes;
late String _fileName;
int _loadToken = 0;
int _rotationTurns = 0;
bool get isPdf => widget.attachment.extension.toLowerCase() == 'pdf';
AttachmentModel get _currentAttachment => _items[_currentIndex];
bool get isPdf =>
_currentAttachment.extension.toLowerCase().replaceAll('.', '') == 'pdf';
bool get hasMultipleFiles => _items.length > 1;
bool get canGoPrevious => _currentIndex > 0;
bool get canGoNext => _currentIndex < _items.length - 1;
@override
void initState() {
super.initState();
_fileName = widget.attachment.name;
_loadFile();
}
Future<void> _loadFile() async {
try {
// 1. Capiamo da dove prendere i dati
if (widget.attachment.localBytes != null) {
_fileBytes = widget.attachment.localBytes;
} else if (widget.attachment.storagePath != null &&
widget.attachment.storagePath!.isNotEmpty) {
final signedUrl = await getSignedUrl(widget.attachment.storagePath!);
_fileBytes = await InternetFile.get(signedUrl);
} else {
throw Exception("Nessun documento trovato o byte mancanti.");
}
// 2. Se è PDF, inizializziamo il controller
if (isPdf && _fileBytes != null) {
_pdfController = PdfControllerPinch(
document: PdfDocument.openData(_fileBytes!),
);
}
if (mounted) setState(() => _isLoading = false);
} catch (e) {
if (mounted) {
setState(() {
_isLoading = false;
_errorMessage = e.toString();
});
}
if (widget.attachments != null && widget.attachments!.isNotEmpty) {
_items = List<AttachmentModel>.from(widget.attachments!);
_currentIndex = widget.initialIndex.clamp(0, _items.length - 1);
} else if (widget.attachment != null) {
_items = [widget.attachment!];
_currentIndex = 0;
} else {
_items = [];
_currentIndex = 0;
}
_loadFile();
WidgetsBinding.instance.addPostFrameCallback((_) {
if (mounted) {
_focusNode.requestFocus();
}
});
}
@override
void dispose() {
_pdfController?.dispose();
_focusNode.dispose();
super.dispose();
}
void _goToPrevious() {
if (!canGoPrevious) return;
_changeFile(_currentIndex - 1);
}
void _goToNext() {
if (!canGoNext) return;
_changeFile(_currentIndex + 1);
}
void _changeFile(int newIndex) {
if (newIndex < 0 || newIndex >= _items.length) return;
setState(() {
_currentIndex = newIndex;
_isLoading = true;
_errorMessage = null;
_fileBytes = null;
_rotationTurns = 0;
});
_loadFile();
}
KeyEventResult _handleKeyEvent(FocusNode node, KeyEvent event) {
if (event is KeyDownEvent) {
if (event.logicalKey == LogicalKeyboardKey.arrowLeft) {
if (canGoPrevious) {
_goToPrevious();
return KeyEventResult.handled;
}
} else if (event.logicalKey == LogicalKeyboardKey.arrowRight) {
if (canGoNext) {
_goToNext();
return KeyEventResult.handled;
}
}
}
return KeyEventResult.ignored;
}
Future<void> _loadFile() async {
final token = ++_loadToken;
final item = _currentAttachment;
try {
Uint8List? bytes;
if (item.localBytes != null) {
bytes = item.localBytes;
} else if (item.storagePath != null &&
item.storagePath!.isNotEmpty) {
final signedUrl = await getSignedUrl(item.storagePath!);
bytes = await InternetFile.get(signedUrl);
} else {
throw Exception("Nessun documento trovato o byte mancanti.");
}
if (token != _loadToken || !mounted) return;
if (bytes != null && !isPdf) {
bytes = ImageUtils.normalizeOrientation(bytes, extension: item.extension);
}
setState(() {
_fileBytes = bytes;
_isLoading = false;
});
} catch (e) {
if (token != _loadToken || !mounted) return;
setState(() {
_isLoading = false;
_errorMessage = e.toString();
});
}
}
void _showRenameDialog() {
final ctrl = TextEditingController(text: _fileName);
final current = _currentAttachment;
final ctrl = TextEditingController(text: current.name);
ctrl.selection = TextSelection(
baseOffset: 0,
extentOffset: ctrl.text.length,
);
final focusNode = FocusNode();
final dialogFocusNode = FocusNode();
showDialog(
context: context,
builder: (context) {
WidgetsBinding.instance.addPostFrameCallback(
(_) => focusNode.requestFocus(),
(_) => dialogFocusNode.requestFocus(),
);
return AlertDialog(
title: const Text('Rinomina File'),
content: TextField(
controller: ctrl,
focusNode: focusNode,
focusNode: dialogFocusNode,
decoration: InputDecoration(
labelText: 'Nuovo nome',
suffixText: '.${widget.attachment.extension}',
suffixText: '.${current.extension}',
),
onSubmitted: (val) {
Navigator.pop(context);
if (val.trim().isNotEmpty && widget.onRename != null) {
setState(() {
_fileName = val.trim();
});
widget.onRename!(val.trim());
}
_applyRename(val);
},
),
actions: [
@@ -115,73 +196,203 @@ class _AttachmentViewerScreenState extends State<AttachmentViewerScreen> {
ElevatedButton(
onPressed: () {
Navigator.pop(context);
if (ctrl.text.trim().isNotEmpty && widget.onRename != null) {
setState(() {
_fileName = ctrl.text.trim();
});
widget.onRename!(ctrl.text.trim());
}
_applyRename(ctrl.text);
},
child: const Text('Salva'),
),
],
);
},
).then((_) {
if (mounted) {
_focusNode.requestFocus();
}
});
}
void _applyRename(String val) {
final trimmed = val.trim();
if (trimmed.isEmpty) return;
final current = _currentAttachment;
final updated = current.copyWith(name: trimmed);
setState(() {
_items[_currentIndex] = updated;
});
widget.onRenameAttachment?.call(current, trimmed);
widget.onRename?.call(trimmed);
}
void _confirmDelete() {
final current = _currentAttachment;
showDialog(
context: context,
builder: (c) => AlertDialog(
title: const Text('Eliminare file?'),
content: const Text(
'Sei sicuro di voler eliminare questo allegato?',
),
actions: [
TextButton(
onPressed: () => Navigator.pop(c),
child: const Text('Annulla'),
),
ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: Colors.red,
),
onPressed: () {
Navigator.pop(c); // Chiude dialog
widget.onDeleteAttachment?.call(current);
widget.onDelete?.call();
Navigator.pop(context); // Chiude il viewer
},
child: const Text('Elimina'),
),
],
),
);
}
Future<void> _downloadCurrentFile() async {
final bytes = _fileBytes;
if (bytes == null || bytes.isEmpty) {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text('File non ancora caricato o non disponibile.'),
),
);
return;
}
String fullName = _currentAttachment.name;
final ext = _currentAttachment.extension.toLowerCase().replaceAll('.', '');
if (ext.isNotEmpty && !fullName.toLowerCase().endsWith('.$ext')) {
fullName = '$fullName.$ext';
}
if (kIsWeb) {
final blob = html.Blob([bytes]);
final url = html.Url.createObjectUrlFromBlob(blob);
html.AnchorElement(href: url)
..setAttribute('download', fullName)
..click();
html.Url.revokeObjectUrl(url);
if (mounted) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text('Download avviato: $fullName')),
);
}
} else {
final savePath = await FilePicker.saveFile(
dialogTitle: 'Salva file',
fileName: fullName,
bytes: bytes,
);
if (savePath != null) {
final targetFile = File(savePath);
await targetFile.writeAsBytes(bytes);
if (mounted) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text('File salvato in: $savePath')),
);
}
}
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.black87, // Sfondo scuro per i viewer è il top
appBar: AppBar(
backgroundColor: Colors.black,
foregroundColor: Colors.white,
title: Text(_fileName, style: const TextStyle(fontSize: 16)),
actions: [
if (widget.onRename != null)
return Focus(
focusNode: _focusNode,
autofocus: true,
onKeyEvent: _handleKeyEvent,
child: Scaffold(
backgroundColor: Colors.black87,
appBar: AppBar(
backgroundColor: Colors.black,
foregroundColor: Colors.white,
title: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Text(
_currentAttachment.name,
style: const TextStyle(fontSize: 16),
overflow: TextOverflow.ellipsis,
),
if (hasMultipleFiles)
Text(
'${_currentIndex + 1} di ${_items.length}',
style: const TextStyle(fontSize: 12, color: Colors.white70),
),
],
),
actions: [
if (!isPdf)
IconButton(
icon: const Icon(Icons.rotate_right),
tooltip: 'Ruota',
onPressed: () {
setState(() {
_rotationTurns = (_rotationTurns + 1) % 4;
});
},
),
IconButton(
icon: const Icon(Icons.edit),
tooltip: 'Rinomina',
onPressed: _showRenameDialog,
icon: const Icon(Icons.download),
tooltip: 'Scarica',
onPressed: _downloadCurrentFile,
),
if (widget.onDelete != null)
IconButton(
icon: const Icon(Icons.delete, color: Colors.redAccent),
tooltip: 'Elimina',
onPressed: () {
// Chiediamo conferma
showDialog(
context: context,
builder: (c) => AlertDialog(
title: const Text('Eliminare file?'),
content: const Text(
'Sei sicuro di voler eliminare questo allegato?',
),
actions: [
TextButton(
onPressed: () => Navigator.pop(c),
child: const Text('Annulla'),
),
ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: Colors.red,
),
onPressed: () {
Navigator.pop(c); // Chiude dialog
widget.onDelete!(); // Lancia eliminazione
Navigator.pop(context); // Chiude il viewer
},
child: const Text('Elimina'),
),
],
if (widget.onRename != null || widget.onRenameAttachment != null)
IconButton(
icon: const Icon(Icons.edit),
tooltip: 'Rinomina',
onPressed: _showRenameDialog,
),
if (widget.onDelete != null || widget.onDeleteAttachment != null)
IconButton(
icon: const Icon(Icons.delete, color: Colors.redAccent),
tooltip: 'Elimina',
onPressed: _confirmDelete,
),
],
),
body: Stack(
children: [
Positioned.fill(
child: _buildBody(),
),
// Freccia Precedente
if (hasMultipleFiles && canGoPrevious)
Positioned(
left: 16,
top: 0,
bottom: 0,
child: Center(
child: _NavigationArrowButton(
icon: Icons.arrow_back_ios_new_rounded,
tooltip: 'File precedente (←)',
onPressed: _goToPrevious,
),
);
},
),
],
),
),
// Freccia Successivo
if (hasMultipleFiles && canGoNext)
Positioned(
right: 16,
top: 0,
bottom: 0,
child: Center(
child: _NavigationArrowButton(
icon: Icons.arrow_forward_ios_rounded,
tooltip: 'File successivo (→)',
onPressed: _goToNext,
),
),
),
],
),
),
body: _buildBody(),
);
}
@@ -208,13 +419,63 @@ class _AttachmentViewerScreenState extends State<AttachmentViewerScreen> {
);
}
if (isPdf && _pdfController != null) {
return PdfViewPinch(controller: _pdfController!);
if (isPdf && _fileBytes != null) {
return PdfViewer.data(
_fileBytes!,
sourceName: '${_currentAttachment.id}_${_currentAttachment.name}.pdf',
params: const PdfViewerParams(
backgroundColor: Colors.transparent,
enableKeyboardNavigation: false,
),
);
} else {
return InteractiveViewer(
maxScale: 5.0,
child: Center(child: Image.memory(_fileBytes!)),
child: Center(
child: RotatedBox(
quarterTurns: _rotationTurns,
child: Image.memory(_fileBytes!),
),
),
);
}
}
}
class _NavigationArrowButton extends StatelessWidget {
final IconData icon;
final String tooltip;
final VoidCallback onPressed;
const _NavigationArrowButton({
required this.icon,
required this.tooltip,
required this.onPressed,
});
@override
Widget build(BuildContext context) {
return Tooltip(
message: tooltip,
child: Material(
color: Colors.black.withValues(alpha: 0.55),
shape: const CircleBorder(),
clipBehavior: Clip.antiAlias,
elevation: 6,
child: InkWell(
onTap: onPressed,
hoverColor: Colors.white.withValues(alpha: 0.2),
splashColor: Colors.white.withValues(alpha: 0.3),
child: Padding(
padding: const EdgeInsets.all(12),
child: Icon(
icon,
color: Colors.white,
size: 28,
),
),
),
),
);
}
}
@@ -0,0 +1,248 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flux/features/home/dashboard_daily_ricontatti/models/staff_daily_ricontatti_summary.dart';
import 'package:flux/features/master_data/staff/data/staff_repository.dart';
import 'package:flux/features/operations/data/operations_repository.dart';
import 'package:flux/features/operations/models/operation_type.dart';
import 'package:get_it/get_it.dart';
import 'dashboard_daily_ricontatti_state.dart';
class DashboardDailyRicontattiCubit extends Cubit<DashboardDailyRicontattiState> {
final OperationsRepository _operationsRepository;
final StaffRepository _staffRepository;
String? companyId;
String? storeId;
StreamSubscription<void>? _operationsSubscription;
Timer? _pollingTimer;
DashboardDailyRicontattiCubit({
this.companyId,
this.storeId,
OperationsRepository? operationsRepository,
StaffRepository? staffRepository,
}) : _operationsRepository =
operationsRepository ?? GetIt.I.get<OperationsRepository>(),
_staffRepository = staffRepository ?? GetIt.I.get<StaffRepository>(),
super(
DashboardDailyRicontattiState(
date: DateTime.now(),
),
);
void updateContext({
String? newCompanyId,
String? newStoreId,
}) {
bool changed = false;
if (newCompanyId != null && newCompanyId != companyId) {
companyId = newCompanyId;
changed = true;
}
if (newStoreId != null && newStoreId != storeId) {
storeId = newStoreId;
changed = true;
}
if (changed) {
refresh();
}
}
void startListening() {
emit(state.copyWith(status: DashboardDailyRicontattiStatus.loading));
stopListening();
_loadDailyRicontattiSilently();
// 1. Ascolto notifiche di creazione/modifica operazioni in real-time
_operationsSubscription =
_operationsRepository.onOperationsChanged.listen((_) {
_loadDailyRicontattiSilently();
});
// 2. Polling periodico ogni 30 secondi
_pollingTimer = Timer.periodic(const Duration(seconds: 30), (_) {
_loadDailyRicontattiSilently();
});
}
void stopListening() {
_operationsSubscription?.cancel();
_operationsSubscription = null;
_pollingTimer?.cancel();
_pollingTimer = null;
}
void refresh() {
_loadDailyRicontattiSilently();
}
Future<void> _loadDailyRicontattiSilently() async {
if (companyId == null || storeId == null) {
if (!isClosed) {
emit(
state.copyWith(
status: DashboardDailyRicontattiStatus.initial,
summaries: [],
totalRicontattiToday: 0,
totalRicontattiMonth: 0,
),
);
}
return;
}
try {
final now = DateTime.now();
final todayStart = DateTime(now.year, now.month, now.day, 0, 0, 0);
final todayEnd = DateTime(now.year, now.month, now.day, 23, 59, 59, 999);
// 1. Recupero staff del negozio
final allStaff = await _staffRepository.getStaffMembers(
companyId!,
storeId: storeId,
);
// 1. Escludiamo i collaboratori con qualifica Manager o Tester, o disattivati
final Set<String> excludedStaffIds = {};
for (final s in allStaff) {
if (s.isExcludedFromRicontattiFocus && s.id != null) {
excludedStaffIds.add(s.id!);
}
}
final activeEligibleStaff = allStaff
.where((s) => !s.isExcludedFromRicontattiFocus)
.toList();
// 2. Recupero conteggi mensili per addetto del negozio
final monthlyCountsByStaff =
await _operationsRepository.getMonthlyRicontattiCountsByStaff(
companyId: companyId!,
storeId: storeId!,
month: now,
);
// 3. Recupero operazioni create oggi nel negozio
final paginatedOps = await _operationsRepository.fetchPaginatedOperations(
companyId: companyId!,
storeId: storeId,
dateRange: DateTimeRange(start: todayStart, end: todayEnd),
page: 1,
itemsPerPage: 150,
onlyShowInDashboard: false,
);
// 4. Filtro per tipo Ricontatto
final ricontattiOps = paginatedOps.operations.where((op) {
return op.details.any((d) => d.type == OperationType.ricontatto);
}).toList();
// 5. Raggruppamento per addetto ammissibile
final List<StaffDailyRicontattiSummary> summaries = [];
final Set<String> processedStaffIds = Set<String>.from(excludedStaffIds);
for (final staff in activeEligibleStaff) {
final staffId = staff.id ?? '';
processedStaffIds.add(staffId);
final staffOps = ricontattiOps.where((op) => op.staffId == staffId).toList();
int staffCount = 0;
for (final op in staffOps) {
final countInOp = op.details.where((d) => d.type == OperationType.ricontatto).length;
staffCount += countInOp > 0 ? countInOp : 1;
}
final staffMonthCount = monthlyCountsByStaff[staffId] ?? 0;
summaries.add(
StaffDailyRicontattiSummary(
staffId: staffId,
staffName: staff.name,
jobTitle: staff.jobTitle,
systemRole: staff.systemRole,
count: staffCount,
monthCount: staffMonthCount,
operations: staffOps,
),
);
}
// 6. Verifica se ci sono operazioni attribuite a staff non presente nella lista
for (final op in ricontattiOps) {
final opStaffId = op.staffId ?? '';
if (opStaffId.isNotEmpty && !processedStaffIds.contains(opStaffId)) {
processedStaffIds.add(opStaffId);
final staffOps = ricontattiOps.where((o) => o.staffId == opStaffId).toList();
int staffCount = 0;
for (final o in staffOps) {
final countInOp = o.details.where((d) => d.type == OperationType.ricontatto).length;
staffCount += countInOp > 0 ? countInOp : 1;
}
final staffMonthCount = monthlyCountsByStaff[opStaffId] ?? 0;
summaries.add(
StaffDailyRicontattiSummary(
staffId: opStaffId,
staffName: op.staffDisplayName ?? 'Operatore',
count: staffCount,
monthCount: staffMonthCount,
operations: staffOps,
),
);
}
}
// 7. Calcolo totali coerenti con gli addetti visibili
int grandTotal = 0;
int grandMonthTotal = 0;
for (final s in summaries) {
grandTotal += s.count;
grandMonthTotal += s.monthCount;
}
// 8. Ordinamento: per numero di ricontatti oggi decrescente, poi per mese decrescente, poi per nome
summaries.sort((a, b) {
final countCmp = b.count.compareTo(a.count);
if (countCmp != 0) return countCmp;
final monthCmp = b.monthCount.compareTo(a.monthCount);
if (monthCmp != 0) return monthCmp;
return a.staffName.toLowerCase().compareTo(b.staffName.toLowerCase());
});
if (isClosed) return;
emit(
state.copyWith(
status: DashboardDailyRicontattiStatus.success,
summaries: summaries,
totalRicontattiToday: grandTotal,
totalRicontattiMonth: grandMonthTotal,
date: now,
errorMessage: null,
),
);
} catch (e, stack) {
debugPrint('Errore in DashboardDailyRicontattiCubit: $e\n$stack');
if (isClosed) return;
emit(
state.copyWith(
status: DashboardDailyRicontattiStatus.failure,
errorMessage: e.toString(),
),
);
}
}
@override
Future<void> close() {
stopListening();
return super.close();
}
}
@@ -0,0 +1,64 @@
import 'package:equatable/equatable.dart';
import 'package:flux/features/home/dashboard_daily_ricontatti/models/staff_daily_ricontatti_summary.dart';
enum DashboardDailyRicontattiStatus { initial, loading, success, failure }
class DashboardDailyRicontattiState extends Equatable {
final DashboardDailyRicontattiStatus status;
final List<StaffDailyRicontattiSummary> summaries;
final int totalRicontattiToday;
final int totalRicontattiMonth;
final DateTime date;
final String? errorMessage;
const DashboardDailyRicontattiState({
this.status = DashboardDailyRicontattiStatus.initial,
this.summaries = const [],
this.totalRicontattiToday = 0,
this.totalRicontattiMonth = 0,
required this.date,
this.errorMessage,
});
/// Numero di addetti che hanno raggiunto l'obiettivo (>= 2)
int get staffWithGoal => summaries.where((s) => s.hasReachedGoal).length;
/// Numero di addetti che hanno registrato almeno 1 ricontatto (= 1)
int get staffWithOne => summaries.where((s) => s.hasStarted).length;
/// Numero di addetti a 0
int get staffAtZero => summaries.where((s) => s.isZero).length;
/// Totale addetti monitorati
int get activeStaffCount => summaries.length;
DashboardDailyRicontattiState copyWith({
DashboardDailyRicontattiStatus? status,
List<StaffDailyRicontattiSummary>? summaries,
int? totalRicontattiToday,
int? totalRicontattiMonth,
DateTime? date,
String? errorMessage,
}) {
return DashboardDailyRicontattiState(
status: status ?? this.status,
summaries: summaries ?? this.summaries,
totalRicontattiToday:
totalRicontattiToday ?? this.totalRicontattiToday,
totalRicontattiMonth:
totalRicontattiMonth ?? this.totalRicontattiMonth,
date: date ?? this.date,
errorMessage: errorMessage,
);
}
@override
List<Object?> get props => [
status,
summaries,
totalRicontattiToday,
totalRicontattiMonth,
date,
errorMessage,
];
}
@@ -0,0 +1,73 @@
import 'package:equatable/equatable.dart';
import 'package:flux/features/master_data/staff/models/staff_member_model.dart';
import 'package:flux/features/operations/models/operation_model.dart';
/// Modello di riepilogo giornaliero dei ricontatti per singolo addetto.
class StaffDailyRicontattiSummary extends Equatable {
final String staffId;
final String staffName;
final String? jobTitle;
final SystemRole systemRole;
final int count;
final int monthCount;
final List<OperationModel> operations;
const StaffDailyRicontattiSummary({
required this.staffId,
required this.staffName,
this.jobTitle,
this.systemRole = SystemRole.user,
required this.count,
this.monthCount = 0,
this.operations = const [],
});
/// Ha raggiunto l'obiettivo consigliato (almeno 2 ricontatti al giorno)
bool get hasReachedGoal => count >= 2;
/// Ha iniziato la raccolta (1 ricontatto preso)
bool get hasStarted => count == 1;
/// Non ha ancora registrato alcun ricontatto oggi
bool get isZero => count == 0;
StaffDailyRicontattiSummary copyWith({
String? staffId,
String? staffName,
String? jobTitle,
SystemRole? systemRole,
int? count,
int? monthCount,
List<OperationModel>? operations,
}) {
return StaffDailyRicontattiSummary(
staffId: staffId ?? this.staffId,
staffName: staffName ?? this.staffName,
jobTitle: jobTitle ?? this.jobTitle,
systemRole: systemRole ?? this.systemRole,
count: count ?? this.count,
monthCount: monthCount ?? this.monthCount,
operations: operations ?? this.operations,
);
}
factory StaffDailyRicontattiSummary.empty() {
return const StaffDailyRicontattiSummary(
staffId: '',
staffName: '',
count: 0,
monthCount: 0,
);
}
@override
List<Object?> get props => [
staffId,
staffName,
jobTitle,
systemRole,
count,
monthCount,
operations,
];
}
@@ -0,0 +1,867 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flux/core/blocs/session/session_cubit.dart';
import 'package:flux/core/routes/routes.dart';
import 'package:flux/core/theme/theme.dart';
import 'package:flux/features/home/dashboard_daily_ricontatti/blocs/dashboard_daily_ricontatti_cubit.dart';
import 'package:flux/features/home/dashboard_daily_ricontatti/blocs/dashboard_daily_ricontatti_state.dart';
import 'package:flux/features/home/dashboard_daily_ricontatti/models/staff_daily_ricontatti_summary.dart';
import 'package:flux/features/operations/models/operation_type.dart';
import 'package:go_router/go_router.dart';
import 'package:intl/intl.dart';
class DashboardDailyRicontattiCard extends StatelessWidget {
const DashboardDailyRicontattiCard({super.key});
@override
Widget build(BuildContext context) {
// Visibile a chi ha qualifica Manager o Titolare (o Admin di sistema)
final staff = context.watch<SessionCubit>().state.currentStaffMember;
final canView = staff?.canViewRicontattiFocus ?? false;
if (!canView) {
return const SizedBox.shrink();
}
return BlocBuilder<DashboardDailyRicontattiCubit,
DashboardDailyRicontattiState>(
builder: (context, state) {
final theme = Theme.of(context);
return Padding(
padding: const EdgeInsets.fromLTRB(24.0, 0, 24.0, 24.0),
child: Container(
decoration: BoxDecoration(
color: theme.colorScheme.surface,
borderRadius: BorderRadius.circular(20),
border: Border.all(
color: Colors.amber.shade600.withValues(alpha: 0.35),
width: 1.5,
),
boxShadow: [
BoxShadow(
color: Colors.amber.shade700.withValues(alpha: 0.06),
blurRadius: 18,
offset: const Offset(0, 6),
),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_buildHeader(context, theme, state),
Divider(
height: 1,
color: theme.dividerColor.withValues(alpha: 0.15),
),
if (state.status == DashboardDailyRicontattiStatus.loading &&
state.summaries.isEmpty)
_buildLoading(theme)
else if (state.status == DashboardDailyRicontattiStatus.failure)
_buildError(context, theme, state)
else if (state.summaries.isEmpty)
_buildEmpty(theme)
else ...[
_buildOverviewStats(context, theme, state),
Padding(
padding: const EdgeInsets.fromLTRB(18, 0, 18, 18),
child: _buildStaffGrid(context, theme, state.summaries),
),
],
],
),
),
);
},
);
}
Widget _buildHeader(
BuildContext context,
ThemeData theme,
DashboardDailyRicontattiState state,
) {
return Padding(
padding: const EdgeInsets.all(18.0),
child: Row(
children: [
Container(
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [
Colors.amber.shade600,
Colors.orange.shade700,
],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
),
borderRadius: BorderRadius.circular(14),
boxShadow: [
BoxShadow(
color: Colors.amber.shade700.withValues(alpha: 0.3),
blurRadius: 8,
offset: const Offset(0, 3),
),
],
),
child: const Icon(
Icons.event_repeat_rounded,
color: Colors.white,
size: 24,
),
),
const SizedBox(width: 14),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Row(
children: [
Flexible(
child: Text(
'FOCUS RICONTATTI DI OGGI',
style: theme.textTheme.titleMedium?.copyWith(
fontWeight: FontWeight.w900,
letterSpacing: 0.5,
),
overflow: TextOverflow.ellipsis,
),
),
const SizedBox(width: 8),
Container(
padding: const EdgeInsets.symmetric(
horizontal: 8,
vertical: 3,
),
decoration: BoxDecoration(
color: Colors.amber.shade100,
borderRadius: BorderRadius.circular(6),
),
child: Text(
'MANAGER',
style: TextStyle(
fontSize: 10,
fontWeight: FontWeight.w800,
color: Colors.amber.shade900,
letterSpacing: 0.4,
),
),
),
],
),
const SizedBox(height: 3),
Text(
'Raccolta situazioni da ricontattare & bollette (chi sta facendo e chi no)',
style: theme.textTheme.bodySmall?.copyWith(
color: theme.colorScheme.onSurfaceVariant,
),
overflow: TextOverflow.ellipsis,
),
],
),
),
const SizedBox(width: 12),
// Total today & month pill badge
Container(
padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 8),
decoration: BoxDecoration(
color: Colors.amber.shade500.withValues(alpha: 0.15),
borderRadius: BorderRadius.circular(12),
border: Border.all(
color: Colors.amber.shade600.withValues(alpha: 0.4),
),
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Text(
'${state.totalRicontattiToday}',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w900,
color: Colors.amber.shade900,
),
),
const SizedBox(width: 5),
Text(
'oggi',
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w700,
color: Colors.amber.shade800,
),
),
const SizedBox(width: 6),
Text(
'(mese: ${state.totalRicontattiMonth})',
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w800,
color: Colors.amber.shade900.withValues(alpha: 0.85),
),
),
],
),
),
const SizedBox(width: 6),
IconButton(
tooltip: 'Aggiorna ora',
icon: const Icon(Icons.refresh_rounded, size: 20),
onPressed: () =>
context.read<DashboardDailyRicontattiCubit>().refresh(),
),
],
),
);
}
Widget _buildOverviewStats(
BuildContext context,
ThemeData theme,
DashboardDailyRicontattiState state,
) {
final hasZeros = state.staffAtZero > 0;
return Padding(
padding: const EdgeInsets.fromLTRB(18, 14, 18, 14),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Wrap(
spacing: 12,
runSpacing: 8,
children: [
_buildStatChip(
icon: Icons.check_circle_rounded,
color: Colors.green.shade600,
bgColor: Colors.green.shade50,
label: '>= 2 Ricontatti',
count: state.staffWithGoal,
),
_buildStatChip(
icon: Icons.hourglass_top_rounded,
color: Colors.blue.shade600,
bgColor: Colors.blue.shade50,
label: '1 Ricontatto',
count: state.staffWithOne,
),
_buildStatChip(
icon: Icons.warning_amber_rounded,
color: Colors.deepOrange.shade600,
bgColor: Colors.deepOrange.shade50,
label: '0 Ricontatti',
count: state.staffAtZero,
),
],
),
if (hasZeros) ...[
const SizedBox(height: 10),
Container(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
decoration: BoxDecoration(
color: Colors.deepOrange.shade50.withValues(alpha: 0.7),
borderRadius: BorderRadius.circular(10),
border: Border.all(
color: Colors.deepOrange.shade200,
),
),
child: Row(
children: [
Icon(
Icons.info_outline_rounded,
size: 16,
color: Colors.deepOrange.shade800,
),
const SizedBox(width: 8),
Expanded(
child: Text(
'${state.staffAtZero} ${state.staffAtZero == 1 ? "addetto non ha" : "addetti non hanno"} ancora raccolto alcun ricontatto oggi.',
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
color: Colors.deepOrange.shade900,
),
),
),
],
),
),
],
],
),
);
}
Widget _buildStatChip({
required IconData icon,
required Color color,
required Color bgColor,
required String label,
required int count,
}) {
return Container(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 6),
decoration: BoxDecoration(
color: bgColor,
borderRadius: BorderRadius.circular(10),
border: Border.all(color: color.withValues(alpha: 0.3)),
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(icon, size: 16, color: color),
const SizedBox(width: 6),
Text(
label,
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
color: color,
),
),
const SizedBox(width: 6),
Container(
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 2),
decoration: BoxDecoration(
color: color,
borderRadius: BorderRadius.circular(8),
),
child: Text(
'$count',
style: const TextStyle(
fontSize: 11,
fontWeight: FontWeight.w800,
color: Colors.white,
),
),
),
],
),
);
}
Widget _buildStaffGrid(
BuildContext context,
ThemeData theme,
List<StaffDailyRicontattiSummary> summaries,
) {
return LayoutBuilder(
builder: (context, constraints) {
// Calcola quante colonne in base alla larghezza disponibile
final double width = constraints.maxWidth;
final int crossAxisCount = width > 1100
? 4
: width > 750
? 3
: width > 480
? 2
: 1;
return GridView.builder(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemCount: summaries.length,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: crossAxisCount,
mainAxisSpacing: 10,
crossAxisSpacing: 10,
mainAxisExtent: 104,
),
itemBuilder: (context, index) {
final summary = summaries[index];
return _StaffItemCard(summary: summary);
},
);
},
);
}
Widget _buildLoading(ThemeData theme) {
return const Padding(
padding: EdgeInsets.all(32.0),
child: Center(
child: SizedBox(
width: 28,
height: 28,
child: CircularProgressIndicator(strokeWidth: 2.5),
),
),
);
}
Widget _buildError(
BuildContext context,
ThemeData theme,
DashboardDailyRicontattiState state,
) {
return Padding(
padding: const EdgeInsets.all(24.0),
child: Center(
child: Column(
children: [
Icon(Icons.error_outline, color: theme.colorScheme.error, size: 32),
const SizedBox(height: 8),
Text(
'Impossibile caricare i dati dei ricontatti',
style: TextStyle(color: theme.colorScheme.error),
),
const SizedBox(height: 8),
TextButton.icon(
onPressed: () =>
context.read<DashboardDailyRicontattiCubit>().refresh(),
icon: const Icon(Icons.refresh),
label: const Text('Riprova'),
),
],
),
),
);
}
Widget _buildEmpty(ThemeData theme) {
return const Padding(
padding: EdgeInsets.all(24.0),
child: Center(
child: Text(
'Nessun addetto attivo registrato per questo negozio.',
style: TextStyle(fontStyle: FontStyle.italic),
),
),
);
}
}
class _StaffItemCard extends StatelessWidget {
final StaffDailyRicontattiSummary summary;
const _StaffItemCard({required this.summary});
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
// Stile in base al conteggio
final bool hasGoal = summary.hasReachedGoal;
final bool hasOne = summary.hasStarted;
final bool isZero = summary.isZero;
final Color primaryColor = hasGoal
? Colors.green.shade600
: hasOne
? Colors.blue.shade600
: Colors.grey.shade500;
final Color cardBg = hasGoal
? Colors.green.shade50.withValues(alpha: 0.3)
: hasOne
? Colors.blue.shade50.withValues(alpha: 0.3)
: theme.colorScheme.surface;
final Color borderColor = hasGoal
? Colors.green.shade400
: hasOne
? Colors.blue.shade300
: theme.dividerColor.withValues(alpha: 0.25);
final String initials = _getInitials(summary.staffName);
return InkWell(
onTap: () => _handleTap(context),
borderRadius: BorderRadius.circular(14),
child: Container(
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(
color: cardBg,
borderRadius: BorderRadius.circular(14),
border: Border.all(
color: borderColor,
width: isZero ? 1.0 : 1.5,
),
),
child: Row(
children: [
// Avatar con iniziali
CircleAvatar(
radius: 20,
backgroundColor: primaryColor.withValues(alpha: 0.15),
child: Text(
initials,
style: TextStyle(
fontSize: 13,
fontWeight: FontWeight.w800,
color: primaryColor,
),
),
),
const SizedBox(width: 10),
// Nome e stato
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
summary.staffName,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w700,
color: isZero
? context.primaryText.withValues(alpha: 0.75)
: context.primaryText,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
const SizedBox(height: 3),
_buildStatusChip(hasGoal, hasOne, isZero),
],
),
),
const SizedBox(width: 8),
// Grande numero conteggio e riepilogo mese tra parentesi
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Row(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic,
children: [
Text(
'${summary.count}',
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.w900,
height: 1.0,
color: hasGoal
? Colors.green.shade700
: hasOne
? Colors.blue.shade700
: Colors.grey.shade400,
),
),
const SizedBox(width: 4),
Text(
'oggi',
style: TextStyle(
fontSize: 10,
fontWeight: FontWeight.w600,
color: hasGoal
? Colors.green.shade700
: hasOne
? Colors.blue.shade700
: Colors.grey.shade500,
),
),
],
),
const SizedBox(height: 3),
Container(
padding: const EdgeInsets.symmetric(horizontal: 5, vertical: 1.5),
decoration: BoxDecoration(
color: theme.colorScheme.surfaceContainerHighest.withValues(alpha: 0.6),
borderRadius: BorderRadius.circular(6),
),
child: Text(
'(mese: ${summary.monthCount})',
style: TextStyle(
fontSize: 11,
fontWeight: FontWeight.w700,
color: theme.colorScheme.onSurfaceVariant.withValues(alpha: 0.85),
),
),
),
],
),
],
),
),
);
}
Widget _buildStatusChip(bool hasGoal, bool hasOne, bool isZero) {
if (hasGoal) {
return Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(Icons.star_rounded, size: 13, color: Colors.green.shade700),
const SizedBox(width: 3),
Text(
'Obiettivo preso',
style: TextStyle(
fontSize: 11,
fontWeight: FontWeight.w700,
color: Colors.green.shade700,
),
),
],
);
}
if (hasOne) {
return Text(
'1 raccolto',
style: TextStyle(
fontSize: 11,
fontWeight: FontWeight.w600,
color: Colors.blue.shade700,
),
);
}
return Text(
'0 ricontatti',
style: TextStyle(
fontSize: 11,
fontWeight: FontWeight.w600,
color: Colors.deepOrange.shade600,
),
);
}
String _getInitials(String name) {
final parts = name.trim().split(RegExp(r'\s+'));
if (parts.isEmpty || parts[0].isEmpty) return '?';
if (parts.length == 1) return parts[0][0].toUpperCase();
return '${parts[0][0]}${parts[1][0]}'.toUpperCase();
}
void _handleTap(BuildContext context) {
if (summary.operations.isEmpty) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
'${summary.staffName} non ha ancora registrato ricontatti oggi (${summary.monthCount} nel mese).',
),
duration: const Duration(seconds: 2),
behavior: SnackBarBehavior.floating,
),
);
return;
}
// Mostra bottom sheet di dettaglio con le operazioni prese oggi dall'addetto
showModalBottomSheet(
context: context,
isScrollControlled: true,
backgroundColor: Colors.transparent,
builder: (sheetContext) => _StaffOperationsSheet(summary: summary),
);
}
}
class _StaffOperationsSheet extends StatelessWidget {
final StaffDailyRicontattiSummary summary;
const _StaffOperationsSheet({required this.summary});
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
final timeFormat = DateFormat('HH:mm');
return Container(
decoration: BoxDecoration(
color: theme.colorScheme.surface,
borderRadius: const BorderRadius.vertical(top: Radius.circular(24)),
),
padding: EdgeInsets.only(
top: 16,
left: 20,
right: 20,
bottom: MediaQuery.of(context).viewInsets.bottom + 24,
),
constraints: BoxConstraints(
maxHeight: MediaQuery.of(context).size.height * 0.75,
),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Center(
child: Container(
width: 40,
height: 4,
margin: const EdgeInsets.only(bottom: 16),
decoration: BoxDecoration(
color: theme.dividerColor.withValues(alpha: 0.3),
borderRadius: BorderRadius.circular(2),
),
),
),
Row(
children: [
Container(
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
color: Colors.amber.shade100,
borderRadius: BorderRadius.circular(12),
),
child: Icon(
Icons.person_rounded,
color: Colors.amber.shade900,
size: 22,
),
),
const SizedBox(width: 12),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
summary.staffName,
style: theme.textTheme.titleMedium?.copyWith(
fontWeight: FontWeight.bold,
),
),
Text(
'${summary.count} ${summary.count == 1 ? "ricontatto oggi" : "ricontatti oggi"} • (${summary.monthCount} nel mese)',
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
color: theme.colorScheme.onSurfaceVariant,
),
),
],
),
),
IconButton(
onPressed: () => Navigator.of(context).pop(),
icon: const Icon(Icons.close),
),
],
),
const SizedBox(height: 16),
Divider(height: 1, color: theme.dividerColor.withValues(alpha: 0.2)),
const SizedBox(height: 12),
Flexible(
child: ListView.separated(
shrinkWrap: true,
itemCount: summary.operations.length,
separatorBuilder: (context, _) => Divider(
height: 16,
color: theme.dividerColor.withValues(alpha: 0.1),
),
itemBuilder: (context, index) {
final op = summary.operations[index];
final ricontattoDetails = op.details
.where((d) => d.type == OperationType.ricontatto)
.toList();
final timeStr = op.createdAt != null
? timeFormat.format(op.createdAt!)
: '--:--';
return InkWell(
borderRadius: BorderRadius.circular(12),
onTap: () {
Navigator.of(context).pop();
context.pushNamed(
Routes.operationForm,
extra: (createdBy: null, operation: op),
pathParameters: {'id': op.id!},
);
},
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: 8.0,
horizontal: 4.0,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
padding: const EdgeInsets.symmetric(
horizontal: 8,
vertical: 4,
),
decoration: BoxDecoration(
color: theme.colorScheme.surfaceContainerHighest,
borderRadius: BorderRadius.circular(8),
),
child: Text(
timeStr,
style: const TextStyle(
fontSize: 12,
fontWeight: FontWeight.w700,
),
),
),
const SizedBox(width: 12),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
op.customer?.name ?? 'Cliente non specificato',
style: const TextStyle(
fontWeight: FontWeight.bold,
fontSize: 14,
),
),
const SizedBox(height: 4),
Wrap(
spacing: 6,
runSpacing: 4,
children: ricontattoDetails.map((detail) {
final label = detail.subType != null &&
detail.subType!.isNotEmpty
? detail.subType!
: 'Ricontatto';
return Container(
padding: const EdgeInsets.symmetric(
horizontal: 6,
vertical: 2,
),
decoration: BoxDecoration(
color: Colors.amber.shade100,
borderRadius: BorderRadius.circular(6),
),
child: Text(
label,
style: TextStyle(
fontSize: 11,
fontWeight: FontWeight.w600,
color: Colors.amber.shade900,
),
),
);
}).toList(),
),
if (op.note.trim().isNotEmpty) ...[
const SizedBox(height: 4),
Text(
op.note,
style: TextStyle(
fontSize: 12,
fontStyle: FontStyle.italic,
color: theme.colorScheme.onSurfaceVariant,
),
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
],
],
),
),
const SizedBox(width: 8),
const Icon(
Icons.chevron_right_rounded,
size: 20,
color: Colors.grey,
),
],
),
),
);
},
),
),
],
),
);
}
}
@@ -0,0 +1,80 @@
import 'dart:async';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flux/features/home/dashboard_expiring_contracts/bloc/dashboard_expiring_contracts_state.dart';
import 'package:flux/features/operations/data/operations_repository.dart';
import 'package:get_it/get_it.dart';
class DashboardExpiringContractsCubit
extends Cubit<DashboardExpiringContractsState> {
final OperationsRepository _repository =
GetIt.I.get<OperationsRepository>();
final String? companyId;
final String? storeId;
StreamSubscription<void>? _operationsSubscription;
Timer? _pollingTimer;
DashboardExpiringContractsCubit({
required this.companyId,
required this.storeId,
}) : super(const DashboardExpiringContractsState());
void startListening() {
emit(state.copyWith(status: DashboardExpiringContractsStatus.loading));
stopListening();
_loadExpiringSilently();
_operationsSubscription = _repository.onOperationsChanged.listen((_) {
_loadExpiringSilently();
});
_pollingTimer = Timer.periodic(const Duration(seconds: 30), (_) {
_loadExpiringSilently();
});
}
void stopListening() {
_operationsSubscription?.cancel();
_operationsSubscription = null;
_pollingTimer?.cancel();
_pollingTimer = null;
}
void refresh() {
_loadExpiringSilently();
}
void _loadExpiringSilently() async {
try {
if (companyId == null || companyId!.isEmpty) return;
final expiringOps = await _repository.fetchExpiringOperations(
companyId: companyId!,
storeId: storeId,
limit: 20,
);
if (isClosed) return;
emit(
state.copyWith(
status: DashboardExpiringContractsStatus.success,
operations: expiringOps,
error: null,
),
);
} catch (e) {
if (isClosed) return;
emit(
state.copyWith(
status: DashboardExpiringContractsStatus.failure,
error: e.toString(),
),
);
}
}
@override
Future<void> close() {
stopListening();
return super.close();
}
}
@@ -0,0 +1,31 @@
import 'package:equatable/equatable.dart';
import 'package:flux/features/operations/models/operation_model.dart';
enum DashboardExpiringContractsStatus { initial, loading, success, failure }
class DashboardExpiringContractsState extends Equatable {
final DashboardExpiringContractsStatus status;
final List<OperationModel> operations;
final String? error;
const DashboardExpiringContractsState({
this.status = DashboardExpiringContractsStatus.initial,
this.operations = const [],
this.error,
});
DashboardExpiringContractsState copyWith({
DashboardExpiringContractsStatus? status,
List<OperationModel>? operations,
String? error,
}) {
return DashboardExpiringContractsState(
status: status ?? this.status,
operations: operations ?? this.operations,
error: error,
);
}
@override
List<Object?> get props => [status, operations, error];
}
@@ -0,0 +1,292 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flux/core/routes/routes.dart';
import 'package:flux/core/theme/theme.dart';
import 'package:flux/core/utils/extensions.dart';
import 'package:flux/features/home/dashboard_expiring_contracts/bloc/dashboard_expiring_contracts_cubit.dart';
import 'package:flux/features/home/dashboard_expiring_contracts/bloc/dashboard_expiring_contracts_state.dart';
import 'package:flux/features/operations/data/operations_repository.dart';
import 'package:flux/features/operations/models/operation_model.dart';
import 'package:go_router/go_router.dart';
class DashboardExpiringContractsCard extends StatelessWidget {
const DashboardExpiringContractsCard({super.key});
@override
Widget build(BuildContext context) {
return _ExpiringContractsCardContent();
}
}
class _ExpiringContractsCardContent extends StatelessWidget {
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
const color = Colors.orange;
return Card(
elevation: 0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
side: BorderSide(color: theme.dividerColor.withValues(alpha: 0.3)),
),
child: InkWell(
onTap: () => context.pushNamed(Routes.operations),
borderRadius: BorderRadius.circular(12),
child: Padding(
padding: const EdgeInsets.all(12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// --- HEADER DELLA CARD ---
Row(
children: [
Container(
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
color: color.withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(8),
),
child: const Icon(
Icons.event_repeat_outlined,
color: color,
size: 20,
),
),
const SizedBox(width: 12),
Expanded(
child: Text(
context.l10n.homeExpiringContracts,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16,
color: context.primaryText,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
),
],
),
const SizedBox(height: 12),
// --- LISTA OPERAZIONI IN SCADENZA ---
Expanded(
child: BlocBuilder<DashboardExpiringContractsCubit,
DashboardExpiringContractsState>(
builder: (context, state) {
if (state.status ==
DashboardExpiringContractsStatus.loading ||
state.status ==
DashboardExpiringContractsStatus.initial) {
return const Center(
child: CircularProgressIndicator(),
);
}
if (state.status ==
DashboardExpiringContractsStatus.failure) {
return Center(
child: Text(
"Errore di caricamento",
style: TextStyle(color: theme.colorScheme.error),
),
);
}
if (state.operations.isEmpty) {
return Center(
child: Text(
"Nessun contratto in scadenza.",
style: TextStyle(
color: context.secondaryText,
fontStyle: FontStyle.italic,
),
),
);
}
return ListView.separated(
itemCount: state.operations.length,
separatorBuilder: (context, index) => Divider(
height: 1,
color: theme.dividerColor.withValues(alpha: 0.3),
),
itemBuilder: (context, index) {
final operation = state.operations[index];
final earliestExp =
OperationsRepository.getEarliestExpiration(operation);
final phone = operation.customer?.phoneNumber;
return InkWell(
onTap: () => context.pushNamed(
Routes.operationForm,
extra: (createdBy: null, operation: operation),
pathParameters: {'id': operation.id!},
),
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 8.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
// Nome Cliente & note
Expanded(
flex: 5,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Row(
children: [
Flexible(
child: Text(
operation.customer?.name ??
'Cliente sconosciuto',
style: TextStyle(
fontWeight: FontWeight.w700,
color: context.primaryText,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
),
if (operation.attachments.isNotEmpty) ...[
const SizedBox(width: 4),
Icon(
Icons.attach_file,
size: 14,
color: context.secondaryText,
),
],
],
),
if (phone != null && phone.isNotEmpty)
Text(
phone,
style: TextStyle(
color: context.secondaryText,
fontSize: 11,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
],
),
),
const SizedBox(width: 8),
// Badge Tipo / Subtipo
Expanded(
flex: 4,
child: _buildBadges(operation),
),
const SizedBox(width: 8),
// Data Scadenza Badge
_buildExpiryBadge(context, earliestExp),
],
),
),
);
},
);
},
),
),
],
),
),
),
);
}
Widget _buildBadges(OperationModel op) {
final labels = op.details
.map((d) {
final tLabel = d.type?.shortLabel ?? d.type?.value ?? '';
final sub = d.subType?.trim() ?? '';
if (sub.isNotEmpty) return '$tLabel: $sub';
return tLabel;
})
.where((l) => l.isNotEmpty)
.toList();
if (labels.isEmpty) {
return const SizedBox.shrink();
}
return SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Row(
children: labels
.map(
(label) => Container(
margin: const EdgeInsets.only(right: 4),
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 2),
decoration: BoxDecoration(
color: Colors.amber.withValues(alpha: 0.12),
borderRadius: BorderRadius.circular(6),
border: Border.all(
color: Colors.amber.withValues(alpha: 0.3),
width: 1,
),
),
child: Text(
label,
style: const TextStyle(
color: Colors.amber,
fontSize: 11,
fontWeight: FontWeight.bold,
),
),
),
)
.toList(),
),
);
}
Widget _buildExpiryBadge(BuildContext context, DateTime? expiry) {
if (expiry == null) return const SizedBox.shrink();
final now = DateTime.now();
final differenceDays = expiry.difference(now).inDays;
final isExpired = expiry.isBefore(now);
Color badgeColor = Colors.orange;
String text = "${expiry.day}/${expiry.month}/${expiry.year}";
if (isExpired) {
badgeColor = Colors.red;
text = "Scaduto ($text)";
} else if (differenceDays <= 30) {
badgeColor = Colors.redAccent;
text = "Tra $differenceDays gg";
} else if (differenceDays <= 60) {
badgeColor = Colors.orange;
text = "Tra ~${(differenceDays / 30).round()} mesi";
} else {
badgeColor = Colors.blue;
text = "${expiry.day}/${expiry.month}/${expiry.year}";
}
return Container(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
decoration: BoxDecoration(
color: badgeColor.withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(6),
border: Border.all(color: badgeColor.withValues(alpha: 0.4)),
),
child: Text(
text,
style: TextStyle(
color: badgeColor,
fontSize: 11,
fontWeight: FontWeight.bold,
),
),
);
}
}
@@ -35,10 +35,15 @@ class DashboardNoteListCubit extends Cubit<DashboardNoteListState> {
try {
_subscription = _repository
.notesStream(companyId: companyId!, currentStaffId: staffId!)
.listen((_) {
// Quando il campanello suona (qualcosa è cambiato a DB), ricarichiamo!
_loadNotesSilently();
});
.listen(
(_) {
// Quando il campanello suona (qualcosa è cambiato a DB), ricarichiamo!
_loadNotesSilently();
},
onError: (error, stackTrace) {
debugPrint('Dashboard notes stream error: $error');
},
);
} on Exception catch (e) {
debugPrint(e.toString());
}
@@ -14,7 +14,9 @@ class DashboardStoreTicketListCubit
final TicketRepository _repository = GetIt.I.get<TicketRepository>();
final String? companyId;
final String? storeId;
StreamSubscription<void>? _subscription;
StreamSubscription<void>? _realtimeSubscription;
StreamSubscription<void>? _localSubscription;
Timer? _pollingTimer;
DashboardStoreTicketListCubit({
required this.companyId,
@@ -26,8 +28,16 @@ class DashboardStoreTicketListCubit
);
void stopListening() {
_subscription?.cancel();
_subscription = null;
_realtimeSubscription?.cancel();
_realtimeSubscription = null;
_localSubscription?.cancel();
_localSubscription = null;
_pollingTimer?.cancel();
_pollingTimer = null;
}
void refresh() {
_loadTicketsSilently();
}
void startListening() {
@@ -38,21 +48,49 @@ class DashboardStoreTicketListCubit
// Primo caricamento
_loadTicketsSilently();
// Inizio ascolto campanello
// 1. Ascolto notifiche locali di mutazione in memoria (reattività istantanea)
_localSubscription = _repository.onTicketsChanged.listen((_) {
_loadTicketsSilently();
});
// 2. Ascolto campanello Supabase Realtime (se attivo in DB)
try {
_subscription = _repository
.getLatestStoreTicketsStream(storeId: storeId!, limit: 10)
.listen((_) {
// Quando il campanello suona (qualcosa è cambiato a DB), ricarichiamo!
_loadTicketsSilently();
});
if (storeId != null && storeId!.isNotEmpty) {
_realtimeSubscription = _repository
.getLatestStoreTicketsStream(storeId: storeId!, limit: 10)
.listen(
(_) {
_loadTicketsSilently();
},
onError: (error, stackTrace) {
debugPrint('Realtime store tickets stream error: $error');
},
);
}
} on Exception catch (e) {
debugPrint(e.toString());
}
// 3. Polling di sicurezza ogni 30 secondi
_pollingTimer = Timer.periodic(const Duration(seconds: 30), (_) {
_loadTicketsSilently();
});
}
Future<void> _loadTicketsSilently() async {
try {
if (companyId == null || companyId!.isEmpty) {
if (!isClosed) {
emit(
state.copyWith(
status: DashboardStoreTicketListStatus.initial,
tickets: [],
errorMessage: null,
),
);
}
return;
}
final tickets = await _repository.fetchTickets(
companyId: companyId!,
storeId: storeId,
@@ -41,28 +41,78 @@ class DashboardTargetProgressState extends Equatable {
);
}
/// Avanzamento specifico del membro dello staff correntemente connesso
TargetProgressModel? get currentStaffProgress {
/// Avanzamento specifico del membro dello staff indicato o correntemente connesso
TargetProgressModel? getStaffProgress([String? staffId]) {
final curProgress = progress;
final staffId = currentStaffId;
if (curProgress == null || staffId == null) return null;
return curProgress.staffProgress[staffId];
final id = staffId ?? currentStaffId;
if (curProgress == null || id == null) return null;
return curProgress.staffProgress[id];
}
/// True se lo staff connesso ha almeno un target individuale attivo impostato
bool get hasStaffTargets {
final sp = currentStaffProgress;
/// True se lo staff connesso o specificato ha almeno un target individuale attivo impostato
bool hasStaffTargets([String? staffId]) {
final sp = getStaffProgress(staffId);
if (sp == null) return false;
return sp.categories.values.any((c) => c.hasTarget);
}
/// Lista delle categorie con target attivo per l'addetto connesso
List<CategoryProgress> get activeStaffCategories {
final sp = currentStaffProgress;
/// Lista delle categorie con target attivo per l'addetto indicato o connesso
List<CategoryProgress> activeStaffCategories([String? staffId]) {
final sp = getStaffProgress(staffId);
if (sp == null) return const [];
return sp.categories.values.where((c) => c.hasTarget).toList();
}
/// Restituisce sempre l'avanzamento personalizzato per lo staff
TargetProgressModel getEffectiveStaffProgress({
required String? staffId,
required String? staffName,
}) {
final sp = getStaffProgress(staffId);
if (sp != null) {
return sp;
}
final curProgress = progress;
if (curProgress == null) {
return TargetProgressModel.empty();
}
// Se l'addetto non è mappato nella lista (es. nuovo addetto senza operazioni),
// creiamo una scheda personale con le categorie attive del negozio
final staffCount = target?.individualTargets.length ?? 1;
final divisor = staffCount > 0 ? staffCount : 1;
final userCategories = <String, CategoryProgress>{};
for (final entry in curProgress.categories.entries) {
final storeCat = entry.value;
userCategories[entry.key] = CategoryProgress.calculate(
key: storeCat.key,
label: storeCat.label,
actual: 0,
s1: (storeCat.targetS1 / divisor).round(),
s2: (storeCat.targetS2 / divisor).round(),
elapsedDays: curProgress.elapsedWorkingDays,
remainingDays: curProgress.remainingWorkingDays,
totalDays: curProgress.totalWorkingDays,
);
}
return TargetProgressModel(
targetId: curProgress.targetId,
storeId: curProgress.storeId,
staffId: staffId,
staffName: staffName,
totalWorkingDays: curProgress.totalWorkingDays,
elapsedWorkingDays: curProgress.elapsedWorkingDays,
remainingWorkingDays: curProgress.remainingWorkingDays,
categories: userCategories,
);
}
/// Avanzamento specifico del membro dello staff correntemente connesso
TargetProgressModel? get currentStaffProgress => getStaffProgress();
/// Lista delle categorie con target attivo per il negozio
List<CategoryProgress> get activeStoreCategories {
final curProgress = progress;
@@ -4,15 +4,25 @@ import 'package:flux/core/blocs/session/session_cubit.dart';
import 'package:flux/core/routes/routes.dart';
import 'package:flux/features/home/dashboard_target_progress/blocs/dashboard_target_progress_cubit.dart';
import 'package:flux/features/home/dashboard_target_progress/blocs/dashboard_target_progress_state.dart';
import 'package:flux/features/master_data/staff/models/staff_member_model.dart';
import 'package:flux/features/targets/models/target_progress_model.dart';
import 'package:go_router/go_router.dart';
class DashboardTargetHeroCard extends StatelessWidget {
class DashboardTargetHeroCard extends StatefulWidget {
const DashboardTargetHeroCard({super.key});
@override
State<DashboardTargetHeroCard> createState() =>
_DashboardTargetHeroCardState();
}
class _DashboardTargetHeroCardState extends State<DashboardTargetHeroCard> {
bool _showAllCategories = false;
@override
Widget build(BuildContext context) {
return BlocBuilder<DashboardTargetProgressCubit, DashboardTargetProgressState>(
return BlocBuilder<DashboardTargetProgressCubit,
DashboardTargetProgressState>(
builder: (context, state) {
final theme = Theme.of(context);
@@ -149,287 +159,377 @@ class DashboardTargetHeroCard extends StatelessWidget {
final target = state.target!;
final staffMember =
context.watch<SessionCubit>().state.currentStaffMember;
final currentStore =
context.watch<SessionCubit>().state.currentStore;
final staffName = staffMember?.name ?? 'Ospite';
final staffId = staffMember?.id;
final hasStaffTargets = state.hasStaffTargets;
final displayCategories = hasStaffTargets
? state.activeStaffCategories
: state.activeStoreCategories;
final isManager = staffMember?.systemRole == SystemRole.manager ||
staffMember?.systemRole == SystemRole.admin;
final activeProgress = isManager
? progress
: state.getEffectiveStaffProgress(
staffId: staffId,
staffName: staffName,
);
final displayCategories = activeProgress.categories.values
.where((c) => c.hasTarget)
.toList();
final inLineCategories =
displayCategories.where((c) => !c.isBehind).toList();
final behindCategories =
displayCategories.where((c) => c.isBehind).toList();
final categoriesToDisplay =
_showAllCategories ? displayCategories : behindCategories;
final remainingDays = progress.remainingWorkingDays;
return Container(
decoration: BoxDecoration(
color: theme.colorScheme.surface,
borderRadius: BorderRadius.circular(20),
border: Border.all(
color: theme.colorScheme.primary.withValues(alpha: 0.25),
width: 1.5,
),
boxShadow: [
BoxShadow(
color: theme.colorScheme.primary.withValues(alpha: 0.06),
blurRadius: 20,
offset: const Offset(0, 6),
return LayoutBuilder(
builder: (context, constraints) {
final isCompact = constraints.maxWidth < 600;
return Container(
decoration: BoxDecoration(
color: theme.colorScheme.surface,
borderRadius: BorderRadius.circular(20),
border: Border.all(
color: theme.colorScheme.primary.withValues(alpha: 0.25),
width: 1.5,
),
boxShadow: [
BoxShadow(
color: theme.colorScheme.primary.withValues(alpha: 0.06),
blurRadius: 20,
offset: const Offset(0, 6),
),
],
),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
// ==========================================
// 1. HEADER DELLA CARD (TITOLO & GIORNI)
// ==========================================
Padding(
padding: const EdgeInsets.fromLTRB(20, 18, 20, 14),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [
theme.colorScheme.primary,
theme.colorScheme.primary.withValues(alpha: 0.8),
],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
),
borderRadius: BorderRadius.circular(12),
boxShadow: [
BoxShadow(
color: theme.colorScheme.primary.withValues(alpha: 0.25),
blurRadius: 8,
offset: const Offset(0, 2),
),
],
),
child: const Icon(
Icons.trending_up_rounded,
color: Colors.white,
size: 22,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
// ==========================================
// 1. HEADER DELLA CARD (TITOLO & GIORNI)
// ==========================================
Padding(
padding: EdgeInsets.fromLTRB(
isCompact ? 14 : 20,
isCompact ? 14 : 18,
isCompact ? 14 : 20,
isCompact ? 10 : 14,
),
const SizedBox(width: 14),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Flexible(
child: Text(
hasStaffTargets
? 'IL TUO RITMO PER OGGI'
: 'RITMO GIORNALIERO NEGOZIO',
style: TextStyle(
fontSize: 11,
fontWeight: FontWeight.w800,
letterSpacing: 0.8,
color: theme.colorScheme.primary,
),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
padding: EdgeInsets.all(isCompact ? 8 : 10),
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [
theme.colorScheme.primary,
theme.colorScheme.primary.withValues(alpha: 0.8),
],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
),
borderRadius: BorderRadius.circular(12),
boxShadow: [
BoxShadow(
color: theme.colorScheme.primary
.withValues(alpha: 0.25),
blurRadius: 8,
offset: const Offset(0, 2),
),
const SizedBox(width: 8),
Container(
padding: const EdgeInsets.symmetric(
horizontal: 8,
vertical: 2,
),
decoration: BoxDecoration(
color: theme.colorScheme.primaryContainer
.withValues(alpha: 0.35),
borderRadius: BorderRadius.circular(6),
),
child: Text(
remainingDays > 1
? 'Mancano $remainingDays gg'
: (remainingDays == 1
? 'Ultimo giorno!'
: 'Mese concluso'),
style: TextStyle(
fontSize: 11,
fontWeight: FontWeight.bold,
color: theme.colorScheme.primary,
],
),
child: Icon(
Icons.trending_up_rounded,
color: Colors.white,
size: isCompact ? 20 : 22,
),
),
SizedBox(width: isCompact ? 10 : 14),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Wrap(
crossAxisAlignment: WrapCrossAlignment.center,
spacing: 8,
runSpacing: 4,
children: [
Text(
isManager ? 'RITMO NEGOZIO PER OGGI' : 'IL TUO RITMO PER OGGI',
style: TextStyle(
fontSize: isCompact ? 10.5 : 11,
fontWeight: FontWeight.w800,
letterSpacing: 0.6,
color: theme.colorScheme.primary,
),
),
Container(
padding: const EdgeInsets.symmetric(
horizontal: 7,
vertical: 2,
),
decoration: BoxDecoration(
color: theme.colorScheme.primaryContainer
.withValues(alpha: 0.35),
borderRadius: BorderRadius.circular(6),
),
child: Text(
remainingDays > 1
? 'Mancano $remainingDays gg'
: (remainingDays == 1
? 'Ultimo giorno!'
: 'Mese concluso'),
style: TextStyle(
fontSize: isCompact ? 10 : 11,
fontWeight: FontWeight.bold,
color: theme.colorScheme.primary,
),
),
),
],
),
const SizedBox(height: 3),
Text(
isManager
? 'Obiettivi di ${currentStore?.name ?? "Negozio"} per oggi'
: (staffMember != null
? 'Cosa portare a casa oggi, $staffName'
: 'Obiettivi personali per oggi'),
style: theme.textTheme.titleMedium?.copyWith(
fontWeight: FontWeight.w900,
fontSize: isCompact ? 15 : 17,
),
),
],
),
const SizedBox(height: 3),
Text(
hasStaffTargets
? 'Cosa portare a casa oggi, $staffName'
: 'Obiettivi di ${target.store?.name ?? "Negozio"} per oggi',
style: theme.textTheme.titleMedium?.copyWith(
fontWeight: FontWeight.w900,
fontSize: 17,
),
const SizedBox(width: 4),
// Tasto rapido dettaglio
if (isCompact)
IconButton(
onPressed: () => context.pushNamed(
Routes.targetDetail,
extra: target,
),
icon: const Icon(Icons.analytics_outlined),
tooltip: 'Dettagli target',
color: theme.colorScheme.primary,
visualDensity: VisualDensity.compact,
)
else
TextButton.icon(
onPressed: () => context.pushNamed(
Routes.targetDetail,
extra: target,
),
icon: const Icon(Icons.analytics_outlined, size: 18),
label: const Text('Dettagli'),
style: TextButton.styleFrom(
visualDensity: VisualDensity.compact,
foregroundColor: theme.colorScheme.primary,
textStyle: const TextStyle(fontWeight: FontWeight.bold),
),
),
],
),
),
// Tasto rapido dettaglio
TextButton.icon(
onPressed: () => context.pushNamed(
Routes.targetDetail,
extra: target,
),
icon: const Icon(Icons.analytics_outlined, size: 18),
label: const Text('Dettagli'),
style: TextButton.styleFrom(
visualDensity: VisualDensity.compact,
foregroundColor: theme.colorScheme.primary,
textStyle: const TextStyle(fontWeight: FontWeight.bold),
),
),
],
),
),
// ==========================================
// 2. FOCUS METRICHE: MEDIE RICHIESTE PER OGGI
// ==========================================
if (displayCategories.isEmpty)
Padding(
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 12),
child: Text(
'Nessun obiettivo attivo configurato per questo mese.',
style: TextStyle(
color: theme.colorScheme.onSurfaceVariant,
fontSize: 13,
],
),
),
)
else
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: LayoutBuilder(
builder: (context, constraints) {
final isWide = constraints.maxWidth > 700;
return GridView.builder(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemCount: displayCategories.length,
gridDelegate: SliverGridDelegateWithMaxCrossAxisExtent(
maxCrossAxisExtent: isWide ? 260 : 200,
mainAxisExtent: 154,
crossAxisSpacing: 10,
mainAxisSpacing: 10,
// ==========================================
// 2. FOCUS METRICHE: MEDIE RICHIESTE PER OGGI
// ==========================================
if (displayCategories.isEmpty)
Padding(
padding:
const EdgeInsets.symmetric(horizontal: 20, vertical: 12),
child: Text(
'Nessun obiettivo attivo configurato per questo mese.',
style: TextStyle(
color: theme.colorScheme.onSurfaceVariant,
fontSize: 13,
),
itemBuilder: (context, index) {
final category = displayCategories[index];
return _buildCategoryDailyPacingCard(theme, category);
},
);
},
),
),
),
)
else ...[
// Banner sintetico per gli elementi in linea
if (inLineCategories.isNotEmpty)
_buildInLineSummaryBanner(
theme,
inLineCategories: inLineCategories,
totalCategoriesCount: displayCategories.length,
hasBehindCategories: behindCategories.isNotEmpty,
isManager: isManager,
),
const SizedBox(height: 14),
// ==========================================
// 3. SEZIONE INFERIORE: RIEPILOGO NEGOZIO
// ==========================================
Container(
decoration: BoxDecoration(
color: theme.colorScheme.surfaceContainerHighest
.withValues(alpha: 0.35),
borderRadius: const BorderRadius.vertical(
bottom: Radius.circular(19),
),
border: Border(
top: BorderSide(
color: theme.dividerColor.withValues(alpha: 0.2),
),
),
),
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 12),
child: Row(
children: [
Icon(
Icons.storefront_outlined,
size: 18,
color: theme.colorScheme.primary,
),
const SizedBox(width: 8),
Text(
'Negozio:',
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w800,
color: theme.colorScheme.primary,
letterSpacing: 0.5,
),
),
const SizedBox(width: 10),
// Badge sintetici del negozio
_buildMiniBadge(
label: '${progress.countAchieved}/${progress.countTotalActive} Presi',
color: const Color(0xFF15803D),
bgColor: const Color(0xFFDCFCE7),
),
const SizedBox(width: 6),
_buildMiniBadge(
label: '${progress.countInLineOnly} In linea',
color: const Color(0xFF0D9488),
bgColor: const Color(0xFFCCFBF1),
),
if (progress.countBehind > 0) ...[
const SizedBox(width: 6),
_buildMiniBadge(
label: '${progress.countBehind} Sotto ritmo',
color: const Color(0xFFDC2626),
bgColor: const Color(0xFFFEE2E2),
),
],
const Spacer(),
InkWell(
onTap: () => context.pushNamed(
Routes.targetDetail,
extra: target,
),
borderRadius: BorderRadius.circular(6),
child: Padding(
if (categoriesToDisplay.isNotEmpty)
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: GridView.builder(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemCount: categoriesToDisplay.length,
gridDelegate: SliverGridDelegateWithMaxCrossAxisExtent(
maxCrossAxisExtent:
constraints.maxWidth > 700 ? 260 : 200,
mainAxisExtent: 168,
crossAxisSpacing: 10,
mainAxisSpacing: 10,
),
itemBuilder: (context, index) {
final category = categoriesToDisplay[index];
final storeCategory =
progress.categories[category.key];
return _buildCategoryDailyPacingCard(
theme,
category,
storeCategory: storeCategory,
isManager: isManager,
);
},
),
)
else if (behindCategories.isEmpty)
Padding(
padding: const EdgeInsets.symmetric(
horizontal: 8,
vertical: 4,
horizontal: 20,
vertical: 8,
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Text(
'Apri analisi completa',
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.bold,
color: theme.colorScheme.primary,
),
child: Center(
child: Text(
'Tutti gli obiettivi sono in linea col ritmo! 🎉',
style: TextStyle(
fontSize: 12.5,
fontWeight: FontWeight.w600,
color: theme.colorScheme.onSurfaceVariant,
fontStyle: FontStyle.italic,
),
const SizedBox(width: 4),
),
),
),
],
const SizedBox(height: 14),
// ==========================================
// 3. SEZIONE INFERIORE: RIEPILOGO NEGOZIO
// ==========================================
Container(
decoration: BoxDecoration(
color: theme.colorScheme.surfaceContainerHighest
.withValues(alpha: 0.35),
borderRadius: const BorderRadius.vertical(
bottom: Radius.circular(19),
),
border: Border(
top: BorderSide(
color: theme.dividerColor.withValues(alpha: 0.2),
),
),
),
padding: EdgeInsets.symmetric(
horizontal: isCompact ? 14 : 20,
vertical: 10,
),
child: Wrap(
alignment: WrapAlignment.spaceBetween,
crossAxisAlignment: WrapCrossAlignment.center,
spacing: 10,
runSpacing: 8,
children: [
Wrap(
crossAxisAlignment: WrapCrossAlignment.center,
spacing: 6,
runSpacing: 4,
children: [
Icon(
Icons.arrow_forward_rounded,
size: 14,
Icons.storefront_outlined,
size: 17,
color: theme.colorScheme.primary,
),
Text(
'Negozio:',
style: TextStyle(
fontSize: 11.5,
fontWeight: FontWeight.w800,
color: theme.colorScheme.primary,
letterSpacing: 0.5,
),
),
const SizedBox(width: 2),
// Badge sintetici del negozio
_buildMiniBadge(
label:
'${progress.countAchieved}/${progress.countTotalActive} Presi',
color: const Color(0xFF15803D),
bgColor: const Color(0xFFDCFCE7),
),
_buildMiniBadge(
label: '${progress.countInLineOnly} In linea',
color: const Color(0xFF0D9488),
bgColor: const Color(0xFFCCFBF1),
),
if (progress.countBehind > 0)
_buildMiniBadge(
label: '${progress.countBehind} Sotto ritmo',
color: const Color(0xFFDC2626),
bgColor: const Color(0xFFFEE2E2),
),
],
),
),
InkWell(
onTap: () => context.pushNamed(
Routes.targetDetail,
extra: target,
),
borderRadius: BorderRadius.circular(6),
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 4,
vertical: 2,
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Text(
'Apri analisi completa',
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.bold,
color: theme.colorScheme.primary,
),
),
const SizedBox(width: 4),
Icon(
Icons.arrow_forward_rounded,
size: 14,
color: theme.colorScheme.primary,
),
],
),
),
),
],
),
],
),
),
],
),
],
),
);
},
);
}
Widget _buildCategoryDailyPacingCard(
ThemeData theme,
CategoryProgress category,
) {
CategoryProgress category, {
CategoryProgress? storeCategory,
bool isManager = false,
}) {
final pacingTheme = PacingTheme.of(category.status);
final isAchieved = category.isAchieved;
final hasS2 = category.targetS2 > 0;
@@ -532,7 +632,9 @@ class DashboardTargetHeroCard extends StatelessWidget {
)
else
Text(
'Soglia minima centrata!',
isManager
? 'Obiettivo negozio centrato!'
: 'Obiettivo personale centrato!',
style: TextStyle(
fontSize: 10,
fontWeight: FontWeight.w600,
@@ -581,7 +683,7 @@ class DashboardTargetHeroCard extends StatelessWidget {
)
else
Text(
'per Minimo (${category.targetS1})',
'Target: ${category.targetS1} pz',
style: TextStyle(
fontSize: 10,
fontWeight: FontWeight.w600,
@@ -593,12 +695,14 @@ class DashboardTargetHeroCard extends StatelessWidget {
const Spacer(),
// Footer: Avanzamento e ritmo attuale
// Footer: Avanzamento e ritmo
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'Fatti: ${category.actualPieces} / ${category.targetS1}',
isManager
? 'Negozio: ${category.actualPieces} / ${category.targetS1}'
: 'I tuoi: ${category.actualPieces} / ${category.targetS1}',
style: TextStyle(
fontSize: 10,
fontWeight: FontWeight.bold,
@@ -627,6 +731,141 @@ class DashboardTargetHeroCard extends StatelessWidget {
color: pacingTheme.primary,
),
),
if (!isManager && storeCategory != null && storeCategory.targetS1 > 0) ...[
const SizedBox(height: 4),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'Negozio: ${storeCategory.actualPieces}/${storeCategory.targetS1}',
style: TextStyle(
fontSize: 9.5,
color: theme.colorScheme.onSurfaceVariant.withValues(alpha: 0.75),
fontWeight: FontWeight.w600,
),
),
Text(
'ritmo: ${storeCategory.actualDailyRate.toStringAsFixed(1)}/gg',
style: TextStyle(
fontSize: 9.5,
color: theme.colorScheme.onSurfaceVariant.withValues(alpha: 0.75),
fontWeight: FontWeight.w600,
),
),
],
),
],
],
),
);
}
Widget _buildInLineSummaryBanner(
ThemeData theme, {
required List<CategoryProgress> inLineCategories,
required int totalCategoriesCount,
required bool hasBehindCategories,
bool isManager = false,
}) {
final isDark = theme.brightness == Brightness.dark;
final bannerBg = isDark
? const Color(0xFF064E3B).withValues(alpha: 0.35)
: const Color(0xFFF0FDF4);
final bannerBorder = isDark
? const Color(0xFF047857).withValues(alpha: 0.5)
: const Color(0xFFBBF7D0);
final bannerIconColor =
isDark ? const Color(0xFF34D399) : const Color(0xFF16A34A);
final bannerTextColor =
isDark ? const Color(0xFF6EE7B7) : const Color(0xFF15803D);
final bannerSubtextColor =
isDark ? const Color(0xFFA7F3D0) : const Color(0xFF166534);
final subjectText = isManager ? 'Il negozio è in linea' : 'Sei in linea';
final titleText = !hasBehindCategories
? '$subjectText con tutti i ${inLineCategories.length} obiettivi! 🎉'
: '$subjectText con ${inLineCategories.length} ${inLineCategories.length == 1 ? 'obiettivo' : 'obiettivi'} su $totalCategoriesCount';
final categoryNames = inLineCategories.map((c) => c.label).join(' • ');
return Container(
margin: const EdgeInsets.fromLTRB(16, 0, 16, 12),
padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 10),
decoration: BoxDecoration(
color: bannerBg,
borderRadius: BorderRadius.circular(12),
border: Border.all(color: bannerBorder, width: 1),
),
child: Row(
children: [
Icon(
Icons.check_circle_rounded,
color: bannerIconColor,
size: 20,
),
const SizedBox(width: 10),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Text(
titleText,
style: TextStyle(
fontSize: 12.5,
fontWeight: FontWeight.w800,
color: bannerTextColor,
),
),
const SizedBox(height: 2),
Text(
categoryNames,
style: TextStyle(
fontSize: 11,
fontWeight: FontWeight.w500,
color: bannerSubtextColor,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
],
),
),
const SizedBox(width: 8),
InkWell(
onTap: () {
setState(() {
_showAllCategories = !_showAllCategories;
});
},
borderRadius: BorderRadius.circular(8),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Text(
_showAllCategories
? 'Nascondi'
: 'Mostra tutti (${inLineCategories.length})',
style: TextStyle(
fontSize: 11.5,
fontWeight: FontWeight.bold,
color: bannerTextColor,
),
),
Icon(
_showAllCategories
? Icons.keyboard_arrow_up
: Icons.keyboard_arrow_down,
size: 16,
color: bannerTextColor,
),
],
),
),
),
],
),
);
@@ -29,12 +29,15 @@ class DashboardTaskListCubit extends Cubit<DashboardTaskListState> {
// Inizio ascolto campanello
try {
_tasksSubscription = _repository.watchCompanyTasks(companyId!).listen((
_,
) {
// Quando il campanello suona (qualcosa è cambiato a DB), ricarichiamo!
_loadTasksSilently();
});
_tasksSubscription = _repository.watchCompanyTasks(companyId!).listen(
(_) {
// Quando il campanello suona (qualcosa è cambiato a DB), ricarichiamo!
_loadTasksSilently();
},
onError: (error, stackTrace) {
debugPrint('Dashboard tasks stream error: $error');
},
);
} on Exception catch (e) {
debugPrint(e.toString());
}
+39 -92
View File
@@ -6,6 +6,10 @@ import 'package:flux/core/routes/routes.dart';
import 'package:flux/core/theme/theme.dart';
import 'package:flux/core/utils/extensions.dart';
import 'package:flux/core/widgets/staff_selector_modal.dart';
import 'package:flux/features/home/dashboard_daily_ricontatti/blocs/dashboard_daily_ricontatti_cubit.dart';
import 'package:flux/features/home/dashboard_daily_ricontatti/ui/dashboard_daily_ricontatti_card.dart';
import 'package:flux/features/home/dashboard_expiring_contracts/bloc/dashboard_expiring_contracts_cubit.dart';
import 'package:flux/features/home/dashboard_expiring_contracts/ui/dashboard_expiring_contracts_card.dart';
import 'package:flux/features/home/dashboard_note_list/blocs/dashboard_note_list_cubit.dart';
import 'package:flux/features/home/dashboard_store_operation_list/bloc/dashboard_store_operation_list_cubit.dart';
import 'package:flux/features/home/dashboard_store_ticket_list/blocs/dashboard_store_ticket_list_cubit.dart';
@@ -76,14 +80,28 @@ class _HomeScreenState extends State<HomeScreen> {
context.read<DashboardStoreTicketListCubit>().stopListening();
context.read<DashboardNoteListCubit>().stopListening();
context.read<DashboardTargetProgressCubit>().stopListening();
context.read<DashboardExpiringContractsCubit>().stopListening();
context.read<DashboardDailyRicontattiCubit>().stopListening();
}
void _startListeners() {
final sessionState = context.read<SessionCubit>().state;
context.read<DashboardTargetProgressCubit>().updateContext(
newCompanyId: sessionState.company?.id,
newStoreId: sessionState.currentStore?.id,
newStaffId: sessionState.currentStaffMember?.id,
);
context.read<DashboardDailyRicontattiCubit>().updateContext(
newCompanyId: sessionState.company?.id,
newStoreId: sessionState.currentStore?.id,
);
context.read<DashboardStoreOperationListCubit>().startListening();
context.read<DashboardTaskListCubit>().startListening();
context.read<DashboardStoreTicketListCubit>().startListening();
context.read<DashboardNoteListCubit>().startListening();
context.read<DashboardTargetProgressCubit>().startListening();
context.read<DashboardExpiringContractsCubit>().startListening();
context.read<DashboardDailyRicontattiCubit>().startListening();
}
@override
@@ -127,10 +145,27 @@ class _HomeScreenState extends State<HomeScreen> {
newStoreId: sessionState.currentStore?.id,
newStaffId: sessionState.currentStaffMember?.id,
);
context.read<DashboardDailyRicontattiCubit>().updateContext(
newCompanyId: sessionState.company?.id,
newStoreId: sessionState.currentStore?.id,
);
},
child: CustomScrollView(
slivers: [
// --- HERO TARGET DEL GIORNO (TUTTA LARGHEZZA IN CIMA) ---
// --- 1. QUICK ACTIONS: AZIONI RAPIDE (IN CIMA) ---
SliverToBoxAdapter(
child: Padding(
padding: const EdgeInsets.fromLTRB(24.0, 0, 24.0, 24.0),
child: _buildQuickActions(context),
),
),
// --- 2. HERO FOCUS RICONTATTI DEL GIORNO (VISIBILE AI MANAGER) ---
const SliverToBoxAdapter(
child: DashboardDailyRicontattiCard(),
),
// --- 3. HERO TARGET DEL GIORNO ---
const SliverToBoxAdapter(
child: Padding(
padding: EdgeInsets.fromLTRB(24.0, 0, 24.0, 24.0),
@@ -138,17 +173,9 @@ class _HomeScreenState extends State<HomeScreen> {
),
),
// --- QUICK ACTIONS: AZIONI RAPIDE ---
SliverToBoxAdapter(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 24.0),
child: _buildQuickActions(context),
),
),
const SliverToBoxAdapter(child: SizedBox(height: 8)),
const SliverToBoxAdapter(child: SizedBox(height: 32)),
// --- I WIDGET DELLA DASHBOARD (Responsive Grid) ---
// --- 4. I WIDGET DELLA DASHBOARD (Responsive Grid) ---
SliverPadding(
padding: const EdgeInsets.symmetric(horizontal: 24.0),
sliver: SliverGrid(
@@ -162,12 +189,7 @@ class _HomeScreenState extends State<HomeScreen> {
delegate: SliverChildListDelegate([
DashboardStoreOperationListCard(),
DashboardStoreTicketListCard(),
_buildDashboardWidget(
title: context.l10n.homeExpiringContracts,
icon: Icons.assignment_late_outlined,
color: Colors.orange,
context: context,
),
DashboardExpiringContractsCard(),
DashboardNoteListCard(),
DashboardTaskListCard(),
]),
@@ -333,82 +355,7 @@ class _HomeScreenState extends State<HomeScreen> {
);
}
Widget _buildDashboardWidget({
required BuildContext context,
required String title,
required IconData icon,
required Color color,
VoidCallback? onTap,
}) {
final theme = Theme.of(context);
return Card(
elevation: 0,
clipBehavior: Clip.antiAlias,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16),
side: BorderSide(color: theme.dividerColor.withValues(alpha: 0.5)),
),
child: InkWell(
onTap: onTap,
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Container(
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
color: color.withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(8),
),
child: Icon(icon, color: color, size: 20),
),
const SizedBox(width: 12),
Expanded(
child: Text(
title,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16,
color: context.primaryText,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
),
IconButton(
icon: Icon(
Icons.more_vert,
size: 20,
color: context.secondaryText,
),
onPressed: () {},
padding: EdgeInsets.zero,
constraints: const BoxConstraints(),
),
],
),
const Spacer(),
Center(
child: Text(
context.l10n.commonComingSoon,
style: TextStyle(
color: context.secondaryText.withValues(alpha: 0.7),
fontStyle: FontStyle.italic,
fontSize: 13,
),
),
),
const Spacer(),
],
),
),
),
);
}
void _showStoreSelector(BuildContext context, ThemeData theme) {
showModalBottomSheet(
@@ -24,21 +24,23 @@ class StaffRepository {
${Tables.stores}(*)
)
''')
.eq('company_id', companyId);
.eq('company_id', companyId)
.order('name', ascending: true);
if (storeId != null) {
filterBuilder = filterBuilder.or(
'store_id.eq.$storeId,store_id.is.null',
);
}
final response = await filterBuilder;
var transformBuilder = filterBuilder.order('name', ascending: true);
final response = await transformBuilder;
return (response as List)
final list = (response as List)
.map((s) => StaffMemberModel.fromMap(s))
.toList();
if (storeId != null) {
return list
.where((s) =>
s.assignedStoreIds.isEmpty || s.assignedStoreIds.contains(storeId))
.toList();
}
return list;
} on Exception catch (e) {
debugPrint('Errore nel recupero della lista di staff: $e');
throw Exception('Errore nel recupero della lista di staff: $e');
@@ -77,6 +77,35 @@ class StaffMemberModel extends Equatable {
);
}
/// Indica se il collaboratore ha la qualifica di Manager o Titolare (tramite jobTitle)
bool get isManagerOrTitolare {
final title = (jobTitle ?? '').trim().toLowerCase();
return title.contains('manager') || title.contains('titolare');
}
/// Discriminante per vedere o meno il Focus Ricontatti: Manager e Titolare (o Admin di sistema)
bool get canViewRicontattiFocus {
if (isManagerOrTitolare) return true;
if (systemRole == SystemRole.admin) return true;
return false;
}
/// Discriminante per non comparire tra gli utenti "controllati" (addetti):
/// Manager, Titolari, Tester o collaboratori disattivati
bool get isExcludedFromControlledStaff {
if (!isActive) return true;
final title = (jobTitle ?? '').trim().toLowerCase();
if (title.contains('manager') ||
title.contains('titolare') ||
title.contains('tester')) {
return true;
}
return false;
}
/// Alias retrocompatibile
bool get isExcludedFromRicontattiFocus => isExcludedFromControlledStaff;
factory StaffMemberModel.empty() {
return const StaffMemberModel(
companyId: '',
@@ -142,24 +142,64 @@ class _StaffScreenState extends State<StaffScreen> {
myRole == SystemRole.admin || myRole == SystemRole.manager;
final hasEmail = member.email != null && member.email!.trim().isNotEmpty;
final bool isActive = member.isActive;
return Card(
elevation: 0,
color: isActive ? null : context.surface.withValues(alpha: 0.6),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16),
side: BorderSide(color: context.accent.withValues(alpha: 0.1)),
side: BorderSide(
color: isActive
? context.accent.withValues(alpha: 0.1)
: Colors.red.withValues(alpha: 0.2),
),
),
child: ListTile(
contentPadding: const EdgeInsets.all(12),
leading: CircleAvatar(
backgroundColor: context.accent.withValues(alpha: 0.1),
backgroundColor: isActive
? context.accent.withValues(alpha: 0.1)
: Colors.grey.withValues(alpha: 0.2),
child: Text(
member.name[0].toUpperCase(),
style: TextStyle(color: context.accent),
style: TextStyle(
color: isActive ? context.accent : Colors.grey,
),
),
),
title: Text(
member.name,
style: const TextStyle(fontWeight: FontWeight.bold),
title: Row(
children: [
Flexible(
child: Text(
member.name,
style: TextStyle(
fontWeight: FontWeight.bold,
color: isActive ? null : context.secondaryText,
),
overflow: TextOverflow.ellipsis,
),
),
if (!isActive) ...[
const SizedBox(width: 8),
Container(
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 2),
decoration: BoxDecoration(
color: Colors.red.withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(4),
border: Border.all(color: Colors.red.withValues(alpha: 0.3)),
),
child: const Text(
'DISATTIVATO',
style: TextStyle(
fontSize: 10,
fontWeight: FontWeight.bold,
color: Colors.red,
),
),
),
],
],
),
subtitle: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -177,19 +217,18 @@ class _StaffScreenState extends State<StaffScreen> {
Text(
'Qualifica: ${member.jobTitle!}',
style: TextStyle(
color: context.accent,
color: isActive ? context.accent : Colors.grey,
fontWeight: FontWeight.w500,
),
),
],
],
),
// MODIFICA UX: Menu a tendina per le azioni (Salva spazio e previene overflow)
trailing: canManageStaff && hasEmail
trailing: canManageStaff
? PopupMenuButton<String>(
icon: const Icon(Icons.more_vert),
onSelected: (value) {
if (value == 'invite_reset') {
onSelected: (value) async {
if (value == 'invite_reset' && hasEmail) {
if (!member.hasJoined) {
context.read<StaffCubit>().inviteStaffMember(
member: member,
@@ -207,22 +246,97 @@ class _StaffScreenState extends State<StaffScreen> {
} else {
context.read<StaffCubit>().resetPassword(member.email!);
}
} else if (value == 'toggle_active') {
final newActiveState = !member.isActive;
final confirm = await showDialog<bool>(
context: context,
builder: (ctx) => AlertDialog(
title: Text(
newActiveState
? "Riattivare ${member.name}?"
: "Disattivare ${member.name}?",
),
content: Text(
newActiveState
? "L'addetto tornerà attivo e selezionabile per nuove operazioni, ticket e gare."
: "L'addetto non comparirà più nella selezione per nuove operazioni o ticket e non comparirà nelle gare e nelle loro ripartizioni. I dati storici rimarranno intatti.",
),
actions: [
TextButton(
onPressed: () => Navigator.pop(ctx, false),
child: const Text("Annulla"),
),
FilledButton(
style: FilledButton.styleFrom(
backgroundColor:
newActiveState ? Colors.green : Colors.red,
),
onPressed: () => Navigator.pop(ctx, true),
child: Text(
newActiveState ? "Riattiva" : "Disattiva",
),
),
],
),
);
if (confirm != true || !mounted) return;
context.read<StaffCubit>().saveStaffMember(
member.copyWith(isActive: newActiveState),
);
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
newActiveState
? "${member.name} riattivato con successo!"
: "${member.name} disattivato con successo.",
),
backgroundColor:
newActiveState ? Colors.green : Colors.orange.shade800,
),
);
}
},
itemBuilder: (context) => [
if (hasEmail)
PopupMenuItem(
value: 'invite_reset',
child: Row(
children: [
Icon(
!member.hasJoined ? Icons.send : Icons.lock_reset,
size: 20,
),
const SizedBox(width: 12),
Text(
!member.hasJoined
? "Re-invia Invito"
: "Reset Password",
),
],
),
),
PopupMenuItem(
value: 'invite_reset',
value: 'toggle_active',
child: Row(
children: [
Icon(
!member.hasJoined ? Icons.send : Icons.lock_reset,
member.isActive
? Icons.person_off_outlined
: Icons.person_add_alt_outlined,
size: 20,
color: member.isActive ? Colors.redAccent : Colors.green,
),
const SizedBox(width: 12),
Text(
!member.hasJoined
? "Re-invia Invito"
: "Reset Password",
member.isActive
? "Disattiva Addetto"
: "Riattiva Addetto",
style: TextStyle(
color:
member.isActive ? Colors.redAccent : Colors.green,
),
),
],
),
@@ -241,6 +355,7 @@ class _StaffScreenState extends State<StaffScreen> {
final emailController = TextEditingController(text: member?.email);
final phoneController = TextEditingController(text: member?.phoneNumber);
final jobTitleController = TextEditingController(text: member?.jobTitle);
bool isActive = member?.isActive ?? true;
SystemRole selectedRole = member?.systemRole ?? SystemRole.user;
List<String> tempSelectedStores =
@@ -345,7 +460,31 @@ class _StaffScreenState extends State<StaffScreen> {
),
],
),
const SizedBox(height: 24),
const SizedBox(height: 16),
// SWITCH ATTIVO / DISATTIVATO
SwitchListTile(
contentPadding: EdgeInsets.zero,
value: isActive,
title: const Text(
"Collaboratore Attivo",
style: TextStyle(fontWeight: FontWeight.w600),
),
subtitle: Text(
isActive
? "Visibile per nuove operazioni, ticket e gare"
: "Disattivato (invisibile per nuove operazioni, ticket e gare)",
style: TextStyle(
fontSize: 12,
color: context.secondaryText,
),
),
activeThumbColor: context.accent,
onChanged: (val) {
setModalState(() => isActive = val);
},
),
const SizedBox(height: 16),
const Text(
"Assegna ai Negozi",
@@ -412,6 +551,7 @@ class _StaffScreenState extends State<StaffScreen> {
phoneNumber: phoneController.text.trim(),
jobTitle: jobTitleController.text.trim(),
systemRole: selectedRole,
isActive: isActive,
companyId: GetIt.I
.get<SessionCubit>()
.state
+9 -4
View File
@@ -37,10 +37,15 @@ class NotesCubit extends Cubit<NotesState> {
try {
_subscription = _repository
.notesStream(companyId: companyId!, currentStaffId: staffId!)
.listen((_) {
// Quando il campanello suona (qualcosa è cambiato a DB), ricarichiamo!
_loadNotesSilently();
});
.listen(
(_) {
// Quando il campanello suona (qualcosa è cambiato a DB), ricarichiamo!
_loadNotesSilently();
},
onError: (error, stackTrace) {
debugPrint('Notes stream error: $error');
},
);
} on Exception catch (e) {
debugPrint(e.toString());
}
@@ -4,6 +4,7 @@ import 'package:flux/core/enums_and_consts/consts.dart';
import 'package:flux/features/master_data/store/models/store_model.dart';
import 'package:flux/features/operations/models/operation_detail_model.dart';
import 'package:flux/features/operations/models/operation_model.dart';
import 'package:flux/features/operations/models/operation_type.dart';
import 'package:flux/features/operations/models/paginated_operations.dart';
import 'package:flux/service_locator.dart';
import 'package:supabase_flutter/supabase_flutter.dart';
@@ -251,4 +252,121 @@ class OperationsRepository {
throw Exception('Errore nel salvataggio dell\'operazione: $e');
}
}
Future<List<OperationModel>> fetchExpiringOperations({
required String companyId,
String? storeId,
int limit = 20,
}) async {
try {
var query = _supabase
.from(Tables.operations)
.select('''
*,
${Tables.customers}(*),
${Tables.stores}(*),
${Tables.staffMembers}(*),
${Tables.attachments}(*),
${Tables.operationDetails}!inner(
*,
${Tables.providers}(*),
${Tables.models}(*)
)
''')
.eq('company_id', companyId)
.not('${Tables.operationDetails}.expiration_date', 'is', null);
if (storeId != null && storeId.isNotEmpty) {
query = query.or('store_id.eq.$storeId,store_id.is.null');
}
final response = await query
.order('created_at', ascending: false)
.limit(limit);
final List<OperationModel> operations = (response as List)
.map((map) => OperationModel.fromMap(map as Map<String, dynamic>))
.toList();
operations.sort((a, b) {
final aExp = getEarliestExpiration(a);
final bExp = getEarliestExpiration(b);
if (aExp == null && bExp == null) return 0;
if (aExp == null) return 1;
if (bExp == null) return -1;
return aExp.compareTo(bExp);
});
return operations;
} catch (e) {
debugPrint('Errore nel recupero contratti/operazioni in scadenza: $e');
return [];
}
}
static DateTime? getEarliestExpiration(OperationModel op) {
DateTime? earliest;
for (final d in op.details) {
if (d.expirationDate != null) {
if (earliest == null || d.expirationDate!.isBefore(earliest)) {
earliest = d.expirationDate;
}
}
}
return earliest;
}
/// Recupera il conteggio dei ricontatti registrati nel mese per ciascun addetto del negozio
Future<Map<String, int>> getMonthlyRicontattiCountsByStaff({
required String companyId,
required String storeId,
required DateTime month,
}) async {
try {
final monthStart = DateTime(month.year, month.month, 1, 0, 0, 0);
final monthEnd = DateTime(month.year, month.month + 1, 0, 23, 59, 59, 999);
final response = await _supabase
.from(Tables.operations)
.select('''
id,
staff_id,
${Tables.operationDetails}(
type
)
''')
.eq('company_id', companyId)
.eq('store_id', storeId)
.neq('status', 'failure')
.gte('created_at', monthStart.toIso8601String())
.lte('created_at', monthEnd.toIso8601String());
final operations = response as List<dynamic>;
final Map<String, int> staffCounts = {};
for (final op in operations) {
final staffId = op['staff_id'] as String?;
if (staffId == null || staffId.isEmpty) continue;
final details = op[Tables.operationDetails] as List<dynamic>? ?? [];
int ricontattiInOp = 0;
for (final detail in details) {
final typeVal = detail['type']?.toString();
if (typeVal != null &&
OperationType.fromValue(typeVal) == OperationType.ricontatto) {
ricontattiInOp++;
}
}
if (ricontattiInOp > 0) {
staffCounts[staffId] = (staffCounts[staffId] ?? 0) + ricontattiInOp;
}
}
return staffCounts;
} catch (e) {
debugPrint('Errore nel recupero conteggi ricontatti del mese: $e');
return {};
}
}
}
@@ -0,0 +1,236 @@
class FinancingTranslations {
static const List<FinancingLanguage> supportedLanguages = [
FinancingLanguage(code: 'it', name: 'Italiano', flag: '🇮🇹', isRtl: false),
FinancingLanguage(code: 'en', name: 'English', flag: '🇬🇧', isRtl: false),
FinancingLanguage(code: 'fr', name: 'Français', flag: '🇫🇷', isRtl: false),
FinancingLanguage(code: 'es', name: 'Español', flag: '🇪🇸', isRtl: false),
FinancingLanguage(code: 'ar', name: 'العربية', flag: '🇸🇦', isRtl: true),
FinancingLanguage(code: 'uk', name: 'Українська', flag: '🇺🇦', isRtl: false),
FinancingLanguage(code: 'ru', name: 'Русский', flag: '🇷🇺', isRtl: false),
FinancingLanguage(code: 'mk', name: 'Македонски', flag: '🇲🇰', isRtl: false),
FinancingLanguage(code: 'sq', name: 'Shqip', flag: '🇦🇱', isRtl: false),
];
static const List<String> canonicalMaritalStatuses = [
'Celibe / Nubile',
'Coniugato/a',
'Separato/a',
'Divorziato/a',
'Vedovo/a',
];
static const List<String> canonicalIncomeRanges = [
'Fino a 2.000 €',
'Da 2.000 € a 5.000 €',
'Oltre 5.000 €',
];
static FinancingStrings getStrings(String langCode) {
switch (langCode) {
case 'en':
return const FinancingStrings(
title: 'Financing Details',
subtitle: 'Please fill in the information below required for your financing application.',
maritalStatusLabel: 'Marital Status',
maritalOptions: ['Single', 'Married', 'Separated', 'Divorced', 'Widowed'],
occupationLabel: 'Occupation',
occupationHint: 'e.g. Employee, Factory Worker, Self-employed...',
incomeLabel: 'Net Monthly Income',
incomeOptions: ['Up to €2,000', 'From €2,000 to €5,000', 'Over €5,000'],
submitButton: 'Submit Information',
errorRequired: 'Please complete all fields before submitting.',
successTitle: 'Information Submitted!',
successSubtitle: 'Thank you! Your information has been safely received by our store. You can close this page.',
);
case 'fr':
return const FinancingStrings(
title: 'Informations de Financement',
subtitle: 'Veuillez renseigner les informations requises pour votre demande de financement.',
maritalStatusLabel: 'État Civil',
maritalOptions: ['Célibataire', 'Marié(e)', 'Séparé(e)', 'Divorcé(e)', 'Veuf / Veuve'],
occupationLabel: 'Profession',
occupationHint: 'Ex. Employé, Ouvrier, Artisan, Indépendant...',
incomeLabel: 'Revenu Mensuel Net',
incomeOptions: ['Jusqu\'à 2 000 €', 'De 2 000 € à 5 000 €', 'Plus de 5 000 €'],
submitButton: 'Envoyer les données',
errorRequired: 'Veuillez remplir tous les champs avant de soumettre.',
successTitle: 'Données transmises avec succès !',
successSubtitle: 'Merci ! Les informations ont été reçues par notre conseiller. Vous pouvez fermer cette page.',
);
case 'es':
return const FinancingStrings(
title: 'Datos para Financiación',
subtitle: 'Completa los siguientes datos necesarios para la solicitud de financiación.',
maritalStatusLabel: 'Estado Civil',
maritalOptions: ['Soltero/a', 'Casado/a', 'Separado/a', 'Divorciado/a', 'Viudo/a'],
occupationLabel: 'Profesión',
occupationHint: 'Ej. Empleado, Obrero, Autónomo, Comerciante...',
incomeLabel: 'Ingreso Mensual Neto',
incomeOptions: ['Hasta 2.000 €', 'De 2.000 € a 5.000 €', 'Más de 5.000 €'],
submitButton: 'Enviar Datos',
errorRequired: 'Por favor, completa todos los campos antes de enviar.',
successTitle: '¡Datos enviados con éxito!',
successSubtitle: '¡Gracias! Nuestro asesor ha recibido tus datos. Ya puedes cerrar esta pantalla.',
);
case 'ar':
return const FinancingStrings(
title: 'بيانات التمويل',
subtitle: 'يرجى تعبئة البيانات التالية المطلوبة لإتمام معاملة التمويل.',
maritalStatusLabel: 'الحالة الاجتماعية',
maritalOptions: ['أعزب / عزباء', 'متزوج / متزوجة', 'منفصل / منفصلة', 'مطلق / مطلقة', 'أرمل / أرملة'],
occupationLabel: 'المهنة',
occupationHint: 'مثال: موظف، عامل، تاجر، عمل حر...',
incomeLabel: 'الدخل الشهري الصافي',
incomeOptions: ['حتى 2,000 يورو', 'من 2,000 إلى 5,000 يورو', 'أكثر من 5,000 يورو'],
submitButton: 'إرسال البيانات',
errorRequired: 'يرجى ملء جميع الحقول قبل الإرسال.',
successTitle: 'تم إرسال البيانات بنجاح!',
successSubtitle: 'شكراً لك! لقد استلم موظفنا البيانات بنجاح. يمكنك إغلاق هذه الصفحة الآن.',
);
case 'uk':
return const FinancingStrings(
title: 'Дані для фінансування',
subtitle: 'Будь ласка, заповніть наступні дані, необхідні для оформлення фінансування.',
maritalStatusLabel: 'Сімейний стан',
maritalOptions: ['Неодружений / Незаміжня', 'Одружений / Заміжня', 'Розлучений / Розлучена', 'Проживає окремо', 'Вдівець / Вдова'],
occupationLabel: 'Професія / Посада',
occupationHint: 'Наприклад: Службовець, Робітник, ФОП...',
incomeLabel: 'Чистий щомісячний дохід',
incomeOptions: ['До 2 000 €', 'Від 2 000 € до 5 000 €', 'Понад 5 000 €'],
submitButton: 'Надіслати дані',
errorRequired: 'Будь ласка, заповніть усі поля перед відправленням.',
successTitle: 'Дані успішно надіслано!',
successSubtitle: 'Дякуємо! Наш фахівець отримав ваші дані. Ви можете закрити цю сторінку.',
);
case 'ru':
return const FinancingStrings(
title: 'Данные для финансирования',
subtitle: 'Пожалуйста, заполните следующие данные, необходимые для оформления финансирования.',
maritalStatusLabel: 'Семейное положение',
maritalOptions: ['Холост / Не замужем', 'Женат / Замужем', 'Проживает раздельно', 'Разведен / Разведена', 'Вдовец / Вдова'],
occupationLabel: 'Профессия / Должность',
occupationHint: 'Например: Служащий, Рабочий, Предприниматель...',
incomeLabel: 'Чистый ежемесячный доход',
incomeOptions: ['До 2 000 €', 'От 2 000 € до 5 000 €', 'Более 5 000 €'],
submitButton: 'Отправить данные',
errorRequired: 'Пожалуйста, заполните все поля перед отправкой.',
successTitle: 'Данные успешно отправлены!',
successSubtitle: 'Спасибо! Наш сотрудник получил ваши данные. Вы можете закрыть эту страницу.',
);
case 'mk':
return const FinancingStrings(
title: 'Податоци за финансирање',
subtitle: 'Ве молиме пополнете ги следните податоци потребни за апликацијата за финансирање.',
maritalStatusLabel: 'Брачна состојба',
maritalOptions: ['Неженет / Немажена', 'Оженет / Мажена', 'Разделен / Разделена', 'Разведен / Разведена', 'Вдовец / Вдовица'],
occupationLabel: 'Професија',
occupationHint: 'Пр. Вработен, Работник, Трговец...',
incomeLabel: 'Нето месечен приход',
incomeOptions: ['До 2.000 €', 'Од 2.000 € до 5.000 €', 'Над 5.000 €'],
submitButton: 'Испрати податоци',
errorRequired: 'Ве молиме пополнете ги сите полиња пред испраќање.',
successTitle: 'Податоците се успешно испратени!',
successSubtitle: 'Ви благодариме! Нашиот оператор ги прими вашите податоци. Можете да го затворите овој прозорец.',
);
case 'sq':
return const FinancingStrings(
title: 'Të dhënat për Financim',
subtitle: 'Ju lutemi plotësoni të dhënat e mëposhtme të nevojshme për kërkesën për financim.',
maritalStatusLabel: 'Gjendja Civile',
maritalOptions: ['Beqar / Beqare', 'I/E martuar', 'I/E ndarë', 'I/E divorcuar', 'I/E ve'],
occupationLabel: 'Profesioni',
occupationHint: 'P.sh. Punonjës, Punëtor, Tregtar, Vetëpunësuar...',
incomeLabel: 'Të Ardhurat Mujore Neto',
incomeOptions: ['Deri në 2.000 €', 'Nga 2.000 € në 5.000 €', 'Mbi 5.000 €'],
submitButton: 'Dërgo të Dhënat',
errorRequired: 'Ju lutemi plotësoni të gjitha fushat para dërgimit.',
successTitle: 'Të dhënat u dërguan me sukses!',
successSubtitle: 'Faleminderit! Operatori ynë i pranoi të dhënat tuaja. Mund ta mbyllni këtë faqe.',
);
case 'it':
default:
return const FinancingStrings(
title: 'Dati per Finanziamento',
subtitle: 'Compila i seguenti dati necessari per la pratica di finanziamento.',
maritalStatusLabel: 'Stato Civile',
maritalOptions: ['Celibe / Nubile', 'Coniugato/a', 'Separato/a', 'Divorziato/a', 'Vedovo/a'],
occupationLabel: 'Professione',
occupationHint: 'Es. Impiegato, Operaio, Commerciante, Autonomo...',
incomeLabel: 'Reddito Mensile Netto',
incomeOptions: ['Fino a 2.000 €', 'Da 2.000 € a 5.000 €', 'Oltre 5.000 €'],
submitButton: 'Invia Dati',
errorRequired: 'Per favore compila tutti i campi prima di inviare.',
successTitle: 'Dati inviati con successo!',
successSubtitle: 'Grazie! Le informazioni sono state ricevute dal nostro operatore. Puoi chiudere questa schermata.',
);
}
}
static String formatNoteText({
required int maritalStatusIndex,
required String occupation,
required int incomeRangeIndex,
required String languageName,
}) {
final marital = (maritalStatusIndex >= 0 && maritalStatusIndex < canonicalMaritalStatuses.length)
? canonicalMaritalStatuses[maritalStatusIndex]
: 'Non specificato';
final income = (incomeRangeIndex >= 0 && incomeRangeIndex < canonicalIncomeRanges.length)
? canonicalIncomeRanges[incomeRangeIndex]
: 'Non specificato';
final cleanOccupation = occupation.trim().isNotEmpty ? occupation.trim() : 'Non specificata';
return '''
[DATI FINANZIAMENTO]
• Stato civile: $marital
• Professione: $cleanOccupation
• Reddito mensile: $income
(Compilato dal cliente via QR - Lingua: $languageName)''';
}
}
class FinancingLanguage {
final String code;
final String name;
final String flag;
final bool isRtl;
const FinancingLanguage({
required this.code,
required this.name,
required this.flag,
required this.isRtl,
});
}
class FinancingStrings {
final String title;
final String subtitle;
final String maritalStatusLabel;
final List<String> maritalOptions;
final String occupationLabel;
final String occupationHint;
final String incomeLabel;
final List<String> incomeOptions;
final String submitButton;
final String errorRequired;
final String successTitle;
final String successSubtitle;
const FinancingStrings({
required this.title,
required this.subtitle,
required this.maritalStatusLabel,
required this.maritalOptions,
required this.occupationLabel,
required this.occupationHint,
required this.incomeLabel,
required this.incomeOptions,
required this.submitButton,
required this.errorRequired,
required this.successTitle,
required this.successSubtitle,
});
}
@@ -86,6 +86,13 @@ enum OperationType {
icon: Icons.business_center_outlined,
color: Colors.blueGrey,
),
ricontatto(
value: 'Ricontatto',
label: 'Ricontatto / Scadenza',
shortLabel: 'Ricontatto',
icon: Icons.event_repeat_outlined,
color: Colors.amber,
),
altro(
value: 'Altro',
label: 'Altro Servizio',
@@ -139,3 +146,14 @@ class EnergySubtypes {
static const List<String> all = [luce, gas, dual];
}
/// Sottotipi standard per Ricontatti / Bollette in scadenza
class RicontattoSubtypes {
static const String luce = 'Luce';
static const String gas = 'Gas';
static const String dual = 'Luce e Gas';
static const String telefonia = 'Telefonia';
static const String altro = 'Altro';
static const List<String> all = [luce, gas, dual, telefonia, altro];
}
@@ -0,0 +1,592 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flux/features/operations/models/financing_translations.dart';
import 'package:supabase_flutter/supabase_flutter.dart';
class FinancingFormScreen extends StatefulWidget {
final String sessionId;
const FinancingFormScreen({
super.key,
required this.sessionId,
});
@override
State<FinancingFormScreen> createState() => _FinancingFormScreenState();
}
class _FinancingFormScreenState extends State<FinancingFormScreen> {
FinancingLanguage _currentLang = FinancingTranslations.supportedLanguages.first; // Default Italiano
final _occupationController = TextEditingController();
final _formKey = GlobalKey<FormState>();
int? _selectedMaritalIndex;
int? _selectedIncomeIndex;
bool _isSubmitting = false;
bool _isSuccess = false;
String? _errorMessage;
RealtimeChannel? _channel;
StreamSubscription? _ackSubscription;
@override
void initState() {
super.initState();
_initRealtimeChannel();
}
void _initRealtimeChannel() {
if (widget.sessionId.isEmpty) return;
try {
_channel = Supabase.instance.client.channel('financing_${widget.sessionId}');
_channel?.onBroadcast(
event: 'ack',
callback: (payload) {
if (mounted && _isSubmitting) {
setState(() {
_isSubmitting = false;
_isSuccess = true;
});
}
},
).subscribe();
} catch (e) {
debugPrint('Errore init channel financing: $e');
}
}
@override
void dispose() {
_ackSubscription?.cancel();
if (_channel != null) {
Supabase.instance.client.removeChannel(_channel!);
}
_occupationController.dispose();
super.dispose();
}
Future<void> _submit() async {
final strings = FinancingTranslations.getStrings(_currentLang.code);
if (_selectedMaritalIndex == null ||
_selectedIncomeIndex == null ||
_occupationController.text.trim().isEmpty) {
setState(() {
_errorMessage = strings.errorRequired;
});
return;
}
setState(() {
_errorMessage = null;
_isSubmitting = true;
});
final formattedText = FinancingTranslations.formatNoteText(
maritalStatusIndex: _selectedMaritalIndex!,
occupation: _occupationController.text.trim(),
incomeRangeIndex: _selectedIncomeIndex!,
languageName: _currentLang.name,
);
try {
if (_channel == null) {
_channel = Supabase.instance.client.channel('financing_${widget.sessionId}');
_channel?.subscribe();
}
await _channel?.sendBroadcastMessage(
event: 'submit',
payload: {
'maritalStatusIndex': _selectedMaritalIndex,
'occupation': _occupationController.text.trim(),
'incomeRangeIndex': _selectedIncomeIndex,
'languageCode': _currentLang.code,
'languageName': _currentLang.name,
'formattedText': formattedText,
},
);
// Timeout di sicurezza: se entro 3 secondi non riceviamo ack specifico,
// consideriamo comunque la trasmissione completata con successo
Future.delayed(const Duration(seconds: 2), () {
if (mounted && _isSubmitting) {
setState(() {
_isSubmitting = false;
_isSuccess = true;
});
}
});
} catch (e) {
if (mounted) {
setState(() {
_isSubmitting = false;
_errorMessage = 'Errore di connessione: $e';
});
}
}
}
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
final strings = FinancingTranslations.getStrings(_currentLang.code);
return Directionality(
textDirection: _currentLang.isRtl ? TextDirection.rtl : TextDirection.ltr,
child: Scaffold(
backgroundColor: const Color(0xFFF8FAFC),
appBar: AppBar(
elevation: 0,
backgroundColor: Colors.white,
centerTitle: true,
title: Row(
mainAxisSize: MainAxisSize.min,
children: [
Container(
padding: const EdgeInsets.all(6),
decoration: BoxDecoration(
color: theme.colorScheme.primary.withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(8),
),
child: Icon(
Icons.account_balance_wallet_outlined,
color: theme.colorScheme.primary,
size: 22,
),
),
const SizedBox(width: 10),
Flexible(
child: Text(
strings.title,
style: const TextStyle(
color: Color(0xFF1E293B),
fontWeight: FontWeight.bold,
fontSize: 18,
),
overflow: TextOverflow.ellipsis,
),
),
],
),
),
body: SafeArea(
child: _isSuccess
? _buildSuccessView(strings, theme)
: _buildFormView(strings, theme),
),
),
);
}
Widget _buildSuccessView(FinancingStrings strings, ThemeData theme) {
return Center(
child: SingleChildScrollView(
padding: const EdgeInsets.all(32.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
width: 90,
height: 90,
decoration: BoxDecoration(
color: Colors.green.shade50,
shape: BoxShape.circle,
border: Border.all(color: Colors.green.shade200, width: 2),
),
child: Icon(
Icons.check_circle_rounded,
color: Colors.green.shade600,
size: 56,
),
),
const SizedBox(height: 24),
Text(
strings.successTitle,
textAlign: TextAlign.center,
style: const TextStyle(
fontSize: 22,
fontWeight: FontWeight.bold,
color: Color(0xFF0F172A),
),
),
const SizedBox(height: 12),
Text(
strings.successSubtitle,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 15,
color: Colors.grey.shade700,
height: 1.4,
),
),
const SizedBox(height: 36),
Container(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
decoration: BoxDecoration(
color: Colors.blue.shade50,
borderRadius: BorderRadius.circular(12),
border: Border.all(color: Colors.blue.shade100),
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(Icons.info_outline, color: Colors.blue.shade700, size: 20),
const SizedBox(width: 8),
Flexible(
child: Text(
'Sessione completata',
style: TextStyle(
fontSize: 13,
fontWeight: FontWeight.w600,
color: Colors.blue.shade900,
),
),
),
],
),
),
],
),
),
);
}
Widget _buildFormView(FinancingStrings strings, ThemeData theme) {
return SingleChildScrollView(
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 16),
child: Center(
child: ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 540),
child: Form(
key: _formKey,
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
// SELETTORE LINGUA
_buildLanguageSelector(),
const SizedBox(height: 16),
// DESCRIZIONE
Container(
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
border: Border.all(color: const Color(0xFFE2E8F0)),
),
child: Row(
children: [
Icon(
Icons.privacy_tip_outlined,
color: theme.colorScheme.primary,
size: 24,
),
const SizedBox(width: 12),
Expanded(
child: Text(
strings.subtitle,
style: const TextStyle(
fontSize: 13,
color: Color(0xFF475569),
height: 1.35,
),
),
),
],
),
),
const SizedBox(height: 20),
// 1. STATO CIVILE
_buildSectionHeader(
icon: Icons.favorite_border,
title: strings.maritalStatusLabel,
theme: theme,
),
const SizedBox(height: 10),
_buildChoiceList(
options: strings.maritalOptions,
selectedIndex: _selectedMaritalIndex,
onSelected: (idx) {
setState(() => _selectedMaritalIndex = idx);
},
),
const SizedBox(height: 24),
// 2. PROFESSIONE
_buildSectionHeader(
icon: Icons.work_outline,
title: strings.occupationLabel,
theme: theme,
),
const SizedBox(height: 10),
TextFormField(
controller: _occupationController,
textInputAction: TextInputAction.done,
style: const TextStyle(fontSize: 16, fontWeight: FontWeight.w500),
decoration: InputDecoration(
hintText: strings.occupationHint,
hintStyle: TextStyle(color: Colors.grey.shade400, fontSize: 14),
filled: true,
fillColor: Colors.white,
contentPadding: const EdgeInsets.symmetric(
horizontal: 16,
vertical: 16,
),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(14),
borderSide: const BorderSide(color: Color(0xFFCBD5E1)),
),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(14),
borderSide: const BorderSide(color: Color(0xFFCBD5E1)),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(14),
borderSide: BorderSide(
color: theme.colorScheme.primary,
width: 2,
),
),
),
onChanged: (_) {
if (_errorMessage != null) {
setState(() => _errorMessage = null);
}
},
),
const SizedBox(height: 24),
// 3. REDDITO MENSILE
_buildSectionHeader(
icon: Icons.euro_symbol_outlined,
title: strings.incomeLabel,
theme: theme,
),
const SizedBox(height: 10),
_buildChoiceList(
options: strings.incomeOptions,
selectedIndex: _selectedIncomeIndex,
onSelected: (idx) {
setState(() => _selectedIncomeIndex = idx);
},
),
const SizedBox(height: 24),
// MESSAGGIO DI ERRORE
if (_errorMessage != null) ...[
Container(
padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 10),
decoration: BoxDecoration(
color: Colors.red.shade50,
borderRadius: BorderRadius.circular(10),
border: Border.all(color: Colors.red.shade200),
),
child: Row(
children: [
Icon(Icons.error_outline, color: Colors.red.shade700, size: 20),
const SizedBox(width: 8),
Expanded(
child: Text(
_errorMessage!,
style: TextStyle(
color: Colors.red.shade800,
fontSize: 13,
fontWeight: FontWeight.w600,
),
),
),
],
),
),
const SizedBox(height: 16),
],
// PULSANTE INVIO
SizedBox(
height: 54,
child: FilledButton.icon(
style: FilledButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(14),
),
elevation: 1,
),
onPressed: _isSubmitting ? null : _submit,
icon: _isSubmitting
? const SizedBox(
width: 20,
height: 20,
child: CircularProgressIndicator(
strokeWidth: 2,
color: Colors.white,
),
)
: const Icon(Icons.send_rounded, size: 20),
label: Text(
_isSubmitting ? '...' : strings.submitButton,
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
),
),
),
),
const SizedBox(height: 32),
],
),
),
),
),
);
}
Widget _buildLanguageSelector() {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Padding(
padding: EdgeInsets.only(left: 4.0, bottom: 8.0),
child: Text(
'Seleziona lingua / Choose language:',
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xFF64748B),
),
),
),
SizedBox(
height: 42,
child: ListView.separated(
scrollDirection: Axis.horizontal,
itemCount: FinancingTranslations.supportedLanguages.length,
separatorBuilder: (_, _) => const SizedBox(width: 8),
itemBuilder: (context, index) {
final lang = FinancingTranslations.supportedLanguages[index];
final isSelected = lang.code == _currentLang.code;
return ChoiceChip(
showCheckmark: false,
labelPadding: const EdgeInsets.symmetric(horizontal: 4),
avatar: Text(lang.flag, style: const TextStyle(fontSize: 16)),
label: Text(
lang.name,
style: TextStyle(
fontSize: 13,
fontWeight: isSelected ? FontWeight.bold : FontWeight.w500,
color: isSelected ? Colors.white : const Color(0xFF1E293B),
),
),
selected: isSelected,
selectedColor: Theme.of(context).colorScheme.primary,
backgroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
side: BorderSide(
color: isSelected
? Theme.of(context).colorScheme.primary
: const Color(0xFFCBD5E1),
),
),
onSelected: (selected) {
if (selected) {
setState(() {
_currentLang = lang;
_errorMessage = null;
});
}
},
);
},
),
),
],
);
}
Widget _buildSectionHeader({
required IconData icon,
required String title,
required ThemeData theme,
}) {
return Row(
children: [
Icon(icon, size: 20, color: theme.colorScheme.primary),
const SizedBox(width: 8),
Text(
title,
style: const TextStyle(
fontSize: 15,
fontWeight: FontWeight.bold,
color: Color(0xFF1E293B),
),
),
],
);
}
Widget _buildChoiceList({
required List<String> options,
required int? selectedIndex,
required ValueChanged<int> onSelected,
}) {
return Column(
children: List.generate(options.length, (index) {
final label = options[index];
final isSelected = selectedIndex == index;
return Padding(
padding: const EdgeInsets.only(bottom: 8.0),
child: InkWell(
borderRadius: BorderRadius.circular(12),
onTap: () => onSelected(index),
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14),
decoration: BoxDecoration(
color: isSelected
? Theme.of(context).colorScheme.primary.withValues(alpha: 0.08)
: Colors.white,
borderRadius: BorderRadius.circular(12),
border: Border.all(
color: isSelected
? Theme.of(context).colorScheme.primary
: const Color(0xFFCBD5E1),
width: isSelected ? 2 : 1,
),
),
child: Row(
children: [
Icon(
isSelected
? Icons.radio_button_checked
: Icons.radio_button_off,
color: isSelected
? Theme.of(context).colorScheme.primary
: const Color(0xFF94A3B8),
size: 20,
),
const SizedBox(width: 12),
Expanded(
child: Text(
label,
style: TextStyle(
fontSize: 15,
fontWeight: isSelected ? FontWeight.bold : FontWeight.w500,
color: isSelected
? Theme.of(context).colorScheme.primary
: const Color(0xFF1E293B),
),
),
),
],
),
),
),
);
}),
);
}
}
@@ -6,6 +6,7 @@ import 'package:flux/features/attachments/blocs/attachments_bloc.dart';
import 'package:flux/features/operations/blocs/operation_details_list_cubit.dart';
import 'package:flux/features/operations/blocs/operation_form_cubit.dart';
import 'package:flux/features/operations/models/operation_model.dart';
import 'package:flux/features/operations/ui/widgets/financing_qr_dialog.dart';
import 'package:flux/features/operations/ui/widgets/operation_details_section.dart';
class OperationFormScreen extends StatefulWidget {
@@ -629,6 +630,19 @@ class _OperationFormScreenState extends State<OperationFormScreen> {
title: 'Note Interne',
icon: Icons.notes,
themeColor: Colors.teal,
headerTrailing: OutlinedButton.icon(
icon: const Icon(Icons.qr_code_2, size: 18),
label: const Text('Dati Finanziamento'),
style: OutlinedButton.styleFrom(
foregroundColor: Colors.teal,
side: const BorderSide(color: Colors.teal),
visualDensity: VisualDensity.compact,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
),
onPressed: _showFinancingQrDialog,
),
children: [
TextFormField(
controller: _notesController,
@@ -649,6 +663,32 @@ class _OperationFormScreenState extends State<OperationFormScreen> {
);
}
void _showFinancingQrDialog() {
showDialog(
context: context,
builder: (dialogCtx) => FinancingQrDialog(
onDataReceived: (formattedData) {
setState(() {
final existing = _notesController.text.trim();
if (existing.isEmpty) {
_notesController.text = formattedData;
} else {
_notesController.text = '$existing\n\n$formattedData';
}
});
_flushControllersToCubit();
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text('Dati finanziamento inseriti nelle note!'),
backgroundColor: Colors.teal,
duration: Duration(seconds: 3),
),
);
},
),
);
}
Widget _cardAllegati(OperationFormState state) {
return _buildCard(
title: 'Allegati e Documenti',
@@ -679,6 +719,7 @@ class _OperationFormScreenState extends State<OperationFormScreen> {
required IconData icon,
required Color themeColor,
required List<Widget> children,
Widget? headerTrailing,
}) {
return Card(
margin: const EdgeInsets.only(bottom: 24),
@@ -703,13 +744,16 @@ class _OperationFormScreenState extends State<OperationFormScreen> {
child: Icon(icon, color: themeColor),
),
const SizedBox(width: 12),
Text(
title,
style: Theme.of(context).textTheme.titleLarge?.copyWith(
fontWeight: FontWeight.bold,
color: themeColor,
Expanded(
child: Text(
title,
style: Theme.of(context).textTheme.titleLarge?.copyWith(
fontWeight: FontWeight.bold,
color: themeColor,
),
),
),
?headerTrailing,
],
),
const Divider(height: 32),
@@ -0,0 +1,345 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flux/features/operations/models/financing_translations.dart';
import 'package:qr_flutter/qr_flutter.dart';
import 'package:supabase_flutter/supabase_flutter.dart';
import 'package:uuid/uuid.dart';
class FinancingQrDialog extends StatefulWidget {
final ValueChanged<String> onDataReceived;
const FinancingQrDialog({
super.key,
required this.onDataReceived,
});
@override
State<FinancingQrDialog> createState() => _FinancingQrDialogState();
}
class _FinancingQrDialogState extends State<FinancingQrDialog> {
late final String _sessionId;
late final String _deepLinkUrl;
RealtimeChannel? _channel;
bool _isReceived = false;
Map<String, dynamic>? _receivedPayload;
bool _copied = false;
@override
void initState() {
super.initState();
_sessionId = const Uuid().v4();
_deepLinkUrl = 'https://flux.catelli.it/financing/$_sessionId';
_setupRealtimeChannel();
}
void _setupRealtimeChannel() {
try {
_channel = Supabase.instance.client.channel('financing_$_sessionId');
_channel?.onBroadcast(
event: 'submit',
callback: (payload) {
if (!mounted) return;
// Invia risposta di conferma (ACK) allo smartphone del cliente
_channel?.sendBroadcastMessage(
event: 'ack',
payload: {'status': 'ok'},
);
final maritalIndex = payload['maritalStatusIndex'] as int? ?? 0;
final occupation = payload['occupation'] as String? ?? '';
final incomeIndex = payload['incomeRangeIndex'] as int? ?? 0;
final languageName = payload['languageName'] as String? ?? 'Italiano';
final formattedText = payload['formattedText'] as String? ??
FinancingTranslations.formatNoteText(
maritalStatusIndex: maritalIndex,
occupation: occupation,
incomeRangeIndex: incomeIndex,
languageName: languageName,
);
widget.onDataReceived(formattedText);
setState(() {
_isReceived = true;
_receivedPayload = {
'marital': (maritalIndex >= 0 &&
maritalIndex <
FinancingTranslations.canonicalMaritalStatuses.length)
? FinancingTranslations.canonicalMaritalStatuses[maritalIndex]
: 'N/D',
'occupation': occupation,
'income': (incomeIndex >= 0 &&
incomeIndex <
FinancingTranslations.canonicalIncomeRanges.length)
? FinancingTranslations.canonicalIncomeRanges[incomeIndex]
: 'N/D',
'language': languageName,
};
});
},
).subscribe();
} catch (e) {
debugPrint('Errore setup realtime channel: $e');
}
}
@override
void dispose() {
if (_channel != null) {
Supabase.instance.client.removeChannel(_channel!);
}
super.dispose();
}
void _copyToClipboard() {
Clipboard.setData(ClipboardData(text: _deepLinkUrl));
setState(() => _copied = true);
Future.delayed(const Duration(seconds: 2), () {
if (mounted) setState(() => _copied = false);
});
}
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
return AlertDialog(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
backgroundColor: theme.colorScheme.surface,
title: Row(
children: [
Container(
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
color: Colors.teal.withValues(alpha: 0.12),
borderRadius: BorderRadius.circular(10),
),
child: const Icon(Icons.qr_code_2, color: Colors.teal, size: 28),
),
const SizedBox(width: 12),
const Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Dati Finanziamento',
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18),
),
Text(
'Raccolta via smartphone cliente',
style: TextStyle(fontSize: 12, color: Colors.grey),
),
],
),
),
],
),
content: SizedBox(
width: 380,
child: SingleChildScrollView(
child: _isReceived
? _buildReceivedContent(theme)
: _buildQrContent(theme),
),
),
actionsPadding: const EdgeInsets.fromLTRB(16, 0, 16, 16),
actions: [
if (!_isReceived) ...[
OutlinedButton.icon(
onPressed: _copyToClipboard,
icon: Icon(_copied ? Icons.check : Icons.copy, size: 16),
label: Text(_copied ? 'Link Copiato!' : 'Copia Link'),
),
TextButton(
onPressed: () => Navigator.of(context).pop(),
child: const Text('Annulla'),
),
] else ...[
FilledButton.icon(
style: FilledButton.styleFrom(backgroundColor: Colors.teal),
onPressed: () => Navigator.of(context).pop(),
icon: const Icon(Icons.check, size: 18),
label: const Text('Chiudi (Dati inseriti nelle note)'),
),
],
],
);
}
Widget _buildQrContent(ThemeData theme) {
return Column(
mainAxisSize: MainAxisSize.min,
children: [
const Text(
'Fai inquadrare questo codice al cliente con la fotocamera del suo telefono.',
textAlign: TextAlign.center,
style: TextStyle(fontSize: 13, color: Colors.grey),
),
const SizedBox(height: 8),
Container(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 4),
decoration: BoxDecoration(
color: Colors.amber.shade50,
borderRadius: BorderRadius.circular(8),
border: Border.all(color: Colors.amber.shade200),
),
child: Text(
'🌐 Il cliente potrà scegliere la lingua (IT, EN, FR, ES, AR, UK, RU, MK, SQ)',
style: TextStyle(
fontSize: 11,
fontWeight: FontWeight.w600,
color: Colors.amber.shade900,
),
textAlign: TextAlign.center,
),
),
const SizedBox(height: 20),
Container(
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
border: Border.all(color: Colors.grey.shade200),
boxShadow: [
BoxShadow(
color: Colors.black.withValues(alpha: 0.04),
blurRadius: 10,
offset: const Offset(0, 4),
),
],
),
child: QrImageView(
data: _deepLinkUrl,
version: QrVersions.auto,
size: 210.0,
embeddedImage: const AssetImage('assets/images/logo.png'),
embeddedImageStyle: const QrEmbeddedImageStyle(
size: Size(40, 40),
),
),
),
const SizedBox(height: 20),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const SizedBox(
width: 16,
height: 16,
child: CircularProgressIndicator(strokeWidth: 2, color: Colors.teal),
),
const SizedBox(width: 10),
Text(
'In attesa che il cliente compili i dati...',
style: TextStyle(
fontSize: 13,
fontStyle: FontStyle.italic,
color: Colors.grey.shade700,
),
),
],
),
],
);
}
Widget _buildReceivedContent(ThemeData theme) {
final marital = _receivedPayload?['marital'] ?? '';
final occupation = _receivedPayload?['occupation'] ?? '';
final income = _receivedPayload?['income'] ?? '';
final lang = _receivedPayload?['language'] ?? '';
return Container(
padding: const EdgeInsets.all(18),
decoration: BoxDecoration(
color: Colors.teal.shade50,
borderRadius: BorderRadius.circular(16),
border: Border.all(color: Colors.teal.shade200),
),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
const Icon(Icons.check_circle, color: Colors.teal, size: 28),
const SizedBox(width: 10),
Expanded(
child: Text(
'Dati ricevuti con successo! 🎉',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16,
color: Colors.teal.shade900,
),
),
),
],
),
const SizedBox(height: 14),
const Divider(height: 1),
const SizedBox(height: 12),
_buildInfoRow('Stato civile', marital),
const SizedBox(height: 8),
_buildInfoRow('Professione', occupation),
const SizedBox(height: 8),
_buildInfoRow('Reddito mensile', income),
const SizedBox(height: 8),
_buildInfoRow('Lingua cliente', lang),
const SizedBox(height: 14),
Container(
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8),
),
child: Row(
children: [
Icon(Icons.notes, size: 18, color: Colors.teal.shade700),
const SizedBox(width: 8),
const Expanded(
child: Text(
'I dati sono stati automaticamente inseriti nel campo note dell\'operazione.',
style: TextStyle(fontSize: 12, color: Colors.black87),
),
),
],
),
),
],
),
);
}
Widget _buildInfoRow(String label, String value) {
return Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
width: 110,
child: Text(
label,
style: const TextStyle(
fontSize: 13,
fontWeight: FontWeight.w600,
color: Colors.black54,
),
),
),
Expanded(
child: Text(
value,
style: const TextStyle(
fontSize: 13,
fontWeight: FontWeight.bold,
color: Colors.black87,
),
),
),
],
);
}
}
@@ -8,6 +8,7 @@ import 'package:flux/features/operations/blocs/operation_details_form_cubit.dart
import 'package:flux/features/operations/blocs/operation_details_list_cubit.dart';
import 'package:flux/features/operations/models/operation_detail_model.dart';
import 'package:flux/features/operations/models/operation_type.dart';
import 'package:flux/features/master_data/products/models/model_model.dart';
class OperationDetailsSection extends StatelessWidget {
const OperationDetailsSection({super.key});
@@ -648,7 +649,15 @@ class _OperationDetailFormSheetState
onModelSelected: (id, name) {
context
.read<OperationDetailsFormCubit>()
.updateFields(modelId: id);
.updateFields(
modelId: id,
model: ModelModel(
id: id,
name: name,
nameWithBrand: name,
brandId: '',
),
);
},
),
const SizedBox(height: 16),
@@ -698,6 +707,52 @@ class _OperationDetailFormSheetState
const SizedBox(height: 16),
],
// Scenario Ricontatto / Bolletta in scadenza
if (currentType == OperationType.ricontatto) ...[
const Text(
'Tipo di Fornitura / Servizio da Ricontattare',
style: TextStyle(fontWeight: FontWeight.w600, fontSize: 13),
),
const SizedBox(height: 8),
Wrap(
spacing: 8.0,
runSpacing: 8.0,
children: RicontattoSubtypes.all.map((sub) {
final isSelected = detail.subType?.toLowerCase() == sub.toLowerCase();
return ChoiceChip(
avatar: sub == RicontattoSubtypes.luce
? const Icon(Icons.bolt_outlined, size: 16)
: (sub == RicontattoSubtypes.gas
? const Icon(Icons.local_fire_department_outlined, size: 16)
: (sub == RicontattoSubtypes.telefonia
? const Icon(Icons.phone_outlined, size: 16)
: null)),
label: Text(sub),
selected: isSelected,
onSelected: (selected) {
final newVal = selected ? sub : null;
_subtypeController.text = newVal ?? '';
context.read<OperationDetailsFormCubit>().updateFields(subType: newVal);
},
);
}).toList(),
),
const SizedBox(height: 12),
TextFormField(
controller: _descriptionController,
decoration: const InputDecoration(
labelText: 'Gestore Attuale / Note Offerta',
hintText: 'Es. Enel Luce 0.15€/kWh, scadenza vincolo tra 10 mesi...',
),
onChanged: (val) {
context
.read<OperationDetailsFormCubit>()
.updateFields(description: val);
},
),
const SizedBox(height: 16),
],
// Scenario Altro (Testo libero)
if (currentType == OperationType.altro) ...[
TextFormField(
@@ -719,6 +774,7 @@ class _OperationDetailFormSheetState
OperationType.energy,
OperationType.fin,
OperationType.entertainment,
OperationType.ricontatto,
OperationType.altro,
].contains(currentType)) ...[
_buildDurationQuickPicks(context),
@@ -4,6 +4,8 @@ import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flux/core/blocs/session/session_cubit.dart';
import 'package:flux/core/routes/routes.dart';
import 'package:flux/core/theme/theme.dart';
import 'package:flux/core/utils/update_prompt_helper.dart';
import 'package:flux/core/utils/version_check_service.dart';
import 'package:flux/features/settings/blocs/settings_cubit.dart';
import 'package:get_it/get_it.dart';
import 'package:go_router/go_router.dart';
@@ -91,6 +93,22 @@ class SettingsScreen extends StatelessWidget {
context: context,
onTap: () => context.pushNamed(Routes.themeSettings),
),
const Divider(height: 30),
FutureBuilder<String>(
future: VersionCheckService.getFullVersionString(),
builder: (context, snapshot) {
final versionText = snapshot.data ?? '...';
return _settingsTile(
icon: Icons.info_outline,
title: 'Versione Flux',
subtitle: versionText.isNotEmpty
? '$versionText • Tocca per verificare aggiornamenti'
: 'Verifica disponibilità aggiornamenti',
context: context,
onTap: () => UpdatePromptHelper.showManualUpdateCheck(context),
);
},
),
]),
const SizedBox(height: 24),
@@ -53,10 +53,10 @@ class TargetFormCubit extends Cubit<TargetFormState> {
final storeId = target.storeId ?? defaultStoreId;
final storeStaff = await _loadStoreStaff(companyId, storeId);
// Costruisci o allinea individualTargets per ogni membro dello staff
// Costruisci o allinea individualTargets per ogni membro dello staff attivo
final List<IndividualTargetModel> individuals = [];
for (final staff in storeStaff) {
if (staff.id == null) continue;
if (staff.id == null || !staff.isActive) continue;
final existing = target.individualTargets.firstWhere(
(it) => it.staffId == staff.id,
orElse:
@@ -119,9 +119,8 @@ class TargetFormCubit extends Cubit<TargetFormState> {
}
// 5. Se trovati addetti assegnati al negozio, ritorniamo quelli attivi
final activeStoreStaff = staff.where((s) => s.isActive).toList();
if (activeStoreStaff.isNotEmpty) {
return activeStoreStaff;
if (staff.isNotEmpty) {
return staff.where((s) => s.isActive).toList();
}
// 6. Fallback: controlliamo se in allStaff di StaffCubit qualcuno ha questo store associato
@@ -163,7 +162,7 @@ class TargetFormCubit extends Cubit<TargetFormState> {
final List<IndividualTargetModel> individuals = [];
for (final staff in storeStaff) {
if (staff.id == null) continue;
if (staff.id == null || !staff.isActive) continue;
individuals.add(
IndividualTargetModel(
companyId: state.target.companyId,
@@ -279,6 +278,8 @@ class TargetFormCubit extends Cubit<TargetFormState> {
energiaTim2: calc(m.energiaTim2),
energiaAltri1: calc(m.energiaAltri1),
energiaAltri2: calc(m.energiaAltri2),
ricontatti1: calc(m.ricontatti1),
ricontatti2: calc(m.ricontatti2),
);
return it.copyWith(metrics: distributedMetrics);
@@ -28,6 +28,7 @@ class TargetProgressService {
(key: 'telepass', label: 'Telepass'),
(key: 'energiaTim', label: 'Energia TIM'),
(key: 'energiaAltri', label: 'Energia Non TIM'),
(key: 'ricontatti', label: 'Ricontatti / Bollette'),
];
/// Calcola l'avanzamento completo per un target (di negozio e per ciascun addetto)
@@ -137,16 +138,47 @@ class TargetProgressService {
);
}
// 4. Costruzione avanzamento per singoli addetti
// 4. Costruzione avanzamento per singoli addetti (solo addetti attivi)
final staffProgressMap = <String, TargetProgressModel>{};
for (final it in target.individualTargets) {
final individualTargetsList = target.individualTargets
.where((it) => it.staff == null || it.staff!.isActive)
.toList();
final inactiveStaffIds = target.individualTargets
.where((it) => it.staff != null && !it.staff!.isActive)
.map((it) => it.staffId)
.toSet();
final bool hasExplicitIndividualTargets = individualTargetsList.any(
(it) => it.metrics.totalLevel1 > 0 || it.metrics.totalLevel2 > 0,
);
final int staffCount = individualTargetsList.isNotEmpty
? individualTargetsList.length
: (staffCounts.isNotEmpty ? staffCounts.length : 1);
for (final it in individualTargetsList) {
final sId = it.staffId;
final sCounts = staffCounts[sId] ?? {};
final sCategories = <String, CategoryProgress>{};
for (final def in metricDefinitions) {
final actual = sCounts[def.key] ?? 0;
final targets = _extractTargetS1S2(it.metrics, def.key);
({int s1, int s2}) targets;
if (hasExplicitIndividualTargets) {
targets = _extractTargetS1S2(it.metrics, def.key);
} else {
// Se non sono stati assegnati target individuali, dividi equamente il target del negozio
final storeTargets = _extractTargetS1S2(target.metrics, def.key);
targets = (
s1: staffCount > 0
? (storeTargets.s1 / staffCount).round()
: storeTargets.s1,
s2: staffCount > 0
? (storeTargets.s2 / staffCount).round()
: storeTargets.s2,
);
}
sCategories[def.key] = CategoryProgress.calculate(
key: def.key,
@@ -172,6 +204,49 @@ class TargetProgressService {
);
}
// Se ci sono addetti con operazioni che non compaiono in individualTargets, creiamo la loro scheda
for (final sId in staffCounts.keys) {
if (inactiveStaffIds.contains(sId)) continue;
if (!staffProgressMap.containsKey(sId)) {
final sCounts = staffCounts[sId] ?? {};
final sCategories = <String, CategoryProgress>{};
for (final def in metricDefinitions) {
final actual = sCounts[def.key] ?? 0;
final storeTargets = _extractTargetS1S2(target.metrics, def.key);
final targets = (
s1: staffCount > 0
? (storeTargets.s1 / staffCount).round()
: storeTargets.s1,
s2: staffCount > 0
? (storeTargets.s2 / staffCount).round()
: storeTargets.s2,
);
sCategories[def.key] = CategoryProgress.calculate(
key: def.key,
label: def.label,
actual: actual,
s1: targets.s1,
s2: targets.s2,
elapsedDays: days.elapsed,
remainingDays: days.remaining,
totalDays: days.total,
);
}
staffProgressMap[sId] = TargetProgressModel(
targetId: target.id ?? '',
storeId: target.storeId,
staffId: sId,
totalWorkingDays: days.total,
elapsedWorkingDays: days.elapsed,
remainingWorkingDays: days.remaining,
categories: sCategories,
);
}
}
return TargetProgressModel(
targetId: target.id ?? '',
storeId: target.storeId,
@@ -223,6 +298,8 @@ class TargetProgressService {
return 'energiaTim';
}
return 'energiaAltri';
case OperationType.ricontatto:
return 'ricontatti';
default:
return null;
}
@@ -257,6 +334,8 @@ class TargetProgressService {
return (s1: m.energiaTim1, s2: m.energiaTim2);
case 'energiaAltri':
return (s1: m.energiaAltri1, s2: m.energiaAltri2);
case 'ricontatti':
return (s1: m.ricontatti1, s2: m.ricontatti2);
default:
return (s1: 0, s2: 0);
}
@@ -27,6 +27,8 @@ class TargetMetrics extends Equatable {
final int energiaTim2;
final int energiaAltri1;
final int energiaAltri2;
final int ricontatti1;
final int ricontatti2;
// Getter di compatibilità con codice pregresso
int get energiaTim => energiaTim1;
@@ -61,6 +63,8 @@ class TargetMetrics extends Equatable {
int? energiaAltri1,
int? energiaAltri,
this.energiaAltri2 = 0,
this.ricontatti1 = 0,
this.ricontatti2 = 0,
}) : energiaTim1 = energiaTim1 ?? energiaTim ?? 0,
energiaAltri1 = energiaAltri1 ?? energiaAltri ?? 0;
@@ -92,6 +96,8 @@ class TargetMetrics extends Equatable {
energiaTim2,
energiaAltri1,
energiaAltri2,
ricontatti1,
ricontatti2,
];
TargetMetrics copyWith({
@@ -123,6 +129,8 @@ class TargetMetrics extends Equatable {
int? energiaAltri1,
int? energiaAltri,
int? energiaAltri2,
int? ricontatti1,
int? ricontatti2,
}) {
return TargetMetrics(
mnp1: mnp1 ?? this.mnp1,
@@ -151,6 +159,8 @@ class TargetMetrics extends Equatable {
energiaTim2: energiaTim2 ?? this.energiaTim2,
energiaAltri1: energiaAltri1 ?? energiaAltri ?? this.energiaAltri1,
energiaAltri2: energiaAltri2 ?? this.energiaAltri2,
ricontatti1: ricontatti1 ?? this.ricontatti1,
ricontatti2: ricontatti2 ?? this.ricontatti2,
);
}
@@ -196,6 +206,10 @@ class TargetMetrics extends Equatable {
energiaAltri2: (map['energia_altri_2'] as num?)?.toInt() ??
(map['Energia_altri_2'] as num?)?.toInt() ??
0,
ricontatti1: (map['ricontatti_1'] as num?)?.toInt() ??
(map['ricontatti'] as num?)?.toInt() ??
0,
ricontatti2: (map['ricontatti_2'] as num?)?.toInt() ?? 0,
);
}
@@ -229,10 +243,13 @@ class TargetMetrics extends Equatable {
'energia_altri_1': energiaAltri1,
'energia_altri_2': energiaAltri2,
'energia_altri': energiaAltri1,
'ricontatti_1': ricontatti1,
'ricontatti_2': ricontatti2,
'ricontatti': ricontatti1,
};
}
/// Somma totale di tutti i target del Livello 1 (inclusa energia)
/// Somma totale di tutti i target del Livello 1 (inclusa energia e ricontatti)
int get totalLevel1 =>
mnp1 +
unica1 +
@@ -246,9 +263,10 @@ class TargetMetrics extends Equatable {
al1 +
telepass1 +
energiaTim1 +
energiaAltri1;
energiaAltri1 +
ricontatti1;
/// Somma totale di tutti i target del Livello 2 (inclusa energia)
/// Somma totale di tutti i target del Livello 2 (inclusa energia e ricontatti)
int get totalLevel2 =>
mnp2 +
unica2 +
@@ -262,7 +280,8 @@ class TargetMetrics extends Equatable {
al2 +
telepass2 +
energiaTim2 +
energiaAltri2;
energiaAltri2 +
ricontatti2;
/// Numero di categorie con almeno una soglia impostata (> 0)
int get activeMetricsCount {
@@ -280,6 +299,7 @@ class TargetMetrics extends Equatable {
if (telepass1 > 0 || telepass2 > 0) count++;
if (energiaTim1 > 0 || energiaTim2 > 0) count++;
if (energiaAltri1 > 0 || energiaAltri2 > 0) count++;
if (ricontatti1 > 0 || ricontatti2 > 0) count++;
return count;
}
}
@@ -179,6 +179,15 @@ class TargetProgressModel extends Equatable {
this.staffProgress = const {},
});
factory TargetProgressModel.empty() => const TargetProgressModel(
targetId: '',
totalWorkingDays: 0,
elapsedWorkingDays: 0,
remainingWorkingDays: 0,
categories: {},
staffProgress: {},
);
/// Somma di tutti i pezzi realizzati finora
int get totalActualPieces =>
categories.values.fold(0, (sum, c) => sum + c.actualPieces);
@@ -703,7 +703,9 @@ class _TargetDetailScreenState extends State<TargetDetailScreen>
TargetProgressModel progress,
bool isDesktop,
) {
final staffMembers = target.individualTargets;
final staffMembers = target.individualTargets
.where((it) => it.staff == null || it.staff!.isActive)
.toList();
if (staffMembers.isEmpty) {
return Center(
@@ -578,6 +578,24 @@ class _TargetFormScreenState extends State<TargetFormScreen>
metrics.copyWith(energiaAltri2: v),
),
),
const Divider(),
_buildMetricInputRow(
theme: theme,
icon: Icons.event_repeat_outlined,
color: Colors.amber,
label: 'Ricontatti / Bollette',
val1: metrics.ricontatti1,
val2: metrics.ricontatti2,
showLevel2: true,
onChanged1:
(v) => cubit.updateStoreMetrics(
metrics.copyWith(ricontatti1: v),
),
onChanged2:
(v) => cubit.updateStoreMetrics(
metrics.copyWith(ricontatti2: v),
),
),
],
),
),
@@ -952,6 +970,21 @@ class _TargetFormScreenState extends State<TargetFormScreen>
it.metrics.copyWith(energiaAltri2: v),
),
),
_buildStaffMetricRow(
theme: theme,
label: 'Ricontatti / Bollette',
val1: it.metrics.ricontatti1,
val2: it.metrics.ricontatti2,
showLevel2: true,
onChanged1: (v) => cubit.updateIndividualMetrics(
it.staffId,
it.metrics.copyWith(ricontatti1: v),
),
onChanged2: (v) => cubit.updateIndividualMetrics(
it.staffId,
it.metrics.copyWith(ricontatti2: v),
),
),
const SizedBox(height: 8),
],
),
@@ -96,6 +96,9 @@ class TaskFormCubit extends Cubit<TaskFormState> {
final Map<String, List<StaffMemberModel>> grouped = {};
for (var staff in staffList) {
if (!staff.isActive && !state.selectedStaffIds.contains(staff.id)) {
continue;
}
if (!state.isGlobal) {
final belongsToCurrentStore = staff.assignedStores.any(
(store) => store.id == _currentStoreId,
+10 -6
View File
@@ -1,4 +1,5 @@
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:equatable/equatable.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flux/features/tasks/data/task_repository.dart';
@@ -27,12 +28,15 @@ class TaskListCubit extends Cubit<TaskListState> {
_loadTasksSilently();
// Ci mettiamo in ascolto del campanello del Repository
_taskSubscription = _repository.watchCompanyTasks(currentCompanyId).listen((
_,
) {
// Quando il campanello suona (qualcosa è cambiato a DB), ricarichiamo!
_loadTasksSilently();
});
_taskSubscription = _repository.watchCompanyTasks(currentCompanyId).listen(
(_) {
// Quando il campanello suona (qualcosa è cambiato a DB), ricarichiamo!
_loadTasksSilently();
},
onError: (error, stackTrace) {
debugPrint('Task list stream error: $error');
},
);
}
Future<void> loadTasks() async {
@@ -1,3 +1,4 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flux/features/tickets/models/ticket_model.dart';
@@ -13,8 +14,19 @@ class TicketListCubit extends Cubit<TicketListState> {
.get<TrackingRepository>();
static const int _limit = 20; // Paginazione a blocchi di 20
StreamSubscription<void>? _ticketsSubscription;
TicketListCubit() : super(const TicketListState()) {
loadTickets(refresh: true);
_ticketsSubscription = _repository.onTicketsChanged.listen((_) {
loadTickets(refresh: true);
});
}
@override
Future<void> close() {
_ticketsSubscription?.cancel();
return super.close();
}
int _fetchId = 0;
@@ -1,3 +1,4 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flux/core/blocs/session/session_cubit.dart';
import 'package:flux/core/enums_and_consts/consts.dart';
@@ -16,6 +17,17 @@ class TicketRepository {
static const String _tableName = Tables.tickets;
final StreamController<void> _ticketsChangedController =
StreamController<void>.broadcast();
Stream<void> get onTicketsChanged => _ticketsChangedController.stream;
void notifyTicketsChanged() {
if (!_ticketsChangedController.isClosed) {
_ticketsChangedController.add(null);
}
}
// --- RECUPERO PAGINATO CON FILTRI E JOIN DEI TICKET DI UNO STORE ---
Future<List<TicketModel>> fetchStoreTickets({
required int offset,
@@ -37,8 +49,14 @@ class TicketRepository {
assigned_to:${Tables.staffMembers}!ticket_assigned_to_id_fkey (*),
target_model:${Tables.models}!ticket_model_id_1_fkey (*),
source_model:${Tables.models}!ticket_model_id_2_fkey (*)
''')
.eq('store_id', GetIt.I.get<SessionCubit>().state.currentStore!.id!);
''');
final currentStoreId =
GetIt.I.get<SessionCubit>().state.currentStore?.id;
if (currentStoreId == null) {
return [];
}
query = query.eq('store_id', currentStoreId);
// Filtro Range Date
if (dateRange != null) {
@@ -179,12 +197,15 @@ class TicketRepository {
}
}
/// Stream dei ticket che necessitano attenzione (es. in scadenza oggi o in ritardo)
Stream<List<TicketModel>> getAttentionNeededTicketsStream() {
final storeId = GetIt.I.get<SessionCubit>().state.currentStore?.id;
if (storeId == null) {
return const Stream.empty();
}
return _supabase
.from(_tableName)
.stream(primaryKey: ['id'])
.eq('store_id', GetIt.I.get<SessionCubit>().state.currentStore!.id!)
.eq('store_id', storeId)
// Purtroppo lo stream accetta solo filtri base, quindi ci facciamo
// mandare i dati e li filtriamo con la potenza di Dart!
.limit(300)
@@ -280,6 +301,7 @@ class TicketRepository {
.select()
.single();
notifyTicketsChanged();
return TicketModel.fromMap(response);
} catch (e) {
throw Exception('Errore nella creazione del ticket: $e');
@@ -300,6 +322,7 @@ class TicketRepository {
.select()
.single();
notifyTicketsChanged();
return TicketModel.fromMap(response);
} catch (e) {
throw Exception('Errore nell\'aggiornamento del ticket: $e');
@@ -313,6 +336,7 @@ class TicketRepository {
.from(_tableName)
.update({'ticket_status': TicketStatus.closed.value})
.inFilter('id', ticketIds);
notifyTicketsChanged();
} catch (e) {
throw Exception('Errore nella chiusura dei ticket: $e');
}
@@ -322,6 +346,7 @@ class TicketRepository {
Future<void> deleteTicket(String ticketId) async {
try {
await _supabase.from(_tableName).delete().eq('id', ticketId);
notifyTicketsChanged();
} catch (e) {
throw Exception('Errore nell\'eliminazione del ticket: $e');
}
+22 -18
View File
@@ -349,27 +349,31 @@ class _TicketFormScreenState extends State<TicketFormScreen> {
}
void _deleteTicket(TicketModel ticket, {Color color = Colors.red}) {
final ticketFormCubit = context.read<TicketFormCubit>();
showDialog(
context: context,
builder: (context) => AlertDialog(
title: const Text('Conferma Cancellazione'),
content: Text(
'Sei sicuro di voler cancellare il ticket "${ticket.referenceId}"? Questa azione è irreversibile.',
builder: (dialogContext) => BlocProvider.value(
value: ticketFormCubit,
child: AlertDialog(
title: const Text('Conferma Cancellazione'),
content: Text(
'Sei sicuro di voler cancellare il ticket "${ticket.referenceId}"? Questa azione è irreversibile.',
),
actions: [
TextButton(
onPressed: () => Navigator.of(dialogContext).pop(),
child: const Text('Annulla'),
),
ElevatedButton(
style: ElevatedButton.styleFrom(backgroundColor: color),
onPressed: () {
ticketFormCubit.deleteTicket();
Navigator.of(dialogContext).pop(); // Chiude il dialog
},
child: const Text('Cancella Ticket'),
),
],
),
actions: [
TextButton(
onPressed: () => Navigator.of(context).pop(),
child: const Text('Annulla'),
),
ElevatedButton(
style: ElevatedButton.styleFrom(backgroundColor: color),
onPressed: () {
context.read<TicketFormCubit>().deleteTicket();
Navigator.of(context).pop(); // Chiude il dialog
},
child: const Text('Cancella Ticket'),
),
],
),
);
}
@@ -26,22 +26,32 @@ class TicketListCard extends StatelessWidget {
void _openFile({
required BuildContext context,
required AttachmentModel file,
List<AttachmentModel>? attachments,
int? initialIndex,
}) {
// 1. Catturiamo il BLoC dalla pagina corrente prima di navigare
final operationFilesBloc = context.read<AttachmentsBloc>();
final list = attachments ?? [file];
final index = initialIndex ?? (list.isNotEmpty ? list.indexOf(file) : 0);
Navigator.push(
context,
MaterialPageRoute(
builder: (viewerContext) => BlocProvider.value(
value: operationFilesBloc,
child: AttachmentViewerScreen(
attachment: file,
onRename: (newName) {
attachments: list,
initialIndex: index >= 0 ? index : 0,
onRenameAttachment: (targetFile, newName) {
// Spara l'evento al BLoC e lui farà il resto!
operationFilesBloc.add(RenameAttachmentEvent(file, newName));
operationFilesBloc.add(
RenameAttachmentEvent(targetFile, newName),
);
},
onDelete: () {
operationFilesBloc.add(DeleteSpecificAttachmentEvent(file));
onDeleteAttachment: (targetFile) {
operationFilesBloc.add(
DeleteSpecificAttachmentEvent(targetFile),
);
},
),
),
@@ -155,6 +165,8 @@ class TicketListCard extends StatelessWidget {
_openFile(
context: context,
file: attachments.first,
attachments: attachments,
initialIndex: 0,
);
} else {
// CASO 2: Più allegati. Mostriamo una BottomSheet fulminea per far scegliere all'utente.
@@ -188,6 +200,8 @@ class TicketListCard extends StatelessWidget {
_openFile(
context: context,
file: file,
attachments: attachments,
initialIndex: index,
); // Apre il viewer
},
);
+249 -37
View File
@@ -32,11 +32,28 @@ import 'package:flux/features/master_data/store/bloc/store_cubit.dart';
import 'package:flutter_web_plugins/url_strategy.dart';
import 'package:universal_html/html.dart' as html;
import 'package:url_launcher/url_launcher.dart';
import 'package:flux/core/utils/auto_update_service.dart';
String? initialRecoveryFragment;
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await dotenv.load(fileName: ".env");
// Scudo di Sicurezza Globale: Previene crash dell'app per eccezioni asincrone di rete/WebSocket non gestite
FlutterError.onError = (FlutterErrorDetails details) {
FlutterError.presentError(details);
debugPrint('FlutterError caught: ${details.exception}');
};
PlatformDispatcher.instance.onError = (Object error, StackTrace stack) {
debugPrint('PlatformDispatcher error caught: $error');
return true; // Contrassegna l'errore come gestito ed evita il crash dell'app
};
try {
await dotenv.load(fileName: ".env");
} catch (e) {
debugPrint('⚠️ Impossibile caricare il file .env: $e');
}
await init();
final initialUri = Uri.base;
if (initialUri.fragment.contains('access_token=')) {
@@ -72,10 +89,14 @@ void main() async {
),
BlocProvider<ProductsCubit>(create: (_) => sl<ProductsCubit>()),
BlocProvider<StaffCubit>(
create: (_) => sl<StaffCubit>()
..loadStaffForStore(
GetIt.I.get<SessionCubit>().state.currentStore!.id!,
),
create: (_) {
final cubit = sl<StaffCubit>();
final storeId = sl<SessionCubit>().state.currentStore?.id;
if (storeId != null) {
cubit.loadStaffForStore(storeId);
}
return cubit;
},
),
BlocProvider<OperationListCubit>(
create: (_) => sl<OperationListCubit>(),
@@ -236,9 +257,14 @@ class GlobalUpdateChecker extends StatefulWidget {
class _GlobalUpdateCheckerState extends State<GlobalUpdateChecker>
with WidgetsBindingObserver {
bool _mustUpdate = false;
String? _updateUrl;
UpdateInfo? _updateInfo;
bool _isDismissed = false;
String? _dismissedVersion;
StreamSubscription? _versionSubscription;
bool _isUpdating = false;
double _downloadProgress = 0.0;
String _statusMessage = "";
String? _errorMessage;
@override
void initState() {
@@ -280,11 +306,16 @@ class _GlobalUpdateCheckerState extends State<GlobalUpdateChecker>
// Riapriamo il rubinetto di Supabase
_versionSubscription = GetIt.I<SupabaseClient>()
.from('app_config') // <-- Sostituisci col nome reale della tua tabella
.from('app_config')
.stream(primaryKey: ['id'])
.listen((_) {
_checkVersion();
});
.listen(
(_) {
_checkVersion();
},
onError: (error, stackTrace) {
debugPrint('Realtime version check stream error: $error');
},
);
}
void _stopRealtimeVersionCheck() {
@@ -294,19 +325,63 @@ class _GlobalUpdateCheckerState extends State<GlobalUpdateChecker>
}
Future<void> _checkVersion() async {
final updateUrl = await VersionCheckService().checkForceUpdate();
final updateInfo = await VersionCheckService().checkUpdate();
if (updateUrl != null && mounted) {
if (mounted) {
setState(() {
_mustUpdate = true;
_updateUrl = updateUrl;
_updateInfo = updateInfo;
// Se arriva una versione diversa da quella già rimandata, azzeriamo il dismiss
if (updateInfo != null &&
updateInfo.latestVersion != _dismissedVersion) {
_isDismissed = false;
}
});
}
}
Future<void> _startAutoUpdate() async {
final updateUrl = _updateInfo?.downloadUrl;
if (updateUrl == null || updateUrl.isEmpty) return;
setState(() {
_isUpdating = true;
_errorMessage = null;
_downloadProgress = 0.0;
_statusMessage = "Avvio aggiornamento in corso...";
});
try {
await AutoUpdateService.downloadAndApplyUpdate(
downloadUrl: updateUrl,
onProgress: (progress, status) {
if (mounted) {
setState(() {
_downloadProgress = progress;
_statusMessage = status;
});
}
},
);
} catch (e) {
if (mounted) {
setState(() {
_isUpdating = false;
_errorMessage = "Errore durante l'aggiornamento automatico: $e";
});
}
}
}
@override
Widget build(BuildContext context) {
if (!_mustUpdate) return widget.child;
final updateInfo = _updateInfo;
final showOverlay = updateInfo != null &&
updateInfo.hasUpdate &&
(updateInfo.isMandatory || !_isDismissed);
if (!showOverlay) return widget.child;
final isMandatory = updateInfo.isMandatory;
return Stack(
children: [
@@ -320,7 +395,7 @@ class _GlobalUpdateCheckerState extends State<GlobalUpdateChecker>
child: Container(
margin: const EdgeInsets.all(24),
padding: const EdgeInsets.all(24),
constraints: const BoxConstraints(maxWidth: 400),
constraints: const BoxConstraints(maxWidth: 440),
decoration: BoxDecoration(
color: Theme.of(context).scaffoldBackgroundColor,
borderRadius: BorderRadius.circular(16),
@@ -339,32 +414,96 @@ class _GlobalUpdateCheckerState extends State<GlobalUpdateChecker>
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
kIsWeb ? Icons.cached : Icons.system_update,
color: Colors.orange,
isMandatory
? Icons.warning_amber_rounded
: (kIsWeb ? Icons.cached : Icons.system_update),
color:
isMandatory ? Colors.amber[700] : Colors.blue,
size: 32,
),
const SizedBox(width: 12),
Flexible(
Expanded(
child: Text(
kIsWeb
? "Aggiornamento"
: "Aggiornamento Obbligatorio",
style: Theme.of(context).textTheme.titleLarge
isMandatory
? "Aggiornamento Obbligatorio"
: (kIsWeb
? "Aggiornamento Disponibile"
: "Nuova Versione Disponibile"),
style: Theme.of(context)
.textTheme
.titleLarge
?.copyWith(fontWeight: FontWeight.bold),
),
),
if (!isMandatory && !_isUpdating)
IconButton(
icon: const Icon(Icons.close),
tooltip: "Chiudi e rimanda",
onPressed: () {
setState(() {
_isDismissed = true;
_dismissedVersion =
updateInfo.latestVersion;
});
},
),
],
),
const SizedBox(height: 16),
Text(
kIsWeb
? "È stata rilasciata una nuova versione dell'applicazione. Ricarica la pagina per scaricare il nuovo codice."
: "Per continuare ad utilizzare l'applicazione è necessario scaricare e installare l'ultimo aggiornamento.",
? "È stata rilasciata una nuova versione dell'applicazione (${updateInfo.latestVersion}). Ricarica la pagina per scaricare il nuovo codice."
: (isMandatory
? "La versione attuale non è più supportata (minima richiesta: ${updateInfo.minVersion}). È necessario aggiornare all'ultima versione (${updateInfo.latestVersion}) per continuare a lavorare."
: "È disponibile la nuova versione ${updateInfo.latestVersion}. Puoi aggiornare subito oppure rimandare."),
textAlign: TextAlign.center,
style: const TextStyle(fontSize: 16),
style: const TextStyle(fontSize: 15),
),
const SizedBox(height: 24),
if (kIsWeb)
if (_errorMessage != null) ...[
Container(
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(
color: Colors.red.withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(8),
border: Border.all(
color: Colors.red.withValues(alpha: 0.3),
),
),
child: Text(
_errorMessage!,
style: const TextStyle(
color: Colors.red,
fontSize: 13,
),
textAlign: TextAlign.center,
),
),
const SizedBox(height: 16),
],
if (_isUpdating) ...[
ClipRRect(
borderRadius: BorderRadius.circular(8),
child: LinearProgressIndicator(
value: _downloadProgress > 0
? _downloadProgress
: null,
minHeight: 10,
),
),
const SizedBox(height: 12),
Text(
_statusMessage,
style: TextStyle(
fontSize: 13,
color: Theme.of(context)
.colorScheme
.onSurface
.withValues(alpha: 0.7),
),
textAlign: TextAlign.center,
),
] else if (kIsWeb) ...[
FilledButton.icon(
icon: const Icon(Icons.refresh),
label: const Text("RICARICA ORA"),
@@ -375,8 +514,50 @@ class _GlobalUpdateCheckerState extends State<GlobalUpdateChecker>
// Hard reload aggirando la cache!
html.window.location.reload();
},
)
else
),
if (!isMandatory) ...[
const SizedBox(height: 10),
OutlinedButton(
style: OutlinedButton.styleFrom(
minimumSize: const Size(double.infinity, 44),
),
onPressed: () {
setState(() {
_isDismissed = true;
_dismissedVersion =
updateInfo.latestVersion;
});
},
child: const Text("PIÙ TARDI"),
),
],
] else if (AutoUpdateService.isAutoUpdateSupported) ...[
FilledButton.icon(
icon: const Icon(Icons.system_update_alt),
label: const Text("AGGIORNA ORA"),
style: FilledButton.styleFrom(
minimumSize: const Size(double.infinity, 50),
backgroundColor: Colors.blue,
),
onPressed: _startAutoUpdate,
),
if (!isMandatory) ...[
const SizedBox(height: 10),
OutlinedButton(
style: OutlinedButton.styleFrom(
minimumSize: const Size(double.infinity, 44),
),
onPressed: () {
setState(() {
_isDismissed = true;
_dismissedVersion =
updateInfo.latestVersion;
});
},
child: const Text("PIÙ TARDI"),
),
],
] else ...[
FilledButton.icon(
icon: const Icon(Icons.download),
label: const Text("SCARICA AGGIORNAMENTO"),
@@ -385,15 +566,46 @@ class _GlobalUpdateCheckerState extends State<GlobalUpdateChecker>
backgroundColor: Colors.blue,
),
onPressed: () async {
if (_updateUrl != null) {
final url = Uri.parse(_updateUrl!);
await launchUrl(
url,
mode: LaunchMode.externalApplication,
);
}
final url = Uri.parse(updateInfo.downloadUrl);
await launchUrl(
url,
mode: LaunchMode.externalApplication,
);
},
),
if (!isMandatory) ...[
const SizedBox(height: 10),
OutlinedButton(
style: OutlinedButton.styleFrom(
minimumSize: const Size(double.infinity, 44),
),
onPressed: () {
setState(() {
_isDismissed = true;
_dismissedVersion =
updateInfo.latestVersion;
});
},
child: const Text("PIÙ TARDI"),
),
],
],
if (!_isUpdating &&
AutoUpdateService.isAutoUpdateSupported &&
_errorMessage != null) ...[
const SizedBox(height: 10),
TextButton.icon(
icon: const Icon(Icons.open_in_browser, size: 16),
label: const Text("Scarica manualmente dal browser"),
onPressed: () async {
final url = Uri.parse(updateInfo.downloadUrl);
await launchUrl(
url,
mode: LaunchMode.externalApplication,
);
},
),
],
],
),
),
+4 -4
View File
@@ -6,18 +6,18 @@
#include "generated_plugin_registrant.h"
#include <app_links_linux/app_links_plugin_linux.h>
#include <file_selector_linux/file_selector_plugin.h>
#include <gtk/gtk_plugin.h>
#include <printing/printing_plugin.h>
#include <url_launcher_linux/url_launcher_plugin.h>
void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) app_links_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "AppLinksPluginLinux");
app_links_plugin_linux_register_with_registrar(app_links_linux_registrar);
g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin");
file_selector_plugin_register_with_registrar(file_selector_linux_registrar);
g_autoptr(FlPluginRegistrar) gtk_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "GtkPlugin");
gtk_plugin_register_with_registrar(gtk_registrar);
g_autoptr(FlPluginRegistrar) printing_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "PrintingPlugin");
printing_plugin_register_with_registrar(printing_registrar);
+1 -1
View File
@@ -3,8 +3,8 @@
#
list(APPEND FLUTTER_PLUGIN_LIST
app_links_linux
file_selector_linux
gtk
printing
url_launcher_linux
)
@@ -11,7 +11,8 @@ import file_selector_macos
import firebase_core
import firebase_messaging
import package_info_plus
import pdfx
import path_provider_foundation
import pdfium_flutter
import printing
import shared_preferences_foundation
import url_launcher_macos
@@ -23,7 +24,8 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
FLTFirebaseMessagingPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseMessagingPlugin"))
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
PdfxPlugin.register(with: registry.registrar(forPlugin: "PdfxPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
PDFiumFlutterPlugin.register(with: registry.registrar(forPlugin: "PDFiumFlutterPlugin"))
PrintingPlugin.register(with: registry.registrar(forPlugin: "PrintingPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
+1 -1
View File
@@ -1,4 +1,4 @@
platform :osx, '10.15'
platform :osx, '12.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
+48 -40
View File
@@ -5,33 +5,33 @@ PODS:
- FlutterMacOS
- file_selector_macos (0.0.1):
- FlutterMacOS
- Firebase/CoreOnly (12.15.0):
- FirebaseCore (~> 12.15.0)
- Firebase/Messaging (12.15.0):
- Firebase/CoreOnly (12.19.0):
- FirebaseCore (~> 12.19.0)
- Firebase/Messaging (12.19.0):
- Firebase/CoreOnly
- FirebaseMessaging (~> 12.15.0)
- firebase_core (4.11.0):
- Firebase/CoreOnly (~> 12.15.0)
- FirebaseMessaging (~> 12.19.0)
- firebase_core (4.15.0):
- Firebase/CoreOnly (~> 12.19.0)
- FlutterMacOS
- firebase_messaging (16.4.1):
- Firebase/CoreOnly (~> 12.15.0)
- Firebase/Messaging (~> 12.15.0)
- firebase_messaging (16.7.0):
- Firebase/CoreOnly (~> 12.19.0)
- Firebase/Messaging (~> 12.19.0)
- firebase_core
- FlutterMacOS
- FirebaseCore (12.15.0):
- FirebaseCoreInternal (~> 12.15.0)
- FirebaseCore (12.19.0):
- FirebaseCoreInternal (~> 12.19.0)
- GoogleUtilities/Environment (~> 8.1)
- GoogleUtilities/Logger (~> 8.1)
- FirebaseCoreInternal (12.15.0):
- FirebaseCoreInternal (12.19.0):
- "GoogleUtilities/NSData+zlib (~> 8.1)"
- FirebaseInstallations (12.15.0):
- FirebaseCore (~> 12.15.0)
- FirebaseInstallations (12.19.0):
- FirebaseCore (~> 12.19.0)
- GoogleUtilities/Environment (~> 8.1)
- GoogleUtilities/UserDefaults (~> 8.1)
- PromisesObjC (~> 2.4)
- FirebaseMessaging (12.15.0):
- FirebaseCore (~> 12.15.0)
- FirebaseInstallations (~> 12.15.0)
- FirebaseMessaging (12.19.0):
- FirebaseCore (~> 12.19.0)
- FirebaseInstallations (~> 12.19.0)
- GoogleDataTransport (~> 10.1)
- GoogleUtilities/AppDelegateSwizzler (~> 8.1)
- GoogleUtilities/Environment (~> 8.1)
@@ -42,28 +42,28 @@ PODS:
- GoogleDataTransport (10.1.1):
- nanopb (~> 3.30910.0)
- PromisesObjC (~> 2.4)
- GoogleUtilities/AppDelegateSwizzler (8.1.2):
- GoogleUtilities/AppDelegateSwizzler (8.1.4):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- GoogleUtilities/Privacy
- GoogleUtilities/Environment (8.1.2):
- GoogleUtilities/Environment (8.1.4):
- GoogleUtilities/Privacy
- GoogleUtilities/Logger (8.1.2):
- GoogleUtilities/Logger (8.1.4):
- GoogleUtilities/Environment
- GoogleUtilities/Privacy
- GoogleUtilities/Network (8.1.2):
- GoogleUtilities/Network (8.1.4):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Privacy
- GoogleUtilities/Reachability
- "GoogleUtilities/NSData+zlib (8.1.2)":
- "GoogleUtilities/NSData+zlib (8.1.4)":
- GoogleUtilities/Privacy
- GoogleUtilities/Privacy (8.1.2)
- GoogleUtilities/Reachability (8.1.2):
- GoogleUtilities/Privacy (8.1.4)
- GoogleUtilities/Reachability (8.1.4):
- GoogleUtilities/Logger
- GoogleUtilities/Privacy
- GoogleUtilities/UserDefaults (8.1.2):
- GoogleUtilities/UserDefaults (8.1.4):
- GoogleUtilities/Logger
- GoogleUtilities/Privacy
- nanopb (3.30910.0):
@@ -73,7 +73,11 @@ PODS:
- nanopb/encode (3.30910.0)
- package_info_plus (0.0.1):
- FlutterMacOS
- pdfx (1.0.0):
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- pdfium_flutter (0.1.5):
- Flutter
- FlutterMacOS
- printing (1.0.0):
- FlutterMacOS
@@ -92,7 +96,8 @@ DEPENDENCIES:
- firebase_messaging (from `Flutter/ephemeral/.symlinks/plugins/firebase_messaging/macos`)
- FlutterMacOS (from `Flutter/ephemeral`)
- package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`)
- pdfx (from `Flutter/ephemeral/.symlinks/plugins/pdfx/macos`)
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
- pdfium_flutter (from `Flutter/ephemeral/.symlinks/plugins/pdfium_flutter/darwin`)
- printing (from `Flutter/ephemeral/.symlinks/plugins/printing/macos`)
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`)
- url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`)
@@ -124,8 +129,10 @@ EXTERNAL SOURCES:
:path: Flutter/ephemeral
package_info_plus:
:path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos
pdfx:
:path: Flutter/ephemeral/.symlinks/plugins/pdfx/macos
path_provider_foundation:
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin
pdfium_flutter:
:path: Flutter/ephemeral/.symlinks/plugins/pdfium_flutter/darwin
printing:
:path: Flutter/ephemeral/.symlinks/plugins/printing/macos
shared_preferences_foundation:
@@ -137,24 +144,25 @@ SPEC CHECKSUMS:
app_links: 05a6ec2341985eb05e9f97dc63f5837c39895c3f
file_picker: 7584aae6fa07a041af2b36a2655122d42f578c1a
file_selector_macos: 9e9e068e90ebee155097d00e89ae91edb2374db7
Firebase: a8539b633d474fbeb654c7043f9c1649e274045b
firebase_core: 4922bf7ac16c97fb67008a1a00842059b345b0d9
firebase_messaging: 6c506190a7499e67e644957961f86efe1ac1c3e3
FirebaseCore: 2e86a4ea1684d4381707069e4a6d89ac808e901e
FirebaseCoreInternal: 6ab6a02c94446c026d2cf35cf5383842ebaa4992
FirebaseInstallations: eb29ccbf64eaedf86fd5b2ccc7fabde567660b52
FirebaseMessaging: 40017d7bc8457ee295b0f41d480a80fdabc9994e
FlutterMacOS: d0db08ddef1a9af05a5ec4b724367152bb0500b1
Firebase: 7ca191e43724142f79fae653547b3382c45413cc
firebase_core: 43e1937898a25c5d76bc3ac4e58539465c9f219d
firebase_messaging: cf6920ca401d6870c1095a15cec1d4b9ca92b89f
FirebaseCore: c990214798d7c568ad436a15ba7da25c7a278c9a
FirebaseCoreInternal: 656b1c2fd5a1c5976183dc54b73deda78fb26ee3
FirebaseInstallations: f70a49eed611f5602f373e40974b3b01556ac217
FirebaseMessaging: c15f48126adbe8b4d3238a5e1fa24bab3ad3e472
FlutterMacOS: c232990155153907050900a2e175c7773903ba4e
GoogleDataTransport: a24e58982ab3ba2f64d79613e027fe7f57e88539
GoogleUtilities: 766ace00c6b10d8148408f329d10c4f051931850
GoogleUtilities: db34c1c11c6f2eccb6fab2340cb8ceb1451299dc
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
package_info_plus: f0052d280d17aa382b932f399edf32507174e870
pdfx: 1e79f57f7a6ce2f4a4c30f21fa54d3dc82441b51
path_provider_foundation: bb55f6dbba17d0dccd6737fe6f7f34fbd0376880
pdfium_flutter: f29beeb612293cc42df95beee223a4925ce2458e
printing: 7916ffaaede65713863e621de9a4742d9fa723b9
PromisesObjC: 752c3227f599e3467650e47ea36f433eeb10c273
shared_preferences_foundation: 7036424c3d8ec98dfe75ff1667cb0cd531ec82bb
url_launcher_macos: f87a979182d112f911de6820aefddaf56ee9fbfd
PODFILE CHECKSUM: 180da7a1dbc1d932db021ebc8007656e7c46dd99
PODFILE CHECKSUM: 1920c73e89a474dd2aac51211a579ac3e392c7fa
COCOAPODS: 1.17.0
+3 -3
View File
@@ -589,7 +589,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MACOSX_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
@@ -671,7 +671,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MACOSX_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
@@ -721,7 +721,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MACOSX_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
+1
View File
@@ -0,0 +1 @@
f4084dd344cf1045484c82f883b6ac45
@@ -0,0 +1 @@
{"appPreferencesBuildSettings":{},"buildConfigurations":[{"buildSettings":{"ALWAYS_SEARCH_USER_PATHS":"NO","CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED":"YES","CLANG_ANALYZER_NONNULL":"YES","CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION":"YES_AGGRESSIVE","CLANG_CXX_LANGUAGE_STANDARD":"gnu++14","CLANG_CXX_LIBRARY":"libc++","CLANG_ENABLE_MODULES":"YES","CLANG_ENABLE_OBJC_ARC":"YES","CLANG_ENABLE_OBJC_WEAK":"YES","CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING":"YES","CLANG_WARN_BOOL_CONVERSION":"YES","CLANG_WARN_COMMA":"YES","CLANG_WARN_CONSTANT_CONVERSION":"YES","CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS":"YES","CLANG_WARN_DIRECT_OBJC_ISA_USAGE":"YES_ERROR","CLANG_WARN_DOCUMENTATION_COMMENTS":"YES","CLANG_WARN_EMPTY_BODY":"YES","CLANG_WARN_ENUM_CONVERSION":"YES","CLANG_WARN_INFINITE_RECURSION":"YES","CLANG_WARN_INT_CONVERSION":"YES","CLANG_WARN_NON_LITERAL_NULL_CONVERSION":"YES","CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF":"YES","CLANG_WARN_OBJC_LITERAL_CONVERSION":"YES","CLANG_WARN_OBJC_ROOT_CLASS":"YES_ERROR","CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER":"YES","CLANG_WARN_RANGE_LOOP_ANALYSIS":"YES","CLANG_WARN_STRICT_PROTOTYPES":"YES","CLANG_WARN_SUSPICIOUS_MOVE":"YES","CLANG_WARN_UNGUARDED_AVAILABILITY":"YES_AGGRESSIVE","CLANG_WARN_UNREACHABLE_CODE":"YES","CLANG_WARN__DUPLICATE_METHOD_MATCH":"YES","COPY_PHASE_STRIP":"NO","DEBUG_INFORMATION_FORMAT":"dwarf","ENABLE_STRICT_OBJC_MSGSEND":"YES","ENABLE_TESTABILITY":"YES","GCC_C_LANGUAGE_STANDARD":"gnu11","GCC_DYNAMIC_NO_PIC":"NO","GCC_NO_COMMON_BLOCKS":"YES","GCC_OPTIMIZATION_LEVEL":"0","GCC_PREPROCESSOR_DEFINITIONS":"POD_CONFIGURATION_DEBUG=1 DEBUG=1 $(inherited)","GCC_WARN_64_TO_32_BIT_CONVERSION":"YES","GCC_WARN_ABOUT_RETURN_TYPE":"YES_ERROR","GCC_WARN_UNDECLARED_SELECTOR":"YES","GCC_WARN_UNINITIALIZED_AUTOS":"YES_AGGRESSIVE","GCC_WARN_UNUSED_FUNCTION":"YES","GCC_WARN_UNUSED_VARIABLE":"YES","IPHONEOS_DEPLOYMENT_TARGET":"13.0","MTL_ENABLE_DEBUG_INFO":"INCLUDE_SOURCE","MTL_FAST_MATH":"YES","ONLY_ACTIVE_ARCH":"YES","PRODUCT_NAME":"$(TARGET_NAME)","STRIP_INSTALLED_PRODUCT":"NO","SWIFT_ACTIVE_COMPILATION_CONDITIONS":"DEBUG","SWIFT_OPTIMIZATION_LEVEL":"-Onone","SWIFT_VERSION":"5.0","SYMROOT":"${SRCROOT}/../build"},"guid":"bfdfe7dc352907fc980b868725387e983f8723597279233a8f05ceff9fe3456f","name":"Debug"},{"buildSettings":{"ALWAYS_SEARCH_USER_PATHS":"NO","CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED":"YES","CLANG_ANALYZER_NONNULL":"YES","CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION":"YES_AGGRESSIVE","CLANG_CXX_LANGUAGE_STANDARD":"gnu++14","CLANG_CXX_LIBRARY":"libc++","CLANG_ENABLE_MODULES":"YES","CLANG_ENABLE_OBJC_ARC":"YES","CLANG_ENABLE_OBJC_WEAK":"YES","CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING":"YES","CLANG_WARN_BOOL_CONVERSION":"YES","CLANG_WARN_COMMA":"YES","CLANG_WARN_CONSTANT_CONVERSION":"YES","CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS":"YES","CLANG_WARN_DIRECT_OBJC_ISA_USAGE":"YES_ERROR","CLANG_WARN_DOCUMENTATION_COMMENTS":"YES","CLANG_WARN_EMPTY_BODY":"YES","CLANG_WARN_ENUM_CONVERSION":"YES","CLANG_WARN_INFINITE_RECURSION":"YES","CLANG_WARN_INT_CONVERSION":"YES","CLANG_WARN_NON_LITERAL_NULL_CONVERSION":"YES","CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF":"YES","CLANG_WARN_OBJC_LITERAL_CONVERSION":"YES","CLANG_WARN_OBJC_ROOT_CLASS":"YES_ERROR","CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER":"YES","CLANG_WARN_RANGE_LOOP_ANALYSIS":"YES","CLANG_WARN_STRICT_PROTOTYPES":"YES","CLANG_WARN_SUSPICIOUS_MOVE":"YES","CLANG_WARN_UNGUARDED_AVAILABILITY":"YES_AGGRESSIVE","CLANG_WARN_UNREACHABLE_CODE":"YES","CLANG_WARN__DUPLICATE_METHOD_MATCH":"YES","COPY_PHASE_STRIP":"NO","DEBUG_INFORMATION_FORMAT":"dwarf-with-dsym","ENABLE_NS_ASSERTIONS":"NO","ENABLE_STRICT_OBJC_MSGSEND":"YES","GCC_C_LANGUAGE_STANDARD":"gnu11","GCC_NO_COMMON_BLOCKS":"YES","GCC_PREPROCESSOR_DEFINITIONS":"POD_CONFIGURATION_PROFILE=1 $(inherited)","GCC_WARN_64_TO_32_BIT_CONVERSION":"YES","GCC_WARN_ABOUT_RETURN_TYPE":"YES_ERROR","GCC_WARN_UNDECLARED_SELECTOR":"YES","GCC_WARN_UNINITIALIZED_AUTOS":"YES_AGGRESSIVE","GCC_WARN_UNUSED_FUNCTION":"YES","GCC_WARN_UNUSED_VARIABLE":"YES","IPHONEOS_DEPLOYMENT_TARGET":"13.0","MTL_ENABLE_DEBUG_INFO":"NO","MTL_FAST_MATH":"YES","PRODUCT_NAME":"$(TARGET_NAME)","STRIP_INSTALLED_PRODUCT":"NO","SWIFT_COMPILATION_MODE":"wholemodule","SWIFT_OPTIMIZATION_LEVEL":"-O","SWIFT_VERSION":"5.0","SYMROOT":"${SRCROOT}/../build"},"guid":"bfdfe7dc352907fc980b868725387e98431d6fbac4fcf14f03a16b06b7267016","name":"Profile"},{"buildSettings":{"ALWAYS_SEARCH_USER_PATHS":"NO","CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED":"YES","CLANG_ANALYZER_NONNULL":"YES","CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION":"YES_AGGRESSIVE","CLANG_CXX_LANGUAGE_STANDARD":"gnu++14","CLANG_CXX_LIBRARY":"libc++","CLANG_ENABLE_MODULES":"YES","CLANG_ENABLE_OBJC_ARC":"YES","CLANG_ENABLE_OBJC_WEAK":"YES","CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING":"YES","CLANG_WARN_BOOL_CONVERSION":"YES","CLANG_WARN_COMMA":"YES","CLANG_WARN_CONSTANT_CONVERSION":"YES","CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS":"YES","CLANG_WARN_DIRECT_OBJC_ISA_USAGE":"YES_ERROR","CLANG_WARN_DOCUMENTLine truncated
@@ -0,0 +1 @@
{"buildConfigurations":[{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e9807dced212da9d57ff037610b6063ab15","buildSettings":{"CODE_SIGN_IDENTITY[sdk=appletvos*]":"","CODE_SIGN_IDENTITY[sdk=iphoneos*]":"","CODE_SIGN_IDENTITY[sdk=watchos*]":"","CURRENT_PROJECT_VERSION":"1","DEFINES_MODULE":"YES","DYLIB_COMPATIBILITY_VERSION":"1","DYLIB_CURRENT_VERSION":"1","DYLIB_INSTALL_NAME_BASE":"@rpath","ENABLE_MODULE_VERIFIER":"NO","ENABLE_USER_SCRIPT_SANDBOXING":"NO","GCC_PREFIX_HEADER":"Target Support Files/SDWebImage/SDWebImage-prefix.pch","GENERATE_INFOPLIST_FILE":"NO","INFOPLIST_FILE":"Target Support Files/SDWebImage/SDWebImage-Info.plist","INSTALL_PATH":"$(LOCAL_LIBRARY_DIR)/Frameworks","IPHONEOS_DEPLOYMENT_TARGET":"9.0","LD_RUNPATH_SEARCH_PATHS":"$(inherited) @executable_path/Frameworks @loader_path/Frameworks","MODULEMAP_FILE":"Target Support Files/SDWebImage/SDWebImage.modulemap","ONLY_ACTIVE_ARCH":"NO","PRODUCT_MODULE_NAME":"SDWebImage","PRODUCT_NAME":"SDWebImage","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","SWIFT_ACTIVE_COMPILATION_CONDITIONS":"$(inherited) ","SWIFT_INSTALL_OBJC_HEADER":"YES","SWIFT_VERSION":"5.0","TARGETED_DEVICE_FAMILY":"1,2","VERSIONING_SYSTEM":"apple-generic","VERSION_INFO_PREFIX":""},"guid":"bfdfe7dc352907fc980b868725387e98589ff266d192c09051f93298f2daa9a5","name":"Debug"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e9817591ddf25ade48b1de942ba4d9a652c","buildSettings":{"CODE_SIGN_IDENTITY[sdk=appletvos*]":"","CODE_SIGN_IDENTITY[sdk=iphoneos*]":"","CODE_SIGN_IDENTITY[sdk=watchos*]":"","CURRENT_PROJECT_VERSION":"1","DEFINES_MODULE":"YES","DYLIB_COMPATIBILITY_VERSION":"1","DYLIB_CURRENT_VERSION":"1","DYLIB_INSTALL_NAME_BASE":"@rpath","ENABLE_MODULE_VERIFIER":"NO","ENABLE_USER_SCRIPT_SANDBOXING":"NO","GCC_PREFIX_HEADER":"Target Support Files/SDWebImage/SDWebImage-prefix.pch","GENERATE_INFOPLIST_FILE":"NO","INFOPLIST_FILE":"Target Support Files/SDWebImage/SDWebImage-Info.plist","INSTALL_PATH":"$(LOCAL_LIBRARY_DIR)/Frameworks","IPHONEOS_DEPLOYMENT_TARGET":"9.0","LD_RUNPATH_SEARCH_PATHS":"$(inherited) @executable_path/Frameworks @loader_path/Frameworks","MODULEMAP_FILE":"Target Support Files/SDWebImage/SDWebImage.modulemap","PRODUCT_MODULE_NAME":"SDWebImage","PRODUCT_NAME":"SDWebImage","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","SWIFT_ACTIVE_COMPILATION_CONDITIONS":"$(inherited) ","SWIFT_INSTALL_OBJC_HEADER":"YES","SWIFT_VERSION":"5.0","TARGETED_DEVICE_FAMILY":"1,2","VALIDATE_PRODUCT":"YES","VERSIONING_SYSTEM":"apple-generic","VERSION_INFO_PREFIX":""},"guid":"bfdfe7dc352907fc980b868725387e9895143d94b34658a94778e629a50709d2","name":"Profile"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e9817591ddf25ade48b1de942ba4d9a652c","buildSettings":{"CODE_SIGN_IDENTITY[sdk=appletvos*]":"","CODE_SIGN_IDENTITY[sdk=iphoneos*]":"","CODE_SIGN_IDENTITY[sdk=watchos*]":"","CURRENT_PROJECT_VERSION":"1","DEFINES_MODULE":"YES","DYLIB_COMPATIBILITY_VERSION":"1","DYLIB_CURRENT_VERSION":"1","DYLIB_INSTALL_NAME_BASE":"@rpath","ENABLE_MODULE_VERIFIER":"NO","ENABLE_USER_SCRIPT_SANDBOXING":"NO","GCC_PREFIX_HEADER":"Target Support Files/SDWebImage/SDWebImage-prefix.pch","GENERATE_INFOPLIST_FILE":"NO","INFOPLIST_FILE":"Target Support Files/SDWebImage/SDWebImage-Info.plist","INSTALL_PATH":"$(LOCAL_LIBRARY_DIR)/Frameworks","IPHONEOS_DEPLOYMENT_TARGET":"9.0","LD_RUNPATH_SEARCH_PATHS":"$(inherited) @executable_path/Frameworks @loader_path/Frameworks","MODULEMAP_FILE":"Target Support Files/SDWebImage/SDWebImage.modulemap","PRODUCT_MODULE_NAME":"SDWebImage","PRODUCT_NAME":"SDWebImage","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","SWIFT_ACTIVE_COMPILATION_CONDITIONS":"$(inherited) ","SWIFT_INSTALL_OBJC_HEADER":"YES","SWIFT_VERSION":"5.0","TARGETED_DEVICE_FAMILY":"1,2","VALIDATE_PRODUCT":"YES","VERSIONING_SYSTEM":"apple-generic","VERSION_INFO_PREFIX":""},"guid":"bfdfe7dc352907fc980b868725387e982cd6ac18b02fdae827a3b91521449ce1","name":"Release"}],"buildPhases":[{"buildFiles":[{"fileReference":"bfdfe7dc352907fc980b868725387e984ef5f54b72a7372aba1e579dc0ccd846","guid":"bfdfe7dc352907fc980b868725387e983466130875812026d2ffd41bd84ff6bc","headerVisibility":"private"},{"fileReference":"bfdfe7dc352907fc980b868725387e983c9e4b25cc4f3d4a01ef0e2732f2904d","guid":"bfdfe7dc352907fc980b868725387e98c1a17c4251769d2ae9e44f5c112f7f9b","headerVisibility":"public"},{"fileReference":"bfdfe7dc352907fc980b868725387e986cf82ded5cbcd0aedb1e047492bd59f4","guid":"bfdfe7dc352907fc980b868725387e98fe19933aae33539efd1f4e1ca4dc2e84","headerVisibility":"public"},{"fileReference":"bfdfe7dc352907fc980b868725387e98327653faf119453e0c6aec2865862035","guid":"bfdfe7dc352907fc980b868725387e98a5088909540cd2cafeaaf8a4c05e9576","headerVisibility":"public"},{"fileReference":"bfdfe7dc352907fc980b868725387e9822231aaaedf7df013e4b108e0e6fd285","guid":"bfdfe7dc352907fc980b868725387e98703235191994a43429ab69010353e6a3","headerVisibility":"public"},{"fileReference":"bfdfe7dc352907fc980b868725387e989aaed392d2dd6ac61db9e4ecbcf25857","guid":"bLine truncated
@@ -0,0 +1 @@
{"buildConfigurations":[{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e98d19afb1410fae17f549fed9dd2d1b8c3","buildSettings":{"CLANG_ENABLE_OBJC_WEAK":"NO","CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER":"NO","CODE_SIGN_IDENTITY[sdk=appletvos*]":"","CODE_SIGN_IDENTITY[sdk=iphoneos*]":"","CODE_SIGN_IDENTITY[sdk=watchos*]":"","CURRENT_PROJECT_VERSION":"1","DYLIB_COMPATIBILITY_VERSION":"1","DYLIB_CURRENT_VERSION":"1","DYLIB_INSTALL_NAME_BASE":"@rpath","ENABLE_BITCODE":"NO","ENABLE_MODULE_VERIFIER":"NO","ENABLE_USER_SCRIPT_SANDBOXING":"NO","EXCLUDED_ARCHS[sdk=iphoneos*]":"$(inherited) armv7","EXCLUDED_ARCHS[sdk=iphonesimulator*]":"$(inherited) i386","FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios/Flutter.xcframework/ios-arm64\" $(inherited)","FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios/Flutter.xcframework/ios-arm64_x86_64-simulator\" $(inherited)","GCC_PREFIX_HEADER":"Target Support Files/url_launcher_ios/url_launcher_ios-prefix.pch","GENERATE_INFOPLIST_FILE":"NO","INFOPLIST_FILE":"Target Support Files/url_launcher_ios/url_launcher_ios-Info.plist","INSTALL_PATH":"$(LOCAL_LIBRARY_DIR)/Frameworks","IPHONEOS_DEPLOYMENT_TARGET":"13.0","MODULEMAP_FILE":"Target Support Files/url_launcher_ios/url_launcher_ios.modulemap","ONLY_ACTIVE_ARCH":"NO","OTHER_LDFLAGS":"$(inherited) -framework Flutter","PRODUCT_MODULE_NAME":"url_launcher_ios","PRODUCT_NAME":"url_launcher_ios","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","SWIFT_ACTIVE_COMPILATION_CONDITIONS":"$(inherited) ","SWIFT_INSTALL_OBJC_HEADER":"YES","SWIFT_VERSION":"5.0","TARGETED_DEVICE_FAMILY":"1,2","VALID_ARCHS[sdk=iphonesimulator*]":"$(ARCHS_STANDARD)","VERSIONING_SYSTEM":"apple-generic","VERSION_INFO_PREFIX":""},"guid":"bfdfe7dc352907fc980b868725387e98afb629f0dcc255b13d82c9ababfaf54f","name":"Debug"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e98f9a4bf43cf6f978b20d8a9ce206deac9","buildSettings":{"CLANG_ENABLE_OBJC_WEAK":"NO","CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER":"NO","CODE_SIGN_IDENTITY[sdk=appletvos*]":"","CODE_SIGN_IDENTITY[sdk=iphoneos*]":"","CODE_SIGN_IDENTITY[sdk=watchos*]":"","CURRENT_PROJECT_VERSION":"1","DYLIB_COMPATIBILITY_VERSION":"1","DYLIB_CURRENT_VERSION":"1","DYLIB_INSTALL_NAME_BASE":"@rpath","ENABLE_BITCODE":"NO","ENABLE_MODULE_VERIFIER":"NO","ENABLE_USER_SCRIPT_SANDBOXING":"NO","EXCLUDED_ARCHS[sdk=iphoneos*]":"$(inherited) armv7","EXCLUDED_ARCHS[sdk=iphonesimulator*]":"$(inherited) i386","FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64\" $(inherited)","FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64_x86_64-simulator\" $(inherited)","GCC_PREFIX_HEADER":"Target Support Files/url_launcher_ios/url_launcher_ios-prefix.pch","GENERATE_INFOPLIST_FILE":"NO","INFOPLIST_FILE":"Target Support Files/url_launcher_ios/url_launcher_ios-Info.plist","INSTALL_PATH":"$(LOCAL_LIBRARY_DIR)/Frameworks","IPHONEOS_DEPLOYMENT_TARGET":"13.0","MODULEMAP_FILE":"Target Support Files/url_launcher_ios/url_launcher_ios.modulemap","OTHER_LDFLAGS":"$(inherited) -framework Flutter","PRODUCT_MODULE_NAME":"url_launcher_ios","PRODUCT_NAME":"url_launcher_ios","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","SWIFT_ACTIVE_COMPILATION_CONDITIONS":"$(inherited) ","SWIFT_INSTALL_OBJC_HEADER":"YES","SWIFT_VERSION":"5.0","TARGETED_DEVICE_FAMILY":"1,2","VALIDATE_PRODUCT":"YES","VALID_ARCHS[sdk=iphonesimulator*]":"$(ARCHS_STANDARD)","VERSIONING_SYSTEM":"apple-generic","VERSION_INFO_PREFIX":""},"guid":"bfdfe7dc352907fc980b868725387e9879db561c8b08d043bb6ba1bb3996219a","name":"Profile"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e98f9a4bf43cf6f978b20d8a9ce206deac9","buildSettings":{"CLANG_ENABLE_OBJC_WEAK":"NO","CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER":"NO","CODE_SIGN_IDENTITY[sdk=appletvos*]":"","CODE_SIGN_IDENTITY[sdk=iphoneos*]":"","CODE_SIGN_IDENTITY[sdk=watchos*]":"","CURRENT_PROJECT_VERSION":"1","DYLIB_COMPATIBILITY_VERSION":"1","DYLIB_CURRENT_VERSION":"1","DYLIB_INSTALL_NAME_BASE":"@rpath","ENABLE_BITCODE":"NO","ENABLE_MODULE_VERIFIER":"NO","ENABLE_USER_SCRIPT_SANDBOXING":"NO","EXCLUDED_ARCHS[sdk=iphoneos*]":"$(inherited) armv7","EXCLUDED_ARCHS[sdk=iphonesimulator*]":"$(inherited) i386","FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64\" $(inherited)","FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64_x86_64-simulator\" $(inherited)","GCC_PREFIX_HEADER":"Target Support Files/url_launcher_ios/url_launcher_ios-prefix.pch","GENERATE_INFOPLIST_FILE":"NO","INFOPLIST_FILE":"Target Support Files/url_launcher_ios/url_launcher_ios-Info.plist","INSTALL_PATH":"$(LOCAL_LIBRARY_DIR)Line truncated
@@ -0,0 +1 @@
{"buildConfigurations":[{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e98a92e512aac87655ee7918ffca1bc6995","buildSettings":{"CLANG_ENABLE_OBJC_WEAK":"NO","CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER":"NO","CODE_SIGN_IDENTITY[sdk=appletvos*]":"","CODE_SIGN_IDENTITY[sdk=iphoneos*]":"","CODE_SIGN_IDENTITY[sdk=watchos*]":"","CURRENT_PROJECT_VERSION":"1","DYLIB_COMPATIBILITY_VERSION":"1","DYLIB_CURRENT_VERSION":"1","DYLIB_INSTALL_NAME_BASE":"@rpath","ENABLE_BITCODE":"NO","ENABLE_MODULE_VERIFIER":"NO","ENABLE_USER_SCRIPT_SANDBOXING":"NO","EXCLUDED_ARCHS[sdk=iphoneos*]":"$(inherited) armv7","EXCLUDED_ARCHS[sdk=iphonesimulator*]":"$(inherited) i386","FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios/Flutter.xcframework/ios-arm64\" $(inherited)","FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios/Flutter.xcframework/ios-arm64_x86_64-simulator\" $(inherited)","GCC_PREFIX_HEADER":"Target Support Files/shared_preferences_foundation/shared_preferences_foundation-prefix.pch","GENERATE_INFOPLIST_FILE":"NO","INFOPLIST_FILE":"Target Support Files/shared_preferences_foundation/shared_preferences_foundation-Info.plist","INSTALL_PATH":"$(LOCAL_LIBRARY_DIR)/Frameworks","IPHONEOS_DEPLOYMENT_TARGET":"13.0","MODULEMAP_FILE":"Target Support Files/shared_preferences_foundation/shared_preferences_foundation.modulemap","ONLY_ACTIVE_ARCH":"NO","OTHER_LDFLAGS":"$(inherited) -framework Flutter","PRODUCT_MODULE_NAME":"shared_preferences_foundation","PRODUCT_NAME":"shared_preferences_foundation","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","SWIFT_ACTIVE_COMPILATION_CONDITIONS":"$(inherited) ","SWIFT_INSTALL_OBJC_HEADER":"YES","SWIFT_VERSION":"5.0","TARGETED_DEVICE_FAMILY":"1,2","VALID_ARCHS[sdk=iphonesimulator*]":"$(ARCHS_STANDARD)","VERSIONING_SYSTEM":"apple-generic","VERSION_INFO_PREFIX":""},"guid":"bfdfe7dc352907fc980b868725387e98070d049bc9f33d4eedf57f66e50812a1","name":"Debug"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e98eb9d36647a0bea0e4eb1b12f12d263d4","buildSettings":{"CLANG_ENABLE_OBJC_WEAK":"NO","CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER":"NO","CODE_SIGN_IDENTITY[sdk=appletvos*]":"","CODE_SIGN_IDENTITY[sdk=iphoneos*]":"","CODE_SIGN_IDENTITY[sdk=watchos*]":"","CURRENT_PROJECT_VERSION":"1","DYLIB_COMPATIBILITY_VERSION":"1","DYLIB_CURRENT_VERSION":"1","DYLIB_INSTALL_NAME_BASE":"@rpath","ENABLE_BITCODE":"NO","ENABLE_MODULE_VERIFIER":"NO","ENABLE_USER_SCRIPT_SANDBOXING":"NO","EXCLUDED_ARCHS[sdk=iphoneos*]":"$(inherited) armv7","EXCLUDED_ARCHS[sdk=iphonesimulator*]":"$(inherited) i386","FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64\" $(inherited)","FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64_x86_64-simulator\" $(inherited)","GCC_PREFIX_HEADER":"Target Support Files/shared_preferences_foundation/shared_preferences_foundation-prefix.pch","GENERATE_INFOPLIST_FILE":"NO","INFOPLIST_FILE":"Target Support Files/shared_preferences_foundation/shared_preferences_foundation-Info.plist","INSTALL_PATH":"$(LOCAL_LIBRARY_DIR)/Frameworks","IPHONEOS_DEPLOYMENT_TARGET":"13.0","MODULEMAP_FILE":"Target Support Files/shared_preferences_foundation/shared_preferences_foundation.modulemap","OTHER_LDFLAGS":"$(inherited) -framework Flutter","PRODUCT_MODULE_NAME":"shared_preferences_foundation","PRODUCT_NAME":"shared_preferences_foundation","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","SWIFT_ACTIVE_COMPILATION_CONDITIONS":"$(inherited) ","SWIFT_INSTALL_OBJC_HEADER":"YES","SWIFT_VERSION":"5.0","TARGETED_DEVICE_FAMILY":"1,2","VALIDATE_PRODUCT":"YES","VALID_ARCHS[sdk=iphonesimulator*]":"$(ARCHS_STANDARD)","VERSIONING_SYSTEM":"apple-generic","VERSION_INFO_PREFIX":""},"guid":"bfdfe7dc352907fc980b868725387e9844e5c4b35c406f6d23ac5779a73cf27a","name":"Profile"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e98eb9d36647a0bea0e4eb1b12f12d263d4","buildSettings":{"CLANG_ENABLE_OBJC_WEAK":"NO","CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER":"NO","CODE_SIGN_IDENTITY[sdk=appletvos*]":"","CODE_SIGN_IDENTITY[sdk=iphoneos*]":"","CODE_SIGN_IDENTITY[sdk=watchos*]":"","CURRENT_PROJECT_VERSION":"1","DYLIB_COMPATIBILITY_VERSION":"1","DYLIB_CURRENT_VERSION":"1","DYLIB_INSTALL_NAME_BASE":"@rpath","ENABLE_BITCODE":"NO","ENABLE_MODULE_VERIFIER":"NO","ENABLE_USER_SCRIPT_SANDBOXING":"NO","EXCLUDED_ARCHS[sdk=iphoneos*]":"$(inherited) armv7","EXCLUDED_ARCHS[sdk=iphonesimulator*]":"$(inherited) i386","FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64\" $(inherited)","FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64_x86_64-simulator\" $(inherited)","GCC_PREFIX_HEADER":"Target SuppLine truncated
@@ -0,0 +1 @@
{"buildConfigurations":[{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e98e627b81f2277a26392e82dc437b640b9","buildSettings":{"CODE_SIGN_IDENTITY[sdk=appletvos*]":"","CODE_SIGN_IDENTITY[sdk=iphoneos*]":"","CODE_SIGN_IDENTITY[sdk=watchos*]":"","CURRENT_PROJECT_VERSION":"1","DEFINES_MODULE":"YES","DYLIB_COMPATIBILITY_VERSION":"1","DYLIB_CURRENT_VERSION":"1","DYLIB_INSTALL_NAME_BASE":"@rpath","ENABLE_MODULE_VERIFIER":"NO","ENABLE_USER_SCRIPT_SANDBOXING":"NO","GCC_PREFIX_HEADER":"Target Support Files/DKImagePickerController/DKImagePickerController-prefix.pch","GENERATE_INFOPLIST_FILE":"NO","INFOPLIST_FILE":"Target Support Files/DKImagePickerController/DKImagePickerController-Info.plist","INSTALL_PATH":"$(LOCAL_LIBRARY_DIR)/Frameworks","IPHONEOS_DEPLOYMENT_TARGET":"9.0","LD_RUNPATH_SEARCH_PATHS":"$(inherited) @executable_path/Frameworks @loader_path/Frameworks","MODULEMAP_FILE":"Target Support Files/DKImagePickerController/DKImagePickerController.modulemap","ONLY_ACTIVE_ARCH":"NO","PRODUCT_MODULE_NAME":"DKImagePickerController","PRODUCT_NAME":"DKImagePickerController","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","SWIFT_ACTIVE_COMPILATION_CONDITIONS":"$(inherited) ","SWIFT_INSTALL_OBJC_HEADER":"YES","SWIFT_VERSION":"5","TARGETED_DEVICE_FAMILY":"1,2","VERSIONING_SYSTEM":"apple-generic","VERSION_INFO_PREFIX":""},"guid":"bfdfe7dc352907fc980b868725387e987c1a49d2eb4928f38153fbb752b43f0d","name":"Debug"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e984b6d27ca3f133a8809ce8858835ba048","buildSettings":{"CODE_SIGN_IDENTITY[sdk=appletvos*]":"","CODE_SIGN_IDENTITY[sdk=iphoneos*]":"","CODE_SIGN_IDENTITY[sdk=watchos*]":"","CURRENT_PROJECT_VERSION":"1","DEFINES_MODULE":"YES","DYLIB_COMPATIBILITY_VERSION":"1","DYLIB_CURRENT_VERSION":"1","DYLIB_INSTALL_NAME_BASE":"@rpath","ENABLE_MODULE_VERIFIER":"NO","ENABLE_USER_SCRIPT_SANDBOXING":"NO","GCC_PREFIX_HEADER":"Target Support Files/DKImagePickerController/DKImagePickerController-prefix.pch","GENERATE_INFOPLIST_FILE":"NO","INFOPLIST_FILE":"Target Support Files/DKImagePickerController/DKImagePickerController-Info.plist","INSTALL_PATH":"$(LOCAL_LIBRARY_DIR)/Frameworks","IPHONEOS_DEPLOYMENT_TARGET":"9.0","LD_RUNPATH_SEARCH_PATHS":"$(inherited) @executable_path/Frameworks @loader_path/Frameworks","MODULEMAP_FILE":"Target Support Files/DKImagePickerController/DKImagePickerController.modulemap","PRODUCT_MODULE_NAME":"DKImagePickerController","PRODUCT_NAME":"DKImagePickerController","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","SWIFT_ACTIVE_COMPILATION_CONDITIONS":"$(inherited) ","SWIFT_INSTALL_OBJC_HEADER":"YES","SWIFT_VERSION":"5","TARGETED_DEVICE_FAMILY":"1,2","VALIDATE_PRODUCT":"YES","VERSIONING_SYSTEM":"apple-generic","VERSION_INFO_PREFIX":""},"guid":"bfdfe7dc352907fc980b868725387e981a061109697a6fecb5c4052027830873","name":"Profile"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e984b6d27ca3f133a8809ce8858835ba048","buildSettings":{"CODE_SIGN_IDENTITY[sdk=appletvos*]":"","CODE_SIGN_IDENTITY[sdk=iphoneos*]":"","CODE_SIGN_IDENTITY[sdk=watchos*]":"","CURRENT_PROJECT_VERSION":"1","DEFINES_MODULE":"YES","DYLIB_COMPATIBILITY_VERSION":"1","DYLIB_CURRENT_VERSION":"1","DYLIB_INSTALL_NAME_BASE":"@rpath","ENABLE_MODULE_VERIFIER":"NO","ENABLE_USER_SCRIPT_SANDBOXING":"NO","GCC_PREFIX_HEADER":"Target Support Files/DKImagePickerController/DKImagePickerController-prefix.pch","GENERATE_INFOPLIST_FILE":"NO","INFOPLIST_FILE":"Target Support Files/DKImagePickerController/DKImagePickerController-Info.plist","INSTALL_PATH":"$(LOCAL_LIBRARY_DIR)/Frameworks","IPHONEOS_DEPLOYMENT_TARGET":"9.0","LD_RUNPATH_SEARCH_PATHS":"$(inherited) @executable_path/Frameworks @loader_path/Frameworks","MODULEMAP_FILE":"Target Support Files/DKImagePickerController/DKImagePickerController.modulemap","PRODUCT_MODULE_NAME":"DKImagePickerController","PRODUCT_NAME":"DKImagePickerController","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","SWIFT_ACTIVE_COMPILATION_CONDITIONS":"$(inherited) ","SWIFT_INSTALL_OBJC_HEADER":"YES","SWIFT_VERSION":"5","TARGETED_DEVICE_FAMILY":"1,2","VALIDATE_PRODUCT":"YES","VERSIONING_SYSTEM":"apple-generic","VERSION_INFO_PREFIX":""},"guid":"bfdfe7dc352907fc980b868725387e984a2bfc0afebe00a97dd280fbd3b086c7","name":"Release"}],"buildPhases":[{"buildFiles":[{"fileReference":"bfdfe7dc352907fc980b868725387e985ab2e42ee779365312a2e5508ae2de1e","guid":"bfdfe7dc352907fc980b868725387e98305321bb0f6c61d76ab6f8f834f9e1bc","headerVisibility":"public"}],"guid":"bfdfe7dc352907fc980b868725387e989c7318c71e29c5c2fa728fab937f84e4","type":"com.apple.buildphase.headers"},{"buildFiles":[{"fileReference":"bfdfe7dc352907fc980b868725387e988f763bf4ea79de6aab5b94580ae10b71","guid":"bfdfe7dc352907fc980b868725387e986b9c07eb90d1c19fb7ac9f978eac2cfd"},{"fileReference":"bfdfe7dc352907fc980b868725387e988cc10f8287258333398e1ad06a4a08a3","guid":"bfdfe7dc352907fc980b868725387e9899bf2eef86ec86d3071d0464ba311bc3"},{"fileReference":"bfdfe7dc352907fc980b868725387e98ca1aaf1416f26af2ae5f25634becd9c4","guidLine truncated
@@ -0,0 +1 @@
{"buildConfigurations":[{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e988d017df6eb26a1783b874214268dea26","buildSettings":{"CODE_SIGN_IDENTITY[sdk=appletvos*]":"","CODE_SIGN_IDENTITY[sdk=iphoneos*]":"","CODE_SIGN_IDENTITY[sdk=watchos*]":"","CURRENT_PROJECT_VERSION":"1","DEFINES_MODULE":"YES","DYLIB_COMPATIBILITY_VERSION":"1","DYLIB_CURRENT_VERSION":"1","DYLIB_INSTALL_NAME_BASE":"@rpath","ENABLE_MODULE_VERIFIER":"NO","ENABLE_USER_SCRIPT_SANDBOXING":"NO","GCC_PREFIX_HEADER":"Target Support Files/SwiftyGif/SwiftyGif-prefix.pch","GENERATE_INFOPLIST_FILE":"NO","INFOPLIST_FILE":"Target Support Files/SwiftyGif/SwiftyGif-Info.plist","INSTALL_PATH":"$(LOCAL_LIBRARY_DIR)/Frameworks","IPHONEOS_DEPLOYMENT_TARGET":"9.0","LD_RUNPATH_SEARCH_PATHS":"$(inherited) @executable_path/Frameworks @loader_path/Frameworks","MODULEMAP_FILE":"Target Support Files/SwiftyGif/SwiftyGif.modulemap","ONLY_ACTIVE_ARCH":"NO","PRODUCT_MODULE_NAME":"SwiftyGif","PRODUCT_NAME":"SwiftyGif","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","SWIFT_ACTIVE_COMPILATION_CONDITIONS":"$(inherited) ","SWIFT_INSTALL_OBJC_HEADER":"YES","SWIFT_VERSION":"5.0","TARGETED_DEVICE_FAMILY":"1,2","VERSIONING_SYSTEM":"apple-generic","VERSION_INFO_PREFIX":""},"guid":"bfdfe7dc352907fc980b868725387e98b3205f3116e5af79da6242c30607f7d1","name":"Debug"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e98f191c54bfc8bd2078a4337a8bbbe4787","buildSettings":{"CODE_SIGN_IDENTITY[sdk=appletvos*]":"","CODE_SIGN_IDENTITY[sdk=iphoneos*]":"","CODE_SIGN_IDENTITY[sdk=watchos*]":"","CURRENT_PROJECT_VERSION":"1","DEFINES_MODULE":"YES","DYLIB_COMPATIBILITY_VERSION":"1","DYLIB_CURRENT_VERSION":"1","DYLIB_INSTALL_NAME_BASE":"@rpath","ENABLE_MODULE_VERIFIER":"NO","ENABLE_USER_SCRIPT_SANDBOXING":"NO","GCC_PREFIX_HEADER":"Target Support Files/SwiftyGif/SwiftyGif-prefix.pch","GENERATE_INFOPLIST_FILE":"NO","INFOPLIST_FILE":"Target Support Files/SwiftyGif/SwiftyGif-Info.plist","INSTALL_PATH":"$(LOCAL_LIBRARY_DIR)/Frameworks","IPHONEOS_DEPLOYMENT_TARGET":"9.0","LD_RUNPATH_SEARCH_PATHS":"$(inherited) @executable_path/Frameworks @loader_path/Frameworks","MODULEMAP_FILE":"Target Support Files/SwiftyGif/SwiftyGif.modulemap","PRODUCT_MODULE_NAME":"SwiftyGif","PRODUCT_NAME":"SwiftyGif","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","SWIFT_ACTIVE_COMPILATION_CONDITIONS":"$(inherited) ","SWIFT_INSTALL_OBJC_HEADER":"YES","SWIFT_VERSION":"5.0","TARGETED_DEVICE_FAMILY":"1,2","VALIDATE_PRODUCT":"YES","VERSIONING_SYSTEM":"apple-generic","VERSION_INFO_PREFIX":""},"guid":"bfdfe7dc352907fc980b868725387e98f0a64e5762baa3d7b1dc00cef11ac21f","name":"Profile"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e98f191c54bfc8bd2078a4337a8bbbe4787","buildSettings":{"CODE_SIGN_IDENTITY[sdk=appletvos*]":"","CODE_SIGN_IDENTITY[sdk=iphoneos*]":"","CODE_SIGN_IDENTITY[sdk=watchos*]":"","CURRENT_PROJECT_VERSION":"1","DEFINES_MODULE":"YES","DYLIB_COMPATIBILITY_VERSION":"1","DYLIB_CURRENT_VERSION":"1","DYLIB_INSTALL_NAME_BASE":"@rpath","ENABLE_MODULE_VERIFIER":"NO","ENABLE_USER_SCRIPT_SANDBOXING":"NO","GCC_PREFIX_HEADER":"Target Support Files/SwiftyGif/SwiftyGif-prefix.pch","GENERATE_INFOPLIST_FILE":"NO","INFOPLIST_FILE":"Target Support Files/SwiftyGif/SwiftyGif-Info.plist","INSTALL_PATH":"$(LOCAL_LIBRARY_DIR)/Frameworks","IPHONEOS_DEPLOYMENT_TARGET":"9.0","LD_RUNPATH_SEARCH_PATHS":"$(inherited) @executable_path/Frameworks @loader_path/Frameworks","MODULEMAP_FILE":"Target Support Files/SwiftyGif/SwiftyGif.modulemap","PRODUCT_MODULE_NAME":"SwiftyGif","PRODUCT_NAME":"SwiftyGif","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","SWIFT_ACTIVE_COMPILATION_CONDITIONS":"$(inherited) ","SWIFT_INSTALL_OBJC_HEADER":"YES","SWIFT_VERSION":"5.0","TARGETED_DEVICE_FAMILY":"1,2","VALIDATE_PRODUCT":"YES","VERSIONING_SYSTEM":"apple-generic","VERSION_INFO_PREFIX":""},"guid":"bfdfe7dc352907fc980b868725387e98f543cf7ce936c0f554d4d3da1445c6be","name":"Release"}],"buildPhases":[{"buildFiles":[{"fileReference":"bfdfe7dc352907fc980b868725387e98841e69c77a33c992a383444bcd690833","guid":"bfdfe7dc352907fc980b868725387e98de51224ce0e2c5cbb8a4b350ca6d0b25","headerVisibility":"public"},{"fileReference":"bfdfe7dc352907fc980b868725387e986b9414b84d9ae46c6cfb7c8966e95c73","guid":"bfdfe7dc352907fc980b868725387e98a1722bb4c6e5d6fcf7c8a9004b3151d5","headerVisibility":"public"}],"guid":"bfdfe7dc352907fc980b868725387e98bb99cdc50bd77debe142c41be23cfad4","type":"com.apple.buildphase.headers"},{"buildFiles":[{"fileReference":"bfdfe7dc352907fc980b868725387e98e5ec22b9c4ec919ca16aaf1106fdfda7","guid":"bfdfe7dc352907fc980b868725387e989801564cf134465898eabb9cdc3bb4a2"},{"fileReference":"bfdfe7dc352907fc980b868725387e98c1f3f2ed47d0040183997f8bbf5e6ac1","guid":"bfdfe7dc352907fc980b868725387e98500cf1800c2248d2c3e147cb95487cf1"},{"fileReference":"bfdfe7dc352907fc980b868725387e987b5362145f0a8c83082dc613a6cf5234","guid":"bfdfe7dc352907fc980b868725387e9804baa42908b083470f90dc34fafa0576"},{"fileReference":"bfdfe7dc352907fc980b868725387e98ec31ea89f37bf925e7a4e91Line truncated
@@ -0,0 +1 @@
{"buildConfigurations":[{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e98e627b81f2277a26392e82dc437b640b9","buildSettings":{"CODE_SIGNING_ALLOWED":"NO","CODE_SIGNING_IDENTITY":"-","CODE_SIGNING_REQUIRED":"NO","CONFIGURATION_BUILD_DIR":"$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/DKImagePickerController","EXPANDED_CODE_SIGN_IDENTITY":"-","IBSC_MODULE":"DKImagePickerController","INFOPLIST_FILE":"Target Support Files/DKImagePickerController/ResourceBundle-DKImagePickerController-DKImagePickerController-Info.plist","IPHONEOS_DEPLOYMENT_TARGET":"9.0","ONLY_ACTIVE_ARCH":"NO","PRODUCT_NAME":"DKImagePickerController","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","TARGETED_DEVICE_FAMILY":"1,2","WRAPPER_EXTENSION":"bundle"},"guid":"bfdfe7dc352907fc980b868725387e98ccdaadd370001048c02574c5a730a1cb","name":"Debug"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e984b6d27ca3f133a8809ce8858835ba048","buildSettings":{"CLANG_ENABLE_OBJC_WEAK":"NO","CODE_SIGNING_ALLOWED":"NO","CODE_SIGNING_IDENTITY":"-","CODE_SIGNING_REQUIRED":"NO","CONFIGURATION_BUILD_DIR":"$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/DKImagePickerController","EXPANDED_CODE_SIGN_IDENTITY":"-","IBSC_MODULE":"DKImagePickerController","INFOPLIST_FILE":"Target Support Files/DKImagePickerController/ResourceBundle-DKImagePickerController-DKImagePickerController-Info.plist","IPHONEOS_DEPLOYMENT_TARGET":"9.0","PRODUCT_NAME":"DKImagePickerController","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","TARGETED_DEVICE_FAMILY":"1,2","VALIDATE_PRODUCT":"YES","WRAPPER_EXTENSION":"bundle"},"guid":"bfdfe7dc352907fc980b868725387e9869e01d4cc4b1de8f6b4d48853d42af0a","name":"Profile"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e984b6d27ca3f133a8809ce8858835ba048","buildSettings":{"CODE_SIGNING_ALLOWED":"NO","CODE_SIGNING_IDENTITY":"-","CODE_SIGNING_REQUIRED":"NO","CONFIGURATION_BUILD_DIR":"$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/DKImagePickerController","EXPANDED_CODE_SIGN_IDENTITY":"-","IBSC_MODULE":"DKImagePickerController","INFOPLIST_FILE":"Target Support Files/DKImagePickerController/ResourceBundle-DKImagePickerController-DKImagePickerController-Info.plist","IPHONEOS_DEPLOYMENT_TARGET":"9.0","PRODUCT_NAME":"DKImagePickerController","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","TARGETED_DEVICE_FAMILY":"1,2","WRAPPER_EXTENSION":"bundle"},"guid":"bfdfe7dc352907fc980b868725387e9863cc5f78b7c7591a7028ad9c898e9256","name":"Release"}],"buildPhases":[{"buildFiles":[],"guid":"bfdfe7dc352907fc980b868725387e98056c92b9e84188b0df8b410586e6d745","type":"com.apple.buildphase.sources"},{"buildFiles":[],"guid":"bfdfe7dc352907fc980b868725387e98304eee79fee06d880a386653e91a935c","type":"com.apple.buildphase.frameworks"},{"buildFiles":[{"fileReference":"bfdfe7dc352907fc980b868725387e98a292699c7027eaa680bfe5da607e708f","guid":"bfdfe7dc352907fc980b868725387e98c73680d38a61f2dfc18a78011becb030"},{"fileReference":"bfdfe7dc352907fc980b868725387e9852b8cf46dbb173cb75a3b48bbfbb8858","guid":"bfdfe7dc352907fc980b868725387e988db719a71e0f9be89599c1db427236a2"},{"fileReference":"bfdfe7dc352907fc980b868725387e9835648ce799d62afd8c7500844a76b60e","guid":"bfdfe7dc352907fc980b868725387e98a38495d7306ed25cf32278e4df04032b"},{"fileReference":"bfdfe7dc352907fc980b868725387e981ff058d7b390b6f2003ce67e8d91cd71","guid":"bfdfe7dc352907fc980b868725387e98d8e36707dbea32d09f82162f629d7314"},{"fileReference":"bfdfe7dc352907fc980b868725387e98defb1e32e9bd8aba19d9a67f858e60b0","guid":"bfdfe7dc352907fc980b868725387e98ae0beb9538dc7ffe527e56175953c003"},{"fileReference":"bfdfe7dc352907fc980b868725387e9808a0a427f1edd3500994a26f3b1b4614","guid":"bfdfe7dc352907fc980b868725387e9870bd0014af056bf884e433a59898e6a5"},{"fileReference":"bfdfe7dc352907fc980b868725387e98a490e75903fb2b0a8fb899a90d4287ed","guid":"bfdfe7dc352907fc980b868725387e98e2cd9695a6ea4b3f2c471c4380f6fac8"},{"fileReference":"bfdfe7dc352907fc980b868725387e987c76b719348323ba9f42f0d81d70b161","guid":"bfdfe7dc352907fc980b868725387e98ea2bb30bc70b51a188a1222265ae5c10"},{"fileReference":"bfdfe7dc352907fc980b868725387e980962a367e6152e96b70a125d815020af","guid":"bfdfe7dc352907fc980b868725387e98458888e8b20f35ca08283f2813b2b844"},{"fileReference":"bfdfe7dc352907fc980b868725387e980a11f800dc26d56426f6b37f8a283b0b","guid":"bfdfe7dc352907fc980b868725387e989018e231d883a82d3cd93a1efdad182e"},{"fileReference":"bfdfe7dc352907fc980b868725387e98b08b2c243127aba3d1fc2398f7ba08f3","guid":"bfdfe7dc352907fc980b868725387e980d8cec8b0d16e9f63b9976923d595400"},{"fileReference":"bfdfe7dc352907fc980b868725387e989796f8ce5b602046976a913145a66f6c","guid":"bfdfe7dc352907fc980b868725387e9819608d879b2a9a5eda827bef93d57b02"},{"fileReference":"bfdfe7dc352907fc980b868725387e986968906746efa810a96cf74bfa70670d","guid":"bfdfe7dc352907fc980b868725387e9855ef9023701231eeef844df884b26130"},{"fileReference":"bfdfe7dc352907fc980b868725387e98936c99140c6d493cc2084861c68133a2","guid":"bfdfe7dc352907fc980b868725387e98ef65b185b894b7230ad287ab4245cb2Line truncated
@@ -0,0 +1 @@
{"buildConfigurations":[{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e986175ec003efd0925b0e80b27c1a333bb","buildSettings":{"ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES":"NO","CLANG_ENABLE_OBJC_WEAK":"NO","CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER":"NO","CODE_SIGN_IDENTITY[sdk=appletvos*]":"","CODE_SIGN_IDENTITY[sdk=iphoneos*]":"","CODE_SIGN_IDENTITY[sdk=watchos*]":"","CURRENT_PROJECT_VERSION":"1","DEFINES_MODULE":"YES","DYLIB_COMPATIBILITY_VERSION":"1","DYLIB_CURRENT_VERSION":"1","DYLIB_INSTALL_NAME_BASE":"@rpath","ENABLE_BITCODE":"NO","ENABLE_MODULE_VERIFIER":"NO","ENABLE_USER_SCRIPT_SANDBOXING":"NO","EXCLUDED_ARCHS[sdk=iphoneos*]":"$(inherited) armv7","EXCLUDED_ARCHS[sdk=iphonesimulator*]":"$(inherited) i386","FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios/Flutter.xcframework/ios-arm64\" $(inherited)","FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios/Flutter.xcframework/ios-arm64_x86_64-simulator\" $(inherited)","INFOPLIST_FILE":"Target Support Files/Pods-Runner/Pods-Runner-Info.plist","INSTALL_PATH":"$(LOCAL_LIBRARY_DIR)/Frameworks","IPHONEOS_DEPLOYMENT_TARGET":"13.0","LD_RUNPATH_SEARCH_PATHS":"$(inherited) @executable_path/Frameworks @loader_path/Frameworks","MACH_O_TYPE":"staticlib","MODULEMAP_FILE":"Target Support Files/Pods-Runner/Pods-Runner.modulemap","ONLY_ACTIVE_ARCH":"NO","OTHER_LDFLAGS":"$(inherited) -framework Flutter","OTHER_LIBTOOLFLAGS":"","PODS_ROOT":"$(SRCROOT)","PRODUCT_BUNDLE_IDENTIFIER":"org.cocoapods.${PRODUCT_NAME:rfc1034identifier}","PRODUCT_NAME":"$(TARGET_NAME:c99extidentifier)","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","TARGETED_DEVICE_FAMILY":"1,2","VALID_ARCHS[sdk=iphonesimulator*]":"$(ARCHS_STANDARD)","VERSIONING_SYSTEM":"apple-generic","VERSION_INFO_PREFIX":""},"guid":"bfdfe7dc352907fc980b868725387e98e2a60c11c5a70510fcc06cdb050005c8","name":"Debug"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e981c04a92782605bedf8b5bd015c8dc01a","buildSettings":{"ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES":"NO","CLANG_ENABLE_OBJC_WEAK":"NO","CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER":"NO","CODE_SIGN_IDENTITY[sdk=appletvos*]":"","CODE_SIGN_IDENTITY[sdk=iphoneos*]":"","CODE_SIGN_IDENTITY[sdk=watchos*]":"","CURRENT_PROJECT_VERSION":"1","DEFINES_MODULE":"YES","DYLIB_COMPATIBILITY_VERSION":"1","DYLIB_CURRENT_VERSION":"1","DYLIB_INSTALL_NAME_BASE":"@rpath","ENABLE_BITCODE":"NO","ENABLE_MODULE_VERIFIER":"NO","ENABLE_USER_SCRIPT_SANDBOXING":"NO","EXCLUDED_ARCHS[sdk=iphoneos*]":"$(inherited) armv7","EXCLUDED_ARCHS[sdk=iphonesimulator*]":"$(inherited) i386","FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64\" $(inherited)","FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64_x86_64-simulator\" $(inherited)","INFOPLIST_FILE":"Target Support Files/Pods-Runner/Pods-Runner-Info.plist","INSTALL_PATH":"$(LOCAL_LIBRARY_DIR)/Frameworks","IPHONEOS_DEPLOYMENT_TARGET":"13.0","LD_RUNPATH_SEARCH_PATHS":"$(inherited) @executable_path/Frameworks @loader_path/Frameworks","MACH_O_TYPE":"staticlib","MODULEMAP_FILE":"Target Support Files/Pods-Runner/Pods-Runner.modulemap","OTHER_LDFLAGS":"$(inherited) -framework Flutter","OTHER_LIBTOOLFLAGS":"","PODS_ROOT":"$(SRCROOT)","PRODUCT_BUNDLE_IDENTIFIER":"org.cocoapods.${PRODUCT_NAME:rfc1034identifier}","PRODUCT_NAME":"$(TARGET_NAME:c99extidentifier)","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","TARGETED_DEVICE_FAMILY":"1,2","VALIDATE_PRODUCT":"YES","VALID_ARCHS[sdk=iphonesimulator*]":"$(ARCHS_STANDARD)","VERSIONING_SYSTEM":"apple-generic","VERSION_INFO_PREFIX":""},"guid":"bfdfe7dc352907fc980b868725387e982287b8fb98c1f7c516df4dadee62abbc","name":"Profile"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e98ab5e5b11fcf9a2f9f4c2bf61b3a5e465","buildSettings":{"ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES":"NO","CLANG_ENABLE_OBJC_WEAK":"NO","CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER":"NO","CODE_SIGN_IDENTITY[sdk=appletvos*]":"","CODE_SIGN_IDENTITY[sdk=iphoneos*]":"","CODE_SIGN_IDENTITY[sdk=watchos*]":"","CURRENT_PROJECT_VERSION":"1","DEFINES_MODULE":"YES","DYLIB_COMPATIBILITY_VERSION":"1","DYLIB_CURRENT_VERSION":"1","DYLIB_INSTALL_NAME_BASE":"@rpath","ENABLE_BITCODE":"NO","ENABLE_MODULE_VERIFIER":"NO","ENABLE_USER_SCRIPT_SANDBOXING":"NO","EXCLUDED_ARCHS[sdk=iphoneos*]":"$(inherited) armv7","EXCLUDED_ARCHS[sdk=iphonesimulator*]":"$(inherited) i386","FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64\" $(inherited)","FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64_x86_64-simulator\" $(inherited)","INFOPLIST_FILE":"Target Support Files/Pods-Runner/Pods-Runner-Info.plist","INSTALL_PATH":"$(LLine truncated
@@ -0,0 +1 @@
{"buildConfigurations":[{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e98a92e512aac87655ee7918ffca1bc6995","buildSettings":{"CODE_SIGNING_ALLOWED":"NO","CODE_SIGNING_IDENTITY":"-","CODE_SIGNING_REQUIRED":"NO","CONFIGURATION_BUILD_DIR":"$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/shared_preferences_foundation","EXPANDED_CODE_SIGN_IDENTITY":"-","IBSC_MODULE":"shared_preferences_foundation","INFOPLIST_FILE":"Target Support Files/shared_preferences_foundation/ResourceBundle-shared_preferences_foundation_privacy-shared_preferences_foundation-Info.plist","IPHONEOS_DEPLOYMENT_TARGET":"13.0","ONLY_ACTIVE_ARCH":"NO","PRODUCT_NAME":"shared_preferences_foundation_privacy","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","TARGETED_DEVICE_FAMILY":"1,2","WRAPPER_EXTENSION":"bundle"},"guid":"bfdfe7dc352907fc980b868725387e984802826e219cad638716cc06378c607e","name":"Debug"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e98eb9d36647a0bea0e4eb1b12f12d263d4","buildSettings":{"CLANG_ENABLE_OBJC_WEAK":"NO","CODE_SIGNING_ALLOWED":"NO","CODE_SIGNING_IDENTITY":"-","CODE_SIGNING_REQUIRED":"NO","CONFIGURATION_BUILD_DIR":"$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/shared_preferences_foundation","EXPANDED_CODE_SIGN_IDENTITY":"-","IBSC_MODULE":"shared_preferences_foundation","INFOPLIST_FILE":"Target Support Files/shared_preferences_foundation/ResourceBundle-shared_preferences_foundation_privacy-shared_preferences_foundation-Info.plist","IPHONEOS_DEPLOYMENT_TARGET":"13.0","PRODUCT_NAME":"shared_preferences_foundation_privacy","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","TARGETED_DEVICE_FAMILY":"1,2","VALIDATE_PRODUCT":"YES","WRAPPER_EXTENSION":"bundle"},"guid":"bfdfe7dc352907fc980b868725387e98a1ad17034114cb52f7f849056d392c7a","name":"Profile"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e98eb9d36647a0bea0e4eb1b12f12d263d4","buildSettings":{"CODE_SIGNING_ALLOWED":"NO","CODE_SIGNING_IDENTITY":"-","CODE_SIGNING_REQUIRED":"NO","CONFIGURATION_BUILD_DIR":"$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/shared_preferences_foundation","EXPANDED_CODE_SIGN_IDENTITY":"-","IBSC_MODULE":"shared_preferences_foundation","INFOPLIST_FILE":"Target Support Files/shared_preferences_foundation/ResourceBundle-shared_preferences_foundation_privacy-shared_preferences_foundation-Info.plist","IPHONEOS_DEPLOYMENT_TARGET":"13.0","PRODUCT_NAME":"shared_preferences_foundation_privacy","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","TARGETED_DEVICE_FAMILY":"1,2","WRAPPER_EXTENSION":"bundle"},"guid":"bfdfe7dc352907fc980b868725387e989fbd346fd967914618c3e55e88126def","name":"Release"}],"buildPhases":[{"buildFiles":[],"guid":"bfdfe7dc352907fc980b868725387e985b34d3d94c7297b17ebdd939920a5335","type":"com.apple.buildphase.sources"},{"buildFiles":[],"guid":"bfdfe7dc352907fc980b868725387e984e65cb865ec9b1e3f4706dfd3242653a","type":"com.apple.buildphase.frameworks"},{"buildFiles":[{"fileReference":"bfdfe7dc352907fc980b868725387e989650fb71357622ba252b738e43a44104","guid":"bfdfe7dc352907fc980b868725387e9850dd8cf9409e8c037247fe137484a0c1"}],"guid":"bfdfe7dc352907fc980b868725387e98779eade1953c19fc3c67514e4bddb762","type":"com.apple.buildphase.resources"}],"buildRules":[],"dependencies":[],"guid":"bfdfe7dc352907fc980b868725387e98e0be3b0d5ad56f1985578b1f97431765","name":"shared_preferences_foundation-shared_preferences_foundation_privacy","productReference":{"guid":"bfdfe7dc352907fc980b868725387e98ad625504a4c1e61077bbfd33bd1d1785","name":"shared_preferences_foundation_privacy.bundle","type":"product"},"productTypeIdentifier":"com.apple.product-type.bundle","provisioningSourceData":[{"bundleIdentifierFromInfoPlist":"${PRODUCT_BUNDLE_IDENTIFIER}","configurationName":"Debug","provisioningStyle":0},{"bundleIdentifierFromInfoPlist":"${PRODUCT_BUNDLE_IDENTIFIER}","configurationName":"Profile","provisioningStyle":0},{"bundleIdentifierFromInfoPlist":"${PRODUCT_BUNDLE_IDENTIFIER}","configurationName":"Release","provisioningStyle":0}],"type":"standard"}
@@ -0,0 +1 @@
{"buildConfigurations":[{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e98074a9b441078beef16a37aae33ee2900","buildSettings":{"ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES":"NO","CLANG_ENABLE_OBJC_WEAK":"NO","CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER":"NO","CODE_SIGN_IDENTITY[sdk=appletvos*]":"","CODE_SIGN_IDENTITY[sdk=iphoneos*]":"","CODE_SIGN_IDENTITY[sdk=watchos*]":"","CURRENT_PROJECT_VERSION":"1","DEFINES_MODULE":"YES","DYLIB_COMPATIBILITY_VERSION":"1","DYLIB_CURRENT_VERSION":"1","DYLIB_INSTALL_NAME_BASE":"@rpath","ENABLE_BITCODE":"NO","ENABLE_MODULE_VERIFIER":"NO","ENABLE_USER_SCRIPT_SANDBOXING":"NO","EXCLUDED_ARCHS[sdk=iphoneos*]":"$(inherited) armv7","EXCLUDED_ARCHS[sdk=iphonesimulator*]":"$(inherited) i386","FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios/Flutter.xcframework/ios-arm64\" $(inherited)","FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios/Flutter.xcframework/ios-arm64_x86_64-simulator\" $(inherited)","INFOPLIST_FILE":"Target Support Files/Pods-RunnerTests/Pods-RunnerTests-Info.plist","INSTALL_PATH":"$(LOCAL_LIBRARY_DIR)/Frameworks","IPHONEOS_DEPLOYMENT_TARGET":"13.0","LD_RUNPATH_SEARCH_PATHS":"$(inherited) @executable_path/Frameworks @loader_path/Frameworks","MACH_O_TYPE":"staticlib","MODULEMAP_FILE":"Target Support Files/Pods-RunnerTests/Pods-RunnerTests.modulemap","ONLY_ACTIVE_ARCH":"NO","OTHER_LDFLAGS":"$(inherited) -framework Flutter","OTHER_LIBTOOLFLAGS":"","PODS_ROOT":"$(SRCROOT)","PRODUCT_BUNDLE_IDENTIFIER":"org.cocoapods.${PRODUCT_NAME:rfc1034identifier}","PRODUCT_NAME":"$(TARGET_NAME:c99extidentifier)","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","TARGETED_DEVICE_FAMILY":"1,2","VALID_ARCHS[sdk=iphonesimulator*]":"$(ARCHS_STANDARD)","VERSIONING_SYSTEM":"apple-generic","VERSION_INFO_PREFIX":""},"guid":"bfdfe7dc352907fc980b868725387e980029bc42f3dda39154e9cd2e8ce213da","name":"Debug"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e987bd2a5c12d5a72dad789e04e26dc5a25","buildSettings":{"ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES":"NO","CLANG_ENABLE_OBJC_WEAK":"NO","CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER":"NO","CODE_SIGN_IDENTITY[sdk=appletvos*]":"","CODE_SIGN_IDENTITY[sdk=iphoneos*]":"","CODE_SIGN_IDENTITY[sdk=watchos*]":"","CURRENT_PROJECT_VERSION":"1","DEFINES_MODULE":"YES","DYLIB_COMPATIBILITY_VERSION":"1","DYLIB_CURRENT_VERSION":"1","DYLIB_INSTALL_NAME_BASE":"@rpath","ENABLE_BITCODE":"NO","ENABLE_MODULE_VERIFIER":"NO","ENABLE_USER_SCRIPT_SANDBOXING":"NO","EXCLUDED_ARCHS[sdk=iphoneos*]":"$(inherited) armv7","EXCLUDED_ARCHS[sdk=iphonesimulator*]":"$(inherited) i386","FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64\" $(inherited)","FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64_x86_64-simulator\" $(inherited)","INFOPLIST_FILE":"Target Support Files/Pods-RunnerTests/Pods-RunnerTests-Info.plist","INSTALL_PATH":"$(LOCAL_LIBRARY_DIR)/Frameworks","IPHONEOS_DEPLOYMENT_TARGET":"13.0","LD_RUNPATH_SEARCH_PATHS":"$(inherited) @executable_path/Frameworks @loader_path/Frameworks","MACH_O_TYPE":"staticlib","MODULEMAP_FILE":"Target Support Files/Pods-RunnerTests/Pods-RunnerTests.modulemap","OTHER_LDFLAGS":"$(inherited) -framework Flutter","OTHER_LIBTOOLFLAGS":"","PODS_ROOT":"$(SRCROOT)","PRODUCT_BUNDLE_IDENTIFIER":"org.cocoapods.${PRODUCT_NAME:rfc1034identifier}","PRODUCT_NAME":"$(TARGET_NAME:c99extidentifier)","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","TARGETED_DEVICE_FAMILY":"1,2","VALIDATE_PRODUCT":"YES","VALID_ARCHS[sdk=iphonesimulator*]":"$(ARCHS_STANDARD)","VERSIONING_SYSTEM":"apple-generic","VERSION_INFO_PREFIX":""},"guid":"bfdfe7dc352907fc980b868725387e98d15fe13ffb666b223bfd6ee9f0a6138e","name":"Profile"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e98fc46d149385d28a69f8f8bc860e81763","buildSettings":{"ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES":"NO","CLANG_ENABLE_OBJC_WEAK":"NO","CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER":"NO","CODE_SIGN_IDENTITY[sdk=appletvos*]":"","CODE_SIGN_IDENTITY[sdk=iphoneos*]":"","CODE_SIGN_IDENTITY[sdk=watchos*]":"","CURRENT_PROJECT_VERSION":"1","DEFINES_MODULE":"YES","DYLIB_COMPATIBILITY_VERSION":"1","DYLIB_CURRENT_VERSION":"1","DYLIB_INSTALL_NAME_BASE":"@rpath","ENABLE_BITCODE":"NO","ENABLE_MODULE_VERIFIER":"NO","ENABLE_USER_SCRIPT_SANDBOXING":"NO","EXCLUDED_ARCHS[sdk=iphoneos*]":"$(inherited) armv7","EXCLUDED_ARCHS[sdk=iphonesimulator*]":"$(inherited) i386","FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64\" $(inherited)","FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64_x86_64-simulator\" $(inherited)","INFOPLIST_FILE":"Target Support Files/Pods-RunnerTestLine truncated
@@ -0,0 +1 @@
{"buildConfigurations":[{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e98dee49624fc73f0ae85aa8a082ba91fed","buildSettings":{"CODE_SIGNING_ALLOWED":"NO","CODE_SIGNING_IDENTITY":"-","CODE_SIGNING_REQUIRED":"NO","CONFIGURATION_BUILD_DIR":"$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/file_picker","EXPANDED_CODE_SIGN_IDENTITY":"-","IBSC_MODULE":"file_picker","INFOPLIST_FILE":"Target Support Files/file_picker/ResourceBundle-file_picker_ios_privacy-file_picker-Info.plist","IPHONEOS_DEPLOYMENT_TARGET":"12.0","ONLY_ACTIVE_ARCH":"NO","PRODUCT_NAME":"file_picker_ios_privacy","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","TARGETED_DEVICE_FAMILY":"1,2","WRAPPER_EXTENSION":"bundle"},"guid":"bfdfe7dc352907fc980b868725387e983cf4f60d40ad9205184b36fb6af727b9","name":"Debug"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e98f0255426bc1673d88b46486c8fd69422","buildSettings":{"CLANG_ENABLE_OBJC_WEAK":"NO","CODE_SIGNING_ALLOWED":"NO","CODE_SIGNING_IDENTITY":"-","CODE_SIGNING_REQUIRED":"NO","CONFIGURATION_BUILD_DIR":"$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/file_picker","EXPANDED_CODE_SIGN_IDENTITY":"-","IBSC_MODULE":"file_picker","INFOPLIST_FILE":"Target Support Files/file_picker/ResourceBundle-file_picker_ios_privacy-file_picker-Info.plist","IPHONEOS_DEPLOYMENT_TARGET":"12.0","PRODUCT_NAME":"file_picker_ios_privacy","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","TARGETED_DEVICE_FAMILY":"1,2","VALIDATE_PRODUCT":"YES","WRAPPER_EXTENSION":"bundle"},"guid":"bfdfe7dc352907fc980b868725387e98b186591f3824f4a621d439f4b541ce7c","name":"Profile"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e98f0255426bc1673d88b46486c8fd69422","buildSettings":{"CODE_SIGNING_ALLOWED":"NO","CODE_SIGNING_IDENTITY":"-","CODE_SIGNING_REQUIRED":"NO","CONFIGURATION_BUILD_DIR":"$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/file_picker","EXPANDED_CODE_SIGN_IDENTITY":"-","IBSC_MODULE":"file_picker","INFOPLIST_FILE":"Target Support Files/file_picker/ResourceBundle-file_picker_ios_privacy-file_picker-Info.plist","IPHONEOS_DEPLOYMENT_TARGET":"12.0","PRODUCT_NAME":"file_picker_ios_privacy","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","TARGETED_DEVICE_FAMILY":"1,2","WRAPPER_EXTENSION":"bundle"},"guid":"bfdfe7dc352907fc980b868725387e981e6e50dceabeba556a6d4b0882d8fe0d","name":"Release"}],"buildPhases":[{"buildFiles":[],"guid":"bfdfe7dc352907fc980b868725387e98380bdff95ee6dba6ad06320ee59f7d1e","type":"com.apple.buildphase.sources"},{"buildFiles":[],"guid":"bfdfe7dc352907fc980b868725387e9895b84bdfdbfc3d5cd91174a50d20b314","type":"com.apple.buildphase.frameworks"},{"buildFiles":[{"fileReference":"bfdfe7dc352907fc980b868725387e98a4fc28bd55db19e7dd9770669b64c8ae","guid":"bfdfe7dc352907fc980b868725387e98184a2985baae916458080126fbe196a9"}],"guid":"bfdfe7dc352907fc980b868725387e987fda5a18f5aeedbcbfec6fae8a7b0fb5","type":"com.apple.buildphase.resources"}],"buildRules":[],"dependencies":[],"guid":"bfdfe7dc352907fc980b868725387e985452a642045cac0ef7c37f93da2d994e","name":"file_picker-file_picker_ios_privacy","productReference":{"guid":"bfdfe7dc352907fc980b868725387e985ae769d0b989789f9e90cfb215ac5a2e","name":"file_picker_ios_privacy.bundle","type":"product"},"productTypeIdentifier":"com.apple.product-type.bundle","provisioningSourceData":[{"bundleIdentifierFromInfoPlist":"${PRODUCT_BUNDLE_IDENTIFIER}","configurationName":"Debug","provisioningStyle":0},{"bundleIdentifierFromInfoPlist":"${PRODUCT_BUNDLE_IDENTIFIER}","configurationName":"Profile","provisioningStyle":0},{"bundleIdentifierFromInfoPlist":"${PRODUCT_BUNDLE_IDENTIFIER}","configurationName":"Release","provisioningStyle":0}],"type":"standard"}
@@ -0,0 +1 @@
{"buildConfigurations":[{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e98d19afb1410fae17f549fed9dd2d1b8c3","buildSettings":{"CODE_SIGNING_ALLOWED":"NO","CODE_SIGNING_IDENTITY":"-","CODE_SIGNING_REQUIRED":"NO","CONFIGURATION_BUILD_DIR":"$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/url_launcher_ios","EXPANDED_CODE_SIGN_IDENTITY":"-","IBSC_MODULE":"url_launcher_ios","INFOPLIST_FILE":"Target Support Files/url_launcher_ios/ResourceBundle-url_launcher_ios_privacy-url_launcher_ios-Info.plist","IPHONEOS_DEPLOYMENT_TARGET":"13.0","ONLY_ACTIVE_ARCH":"NO","PRODUCT_NAME":"url_launcher_ios_privacy","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","TARGETED_DEVICE_FAMILY":"1,2","WRAPPER_EXTENSION":"bundle"},"guid":"bfdfe7dc352907fc980b868725387e981bfbda52aa669fd115434bf083d61c55","name":"Debug"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e98f9a4bf43cf6f978b20d8a9ce206deac9","buildSettings":{"CLANG_ENABLE_OBJC_WEAK":"NO","CODE_SIGNING_ALLOWED":"NO","CODE_SIGNING_IDENTITY":"-","CODE_SIGNING_REQUIRED":"NO","CONFIGURATION_BUILD_DIR":"$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/url_launcher_ios","EXPANDED_CODE_SIGN_IDENTITY":"-","IBSC_MODULE":"url_launcher_ios","INFOPLIST_FILE":"Target Support Files/url_launcher_ios/ResourceBundle-url_launcher_ios_privacy-url_launcher_ios-Info.plist","IPHONEOS_DEPLOYMENT_TARGET":"13.0","PRODUCT_NAME":"url_launcher_ios_privacy","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","TARGETED_DEVICE_FAMILY":"1,2","VALIDATE_PRODUCT":"YES","WRAPPER_EXTENSION":"bundle"},"guid":"bfdfe7dc352907fc980b868725387e98a969866b678fd5b24e79b96d2b979381","name":"Profile"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e98f9a4bf43cf6f978b20d8a9ce206deac9","buildSettings":{"CODE_SIGNING_ALLOWED":"NO","CODE_SIGNING_IDENTITY":"-","CODE_SIGNING_REQUIRED":"NO","CONFIGURATION_BUILD_DIR":"$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/url_launcher_ios","EXPANDED_CODE_SIGN_IDENTITY":"-","IBSC_MODULE":"url_launcher_ios","INFOPLIST_FILE":"Target Support Files/url_launcher_ios/ResourceBundle-url_launcher_ios_privacy-url_launcher_ios-Info.plist","IPHONEOS_DEPLOYMENT_TARGET":"13.0","PRODUCT_NAME":"url_launcher_ios_privacy","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","TARGETED_DEVICE_FAMILY":"1,2","WRAPPER_EXTENSION":"bundle"},"guid":"bfdfe7dc352907fc980b868725387e98d2618c2e407d10b8d3cea1e48cd48660","name":"Release"}],"buildPhases":[{"buildFiles":[],"guid":"bfdfe7dc352907fc980b868725387e98ac1800eae43f994e8fc52434d00e6c20","type":"com.apple.buildphase.sources"},{"buildFiles":[],"guid":"bfdfe7dc352907fc980b868725387e98f408810c5b5c3f4a72f416737c13e810","type":"com.apple.buildphase.frameworks"},{"buildFiles":[{"fileReference":"bfdfe7dc352907fc980b868725387e98b7249c6b1f45282221821a550722db73","guid":"bfdfe7dc352907fc980b868725387e9870f11cac42c43619587628e3320ac7c4"}],"guid":"bfdfe7dc352907fc980b868725387e98f40bae0d89fd070f88d815598548da06","type":"com.apple.buildphase.resources"}],"buildRules":[],"dependencies":[],"guid":"bfdfe7dc352907fc980b868725387e9891b3b8cc56823cdea4b418e009a423b2","name":"url_launcher_ios-url_launcher_ios_privacy","productReference":{"guid":"bfdfe7dc352907fc980b868725387e9827df8da513ac7d6928fc311b53a7155d","name":"url_launcher_ios_privacy.bundle","type":"product"},"productTypeIdentifier":"com.apple.product-type.bundle","provisioningSourceData":[{"bundleIdentifierFromInfoPlist":"${PRODUCT_BUNDLE_IDENTIFIER}","configurationName":"Debug","provisioningStyle":0},{"bundleIdentifierFromInfoPlist":"${PRODUCT_BUNDLE_IDENTIFIER}","configurationName":"Profile","provisioningStyle":0},{"bundleIdentifierFromInfoPlist":"${PRODUCT_BUNDLE_IDENTIFIER}","configurationName":"Release","provisioningStyle":0}],"type":"standard"}
@@ -0,0 +1 @@
{"buildConfigurations":[{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e983c6363c1b6260613b6af5dae89e50fa6","buildSettings":{"CLANG_ENABLE_OBJC_WEAK":"NO","CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER":"NO","CODE_SIGN_IDENTITY[sdk=appletvos*]":"","CODE_SIGN_IDENTITY[sdk=iphoneos*]":"","CODE_SIGN_IDENTITY[sdk=watchos*]":"","CURRENT_PROJECT_VERSION":"1","DYLIB_COMPATIBILITY_VERSION":"1","DYLIB_CURRENT_VERSION":"1","DYLIB_INSTALL_NAME_BASE":"@rpath","ENABLE_BITCODE":"NO","ENABLE_MODULE_VERIFIER":"NO","ENABLE_USER_SCRIPT_SANDBOXING":"NO","EXCLUDED_ARCHS[sdk=iphoneos*]":"$(inherited) armv7","EXCLUDED_ARCHS[sdk=iphonesimulator*]":"$(inherited) i386","FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios/Flutter.xcframework/ios-arm64\" $(inherited)","FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios/Flutter.xcframework/ios-arm64_x86_64-simulator\" $(inherited)","GCC_PREFIX_HEADER":"Target Support Files/app_links/app_links-prefix.pch","GENERATE_INFOPLIST_FILE":"NO","INFOPLIST_FILE":"Target Support Files/app_links/app_links-Info.plist","INSTALL_PATH":"$(LOCAL_LIBRARY_DIR)/Frameworks","IPHONEOS_DEPLOYMENT_TARGET":"13.0","LD_RUNPATH_SEARCH_PATHS":"$(inherited) @executable_path/Frameworks @loader_path/Frameworks","MODULEMAP_FILE":"Target Support Files/app_links/app_links.modulemap","ONLY_ACTIVE_ARCH":"NO","OTHER_LDFLAGS":"$(inherited) -framework Flutter","PRODUCT_MODULE_NAME":"app_links","PRODUCT_NAME":"app_links","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","SWIFT_ACTIVE_COMPILATION_CONDITIONS":"$(inherited) ","SWIFT_INSTALL_OBJC_HEADER":"YES","SWIFT_VERSION":"5.0","TARGETED_DEVICE_FAMILY":"1,2","VALID_ARCHS[sdk=iphonesimulator*]":"$(ARCHS_STANDARD)","VERSIONING_SYSTEM":"apple-generic","VERSION_INFO_PREFIX":""},"guid":"bfdfe7dc352907fc980b868725387e98c8579567ee227a2b71c22abd5778dcf9","name":"Debug"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e98fd8cfcfe7c3fb0ac9ed7c1a13704b3d5","buildSettings":{"CLANG_ENABLE_OBJC_WEAK":"NO","CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER":"NO","CODE_SIGN_IDENTITY[sdk=appletvos*]":"","CODE_SIGN_IDENTITY[sdk=iphoneos*]":"","CODE_SIGN_IDENTITY[sdk=watchos*]":"","CURRENT_PROJECT_VERSION":"1","DYLIB_COMPATIBILITY_VERSION":"1","DYLIB_CURRENT_VERSION":"1","DYLIB_INSTALL_NAME_BASE":"@rpath","ENABLE_BITCODE":"NO","ENABLE_MODULE_VERIFIER":"NO","ENABLE_USER_SCRIPT_SANDBOXING":"NO","EXCLUDED_ARCHS[sdk=iphoneos*]":"$(inherited) armv7","EXCLUDED_ARCHS[sdk=iphonesimulator*]":"$(inherited) i386","FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64\" $(inherited)","FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64_x86_64-simulator\" $(inherited)","GCC_PREFIX_HEADER":"Target Support Files/app_links/app_links-prefix.pch","GENERATE_INFOPLIST_FILE":"NO","INFOPLIST_FILE":"Target Support Files/app_links/app_links-Info.plist","INSTALL_PATH":"$(LOCAL_LIBRARY_DIR)/Frameworks","IPHONEOS_DEPLOYMENT_TARGET":"13.0","LD_RUNPATH_SEARCH_PATHS":"$(inherited) @executable_path/Frameworks @loader_path/Frameworks","MODULEMAP_FILE":"Target Support Files/app_links/app_links.modulemap","OTHER_LDFLAGS":"$(inherited) -framework Flutter","PRODUCT_MODULE_NAME":"app_links","PRODUCT_NAME":"app_links","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","SWIFT_ACTIVE_COMPILATION_CONDITIONS":"$(inherited) ","SWIFT_INSTALL_OBJC_HEADER":"YES","SWIFT_VERSION":"5.0","TARGETED_DEVICE_FAMILY":"1,2","VALIDATE_PRODUCT":"YES","VALID_ARCHS[sdk=iphonesimulator*]":"$(ARCHS_STANDARD)","VERSIONING_SYSTEM":"apple-generic","VERSION_INFO_PREFIX":""},"guid":"bfdfe7dc352907fc980b868725387e984324a992fa364badc4f65f29947547e8","name":"Profile"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e98fd8cfcfe7c3fb0ac9ed7c1a13704b3d5","buildSettings":{"CLANG_ENABLE_OBJC_WEAK":"NO","CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER":"NO","CODE_SIGN_IDENTITY[sdk=appletvos*]":"","CODE_SIGN_IDENTITY[sdk=iphoneos*]":"","CODE_SIGN_IDENTITY[sdk=watchos*]":"","CURRENT_PROJECT_VERSION":"1","DYLIB_COMPATIBILITY_VERSION":"1","DYLIB_CURRENT_VERSION":"1","DYLIB_INSTALL_NAME_BASE":"@rpath","ENABLE_BITCODE":"NO","ENABLE_MODULE_VERIFIER":"NO","ENABLE_USER_SCRIPT_SANDBOXING":"NO","EXCLUDED_ARCHS[sdk=iphoneos*]":"$(inherited) armv7","EXCLUDED_ARCHS[sdk=iphonesimulator*]":"$(inherited) i386","FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64\" $(inherited)","FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64_x86_64-simulator\" $(inherited)","GCC_PREFIX_HEADER":"Target Support Files/app_links/app_links-prefix.pch","GENERATE_INFOPLIST_FILE":"NO","INFOPLIST_FILE":"Target Support Files/app_links/app_links-InLine truncated
@@ -0,0 +1 @@
{"buildConfigurations":[{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e9807dced212da9d57ff037610b6063ab15","buildSettings":{"CODE_SIGNING_ALLOWED":"NO","CODE_SIGNING_IDENTITY":"-","CODE_SIGNING_REQUIRED":"NO","CONFIGURATION_BUILD_DIR":"$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/SDWebImage","EXPANDED_CODE_SIGN_IDENTITY":"-","IBSC_MODULE":"SDWebImage","INFOPLIST_FILE":"Target Support Files/SDWebImage/ResourceBundle-SDWebImage-SDWebImage-Info.plist","IPHONEOS_DEPLOYMENT_TARGET":"9.0","ONLY_ACTIVE_ARCH":"NO","PRODUCT_NAME":"SDWebImage","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","TARGETED_DEVICE_FAMILY":"1,2","WRAPPER_EXTENSION":"bundle"},"guid":"bfdfe7dc352907fc980b868725387e98f2847d1ca9a69889f6d0383fbfe18bbe","name":"Debug"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e9817591ddf25ade48b1de942ba4d9a652c","buildSettings":{"CLANG_ENABLE_OBJC_WEAK":"NO","CODE_SIGNING_ALLOWED":"NO","CODE_SIGNING_IDENTITY":"-","CODE_SIGNING_REQUIRED":"NO","CONFIGURATION_BUILD_DIR":"$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/SDWebImage","EXPANDED_CODE_SIGN_IDENTITY":"-","IBSC_MODULE":"SDWebImage","INFOPLIST_FILE":"Target Support Files/SDWebImage/ResourceBundle-SDWebImage-SDWebImage-Info.plist","IPHONEOS_DEPLOYMENT_TARGET":"9.0","PRODUCT_NAME":"SDWebImage","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","TARGETED_DEVICE_FAMILY":"1,2","VALIDATE_PRODUCT":"YES","WRAPPER_EXTENSION":"bundle"},"guid":"bfdfe7dc352907fc980b868725387e98ebd2f87fefc5272aaf378cf5ff5936df","name":"Profile"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e9817591ddf25ade48b1de942ba4d9a652c","buildSettings":{"CODE_SIGNING_ALLOWED":"NO","CODE_SIGNING_IDENTITY":"-","CODE_SIGNING_REQUIRED":"NO","CONFIGURATION_BUILD_DIR":"$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/SDWebImage","EXPANDED_CODE_SIGN_IDENTITY":"-","IBSC_MODULE":"SDWebImage","INFOPLIST_FILE":"Target Support Files/SDWebImage/ResourceBundle-SDWebImage-SDWebImage-Info.plist","IPHONEOS_DEPLOYMENT_TARGET":"9.0","PRODUCT_NAME":"SDWebImage","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","TARGETED_DEVICE_FAMILY":"1,2","WRAPPER_EXTENSION":"bundle"},"guid":"bfdfe7dc352907fc980b868725387e9828e8935feafbaaf55e1e006e435a39fe","name":"Release"}],"buildPhases":[{"buildFiles":[],"guid":"bfdfe7dc352907fc980b868725387e98c10b3281508b66e43344cb8a9928813b","type":"com.apple.buildphase.sources"},{"buildFiles":[],"guid":"bfdfe7dc352907fc980b868725387e9855f13db31621782dce3ed78a1192533f","type":"com.apple.buildphase.frameworks"},{"buildFiles":[{"fileReference":"bfdfe7dc352907fc980b868725387e98072810b3f251fe9adc8a780b3ece2d19","guid":"bfdfe7dc352907fc980b868725387e9849ff24d1c510c75bcd71236fbddf505a"}],"guid":"bfdfe7dc352907fc980b868725387e98fd0472846197a19fd67e8535dead924f","type":"com.apple.buildphase.resources"}],"buildRules":[],"dependencies":[],"guid":"bfdfe7dc352907fc980b868725387e9826e2628dc041aabe2d77e75ccb1dc95b","name":"SDWebImage-SDWebImage","productReference":{"guid":"bfdfe7dc352907fc980b868725387e986798c379d76b6055dc2d719d4bd63a69","name":"SDWebImage.bundle","type":"product"},"productTypeIdentifier":"com.apple.product-type.bundle","provisioningSourceData":[{"bundleIdentifierFromInfoPlist":"${PRODUCT_BUNDLE_IDENTIFIER}","configurationName":"Debug","provisioningStyle":0},{"bundleIdentifierFromInfoPlist":"${PRODUCT_BUNDLE_IDENTIFIER}","configurationName":"Profile","provisioningStyle":0},{"bundleIdentifierFromInfoPlist":"${PRODUCT_BUNDLE_IDENTIFIER}","configurationName":"Release","provisioningStyle":0}],"type":"standard"}
@@ -0,0 +1 @@
{"buildConfigurations":[{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e988d017df6eb26a1783b874214268dea26","buildSettings":{"CODE_SIGNING_ALLOWED":"NO","CODE_SIGNING_IDENTITY":"-","CODE_SIGNING_REQUIRED":"NO","CONFIGURATION_BUILD_DIR":"$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/SwiftyGif","EXPANDED_CODE_SIGN_IDENTITY":"-","IBSC_MODULE":"SwiftyGif","INFOPLIST_FILE":"Target Support Files/SwiftyGif/ResourceBundle-SwiftyGif-SwiftyGif-Info.plist","IPHONEOS_DEPLOYMENT_TARGET":"9.0","ONLY_ACTIVE_ARCH":"NO","PRODUCT_NAME":"SwiftyGif","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","TARGETED_DEVICE_FAMILY":"1,2","WRAPPER_EXTENSION":"bundle"},"guid":"bfdfe7dc352907fc980b868725387e9867de03905444371c5e39754de7867f8c","name":"Debug"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e98f191c54bfc8bd2078a4337a8bbbe4787","buildSettings":{"CLANG_ENABLE_OBJC_WEAK":"NO","CODE_SIGNING_ALLOWED":"NO","CODE_SIGNING_IDENTITY":"-","CODE_SIGNING_REQUIRED":"NO","CONFIGURATION_BUILD_DIR":"$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/SwiftyGif","EXPANDED_CODE_SIGN_IDENTITY":"-","IBSC_MODULE":"SwiftyGif","INFOPLIST_FILE":"Target Support Files/SwiftyGif/ResourceBundle-SwiftyGif-SwiftyGif-Info.plist","IPHONEOS_DEPLOYMENT_TARGET":"9.0","PRODUCT_NAME":"SwiftyGif","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","TARGETED_DEVICE_FAMILY":"1,2","VALIDATE_PRODUCT":"YES","WRAPPER_EXTENSION":"bundle"},"guid":"bfdfe7dc352907fc980b868725387e9897aa1261c5528aa7f556e942ebe441be","name":"Profile"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e98f191c54bfc8bd2078a4337a8bbbe4787","buildSettings":{"CODE_SIGNING_ALLOWED":"NO","CODE_SIGNING_IDENTITY":"-","CODE_SIGNING_REQUIRED":"NO","CONFIGURATION_BUILD_DIR":"$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/SwiftyGif","EXPANDED_CODE_SIGN_IDENTITY":"-","IBSC_MODULE":"SwiftyGif","INFOPLIST_FILE":"Target Support Files/SwiftyGif/ResourceBundle-SwiftyGif-SwiftyGif-Info.plist","IPHONEOS_DEPLOYMENT_TARGET":"9.0","PRODUCT_NAME":"SwiftyGif","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","TARGETED_DEVICE_FAMILY":"1,2","WRAPPER_EXTENSION":"bundle"},"guid":"bfdfe7dc352907fc980b868725387e98593050ea014300305b2fa837012aabba","name":"Release"}],"buildPhases":[{"buildFiles":[],"guid":"bfdfe7dc352907fc980b868725387e98638550c4be065837c4a93674af9a7642","type":"com.apple.buildphase.sources"},{"buildFiles":[],"guid":"bfdfe7dc352907fc980b868725387e987b1994435d5ecf9645b379eeb8560721","type":"com.apple.buildphase.frameworks"},{"buildFiles":[{"fileReference":"bfdfe7dc352907fc980b868725387e9818ad385274ce64def8d4f9f9ce74f574","guid":"bfdfe7dc352907fc980b868725387e98a99318934ecfdc1e03033f5e13134f6e"}],"guid":"bfdfe7dc352907fc980b868725387e982819ba3f86839bd3cffd437aa85cc34c","type":"com.apple.buildphase.resources"}],"buildRules":[],"dependencies":[],"guid":"bfdfe7dc352907fc980b868725387e98f5cd644fc2aeb8654450a2168f52697c","name":"SwiftyGif-SwiftyGif","productReference":{"guid":"bfdfe7dc352907fc980b868725387e9824d08d80a11ec6e34ca1c1e17eca0844","name":"SwiftyGif.bundle","type":"product"},"productTypeIdentifier":"com.apple.product-type.bundle","provisioningSourceData":[{"bundleIdentifierFromInfoPlist":"${PRODUCT_BUNDLE_IDENTIFIER}","configurationName":"Debug","provisioningStyle":0},{"bundleIdentifierFromInfoPlist":"${PRODUCT_BUNDLE_IDENTIFIER}","configurationName":"Profile","provisioningStyle":0},{"bundleIdentifierFromInfoPlist":"${PRODUCT_BUNDLE_IDENTIFIER}","configurationName":"Release","provisioningStyle":0}],"type":"standard"}
@@ -0,0 +1 @@
{"buildConfigurations":[{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e98dee49624fc73f0ae85aa8a082ba91fed","buildSettings":{"CLANG_ENABLE_OBJC_WEAK":"NO","CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER":"NO","CODE_SIGN_IDENTITY[sdk=appletvos*]":"","CODE_SIGN_IDENTITY[sdk=iphoneos*]":"","CODE_SIGN_IDENTITY[sdk=watchos*]":"","CURRENT_PROJECT_VERSION":"1","DEFINES_MODULE":"YES","DYLIB_COMPATIBILITY_VERSION":"1","DYLIB_CURRENT_VERSION":"1","DYLIB_INSTALL_NAME_BASE":"@rpath","ENABLE_BITCODE":"NO","ENABLE_MODULE_VERIFIER":"NO","ENABLE_USER_SCRIPT_SANDBOXING":"NO","EXCLUDED_ARCHS[sdk=iphoneos*]":"$(inherited) armv7","EXCLUDED_ARCHS[sdk=iphonesimulator*]":"$(inherited) i386","FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios/Flutter.xcframework/ios-arm64\" $(inherited)","FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios/Flutter.xcframework/ios-arm64_x86_64-simulator\" $(inherited)","GCC_PREFIX_HEADER":"Target Support Files/file_picker/file_picker-prefix.pch","GENERATE_INFOPLIST_FILE":"NO","INFOPLIST_FILE":"Target Support Files/file_picker/file_picker-Info.plist","INSTALL_PATH":"$(LOCAL_LIBRARY_DIR)/Frameworks","LD_RUNPATH_SEARCH_PATHS":"$(inherited) @executable_path/Frameworks @loader_path/Frameworks","MODULEMAP_FILE":"Target Support Files/file_picker/file_picker.modulemap","ONLY_ACTIVE_ARCH":"NO","OTHER_LDFLAGS":"$(inherited) -framework Flutter","PRODUCT_MODULE_NAME":"file_picker","PRODUCT_NAME":"file_picker","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","SWIFT_ACTIVE_COMPILATION_CONDITIONS":"$(inherited) ","SWIFT_INSTALL_OBJC_HEADER":"YES","SWIFT_VERSION":"5.0","TARGETED_DEVICE_FAMILY":"1,2","VALID_ARCHS[sdk=iphonesimulator*]":"$(ARCHS_STANDARD)","VERSIONING_SYSTEM":"apple-generic","VERSION_INFO_PREFIX":""},"guid":"bfdfe7dc352907fc980b868725387e98b3839b441583705f02a5120c8d8aa8af","name":"Debug"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e98f0255426bc1673d88b46486c8fd69422","buildSettings":{"CLANG_ENABLE_OBJC_WEAK":"NO","CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER":"NO","CODE_SIGN_IDENTITY[sdk=appletvos*]":"","CODE_SIGN_IDENTITY[sdk=iphoneos*]":"","CODE_SIGN_IDENTITY[sdk=watchos*]":"","CURRENT_PROJECT_VERSION":"1","DEFINES_MODULE":"YES","DYLIB_COMPATIBILITY_VERSION":"1","DYLIB_CURRENT_VERSION":"1","DYLIB_INSTALL_NAME_BASE":"@rpath","ENABLE_BITCODE":"NO","ENABLE_MODULE_VERIFIER":"NO","ENABLE_USER_SCRIPT_SANDBOXING":"NO","EXCLUDED_ARCHS[sdk=iphoneos*]":"$(inherited) armv7","EXCLUDED_ARCHS[sdk=iphonesimulator*]":"$(inherited) i386","FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64\" $(inherited)","FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64_x86_64-simulator\" $(inherited)","GCC_PREFIX_HEADER":"Target Support Files/file_picker/file_picker-prefix.pch","GENERATE_INFOPLIST_FILE":"NO","INFOPLIST_FILE":"Target Support Files/file_picker/file_picker-Info.plist","INSTALL_PATH":"$(LOCAL_LIBRARY_DIR)/Frameworks","LD_RUNPATH_SEARCH_PATHS":"$(inherited) @executable_path/Frameworks @loader_path/Frameworks","MODULEMAP_FILE":"Target Support Files/file_picker/file_picker.modulemap","OTHER_LDFLAGS":"$(inherited) -framework Flutter","PRODUCT_MODULE_NAME":"file_picker","PRODUCT_NAME":"file_picker","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","SWIFT_ACTIVE_COMPILATION_CONDITIONS":"$(inherited) ","SWIFT_INSTALL_OBJC_HEADER":"YES","SWIFT_VERSION":"5.0","TARGETED_DEVICE_FAMILY":"1,2","VALIDATE_PRODUCT":"YES","VALID_ARCHS[sdk=iphonesimulator*]":"$(ARCHS_STANDARD)","VERSIONING_SYSTEM":"apple-generic","VERSION_INFO_PREFIX":""},"guid":"bfdfe7dc352907fc980b868725387e98bf7c85eda27e5e9e0261324bd88a67cb","name":"Profile"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e98f0255426bc1673d88b46486c8fd69422","buildSettings":{"CLANG_ENABLE_OBJC_WEAK":"NO","CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER":"NO","CODE_SIGN_IDENTITY[sdk=appletvos*]":"","CODE_SIGN_IDENTITY[sdk=iphoneos*]":"","CODE_SIGN_IDENTITY[sdk=watchos*]":"","CURRENT_PROJECT_VERSION":"1","DEFINES_MODULE":"YES","DYLIB_COMPATIBILITY_VERSION":"1","DYLIB_CURRENT_VERSION":"1","DYLIB_INSTALL_NAME_BASE":"@rpath","ENABLE_BITCODE":"NO","ENABLE_MODULE_VERIFIER":"NO","ENABLE_USER_SCRIPT_SANDBOXING":"NO","EXCLUDED_ARCHS[sdk=iphoneos*]":"$(inherited) armv7","EXCLUDED_ARCHS[sdk=iphonesimulator*]":"$(inherited) i386","FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64\" $(inherited)","FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]":"\"/Users/mark/sdk/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64_x86_64-simulator\" $(inherited)","GCC_PREFIX_HEADER":"Target Support Files/file_picker/file_picker-prefix.pch","GENERATE_INFOPLIST_FILE":"NO","INFOPLIST_FILE":"Target SupLine truncated
@@ -0,0 +1 @@
{"buildConfigurations":[{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e98ae529f76a1aeb84aed676cbc438f2337","buildSettings":{"CODE_SIGN_IDENTITY[sdk=appletvos*]":"","CODE_SIGN_IDENTITY[sdk=iphoneos*]":"","CODE_SIGN_IDENTITY[sdk=watchos*]":"","CURRENT_PROJECT_VERSION":"1","DEFINES_MODULE":"YES","DYLIB_COMPATIBILITY_VERSION":"1","DYLIB_CURRENT_VERSION":"1","DYLIB_INSTALL_NAME_BASE":"@rpath","ENABLE_MODULE_VERIFIER":"NO","ENABLE_USER_SCRIPT_SANDBOXING":"NO","GCC_PREFIX_HEADER":"Target Support Files/DKPhotoGallery/DKPhotoGallery-prefix.pch","GENERATE_INFOPLIST_FILE":"NO","INFOPLIST_FILE":"Target Support Files/DKPhotoGallery/DKPhotoGallery-Info.plist","INSTALL_PATH":"$(LOCAL_LIBRARY_DIR)/Frameworks","IPHONEOS_DEPLOYMENT_TARGET":"9.0","LD_RUNPATH_SEARCH_PATHS":"$(inherited) @executable_path/Frameworks @loader_path/Frameworks","MODULEMAP_FILE":"Target Support Files/DKPhotoGallery/DKPhotoGallery.modulemap","ONLY_ACTIVE_ARCH":"NO","PRODUCT_MODULE_NAME":"DKPhotoGallery","PRODUCT_NAME":"DKPhotoGallery","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","SWIFT_ACTIVE_COMPILATION_CONDITIONS":"$(inherited) ","SWIFT_INSTALL_OBJC_HEADER":"YES","SWIFT_VERSION":"5","TARGETED_DEVICE_FAMILY":"1,2","VERSIONING_SYSTEM":"apple-generic","VERSION_INFO_PREFIX":""},"guid":"bfdfe7dc352907fc980b868725387e9812a3e31c7a3658cff33e391a712abfee","name":"Debug"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e987c0ad1a68339e983c25e4de21965f4a8","buildSettings":{"CODE_SIGN_IDENTITY[sdk=appletvos*]":"","CODE_SIGN_IDENTITY[sdk=iphoneos*]":"","CODE_SIGN_IDENTITY[sdk=watchos*]":"","CURRENT_PROJECT_VERSION":"1","DEFINES_MODULE":"YES","DYLIB_COMPATIBILITY_VERSION":"1","DYLIB_CURRENT_VERSION":"1","DYLIB_INSTALL_NAME_BASE":"@rpath","ENABLE_MODULE_VERIFIER":"NO","ENABLE_USER_SCRIPT_SANDBOXING":"NO","GCC_PREFIX_HEADER":"Target Support Files/DKPhotoGallery/DKPhotoGallery-prefix.pch","GENERATE_INFOPLIST_FILE":"NO","INFOPLIST_FILE":"Target Support Files/DKPhotoGallery/DKPhotoGallery-Info.plist","INSTALL_PATH":"$(LOCAL_LIBRARY_DIR)/Frameworks","IPHONEOS_DEPLOYMENT_TARGET":"9.0","LD_RUNPATH_SEARCH_PATHS":"$(inherited) @executable_path/Frameworks @loader_path/Frameworks","MODULEMAP_FILE":"Target Support Files/DKPhotoGallery/DKPhotoGallery.modulemap","PRODUCT_MODULE_NAME":"DKPhotoGallery","PRODUCT_NAME":"DKPhotoGallery","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","SWIFT_ACTIVE_COMPILATION_CONDITIONS":"$(inherited) ","SWIFT_INSTALL_OBJC_HEADER":"YES","SWIFT_VERSION":"5","TARGETED_DEVICE_FAMILY":"1,2","VALIDATE_PRODUCT":"YES","VERSIONING_SYSTEM":"apple-generic","VERSION_INFO_PREFIX":""},"guid":"bfdfe7dc352907fc980b868725387e98c22b62655b6be12853c1b5cd5fd652dd","name":"Profile"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e987c0ad1a68339e983c25e4de21965f4a8","buildSettings":{"CODE_SIGN_IDENTITY[sdk=appletvos*]":"","CODE_SIGN_IDENTITY[sdk=iphoneos*]":"","CODE_SIGN_IDENTITY[sdk=watchos*]":"","CURRENT_PROJECT_VERSION":"1","DEFINES_MODULE":"YES","DYLIB_COMPATIBILITY_VERSION":"1","DYLIB_CURRENT_VERSION":"1","DYLIB_INSTALL_NAME_BASE":"@rpath","ENABLE_MODULE_VERIFIER":"NO","ENABLE_USER_SCRIPT_SANDBOXING":"NO","GCC_PREFIX_HEADER":"Target Support Files/DKPhotoGallery/DKPhotoGallery-prefix.pch","GENERATE_INFOPLIST_FILE":"NO","INFOPLIST_FILE":"Target Support Files/DKPhotoGallery/DKPhotoGallery-Info.plist","INSTALL_PATH":"$(LOCAL_LIBRARY_DIR)/Frameworks","IPHONEOS_DEPLOYMENT_TARGET":"9.0","LD_RUNPATH_SEARCH_PATHS":"$(inherited) @executable_path/Frameworks @loader_path/Frameworks","MODULEMAP_FILE":"Target Support Files/DKPhotoGallery/DKPhotoGallery.modulemap","PRODUCT_MODULE_NAME":"DKPhotoGallery","PRODUCT_NAME":"DKPhotoGallery","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","SWIFT_ACTIVE_COMPILATION_CONDITIONS":"$(inherited) ","SWIFT_INSTALL_OBJC_HEADER":"YES","SWIFT_VERSION":"5","TARGETED_DEVICE_FAMILY":"1,2","VALIDATE_PRODUCT":"YES","VERSIONING_SYSTEM":"apple-generic","VERSION_INFO_PREFIX":""},"guid":"bfdfe7dc352907fc980b868725387e9848fe5408463f346fa5b361b3cedb54de","name":"Release"}],"buildPhases":[{"buildFiles":[{"fileReference":"bfdfe7dc352907fc980b868725387e98e61c3706c4c5522b7ecd10e962efb922","guid":"bfdfe7dc352907fc980b868725387e988f3eec976e8ea74bbf5d7cd0b5f67f79","headerVisibility":"public"}],"guid":"bfdfe7dc352907fc980b868725387e98e9d4857b7750471589c9720743ea3b25","type":"com.apple.buildphase.headers"},{"buildFiles":[{"fileReference":"bfdfe7dc352907fc980b868725387e986cd8b63f1efadf20d9ea1ed8f5a55c59","guid":"bfdfe7dc352907fc980b868725387e9815d3d68fd43cc594f1d83dbf5a16bf0e"},{"fileReference":"bfdfe7dc352907fc980b868725387e98d637eecdfef95bbdf30369120352bd46","guid":"bfdfe7dc352907fc980b868725387e980a4bac17f61a14113e14ed5b4442e9f7"},{"fileReference":"bfdfe7dc352907fc980b868725387e9834be2bf990d387cbce4913d90fc0866d","guid":"bfdfe7dc352907fc980b868725387e98021a7b18180da4bcfd722853617e831b"},{"fileReference":"bfdfe7dc352907fc980b868725387e984767f7ebe824e56e6af065bd8c127fb1","guid":"bfdfe7dc352907fc980b868725387e98fbd84374a47a123c65e38dLine truncated
@@ -0,0 +1 @@
{"buildConfigurations":[{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e98b84d960f6c511b37f7394026ec602a26","buildSettings":{"ASSETCATALOG_COMPILER_APPICON_NAME":"AppIcon","ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME":"AccentColor","CLANG_ENABLE_OBJC_WEAK":"NO","ENABLE_USER_SCRIPT_SANDBOXING":"NO","IPHONEOS_DEPLOYMENT_TARGET":"13.0","LD_RUNPATH_SEARCH_PATHS":"$(inherited) @executable_path/Frameworks","ONLY_ACTIVE_ARCH":"NO","SDKROOT":"iphoneos","TARGETED_DEVICE_FAMILY":"1,2"},"guid":"bfdfe7dc352907fc980b868725387e980bc977b873df9b0e01b3c822e5c77429","name":"Debug"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e989f6375ee0579bba7a5de7839408dc6de","buildSettings":{"ASSETCATALOG_COMPILER_APPICON_NAME":"AppIcon","ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME":"AccentColor","CLANG_ENABLE_OBJC_WEAK":"NO","ENABLE_USER_SCRIPT_SANDBOXING":"NO","IPHONEOS_DEPLOYMENT_TARGET":"13.0","LD_RUNPATH_SEARCH_PATHS":"$(inherited) @executable_path/Frameworks","SDKROOT":"iphoneos","TARGETED_DEVICE_FAMILY":"1,2","VALIDATE_PRODUCT":"YES"},"guid":"bfdfe7dc352907fc980b868725387e98b75274b69084014a6a5ac37ea7a9d4bc","name":"Profile"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e989f6375ee0579bba7a5de7839408dc6de","buildSettings":{"ASSETCATALOG_COMPILER_APPICON_NAME":"AppIcon","ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME":"AccentColor","CLANG_ENABLE_OBJC_WEAK":"NO","ENABLE_USER_SCRIPT_SANDBOXING":"NO","IPHONEOS_DEPLOYMENT_TARGET":"13.0","LD_RUNPATH_SEARCH_PATHS":"$(inherited) @executable_path/Frameworks","SDKROOT":"iphoneos","TARGETED_DEVICE_FAMILY":"1,2","VALIDATE_PRODUCT":"YES"},"guid":"bfdfe7dc352907fc980b868725387e988b8e6347e534cb57e9bb1b22dc47b716","name":"Release"}],"buildPhases":[],"buildRules":[],"dependencies":[],"guid":"bfdfe7dc352907fc980b868725387e989da425bb6d6d5d8dbb95e4afffb82217","name":"Flutter","provisioningSourceData":[{"bundleIdentifierFromInfoPlist":"","configurationName":"Debug","provisioningStyle":0},{"bundleIdentifierFromInfoPlist":"","configurationName":"Profile","provisioningStyle":0},{"bundleIdentifierFromInfoPlist":"","configurationName":"Release","provisioningStyle":0}],"type":"aggregate"}
@@ -0,0 +1 @@
{"buildConfigurations":[{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e983c6363c1b6260613b6af5dae89e50fa6","buildSettings":{"CODE_SIGNING_ALLOWED":"NO","CODE_SIGNING_IDENTITY":"-","CODE_SIGNING_REQUIRED":"NO","CONFIGURATION_BUILD_DIR":"$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/app_links","EXPANDED_CODE_SIGN_IDENTITY":"-","IBSC_MODULE":"app_links","INFOPLIST_FILE":"Target Support Files/app_links/ResourceBundle-app_links_ios_privacy-app_links-Info.plist","IPHONEOS_DEPLOYMENT_TARGET":"13.0","ONLY_ACTIVE_ARCH":"NO","PRODUCT_NAME":"app_links_ios_privacy","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","TARGETED_DEVICE_FAMILY":"1,2","WRAPPER_EXTENSION":"bundle"},"guid":"bfdfe7dc352907fc980b868725387e982ac99f10f6822515e6781ade0cb9cc64","name":"Debug"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e98fd8cfcfe7c3fb0ac9ed7c1a13704b3d5","buildSettings":{"CLANG_ENABLE_OBJC_WEAK":"NO","CODE_SIGNING_ALLOWED":"NO","CODE_SIGNING_IDENTITY":"-","CODE_SIGNING_REQUIRED":"NO","CONFIGURATION_BUILD_DIR":"$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/app_links","EXPANDED_CODE_SIGN_IDENTITY":"-","IBSC_MODULE":"app_links","INFOPLIST_FILE":"Target Support Files/app_links/ResourceBundle-app_links_ios_privacy-app_links-Info.plist","IPHONEOS_DEPLOYMENT_TARGET":"13.0","PRODUCT_NAME":"app_links_ios_privacy","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","TARGETED_DEVICE_FAMILY":"1,2","VALIDATE_PRODUCT":"YES","WRAPPER_EXTENSION":"bundle"},"guid":"bfdfe7dc352907fc980b868725387e98b86693991edc063c343b6123475d310d","name":"Profile"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e98fd8cfcfe7c3fb0ac9ed7c1a13704b3d5","buildSettings":{"CODE_SIGNING_ALLOWED":"NO","CODE_SIGNING_IDENTITY":"-","CODE_SIGNING_REQUIRED":"NO","CONFIGURATION_BUILD_DIR":"$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/app_links","EXPANDED_CODE_SIGN_IDENTITY":"-","IBSC_MODULE":"app_links","INFOPLIST_FILE":"Target Support Files/app_links/ResourceBundle-app_links_ios_privacy-app_links-Info.plist","IPHONEOS_DEPLOYMENT_TARGET":"13.0","PRODUCT_NAME":"app_links_ios_privacy","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","TARGETED_DEVICE_FAMILY":"1,2","WRAPPER_EXTENSION":"bundle"},"guid":"bfdfe7dc352907fc980b868725387e98240358b4530237925223b54410489dda","name":"Release"}],"buildPhases":[{"buildFiles":[],"guid":"bfdfe7dc352907fc980b868725387e980135adade744c093ad80fd47ec6ffbb9","type":"com.apple.buildphase.sources"},{"buildFiles":[],"guid":"bfdfe7dc352907fc980b868725387e98f4cf1832e1000167365d8c2092427e45","type":"com.apple.buildphase.frameworks"},{"buildFiles":[{"fileReference":"bfdfe7dc352907fc980b868725387e98eb6655bb0a0f69a2a11ac7bcc08afb0b","guid":"bfdfe7dc352907fc980b868725387e98c40d727f0ffc02a8e1adc3a93e93b868"}],"guid":"bfdfe7dc352907fc980b868725387e9887df74fdfbf5feb239f859edfda11764","type":"com.apple.buildphase.resources"}],"buildRules":[],"dependencies":[],"guid":"bfdfe7dc352907fc980b868725387e9854f2b496f3d836ac3fd0e138cbba7daf","name":"app_links-app_links_ios_privacy","productReference":{"guid":"bfdfe7dc352907fc980b868725387e98b94b436e886ef04c570b7ebe5735692f","name":"app_links_ios_privacy.bundle","type":"product"},"productTypeIdentifier":"com.apple.product-type.bundle","provisioningSourceData":[{"bundleIdentifierFromInfoPlist":"${PRODUCT_BUNDLE_IDENTIFIER}","configurationName":"Debug","provisioningStyle":0},{"bundleIdentifierFromInfoPlist":"${PRODUCT_BUNDLE_IDENTIFIER}","configurationName":"Profile","provisioningStyle":0},{"bundleIdentifierFromInfoPlist":"${PRODUCT_BUNDLE_IDENTIFIER}","configurationName":"Release","provisioningStyle":0}],"type":"standard"}
@@ -0,0 +1 @@
{"buildConfigurations":[{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e98ae529f76a1aeb84aed676cbc438f2337","buildSettings":{"CODE_SIGNING_ALLOWED":"NO","CODE_SIGNING_IDENTITY":"-","CODE_SIGNING_REQUIRED":"NO","CONFIGURATION_BUILD_DIR":"$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/DKPhotoGallery","EXPANDED_CODE_SIGN_IDENTITY":"-","IBSC_MODULE":"DKPhotoGallery","INFOPLIST_FILE":"Target Support Files/DKPhotoGallery/ResourceBundle-DKPhotoGallery-DKPhotoGallery-Info.plist","IPHONEOS_DEPLOYMENT_TARGET":"9.0","ONLY_ACTIVE_ARCH":"NO","PRODUCT_NAME":"DKPhotoGallery","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","TARGETED_DEVICE_FAMILY":"1,2","WRAPPER_EXTENSION":"bundle"},"guid":"bfdfe7dc352907fc980b868725387e981035c23725d6f669f16922d106add07e","name":"Debug"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e987c0ad1a68339e983c25e4de21965f4a8","buildSettings":{"CLANG_ENABLE_OBJC_WEAK":"NO","CODE_SIGNING_ALLOWED":"NO","CODE_SIGNING_IDENTITY":"-","CODE_SIGNING_REQUIRED":"NO","CONFIGURATION_BUILD_DIR":"$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/DKPhotoGallery","EXPANDED_CODE_SIGN_IDENTITY":"-","IBSC_MODULE":"DKPhotoGallery","INFOPLIST_FILE":"Target Support Files/DKPhotoGallery/ResourceBundle-DKPhotoGallery-DKPhotoGallery-Info.plist","IPHONEOS_DEPLOYMENT_TARGET":"9.0","PRODUCT_NAME":"DKPhotoGallery","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","TARGETED_DEVICE_FAMILY":"1,2","VALIDATE_PRODUCT":"YES","WRAPPER_EXTENSION":"bundle"},"guid":"bfdfe7dc352907fc980b868725387e98eb7ec1e525d112a6aba1f3086fbee501","name":"Profile"},{"baseConfigurationFileReference":"bfdfe7dc352907fc980b868725387e987c0ad1a68339e983c25e4de21965f4a8","buildSettings":{"CODE_SIGNING_ALLOWED":"NO","CODE_SIGNING_IDENTITY":"-","CODE_SIGNING_REQUIRED":"NO","CONFIGURATION_BUILD_DIR":"$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/DKPhotoGallery","EXPANDED_CODE_SIGN_IDENTITY":"-","IBSC_MODULE":"DKPhotoGallery","INFOPLIST_FILE":"Target Support Files/DKPhotoGallery/ResourceBundle-DKPhotoGallery-DKPhotoGallery-Info.plist","IPHONEOS_DEPLOYMENT_TARGET":"9.0","PRODUCT_NAME":"DKPhotoGallery","SDKROOT":"iphoneos","SKIP_INSTALL":"YES","TARGETED_DEVICE_FAMILY":"1,2","WRAPPER_EXTENSION":"bundle"},"guid":"bfdfe7dc352907fc980b868725387e983adcaf42a588440a1bb41691dfef76ca","name":"Release"}],"buildPhases":[{"buildFiles":[],"guid":"bfdfe7dc352907fc980b868725387e98cc1885b82bae9e448d1d5b669e2df59d","type":"com.apple.buildphase.sources"},{"buildFiles":[],"guid":"bfdfe7dc352907fc980b868725387e98d88ef0264424cfcd4326446b5004219c","type":"com.apple.buildphase.frameworks"},{"buildFiles":[{"fileReference":"bfdfe7dc352907fc980b868725387e985e10b359dd12b7f39fea9ff06ea97d76","guid":"bfdfe7dc352907fc980b868725387e989b100093402c895020b150b32e00f0f1"},{"fileReference":"bfdfe7dc352907fc980b868725387e98a35234dbbe4590b9a85e7457f0c28ec1","guid":"bfdfe7dc352907fc980b868725387e987afd66ea9f01c8374bf0c92c615381ec"},{"fileReference":"bfdfe7dc352907fc980b868725387e98dee9c8b9a30b693ced32e187ebf0f900","guid":"bfdfe7dc352907fc980b868725387e981cc3d1b485ef7350fe25b708b26d9fbb"},{"fileReference":"bfdfe7dc352907fc980b868725387e98c41ed424f75c34475286f94a0c89533f","guid":"bfdfe7dc352907fc980b868725387e98f5a24a20e079e6784c0fcedf2fcdf3b4"},{"fileReference":"bfdfe7dc352907fc980b868725387e98561ed8ca05356672713bcaada5ce132e","guid":"bfdfe7dc352907fc980b868725387e98426fa1286f9aa17aa26796db5772cbd6"}],"guid":"bfdfe7dc352907fc980b868725387e98769785d34bbe4f415892ef12991c8b36","type":"com.apple.buildphase.resources"}],"buildRules":[],"dependencies":[],"guid":"bfdfe7dc352907fc980b868725387e98d3f65728b12dd217475d1283ee417937","name":"DKPhotoGallery-DKPhotoGallery","productReference":{"guid":"bfdfe7dc352907fc980b868725387e9845db4417944723d8b91f4a6c67e94d3c","name":"DKPhotoGallery.bundle","type":"product"},"productTypeIdentifier":"com.apple.product-type.bundle","provisioningSourceData":[{"bundleIdentifierFromInfoPlist":"${PRODUCT_BUNDLE_IDENTIFIER}","configurationName":"Debug","provisioningStyle":0},{"bundleIdentifierFromInfoPlist":"${PRODUCT_BUNDLE_IDENTIFIER}","configurationName":"Profile","provisioningStyle":0},{"bundleIdentifierFromInfoPlist":"${PRODUCT_BUNDLE_IDENTIFIER}","configurationName":"Release","provisioningStyle":0}],"type":"standard"}
@@ -0,0 +1 @@
{"guid":"dc4b70c03e8043e50e38f2068887b1d4","name":"Pods","path":"/Users/mark/developingProjects/flux/ios/Pods/Pods.xcodeproj/project.xcworkspace","projects":["PROJECT@v11_mod=16ab0516af86f9c4da6cf0caecf5869c_hash=bfdfe7dc352907fc980b868725387e98plugins=1OJSG6M1FOV3XYQCBH7Z29RZ0FPR9XDE1"]}
+210 -211
View File
@@ -5,26 +5,26 @@ packages:
dependency: transitive
description:
name: _flutterfire_internals
sha256: "78f98c1f9c4dbbd22c2bb7b7f17c4a5c06150e8b2cb791a0947979ad0d3dabd5"
sha256: f6966125633a34f82d9be2ee895b755cff3554087b1d00a9eb884e5947f4bca9
url: "https://pub.dev"
source: hosted
version: "1.3.73"
version: "1.3.77"
app_links:
dependency: transitive
description:
name: app_links
sha256: f8db46d2ea9ff6f3a37191a7fd5b7813da1253ace8c32c1b9eadace41d1188ea
sha256: "08ba88bf19d9edea33130cb71c8ced2cb982b4e00b82efef4a434d1357bc69c3"
url: "https://pub.dev"
source: hosted
version: "7.2.1"
version: "7.2.2"
app_links_linux:
dependency: transitive
description:
name: app_links_linux
sha256: f5f7173a78609f3dfd4c2ff2c95bd559ab43c80a87dc6a095921d96c05688c81
sha256: "9ccb5802085a1e57bb07b6256fd1d61a78c7ec104944d4965e62938b4fefd9cb"
url: "https://pub.dev"
source: hosted
version: "1.0.3"
version: "1.0.4"
app_links_platform_interface:
dependency: transitive
description:
@@ -37,18 +37,18 @@ packages:
dependency: transitive
description:
name: app_links_web
sha256: af060ed76183f9e2b87510a9480e56a5352b6c249778d07bd2c95fc35632a555
sha256: "382d32c6f486f15b1d7f5d6a37a70a481a4fc08382eef419d373169921a3e765"
url: "https://pub.dev"
source: hosted
version: "1.0.4"
version: "1.0.5"
archive:
dependency: transitive
description:
name: archive
sha256: a96e8b390886ee8abb49b7bd3ac8df6f451c621619f52a26e815fdcf568959ff
sha256: "6c5bcd986e06b94e3c40244af471750840a3d2341d1f9763a1100a14add517b4"
url: "https://pub.dev"
source: hosted
version: "4.0.9"
version: "4.3.0"
args:
dependency: transitive
description:
@@ -133,18 +133,18 @@ packages:
dependency: transitive
description:
name: clock
sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b
sha256: e51d50bca3217c9a9fa2b41a30e4a38971133f5f9ec7a3d57bae095007f1d28e
url: "https://pub.dev"
source: hosted
version: "1.1.2"
version: "1.1.3"
code_assets:
dependency: transitive
description:
name: code_assets
sha256: bf394f466ba9205f1812a0433b392d6af280f155f56651eda7c18cc32ed493b8
sha256: "828110d598123b5ea96c00c9f3c72105bf79f8ee36c20a39b26209ade421ec57"
url: "https://pub.dev"
source: hosted
version: "1.2.1"
version: "2.1.0"
collection:
dependency: "direct main"
description:
@@ -165,10 +165,10 @@ packages:
dependency: transitive
description:
name: cross_file
sha256: "92c9c43c383bfa1c32079d3bc492d55d6d4318044b7b47edaff8971cbb555c51"
sha256: f141ea4f277af142a0356955707f6556f37b03947d39d55585981a06ca437bd6
url: "https://pub.dev"
source: hosted
version: "0.3.5+4"
version: "0.3.5+5"
crypto:
dependency: transitive
description:
@@ -185,6 +185,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.2"
cupertino_ui:
dependency: transitive
description:
name: cupertino_ui
sha256: ea0b8170b40a86262b2fc21ac0625303f52df209dbf6fccc2b98b27eff44f6ce
url: "https://pub.dev"
source: hosted
version: "1.1.2"
dart_jsonwebtoken:
dependency: transitive
description:
@@ -197,10 +205,10 @@ packages:
dependency: transitive
description:
name: dbus
sha256: "792974a4007974fbc5c1b5433eb2330a9db3e368c3f906253af4c007d0f49a91"
sha256: a48d5da28e89bd02196e80d81ed8d7954923d00a0f4a68cc20b575038f023383
url: "https://pub.dev"
source: hosted
version: "0.7.13"
version: "0.7.15"
equatable:
dependency: "direct main"
description:
@@ -209,14 +217,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.0"
extension:
dependency: transitive
description:
name: extension
sha256: be3a6b7f8adad2f6e2e8c63c895d19811fcf203e23466c6296267941d0ff4f24
url: "https://pub.dev"
source: hosted
version: "0.6.0"
fake_async:
dependency: transitive
description:
@@ -245,26 +245,26 @@ packages:
dependency: "direct main"
description:
name: file_picker
sha256: f13a03000d942e476bc1ff0a736d2e9de711d2f89a95cd4c1d88f861c3348387
sha256: "29cc1fdb20613876cc7afc529738c1c0f11a9ca159b010edad0c566ac330847e"
url: "https://pub.dev"
source: hosted
version: "11.0.2"
version: "11.0.3"
file_selector_linux:
dependency: transitive
description:
name: file_selector_linux
sha256: "2567f398e06ac72dcf2e98a0c95df2a9edd03c2c2e0cacd4780f20cdf56263a0"
sha256: da76400e7872ce7637ffdce12749ec24169c25f6195c28372208e65a24bcd2ab
url: "https://pub.dev"
source: hosted
version: "0.9.4"
version: "0.9.4+1"
file_selector_macos:
dependency: transitive
description:
name: file_selector_macos
sha256: "5e0bbe9c312416f1787a68259ea1505b52f258c587f12920422671807c4d618a"
sha256: d57c62362766b5e7ae739448650b66c6aab7a68ba7ecc65e04018652645ae0f4
url: "https://pub.dev"
source: hosted
version: "0.9.5"
version: "0.9.5+1"
file_selector_platform_interface:
dependency: transitive
description:
@@ -277,58 +277,58 @@ packages:
dependency: transitive
description:
name: file_selector_windows
sha256: "62197474ae75893a62df75939c777763d39c2bc5f73ce5b88497208bc269abfd"
sha256: fbefc5fb92c6d3cbe8d284a2cd971b593bb07d2cd6da8557b81a862250b4acec
url: "https://pub.dev"
source: hosted
version: "0.9.3+5"
version: "0.9.3+6"
firebase_core:
dependency: "direct main"
description:
name: firebase_core
sha256: d2625088d8f8836a7a74a7eb94a5372d70ad88382602ba2dcc02805c294d0d16
sha256: "5fbbaa2aeb08a52feee559f92a62f5a6b04c9bdff81c8f608636771cf0d7b680"
url: "https://pub.dev"
source: hosted
version: "4.11.0"
version: "4.15.0"
firebase_core_platform_interface:
dependency: transitive
description:
name: firebase_core_platform_interface
sha256: "913e7c96ef83a80ad7e1c3f8a059167b3de23b5d5e07fa3ed8f11abe24de98b6"
sha256: "9bfbc85faca09346471ac56fbcee00757ebcfd85887c6f602764eff0001902d8"
url: "https://pub.dev"
source: hosted
version: "7.1.0"
version: "8.1.1"
firebase_core_web:
dependency: transitive
description:
name: firebase_core_web
sha256: "30ba3ae56f5beb2cea836033201570612c911661889f815eca73b6056c7b55bf"
sha256: "8ed84f5001dbd7a0390e2818d46bc858ceebb970edededdfc8d6552c76fc2f6e"
url: "https://pub.dev"
source: hosted
version: "3.9.0"
version: "3.12.0"
firebase_messaging:
dependency: "direct main"
description:
name: firebase_messaging
sha256: ce21a510e5a9aed67a0404476981e19ec0361a0301eeba547dc93dc2e7dec99a
sha256: "47a8142a0b897783103b01018ad69f123b819b0120483847bde30d1b2fa89b36"
url: "https://pub.dev"
source: hosted
version: "16.4.1"
version: "16.7.0"
firebase_messaging_platform_interface:
dependency: transitive
description:
name: firebase_messaging_platform_interface
sha256: e10f6d521e7ed663d0ea2f4ec7de4c6729f8c2ce25d32faf6d6b4219da8515c2
sha256: f9707e185b8ce1155d58e7e29348245072d99981f899fa8d3214abb2652c4ccb
url: "https://pub.dev"
source: hosted
version: "4.9.0"
version: "4.10.0"
firebase_messaging_web:
dependency: transitive
description:
name: firebase_messaging_web
sha256: "7ab45dfaf8efcd1a769baa9b8debbd0da281f5d3fc07274296b564396a980292"
sha256: "311b16c75fc645c7a70c9ade38908abb12310dfce449fc3d3cee1771f196351e"
url: "https://pub.dev"
source: hosted
version: "4.2.1"
version: "4.2.5"
fixnum:
dependency: transitive
description:
@@ -425,66 +425,58 @@ packages:
dependency: transitive
description:
name: functions_client
sha256: e9685e9ab852a8b8e0579c867f6c9155da27317b294b3df796a536b8b8e0d253
sha256: "931e822688d2e97867b2300e2fdbb08c9db73f8653fc83efc7a259d2e0cca769"
url: "https://pub.dev"
source: hosted
version: "2.6.4"
version: "2.7.1"
get_it:
dependency: "direct main"
description:
name: get_it
sha256: "568d62f0e68666fb5d95519743b3c24a34c7f19d834b0658c46e26d778461f66"
sha256: "2b5c6b077aad30bba9782178baff6076a2044141f1d5f2f15b43bca3fbe74874"
url: "https://pub.dev"
source: hosted
version: "9.2.1"
version: "9.3.0"
go_router:
dependency: "direct main"
description:
name: go_router
sha256: "5922b2861e2235a3504896f0d6fa07d84141b480cf52eecd2f42cd25585a9e8a"
sha256: d7a3576cb312649eaa51f2356450aed686085fb58fcdebda5b359aa951eef7ea
url: "https://pub.dev"
source: hosted
version: "17.3.0"
version: "17.5.0"
google_fonts:
dependency: "direct main"
description:
name: google_fonts
sha256: "4e9391085e524954a51e3625b7c9c7e9851dc3f376603208bb45c24b9a66255d"
sha256: e3cb3ee6b47fd2472c23de6da5744796a4da195137759ddb3fbcc9467b7b3c7d
url: "https://pub.dev"
source: hosted
version: "8.1.0"
version: "8.2.1"
gotrue:
dependency: transitive
description:
name: gotrue
sha256: "360bba9606e58d5acc59a033ab64ae3cf571a6868f7a7267cb8e9a204b7bf1b2"
sha256: cd73a6de4198baca71341177bed233673d7965aca2a0257ab5561feb2abdaf59
url: "https://pub.dev"
source: hosted
version: "2.26.0"
gtk:
dependency: transitive
description:
name: gtk
sha256: "4ff85b2a16724029dd9e5bbb5a94b6918f9973f74ba571c949d2002801879cf5"
url: "https://pub.dev"
source: hosted
version: "2.2.0"
version: "2.27.2"
hooks:
dependency: transitive
description:
name: hooks
sha256: "9a62a50b50b769a737bc0a8ff381f333529df3ab746b2f6b02e83760231455ba"
sha256: eaac480a35ec0814146c2c48d96aaa829e0e44a7662c88ae84c9edf4bc35651f
url: "https://pub.dev"
source: hosted
version: "2.0.2"
version: "2.2.0"
html:
dependency: transitive
description:
name: html
sha256: "6d1264f2dffa1b1101c25a91dff0dc2daee4c18e87cd8538729773c073dbf602"
sha256: "43b67b8f43321ab066817dfac5619596c98bb1b61624e77203bb4351785f9699"
url: "https://pub.dev"
source: hosted
version: "0.15.6"
version: "0.15.7"
http:
dependency: transitive
description:
@@ -502,13 +494,13 @@ packages:
source: hosted
version: "4.1.2"
image:
dependency: transitive
dependency: "direct main"
description:
name: image
sha256: "6300175e00616bbc832e2fc91bfa4d776af5402c81c7151bee6905bb08473c52"
sha256: a1e7f4951e538a568e14b856702afc9ae1d2f4b202daced8d22c1b9cd211ce89
url: "https://pub.dev"
source: hosted
version: "4.9.1"
version: "4.10.1"
image_picker:
dependency: "direct main"
description:
@@ -521,10 +513,10 @@ packages:
dependency: transitive
description:
name: image_picker_android
sha256: "6f3a1995eafb000333174fae92202622033b0ee7fd917a6cd3730295264df84a"
sha256: "8a7823d5d3e884f7780829d85d92110d072bdcd9ed48e2be158d2abe91a912d4"
url: "https://pub.dev"
source: hosted
version: "0.8.13+19"
version: "0.8.13+25"
image_picker_for_web:
dependency: transitive
description:
@@ -537,10 +529,10 @@ packages:
dependency: transitive
description:
name: image_picker_ios
sha256: b9c4a438a9ff4f60808c9cf0039b93a42bb6c2211ef6ebb647394b2b3fa84588
sha256: "815921d05ef87d64dc64e9f7f855967614a9a67086d0c60fa27d47a1cd9a8896"
url: "https://pub.dev"
source: hosted
version: "0.8.13+6"
version: "0.8.13+9"
image_picker_linux:
dependency: transitive
description:
@@ -585,26 +577,34 @@ packages:
dependency: "direct main"
description:
name: intl
sha256: "3df61194eb431efc39c4ceba583b95633a403f46c9fd341e550ce0bfa50e9aa5"
sha256: "1ca20c894b1717686a2319b8548763d812bc0aabdac580420a44c5178c57a867"
url: "https://pub.dev"
source: hosted
version: "0.20.2"
version: "0.20.3"
jni:
dependency: transitive
description:
name: jni
sha256: c2230682d5bc2362c1c9e8d3c7f406d9cbba23ab3f2e203a025dd47e0fb2e68f
sha256: "6b9ca0602fef0230e83149afbe3f9f8227e94f2bbe84a1da4f14d699742f402d"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
version: "1.1.0"
jni_flutter:
dependency: transitive
description:
name: jni_flutter
sha256: "8b59e590786050b1cd866677dddaf76b1ade5e7bc751abe04b86e84d379d3ba6"
sha256: b2310cdd4c18c65c081ab141a41efa94aa26c65431803703ece51996f174f351
url: "https://pub.dev"
source: hosted
version: "1.0.1"
version: "1.0.3"
jni_util:
dependency: transitive
description:
name: jni_util
sha256: "1ba86da04a5f2bf18fde2edb235587e70c5b0fc5bd4ba955f46b00942c3fc35f"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
json_annotation:
dependency: transitive
description:
@@ -613,14 +613,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.12.0"
jwt_decode:
dependency: transitive
description:
name: jwt_decode
sha256: d2e9f68c052b2225130977429d30f187aa1981d789c76ad104a32243cfdebfbb
url: "https://pub.dev"
source: hosted
version: "0.3.1"
leak_tracker:
dependency: transitive
description:
@@ -665,10 +657,10 @@ packages:
dependency: transitive
description:
name: matcher
sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861
sha256: "31bd099b47c10cd1aeb55146a2d46ce0277630ecef3f7dae54ad7873f36696cd"
url: "https://pub.dev"
source: hosted
version: "0.12.19"
version: "0.12.20"
material_color_utilities:
dependency: transitive
description:
@@ -677,22 +669,30 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.13.0"
material_ui:
dependency: transitive
description:
name: material_ui
sha256: "98ab9eda579ecae623e4b376c603035c5def78ce706f735f30bd632af5814695"
url: "https://pub.dev"
source: hosted
version: "1.6.0"
meta:
dependency: transitive
description:
name: meta
sha256: "1741988757a65eb6b36abe716829688cf01910bbf91c34354ff7ec1c3de2b349"
sha256: "307249ce4ff29d58a18e97f6345f539382eb9c9c29ecda628900f31de0443dd9"
url: "https://pub.dev"
source: hosted
version: "1.18.0"
version: "1.19.0"
mime:
dependency: transitive
description:
name: mime
sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6"
sha256: bd47de35f07e27267e69c8c8b22edf9473bfee170a60d60fcc93730c5144b7f6
url: "https://pub.dev"
source: hosted
version: "2.0.0"
version: "2.1.0"
nested:
dependency: transitive
description:
@@ -701,22 +701,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.0"
objective_c:
dependency: transitive
description:
name: objective_c
sha256: "6cb691c686fa2838c6deb34980d426145c2a5d537491cb83d463c33cdbc726ed"
url: "https://pub.dev"
source: hosted
version: "9.4.1"
package_config:
dependency: transitive
description:
name: package_config
sha256: f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc
sha256: ffcf4cf3d6c0b74ac43708d9f56625506e8a68aa935abe9d267a7330f320eb5d
url: "https://pub.dev"
source: hosted
version: "2.2.0"
version: "3.0.0"
package_info_plus:
dependency: "direct main"
description:
@@ -737,10 +729,10 @@ packages:
dependency: transitive
description:
name: passkeys_platform_interface
sha256: "9610bd136b3382500390912ddd8517ee99505228b1af7b507b9c907f7e99a47d"
sha256: "5fca044a6f1a3c5abff645ca5a5417b613c130d1c4e08513ba9182c7f4834619"
url: "https://pub.dev"
source: hosted
version: "2.8.0"
version: "2.10.0"
path:
dependency: transitive
description:
@@ -774,13 +766,13 @@ packages:
source: hosted
version: "2.3.1"
path_provider_foundation:
dependency: transitive
dependency: "direct overridden"
description:
name: path_provider_foundation
sha256: "2a376b7d6392d80cd3705782d2caa734ca4727776db0b6ec36ef3f1855197699"
sha256: "6d13aece7b3f5c5a9731eaf553ff9dcbc2eff41087fd2df587fd0fed9a3eb0c4"
url: "https://pub.dev"
source: hosted
version: "2.6.0"
version: "2.5.1"
path_provider_linux:
dependency: transitive
description:
@@ -809,10 +801,10 @@ packages:
dependency: "direct main"
description:
name: pdf
sha256: "517df47af468734a23c8b513c0c6a8a62357403ab1b8ab7fad1606576a9dbdd0"
sha256: "6e40827f370d196e97c6611724d923a3d86c431ce8e2ce1e59edd03a67a1a6e6"
url: "https://pub.dev"
source: hosted
version: "3.13.0"
version: "3.13.1"
pdf_widget_wrapper:
dependency: transitive
description:
@@ -821,15 +813,38 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.4"
pdfx:
pdfium_dart:
dependency: transitive
description:
name: pdfium_dart
sha256: e296a26c030e6e0fb34b32ce7481a3cfa0c2d35ce80f6269551c685759f4c91f
url: "https://pub.dev"
source: hosted
version: "0.3.1"
pdfium_flutter:
dependency: transitive
description:
name: pdfium_flutter
sha256: "59897274513984b347fc98e7bf71ba457678daea8b5568cd7c688979aeb77765"
url: "https://pub.dev"
source: hosted
version: "0.3.1"
pdfrx:
dependency: "direct main"
description:
path: "packages/pdfx"
ref: main
resolved-ref: "900ad0799ebd12d6c87189275fcb6155ce8a9374"
url: "https://github.com/ScerIO/packages.flutter.git"
source: git
version: "2.9.2"
name: pdfrx
sha256: "52e78d84a706e5d63d2502689fe8e800d823bc780ac4341b2d3683a4d726505a"
url: "https://pub.dev"
source: hosted
version: "2.6.5"
pdfrx_engine:
dependency: transitive
description:
name: pdfrx_engine
sha256: f74ca9ea4ec722545f054a1d6ee1bf01222409ecd9458e5945c0cc5feaa3d2c6
url: "https://pub.dev"
source: hosted
version: "0.6.1"
permission_handler:
dependency: "direct main"
description:
@@ -850,58 +865,50 @@ packages:
dependency: transitive
description:
name: permission_handler_apple
sha256: "79dfa1df734798aa3cfdad166d3a3698c206d8813de13516ea1071b5d7e2f420"
sha256: "066bbbc60031b63b916a3871e7bb4b6a8c5e7cec8146dafec53d1da304eff0a5"
url: "https://pub.dev"
source: hosted
version: "9.4.10"
version: "9.6.2"
permission_handler_html:
dependency: transitive
description:
name: permission_handler_html
sha256: "38f000e83355abb3392140f6bc3030660cfaef189e1f87824facb76300b4ff24"
sha256: "6ea98b3f17f60d3b527f2647ed2ab4dc0f6bfe25b22cb1c363f5d8f62252f6ac"
url: "https://pub.dev"
source: hosted
version: "0.1.3+5"
version: "0.1.4+1"
permission_handler_platform_interface:
dependency: transitive
description:
name: permission_handler_platform_interface
sha256: eb99b295153abce5d683cac8c02e22faab63e50679b937fa1bf67d58bb282878
sha256: ed86a61c190258fdd65de395ea0632822e3415c1faec38eae0c31b479c28a531
url: "https://pub.dev"
source: hosted
version: "4.3.0"
version: "4.4.1"
permission_handler_windows:
dependency: transitive
description:
name: permission_handler_windows
sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e"
sha256: caeae01858a0a7d2df67a445ac98e1ad95e55a0e77c73044f4e9b1c8c2289cbd
url: "https://pub.dev"
source: hosted
version: "0.2.1"
version: "0.2.2"
petitparser:
dependency: transitive
description:
name: petitparser
sha256: "91bd59303e9f769f108f8df05e371341b15d59e995e6806aefab827b58336675"
sha256: "2f1564aadb14215e478563b5406cb80729d022158c01dc50c96013c2f7eb4790"
url: "https://pub.dev"
source: hosted
version: "7.0.2"
photo_view:
dependency: transitive
description:
name: photo_view
sha256: "1fc3d970a91295fbd1364296575f854c9863f225505c28c46e0a03e48960c75e"
url: "https://pub.dev"
source: hosted
version: "0.15.0"
version: "7.1.0"
platform:
dependency: transitive
description:
name: platform
sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984"
sha256: a36d119c13416516a7b5913fbe8af8531e11633d784c550b2125f76c758524ec
url: "https://pub.dev"
source: hosted
version: "3.1.6"
version: "3.2.0"
plugin_platform_interface:
dependency: transitive
description:
@@ -922,26 +929,26 @@ packages:
dependency: transitive
description:
name: posix
sha256: "185ef7606574f789b40f289c233efa52e96dead518aed988e040a10737febb07"
sha256: bc1bad54ad2b735816e31f8d4600cfde6c7839975085ddfbca48b6c9f7c4044e
url: "https://pub.dev"
source: hosted
version: "6.5.0"
version: "6.5.2"
postgrest:
dependency: transitive
description:
name: postgrest
sha256: "10e3f195e131eec944fa872644aed89b33b5be998f3fc77c87325db3927bc646"
sha256: b7f957273ba6a1c26cefa987ac524f4138e9ab7542fbb9e6abdfddacb9895a21
url: "https://pub.dev"
source: hosted
version: "2.8.0"
version: "2.9.1"
printing:
dependency: "direct main"
description:
name: printing
sha256: f6cd14c768c1352dd37a958a3ee351aa9ce305b398218d3acd86389d5f7ecad1
sha256: "0f72f29f2e08b8453b7a45b6c7781eb792b1da3468bf0910be0eb3b1d6781f49"
url: "https://pub.dev"
source: hosted
version: "5.15.0"
version: "5.15.1"
provider:
dependency: transitive
description:
@@ -954,10 +961,10 @@ packages:
dependency: transitive
description:
name: pub_semver
sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585"
sha256: "261236774e8b1d69cfc6b9eabbc96c40f25e7a2d6b171f3385d4f65d5734fb24"
url: "https://pub.dev"
source: hosted
version: "2.2.0"
version: "2.2.1"
qr:
dependency: transitive
description:
@@ -978,26 +985,18 @@ packages:
dependency: transitive
description:
name: realtime_client
sha256: "0cfbe0047e2591eba348938e9b4e620d5b1a8df6c374757e8eb8645252b8387f"
sha256: ff731ce21fd775e0d7accfb1eaccdcf47b687610720822ba8b9fd8f5bccb2bd9
url: "https://pub.dev"
source: hosted
version: "2.11.0"
version: "2.13.0"
record_use:
dependency: transitive
description:
name: record_use
sha256: "2551bd8eecfe95d14ae75f6021ad0248be5c27f138c2ec12fcb52b500b3ba1ed"
sha256: "1cb8564af8d43b464294411db9217f5ec04891c6f22ee2c32d73ae05e88a6bd2"
url: "https://pub.dev"
source: hosted
version: "0.6.0"
retry:
dependency: transitive
description:
name: retry
sha256: "822e118d5b3aafed083109c72d5f484c6dc66707885e07c0fbcb8b986bba7efc"
url: "https://pub.dev"
source: hosted
version: "3.1.2"
version: "1.1.1"
rxdart:
dependency: transitive
description:
@@ -1010,26 +1009,26 @@ packages:
dependency: "direct main"
description:
name: shared_preferences
sha256: c3025c5534b01739267eb7d76959bbc25a6d10f6988e1c2a3036940133dd10bf
sha256: "1e85e0dccf5b4a016077fea7dfbb4a7cb39c759ac1596fcf60c06deadb7da91f"
url: "https://pub.dev"
source: hosted
version: "2.5.5"
version: "2.5.6"
shared_preferences_android:
dependency: transitive
description:
name: shared_preferences_android
sha256: "93ae5884a9df5d3bb696825bceb3a17590754548b5d740eba51500afc8d088f5"
sha256: "1e12aafe408aa50da80edfd679a2a6bf63ba7ab37c7fa98286da459a757b3399"
url: "https://pub.dev"
source: hosted
version: "2.4.26"
version: "2.4.28"
shared_preferences_foundation:
dependency: transitive
description:
name: shared_preferences_foundation
sha256: "4e7eaffc2b17ba398759f1151415869a34771ba11ebbccd1b0145472a619a64f"
sha256: "2ec3934efa51e46117f23031cc141b8fc878e8525b94ec1ea4f7f586cf1b47ea"
url: "https://pub.dev"
source: hosted
version: "2.5.6"
version: "2.5.7"
shared_preferences_linux:
dependency: transitive
description:
@@ -1079,18 +1078,18 @@ packages:
dependency: transitive
description:
name: stack_trace
sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1"
sha256: "277654b3034d17ac6f9f1cb5595db011b1d5d41e8806866db28e0abaa101c490"
url: "https://pub.dev"
source: hosted
version: "1.12.1"
version: "1.12.2"
storage_client:
dependency: transitive
description:
name: storage_client
sha256: "221263cfbe0c01575b7d7fe7543e44abff380eb4d38d936372844a1caa85ba12"
sha256: b951281b8e2b293460f0e6cc4e866f2546681390f0e37d24fbbd7b4a0deb27a3
url: "https://pub.dev"
source: hosted
version: "2.6.0"
version: "2.8.1"
stream_channel:
dependency: transitive
description:
@@ -1111,26 +1110,34 @@ packages:
dependency: transitive
description:
name: supabase
sha256: "3879996256325fcc9abb03b62b12c07e4eaae2e008e1bf043cc1525184159a43"
sha256: "3662449640972335e50d075a1fceb000b9217e403564305d129a4d287ff4b4c9"
url: "https://pub.dev"
source: hosted
version: "2.14.0"
version: "2.16.2"
supabase_common:
dependency: transitive
description:
name: supabase_common
sha256: a7961a44953cf8d9da049381fc3377516348255042fbb12b9d4f8540816f2fe9
url: "https://pub.dev"
source: hosted
version: "0.1.2"
supabase_flutter:
dependency: "direct main"
description:
name: supabase_flutter
sha256: c9916c1cd512ebf3107ec0f83c9dca13d2e1e789629c2a5df896586bff46ce5f
sha256: "9698f61e83907b939fd6ee6bbf833d8456541e29cb38e9c08e52ebf88fa9faf4"
url: "https://pub.dev"
source: hosted
version: "2.16.0"
version: "2.18.0"
synchronized:
dependency: transitive
description:
name: synchronized
sha256: "93b153dcb6a26dcddee6ca087dd634b53e38c10b5aa163e8e49501a776456153"
sha256: "397b146f97613b83d84bdccb439bc8d0f3aebb6c1d14a9641e6f24201c490b2d"
url: "https://pub.dev"
source: hosted
version: "3.4.1"
version: "3.4.2"
term_glyph:
dependency: transitive
description:
@@ -1143,10 +1150,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "949a932224383300f01be9221c39180316445ecb8e7547f70a41a35bf421fb9e"
sha256: "2a122cbe059f8b610d3a5415f42e255b6c17b1f21eee1d960f31080237fb4f11"
url: "https://pub.dev"
source: hosted
version: "0.7.11"
version: "0.7.12"
typed_data:
dependency: transitive
description:
@@ -1179,54 +1186,46 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.3.1"
universal_platform:
dependency: transitive
description:
name: universal_platform
sha256: "64e16458a0ea9b99260ceb5467a214c1f298d647c659af1bff6d3bf82536b1ec"
url: "https://pub.dev"
source: hosted
version: "1.1.0"
url_launcher:
dependency: "direct main"
description:
name: url_launcher
sha256: f6a7e5c4835bb4e3026a04793a4199ca2d14c739ec378fdfe23fc8075d0439f8
sha256: e8cc955c97e06df9879140a1fe301f3d493f01b7c62dec7f46834be31d7e9fda
url: "https://pub.dev"
source: hosted
version: "6.3.2"
version: "6.3.3"
url_launcher_android:
dependency: transitive
description:
name: url_launcher_android
sha256: b413d49b73867ac08dd2f9890efd3cc11f2a0e577618d50843440a1fb3776c32
sha256: "611e87fb320b70d1dd721dc46af89c98aceccea9b31fde49e084591414e0c610"
url: "https://pub.dev"
source: hosted
version: "6.3.32"
version: "6.3.33"
url_launcher_ios:
dependency: transitive
description:
name: url_launcher_ios
sha256: "580fe5dfb51671ae38191d316e027f6b76272b026370708c2d898799750a02b0"
sha256: "8faa1aab294f1ab4040b43660c887b0418d5fa4f0cffef76a484e6aa1092eb4a"
url: "https://pub.dev"
source: hosted
version: "6.4.1"
version: "6.4.2"
url_launcher_linux:
dependency: transitive
description:
name: url_launcher_linux
sha256: d5e14138b3bc193a0f63c10a53c94b91d399df0512b1f29b94a043db7482384a
sha256: "10f86fef4c2c43563fa6c211ff9cf757adf4d3ab762c56bd430664a947d70cd0"
url: "https://pub.dev"
source: hosted
version: "3.2.2"
version: "3.2.3"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
sha256: "368adf46f71ad3c21b8f06614adb38346f193f3a59ba8fe9a2fd74133070ba18"
sha256: "5e835a3b869c2d70325349c81c5a45c28e20791265b67b2669da6b08c5cd5201"
url: "https://pub.dev"
source: hosted
version: "3.2.5"
version: "3.2.6"
url_launcher_platform_interface:
dependency: transitive
description:
@@ -1247,26 +1246,26 @@ packages:
dependency: transitive
description:
name: url_launcher_windows
sha256: "712c70ab1b99744ff066053cbe3e80c73332b38d46e5e945c98689b2e66fc15f"
sha256: "6c5ad3f22cd4c38e089b81963b3cd7bb83b111b2df5dce008bb066162f42e429"
url: "https://pub.dev"
source: hosted
version: "3.1.5"
version: "3.1.6"
uuid:
dependency: "direct main"
description:
name: uuid
sha256: "1fef9e8e11e2991bb773070d4656b7bd5d850967a2456cfc83cf47925ba79489"
sha256: "9b129329f58692f6e6578329498a8fe9fbe98f090beb764ffbb8ee2eadd01dcd"
url: "https://pub.dev"
source: hosted
version: "4.5.3"
version: "4.6.0"
vector_graphics:
dependency: transitive
description:
name: vector_graphics
sha256: "2306c03da2ba81724afeb589c351ebbc0aa7d86005925be8f8735856dbe5e42d"
sha256: "9d0e3b9cb16542ad660daee871e726a10d13a93b7b5391677c3160e8f5e83935"
url: "https://pub.dev"
source: hosted
version: "1.2.2"
version: "1.2.3"
vector_graphics_codec:
dependency: transitive
description:
@@ -1279,26 +1278,26 @@ packages:
dependency: transitive
description:
name: vector_graphics_compiler
sha256: "142a9146f447d15b10bdc00e21d5f4d83e5b32bb5f8f8f5a04c75311344923a3"
sha256: "4dca4feb77dc3ec7f6e27e49c53241eb8217f55e4f9b12599a27f8903bca5682"
url: "https://pub.dev"
source: hosted
version: "1.2.6"
version: "1.3.0"
vector_math:
dependency: transitive
description:
name: vector_math
sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b
sha256: "92b9910f66ed1057fd4da7b040ae7c74cafacf885bdc81be496928d5049b032d"
url: "https://pub.dev"
source: hosted
version: "2.2.0"
version: "2.4.3"
vm_service:
dependency: transitive
description:
name: vm_service
sha256: "0016aef94fc66495ac78af5859181e3f3bf2026bd8eecc72b9565601e19ab360"
sha256: "5f37239c4851efcef929cea7824e76df7f2f0970aef85d66bbc430afa40e72f0"
url: "https://pub.dev"
source: hosted
version: "15.2.0"
version: "15.3.0"
web:
dependency: transitive
description:
@@ -1351,10 +1350,10 @@ packages:
dependency: transitive
description:
name: yaml
sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce
sha256: f67cdd8e07d3c6329146aaef1ba043542b3134c12489f553ca9a7435d1068aea
url: "https://pub.dev"
source: hosted
version: "3.1.3"
version: "3.1.4"
yet_another_json_isolate:
dependency: transitive
description:
@@ -1364,5 +1363,5 @@ packages:
source: hosted
version: "2.1.1"
sdks:
dart: ">=3.12.0 <4.0.0"
flutter: ">=3.44.0"
dart: ">=3.13.0 <4.0.0"
flutter: ">=3.47.0"
+4 -7
View File
@@ -1,7 +1,7 @@
name: flux
description: "Gestione attività negozio di telefonia"
publish_to: 'none'
version: 2.0.0+56
version: 2.3.0+80
environment:
sdk: ^3.11.3
@@ -23,9 +23,9 @@ dependencies:
go_router: ^17.2.0
google_fonts: ^8.0.2
image_picker: ^1.2.1
image: ^4.10.1
internet_file: ^1.3.0
intl: ^0.20.2
pdfx: ^2.9.2
permission_handler: ^12.0.1
qr_flutter: ^4.1.0
shared_preferences: ^2.5.5
@@ -42,13 +42,10 @@ dependencies:
firebase_core: ^4.9.0
firebase_messaging: ^16.2.2
universal_html: ^2.3.0
pdfrx: ^2.6.5
dependency_overrides:
pdfx:
git:
url: https://github.com/ScerIO/packages.flutter.git
ref: main
path: packages/pdfx
path_provider_foundation: 2.5.1
dev_dependencies:
flutter_test:
@@ -0,0 +1,176 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:flux/features/home/dashboard_daily_ricontatti/blocs/dashboard_daily_ricontatti_state.dart';
import 'package:flux/features/home/dashboard_daily_ricontatti/models/staff_daily_ricontatti_summary.dart';
import 'package:flux/features/master_data/staff/models/staff_member_model.dart';
import 'package:flux/features/operations/models/operation_type.dart';
void main() {
group('StaffDailyRicontattiSummary', () {
test('correctly evaluates hasReachedGoal, hasStarted, isZero', () {
const summaryZero = StaffDailyRicontattiSummary(
staffId: '1',
staffName: 'Mario Rossi',
count: 0,
);
expect(summaryZero.isZero, isTrue);
expect(summaryZero.hasStarted, isFalse);
expect(summaryZero.hasReachedGoal, isFalse);
const summaryOne = StaffDailyRicontattiSummary(
staffId: '2',
staffName: 'Luigi Bianchi',
count: 1,
);
expect(summaryOne.isZero, isFalse);
expect(summaryOne.hasStarted, isTrue);
expect(summaryOne.hasReachedGoal, isFalse);
const summaryTwo = StaffDailyRicontattiSummary(
staffId: '3',
staffName: 'Anna Verdi',
count: 2,
);
expect(summaryTwo.isZero, isFalse);
expect(summaryTwo.hasStarted, isFalse);
expect(summaryTwo.hasReachedGoal, isTrue);
const summaryFive = StaffDailyRicontattiSummary(
staffId: '4',
staffName: 'Paolo Neri',
count: 5,
);
expect(summaryFive.isZero, isFalse);
expect(summaryFive.hasStarted, isFalse);
expect(summaryFive.hasReachedGoal, isTrue);
});
test('copyWith updates fields as expected', () {
const original = StaffDailyRicontattiSummary(
staffId: '1',
staffName: 'Mario',
count: 0,
systemRole: SystemRole.user,
);
final updated = original.copyWith(
count: 3,
monthCount: 15,
systemRole: SystemRole.manager,
);
expect(updated.count, equals(3));
expect(updated.monthCount, equals(15));
expect(updated.systemRole, equals(SystemRole.manager));
expect(updated.staffName, equals('Mario'));
expect(updated.staffId, equals('1'));
});
});
group('DashboardDailyRicontattiState', () {
test('computes staffWithGoal, staffWithOne, staffAtZero correctly', () {
final state = DashboardDailyRicontattiState(
date: DateTime(2026, 10, 9),
summaries: const [
StaffDailyRicontattiSummary(
staffId: '1',
staffName: 'Mario',
count: 3, // >= 2
monthCount: 18,
),
StaffDailyRicontattiSummary(
staffId: '2',
staffName: 'Luigi',
count: 2, // >= 2
monthCount: 12,
),
StaffDailyRicontattiSummary(
staffId: '3',
staffName: 'Anna',
count: 1, // == 1
monthCount: 9,
),
StaffDailyRicontattiSummary(
staffId: '4',
staffName: 'Paolo',
count: 0, // == 0
monthCount: 5,
),
StaffDailyRicontattiSummary(
staffId: '5',
staffName: 'Giulia',
count: 0, // == 0
monthCount: 0,
),
],
totalRicontattiToday: 6,
totalRicontattiMonth: 44,
);
expect(state.activeStaffCount, equals(5));
expect(state.staffWithGoal, equals(2));
expect(state.staffWithOne, equals(1));
expect(state.staffAtZero, equals(2));
expect(state.totalRicontattiToday, equals(6));
expect(state.totalRicontattiMonth, equals(44));
});
});
group('OperationType.ricontatto', () {
test('resolves from string accurately', () {
expect(OperationType.fromValue('ricontatto'), equals(OperationType.ricontatto));
expect(OperationType.fromValue('Ricontatto'), equals(OperationType.ricontatto));
expect(OperationType.fromValue('RICONTATTO'), equals(OperationType.ricontatto));
});
});
group('StaffMemberModel jobTitle discriminants', () {
test('canViewRicontattiFocus identifies Manager and Titolare by jobTitle', () {
final manager = StaffMemberModel.empty().copyWith(jobTitle: 'Manager');
final titolare = StaffMemberModel.empty().copyWith(jobTitle: 'Titolare');
final storeManager = StaffMemberModel.empty().copyWith(jobTitle: 'Store Manager');
final addetto = StaffMemberModel.empty().copyWith(
jobTitle: 'Addetto Vendite',
systemRole: SystemRole.user,
);
final admin = StaffMemberModel.empty().copyWith(
jobTitle: 'Tecnico',
systemRole: SystemRole.admin,
);
expect(manager.canViewRicontattiFocus, isTrue);
expect(titolare.canViewRicontattiFocus, isTrue);
expect(storeManager.canViewRicontattiFocus, isTrue);
expect(addetto.canViewRicontattiFocus, isFalse);
expect(admin.canViewRicontattiFocus, isTrue);
});
test('excludes Manager, Titolare, Tester from controlled staff', () {
final manager = StaffMemberModel.empty().copyWith(jobTitle: 'Manager');
final titolare = StaffMemberModel.empty().copyWith(jobTitle: 'Titolare');
final tester = StaffMemberModel.empty().copyWith(jobTitle: 'Tester');
final betaTester = StaffMemberModel.empty().copyWith(jobTitle: 'BETA TESTER');
final inactive = StaffMemberModel.empty().copyWith(
jobTitle: 'Addetto',
isActive: false,
);
expect(manager.isExcludedFromControlledStaff, isTrue);
expect(titolare.isExcludedFromControlledStaff, isTrue);
expect(tester.isExcludedFromControlledStaff, isTrue);
expect(betaTester.isExcludedFromControlledStaff, isTrue);
expect(inactive.isExcludedFromControlledStaff, isTrue);
});
test('addetto with systemRole manager is still controlled staff', () {
// systemRole indica permessi app, jobTitle indica il ruolo operativo in negozio
final addettoWithAdminPerms = StaffMemberModel.empty().copyWith(
jobTitle: 'Addetto Vendite',
systemRole: SystemRole.manager,
isActive: true,
);
expect(addettoWithAdminPerms.isExcludedFromControlledStaff, isFalse);
expect(addettoWithAdminPerms.isManagerOrTitolare, isFalse);
expect(addettoWithAdminPerms.canViewRicontattiFocus, isFalse);
});
});
}
@@ -0,0 +1,56 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:flux/features/operations/models/financing_translations.dart';
void main() {
group('FinancingTranslations', () {
test('contains all 9 requested languages', () {
final supportedCodes = FinancingTranslations.supportedLanguages.map((l) => l.code).toSet();
expect(
supportedCodes,
containsAll([
'it',
'en',
'fr',
'es',
'ar',
'uk',
'ru',
'mk',
'sq',
]),
);
expect(FinancingTranslations.supportedLanguages.length, 9);
});
test('Arabic is marked as RTL', () {
final ar = FinancingTranslations.supportedLanguages.firstWhere((l) => l.code == 'ar');
expect(ar.isRtl, isTrue);
final it = FinancingTranslations.supportedLanguages.firstWhere((l) => l.code == 'it');
expect(it.isRtl, isFalse);
});
test('formatNoteText outputs canonical Italian labels regardless of language', () {
final noteText = FinancingTranslations.formatNoteText(
maritalStatusIndex: 0, // Celibe / Nubile
occupation: 'Ingegnere Informatico',
incomeRangeIndex: 1, // Da 2.000 € a 5.000 €
languageName: 'العربية (Arabo)',
);
expect(noteText, contains('[DATI FINANZIAMENTO]'));
expect(noteText, contains('Stato civile: Celibe / Nubile'));
expect(noteText, contains('Professione: Ingegnere Informatico'));
expect(noteText, contains('Reddito mensile: Da 2.000 € a 5.000 €'));
expect(noteText, contains('Lingua: العربية (Arabo)'));
});
test('each language has exactly 5 marital status and 3 income range options', () {
for (final lang in FinancingTranslations.supportedLanguages) {
final strings = FinancingTranslations.getStrings(lang.code);
expect(strings.maritalOptions.length, 5, reason: 'Language ${lang.code} should have 5 marital options');
expect(strings.incomeOptions.length, 3, reason: 'Language ${lang.code} should have 3 income options');
}
});
});
}
+1
View File
@@ -17,6 +17,7 @@
<base href="$FLUTTER_BASE_HREF">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
<meta name="description" content="Gestione attività negozio di telefonia">
+7 -6
View File
@@ -16,11 +16,12 @@ Compression=lzma2/max
SolidCompression=yes
WizardStyle=modern
; Icona dell'installer (opzionale, decommenta se hai il file .ico)
; Icona dell'installer
SetupIconFile=windows\runner\resources\app_icon.ico
; Richiede privilegi di amministratore per installare nella cartella Programmi
PrivilegesRequired=admin
; Installazione utente (senza richiesta di privilegi amministratore UAC)
PrivilegesRequired=lowest
CloseApplications=force
[Files]
; 1. L'eseguibile principale di Flutter
@@ -31,12 +32,12 @@ Source: "build\windows\x64\runner\Release\*"; DestDir: "{app}"; Flags: ignorever
[Icons]
; Scorciatoie nel menu Start e sul Desktop
Name: "{autoprograms}\LaMiaApp"; Filename: "{app}\Flux.exe"
Name: "{autodesktop}\LaMiaApp"; Filename: "{app}\Flux.exe"; Tasks: desktopicon
Name: "{autoprograms}\Flux"; Filename: "{app}\Flux.exe"
Name: "{autodesktop}\Flux"; Filename: "{app}\Flux.exe"; Tasks: desktopicon
[Tasks]
Name: "desktopicon"; Description: "Crea un'icona sul &Desktop"; GroupDescription: "Icone aggiuntive:"; Flags: unchecked
[Run]
; Opzione per avviare l'app subito dopo la fine dell'installazione
Filename: "{app}\Flux.exe"; Description: "Avvia LaMiaApp"; Flags: nowait postinstall skipifsilent
Filename: "{app}\Flux.exe"; Description: "Avvia Flux"; Flags: nowait postinstall
@@ -9,7 +9,6 @@
#include <app_links/app_links_plugin_c_api.h>
#include <file_selector_windows/file_selector_windows.h>
#include <firebase_core/firebase_core_plugin_c_api.h>
#include <pdfx/pdfx_plugin.h>
#include <permission_handler_windows/permission_handler_windows_plugin.h>
#include <printing/printing_plugin.h>
#include <url_launcher_windows/url_launcher_windows.h>
@@ -21,8 +20,6 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
registry->GetRegistrarForPlugin("FileSelectorWindows"));
FirebaseCorePluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FirebaseCorePluginCApi"));
PdfxPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("PdfxPlugin"));
PermissionHandlerWindowsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin"));
PrintingPluginRegisterWithRegistrar(
-1
View File
@@ -6,7 +6,6 @@ list(APPEND FLUTTER_PLUGIN_LIST
app_links
file_selector_windows
firebase_core
pdfx
permission_handler_windows
printing
url_launcher_windows