diff --git a/packages/at_follows_flutter/lib/services/connections_service.dart b/packages/at_follows_flutter/lib/services/connections_service.dart index d8f0997f1..790e19489 100644 --- a/packages/at_follows_flutter/lib/services/connections_service.dart +++ b/packages/at_follows_flutter/lib/services/connections_service.dart @@ -3,10 +3,8 @@ import 'package:at_follows_flutter/domain/atsign.dart'; import 'package:at_follows_flutter/domain/connection_model.dart'; import 'package:at_follows_flutter/services/sdk_service.dart'; import 'package:at_follows_flutter/utils/app_constants.dart'; -import 'package:at_commons/at_commons.dart'; import 'package:at_follows_flutter/utils/strings.dart'; import 'package:at_utils/at_logger.dart'; -import 'package:at_lookup/at_lookup.dart'; import 'package:at_client_mobile/at_client_mobile.dart'; import 'package:at_client/at_client.dart'; diff --git a/packages/at_follows_flutter/lib/services/sdk_service.dart b/packages/at_follows_flutter/lib/services/sdk_service.dart index d6d5c1940..4efeb9b4b 100644 --- a/packages/at_follows_flutter/lib/services/sdk_service.dart +++ b/packages/at_follows_flutter/lib/services/sdk_service.dart @@ -1,8 +1,6 @@ import 'dart:convert'; -import 'package:at_client/src/service/notification_service.dart'; import 'package:at_client_mobile/at_client_mobile.dart'; -import 'package:at_commons/at_commons.dart'; import 'package:at_follows_flutter/exceptions/at_follows_exceptions.dart'; import 'package:at_follows_flutter/services/connections_service.dart'; import 'package:at_follows_flutter/utils/app_constants.dart'; @@ -154,7 +152,7 @@ class SDKService { : AppConstants.followersKey; await this.put(newKey, value.value); value = await this.get(newKey); - if (value != null && value.value != null) { + if (value.value != null) { await this.delete(scanKey[0]); } } diff --git a/packages/at_follows_flutter/lib/widgets/followers.dart b/packages/at_follows_flutter/lib/widgets/followers.dart index a4ab6d537..57da6a933 100644 --- a/packages/at_follows_flutter/lib/widgets/followers.dart +++ b/packages/at_follows_flutter/lib/widgets/followers.dart @@ -68,7 +68,7 @@ class _FollowersState extends State { ), ); } else if (provider.status == Status.done) { - WidgetsBinding.instance!.addPostFrameCallback((_) async { + WidgetsBinding.instance.addPostFrameCallback((_) async { widget.count!(); }); if (_connectionsService.followerAtsign != null) { @@ -257,7 +257,7 @@ class _FollowersState extends State { } else if (provider.status == Status.error) { return AtExceptionHandler().handle(provider.error, context); } else { - WidgetsBinding.instance!.addPostFrameCallback((_) async { + WidgetsBinding.instance.addPostFrameCallback((_) async { await provider.getAtsignsList(isFollowing: widget.isFollowing); }); return SizedBox(); @@ -273,7 +273,7 @@ class _FollowersState extends State { return; } - WidgetsBinding.instance!.addPostFrameCallback((_) async { + WidgetsBinding.instance.addPostFrameCallback((_) async { _isDialogOpen = true; showDialog( context: context, diff --git a/packages/at_follows_flutter/lib/widgets/web_view_screen.dart b/packages/at_follows_flutter/lib/widgets/web_view_screen.dart index 6ddae2fbc..ae2695697 100644 --- a/packages/at_follows_flutter/lib/widgets/web_view_screen.dart +++ b/packages/at_follows_flutter/lib/widgets/web_view_screen.dart @@ -1,5 +1,3 @@ -import 'dart:io'; - import 'package:at_follows_flutter/utils/app_constants.dart'; import 'package:at_follows_flutter/utils/color_constants.dart'; import 'package:at_follows_flutter/widgets/custom_appbar.dart'; diff --git a/packages/at_follows_flutter/test/unit_tests/connections_service_test.dart b/packages/at_follows_flutter/test/unit_tests/connections_service_test.dart index b78b91b4b..b5ba7029b 100644 --- a/packages/at_follows_flutter/test/unit_tests/connections_service_test.dart +++ b/packages/at_follows_flutter/test/unit_tests/connections_service_test.dart @@ -1,3 +1,6 @@ +// ignoring this for the entire file to make it easier to detect real issues when doing review for publishing +// ignore_for_file: unused_local_variable + import 'dart:async'; import 'dart:convert'; import 'dart:io'; @@ -10,7 +13,6 @@ import 'package:at_follows_flutter/services/sdk_service.dart'; import 'package:at_follows_flutter/utils/app_constants.dart'; import 'package:flutter_test/flutter_test.dart'; import '../at_demo_credentials.dart' as demo_data; -import 'package:at_commons/at_commons.dart'; SDKService _sdkService = SDKService(); ConnectionsService _connectionsService = ConnectionsService(); @@ -23,7 +25,9 @@ void main() { final atClientManager = AtClientManager.getInstance(); _connectionsService.init(senderAtsign); ConnectionProvider().init(senderAtsign); - atClientManager.notificationService.subscribe().listen((notification) { + atClientManager.atClient.notificationService + .subscribe() + .listen((notification) { monitorCallBack(notification); }); }); @@ -34,6 +38,7 @@ void main() { await setUpFunc(receiverAtsign); AtClientManager.getInstance() + .atClient .notificationService .subscribe() .listen((notification) {