mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-15 08:12:28 -06:00
feat: Add notes
This commit is contained in:
25
lib/core/bloc/base_state.dart
Normal file
25
lib/core/bloc/base_state.dart
Normal file
@@ -0,0 +1,25 @@
|
||||
import 'package:paperless_mobile/core/bloc/loading_status.dart';
|
||||
|
||||
class BaseState<T> {
|
||||
final Object? error;
|
||||
final T? value;
|
||||
final LoadingStatus status;
|
||||
|
||||
BaseState({
|
||||
required this.error,
|
||||
required this.value,
|
||||
required this.status,
|
||||
});
|
||||
|
||||
BaseState<T> copyWith({
|
||||
Object? error,
|
||||
T? value,
|
||||
LoadingStatus? status,
|
||||
}) {
|
||||
return BaseState(
|
||||
error: error ?? this.error,
|
||||
value: value ?? this.value,
|
||||
status: status ?? this.status,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user