selfprivacy.org.app/lib/logic/api_maps/api_generic_result.dart
NaiJi bd33b8d679 feat: Implement distinction for connection errors on initialing page
Now it's 'false' when api token is invalid and null response if couldn't connect at all, to show different kinds of errors to the user
2022-11-28 22:51:37 +04:00

14 lines
312 B
Dart

class APIGenericResult<T> {
APIGenericResult({
required this.success,
required this.data,
this.message,
});
/// 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;
}