added initial draft of inbox

This commit is contained in:
Anton Stubenbord
2022-11-22 01:33:50 +01:00
parent a7295fb739
commit 8e7a5dddbf
16 changed files with 243 additions and 27 deletions

View File

@@ -4,12 +4,14 @@ class ErrorMessage implements Exception {
final StackTrace? stackTrace;
final int? httpStatusCode;
const ErrorMessage(this.code,
{this.details, this.stackTrace, this.httpStatusCode});
const ErrorMessage(
this.code, {
this.details,
this.stackTrace,
this.httpStatusCode,
});
factory ErrorMessage.unknown() {
return const ErrorMessage(ErrorCode.unknown);
}
const ErrorMessage.unknown() : this(ErrorCode.unknown);
@override
String toString() {

View File

@@ -0,0 +1,15 @@
import 'package:paperless_mobile/core/type/types.dart';
class PaperlessStatistics {
final int documentsTotal;
final int documentsInInbox;
PaperlessStatistics({
required this.documentsTotal,
required this.documentsInInbox,
});
PaperlessStatistics.fromJson(JSON json)
: documentsTotal = json['documents_total'],
documentsInInbox = json['documents_inbox'];
}