selfprivacy.org.app/lib/logic/api_maps/generic_result.dart
NaiJi bad6926567 chore: Continue refactoring
- Rename APIGenericResult to GenericResult
- Wrap all provider functions results with GenericResult
- Move basic server commands and getters to business logic layer from API on Hetzner
2023-02-13 18:13:32 +04:00

16 lines
340 B
Dart

class GenericResult<T> {
GenericResult({
required this.success,
required this.data,
this.message,
this.code,
});
/// Whether was a response successfully received,
/// doesn't represent success of the request if `data<T>` is `bool`
final bool success;
final String? message;
final T data;
final int? code;
}