selfprivacy.org.app/lib/logic/api_maps/api_generic_result.dart
NaiJi e0b32404be refactor: Implement better error handling on create server stage
Replace try-catch hell with APIGenericResult chain
2022-12-02 22:40:08 +04:00

16 lines
346 B
Dart

class APIGenericResult<T> {
APIGenericResult({
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;
}