mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-10 06:07:57 -06:00
fix: Add labels to each cubit using repositories and state properties, remove label cubits
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import 'package:paperless_api/src/models/saved_view_model.dart';
|
||||
|
||||
abstract class PaperlessSavedViewsApi {
|
||||
Future<SavedView> find(int id);
|
||||
Future<SavedView?> find(int id);
|
||||
Future<Iterable<SavedView>> findAll([Iterable<int>? ids]);
|
||||
|
||||
Future<SavedView> save(SavedView view);
|
||||
|
||||
@@ -60,7 +60,7 @@ class PaperlessSavedViewsApiImpl implements PaperlessSavedViewsApi {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<SavedView> find(int id) {
|
||||
Future<SavedView?> find(int id) {
|
||||
return getSingleResult(
|
||||
"/api/saved_views/$id/",
|
||||
SavedView.fromJson,
|
||||
|
||||
@@ -4,7 +4,7 @@ import 'package:dio/dio.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:paperless_api/src/models/paperless_server_exception.dart';
|
||||
|
||||
Future<T> getSingleResult<T>(
|
||||
Future<T?> getSingleResult<T>(
|
||||
String url,
|
||||
T Function(Map<String, dynamic>) fromJson,
|
||||
ErrorCode errorCode, {
|
||||
|
||||
Reference in New Issue
Block a user