class VideosState { final bool loading; final String error; VideosState(this.loading, this.error); factory VideosState.initial() => VideosState(false, ''); VideosState copyWith({bool? loading, String? error}) => VideosState(loading ?? this.loading, error ?? this.error); @override bool operator ==(other) => identical(this, other) || other is VideosState && runtimeType == other.runtimeType && loading == other.loading && error == other.error; @override int get hashCode => super.hashCode ^ runtimeType.hashCode ^ loading.hashCode ^ error.hashCode; @override String toString() => "VideosState { loading: $loading, error: $error}"; }