Skip to content

Commit

Permalink
feat: bugfixes, finished go_router migration, implemented better visi…
Browse files Browse the repository at this point in the history
…bility of states
  • Loading branch information
astubenbord committed Oct 5, 2023
1 parent ad23df4 commit a2c5ced
Show file tree
Hide file tree
Showing 102 changed files with 1,512 additions and 3,090 deletions.
20 changes: 0 additions & 20 deletions lib/core/bloc/bloc_refresh_listenable.dart

This file was deleted.

8 changes: 0 additions & 8 deletions lib/core/bloc/document_status_cubit.dart

This file was deleted.

231 changes: 0 additions & 231 deletions lib/core/navigation/push_routes.dart

This file was deleted.

4 changes: 4 additions & 0 deletions lib/core/notifier/document_changed_notifier.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ class DocumentChangedNotifier {

final Map<dynamic, List<StreamSubscription>> _subscribers = {};

Stream<DocumentModel> get $updated => _updated.asBroadcastStream();

Stream<DocumentModel> get $deleted => _deleted.asBroadcastStream();

void notifyUpdated(DocumentModel updated) {
debugPrint("Notifying updated document ${updated.id}");
_updated.add(updated);
Expand Down
20 changes: 0 additions & 20 deletions lib/core/service/file_description.dart

This file was deleted.

6 changes: 1 addition & 5 deletions lib/core/service/file_service.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'dart:io';

import 'package:flutter/foundation.dart';
import 'package:paperless_api/paperless_api.dart';
import 'package:path_provider/path_provider.dart';
import 'package:rxdart/rxdart.dart';
import 'package:uuid/uuid.dart';
Expand All @@ -14,9 +13,6 @@ class FileService {
String filename,
) async {
final dir = await documentsDirectory;
if (dir == null) {
throw const PaperlessApiException.unknown(); //TODO: better handling
}
File file = File("${dir.path}/$filename");
return file..writeAsBytes(bytes);
}
Expand All @@ -43,7 +39,7 @@ class FileService {

static Future<Directory> get temporaryDirectory => getTemporaryDirectory();

static Future<Directory?> get documentsDirectory async {
static Future<Directory> get documentsDirectory async {
if (Platform.isAndroid) {
return (await getExternalStorageDirectories(
type: StorageDirectory.documents,
Expand Down
Loading

0 comments on commit a2c5ced

Please sign in to comment.