Skip to content

Commit

Permalink
fix: downgrade connectivity_plus version
Browse files Browse the repository at this point in the history
  • Loading branch information
sergdeus committed Apr 8, 2024
1 parent 28ba302 commit c990697
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/core/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class App extends StatefulWidget {
class AppState extends State<App>
with WidgetsBindingObserver, StringMixin, CountryInfoMixin, ForegroundMessagesMixin, UrlMixin {
late final SecureStorage _secureStorage;
late final StreamSubscription<List<ConnectivityResult>> _connectivitySubscription;
late final StreamSubscription<ConnectivityResult> _connectivitySubscription;
late final ApiClient _api;
late final AuthService _authService;
late final AdsRepository _adsRepository;
Expand Down Expand Up @@ -473,12 +473,11 @@ class AppState extends State<App>
}
}

void _handleConnectivity(List<ConnectivityResult> connectivityRes) {
void _handleConnectivity(ConnectivityResult result) {
EasyDebounce.debounce(
'connectivity',
const Duration(milliseconds: 500),
() {
final result = connectivityRes.last;
switch (result) {
case ConnectivityResult.wifi:
case ConnectivityResult.mobile:
Expand Down Expand Up @@ -730,9 +729,9 @@ class AppState extends State<App>
/// Retrieve global services list
///
List<SingleChildWidget> get _providers => [
StreamProvider<List<ConnectivityResult>>(
StreamProvider<ConnectivityResult>(
create: (_) => Connectivity().onConnectivityChanged,
initialData: const [ConnectivityResult.none],
initialData: ConnectivityResult.none,
),
Provider.value(value: _api),
Provider.value(value: _plausible),
Expand Down

0 comments on commit c990697

Please sign in to comment.