Initial commit: unionflow-mobile-apps
Application Flutter complète (sans build artifacts). Signed-off-by: lions dev Team
This commit is contained in:
38
lib/features/explore/presentation/bloc/network_state.dart
Normal file
38
lib/features/explore/presentation/bloc/network_state.dart
Normal file
@@ -0,0 +1,38 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
import '../../domain/entities/network_item.dart';
|
||||
|
||||
export '../../domain/entities/network_item.dart';
|
||||
|
||||
abstract class NetworkState extends Equatable {
|
||||
const NetworkState();
|
||||
|
||||
@override
|
||||
List<Object?> get props => [];
|
||||
}
|
||||
|
||||
class NetworkInitial extends NetworkState {}
|
||||
|
||||
class NetworkLoading extends NetworkState {}
|
||||
|
||||
class NetworkLoaded extends NetworkState {
|
||||
final List<NetworkItem> items;
|
||||
final String currentQuery;
|
||||
|
||||
const NetworkLoaded({
|
||||
required this.items,
|
||||
this.currentQuery = '',
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [items, currentQuery];
|
||||
}
|
||||
|
||||
class NetworkError extends NetworkState {
|
||||
final String message;
|
||||
|
||||
const NetworkError(this.message);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [message];
|
||||
}
|
||||
Reference in New Issue
Block a user