sembra funzionare tutto

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-04-26 10:13:58 +02:00
parent de431b6ee6
commit 69f935b755
13 changed files with 740 additions and 208 deletions

View File

@@ -1,6 +1,15 @@
part of 'services_cubit.dart';
enum ServicesStatus { initial, loading, ready, saving, saved, success, failure }
enum ServicesStatus {
initial,
loading,
ready,
saving,
saved,
savedNoPop,
success,
failure,
}
class ServicesState extends Equatable {
final ServicesStatus status;
@@ -10,6 +19,7 @@ class ServicesState extends Equatable {
final String query;
final DateTimeRange? dateRange;
final bool hasReachedMax;
final bool isSavingDraft;
const ServicesState({
required this.status,
@@ -19,6 +29,7 @@ class ServicesState extends Equatable {
this.query = '',
this.dateRange,
this.hasReachedMax = false,
this.isSavingDraft = false,
});
ServicesState copyWith({
@@ -29,6 +40,7 @@ class ServicesState extends Equatable {
String? query,
DateTimeRange? dateRange,
bool? hasReachedMax,
bool? isSavingDraft,
}) {
return ServicesState(
status: status ?? this.status,
@@ -38,6 +50,7 @@ class ServicesState extends Equatable {
query: query ?? this.query,
dateRange: dateRange ?? this.dateRange,
hasReachedMax: hasReachedMax ?? this.hasReachedMax,
isSavingDraft: isSavingDraft ?? this.isSavingDraft,
);
}
@@ -50,5 +63,6 @@ class ServicesState extends Equatable {
query,
dateRange,
hasReachedMax,
isSavingDraft,
];
}