mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-09-13 07:17:19 +00:00
NaiJi
bd33b8d679
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
14 lines
312 B
Dart
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;
|
|
}
|