2024-12-20 20:49:02 +04:00

38 lines
772 B
Dart

import 'package:equatable/equatable.dart';
import 'package:copy_with_extension/copy_with_extension.dart';
import 'package:pmd_lab/domain/models/card.dart';
import 'package:pmd_lab/domain/models/home.dart';
part 'state.g.dart';
@CopyWith()
class HomeState extends Equatable {
final HomeData? data;
final bool isLoading;
final String? error;
const HomeState({
this.data,
this.isLoading = false,
this.error,
});
HomeState copyWith({
HomeData? data,
bool? isLoading,
String? error,
}) =>
HomeState(
data: data ?? this.data,
isLoading: isLoading ?? this.isLoading,
error: error ?? this.error,
);
@override
List<Object?> get props => [
data,
isLoading,
error,
];
}