Mobiles_programming/lib/presentation/home_page/bloc/state.dart

25 lines
736 B
Dart
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import 'package:equatable/equatable.dart';
import 'package:mobiles_labs_5th_semester/domain/models/game.dart';
import 'package:mobiles_labs_5th_semester/domain/models/page_of_games_home.dart';
import 'package:copy_with_extension/copy_with_extension.dart';
part 'state.g.dart';
@CopyWith()
class HomeState extends Equatable {
final PageOfGames? data;
final bool isLoading;
final bool isPaginationLoading;
final String? error;
const HomeState(
{this.data,
this.isLoading = false,
this.isPaginationLoading = false,
this.error});
//какие поля будут сравниваться у состояний
@override
List<Object?> get props => [data, isLoading, isPaginationLoading, error];
}