Onboarding completato, ora super rapido e top Reviewed-on: http://catelliub.zapto.org:3000/brontomark/flux/pulls/7 Co-authored-by: Mark M2 Macbook <marco@catelli.it> Co-committed-by: Mark M2 Macbook <marco@catelli.it>
38 lines
964 B
Dart
38 lines
964 B
Dart
import 'package:equatable/equatable.dart';
|
|
import 'package:flux/core/blocs/session/session_cubit.dart';
|
|
|
|
class OnboardingState extends Equatable {
|
|
final OnboardingStep step;
|
|
final bool isLoading;
|
|
final String? error;
|
|
final String? companyId; // Salvato dopo lo Step 1
|
|
final String? storeId; // Salvato dopo lo Step 2
|
|
|
|
const OnboardingState({
|
|
required this.step,
|
|
this.isLoading = false,
|
|
this.error,
|
|
this.companyId,
|
|
this.storeId,
|
|
});
|
|
|
|
OnboardingState copyWith({
|
|
OnboardingStep? step,
|
|
bool? isLoading,
|
|
String? error,
|
|
String? companyId,
|
|
String? storeId,
|
|
}) {
|
|
return OnboardingState(
|
|
step: step ?? this.step,
|
|
isLoading: isLoading ?? this.isLoading,
|
|
error: error, // Se non passato, resettiamo l'errore
|
|
companyId: companyId ?? this.companyId,
|
|
storeId: storeId ?? this.storeId,
|
|
);
|
|
}
|
|
|
|
@override
|
|
List<Object?> get props => [step, isLoading, error, companyId, storeId];
|
|
}
|