mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-09 22:07:53 -06:00
feat: Improve notifications, add donation button, improved asn form field
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:paperless_mobile/core/service/connectivity_status_service.dart';
|
||||
|
||||
@@ -45,6 +46,13 @@ class ConnectivityCubit extends Cubit<ConnectivityState> {
|
||||
}
|
||||
}
|
||||
|
||||
extension ConnectivityFromContext on BuildContext {
|
||||
bool get watchInternetConnection =>
|
||||
watch<ConnectivityCubit>().state.isConnected;
|
||||
bool get readInternetConnection =>
|
||||
read<ConnectivityCubit>().state.isConnected;
|
||||
}
|
||||
|
||||
enum ConnectivityState {
|
||||
connected,
|
||||
notConnected,
|
||||
|
||||
Reference in New Issue
Block a user