mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-10 08:07:59 -06:00
Implemented error reporting solution
This commit is contained in:
17
lib/core/bloc/paperless_server_information_cubit.dart
Normal file
17
lib/core/bloc/paperless_server_information_cubit.dart
Normal file
@@ -0,0 +1,17 @@
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:injectable/injectable.dart';
|
||||
import 'package:paperless_mobile/core/model/paperless_server_information.dart';
|
||||
import 'package:paperless_mobile/core/service/paperless_server_information_service.dart';
|
||||
|
||||
@singleton
|
||||
class PaperlessServerInformationCubit
|
||||
extends Cubit<PaperlessServerInformation> {
|
||||
final PaperlessServerInformationService service;
|
||||
|
||||
PaperlessServerInformationCubit(this.service)
|
||||
: super(PaperlessServerInformation());
|
||||
|
||||
Future<void> updateStatus() async {
|
||||
emit(await service.getInformation());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user