Skip to content

Commit 81c9d76

Browse files
committed
more fixes
1 parent 436e4ce commit 81c9d76

File tree

10 files changed

+24
-24
lines changed

10 files changed

+24
-24
lines changed

flutter_news_example/lib/ads/bloc/full_screen_ads_bloc.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ class FullScreenAdsBloc extends Bloc<FullScreenAdsEvent, FullScreenAdsState> {
165165
state.interstitialAd?.fullScreenContentCallback =
166166
ads.FullScreenContentCallback(
167167
onAdDismissedFullScreenContent: (ad) => ad.dispose(),
168-
onAdFailedToShowFullScreenContent: (ad, error) {
169-
ad.dispose();
168+
onAdFailedToShowFullScreenContent: (ad, error) async {
169+
await ad.dispose();
170170
addError(error);
171171
},
172172
);
@@ -201,8 +201,8 @@ class FullScreenAdsBloc extends Bloc<FullScreenAdsEvent, FullScreenAdsState> {
201201
state.rewardedAd?.fullScreenContentCallback =
202202
ads.FullScreenContentCallback(
203203
onAdDismissedFullScreenContent: (ad) => ad.dispose(),
204-
onAdFailedToShowFullScreenContent: (ad, error) {
205-
ad.dispose();
204+
onAdFailedToShowFullScreenContent: (ad, error) async {
205+
await ad.dispose();
206206
addError(error);
207207
},
208208
);

flutter_news_example/lib/analytics/bloc/analytics_bloc.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ class AnalyticsBloc extends Bloc<AnalyticsEvent, AnalyticsState> {
4444
}
4545

4646
@override
47-
Future<void> close() {
48-
_userSubscription.cancel();
47+
Future<void> close() async {
48+
await _userSubscription.cancel();
4949
return super.close();
5050
}
5151
}

flutter_news_example/lib/app/bloc/app_bloc.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ class AppBloc extends Bloc<AppEvent, AppState> {
106106
}
107107

108108
@override
109-
Future<void> close() {
110-
_userSubscription.cancel();
109+
Future<void> close() async {
110+
await _userSubscription.cancel();
111111
return super.close();
112112
}
113113
}

flutter_news_example/lib/login/bloc/login_with_email_link_bloc.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ class LoginWithEmailLinkBloc
7070
}
7171

7272
@override
73-
Future<void> close() {
74-
_incomingEmailLinksSub.cancel();
73+
Future<void> close() async {
74+
await _incomingEmailLinksSub.cancel();
7575
return super.close();
7676
}
7777
}

flutter_news_example/lib/subscriptions/dialog/bloc/subscriptions_bloc.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ class SubscriptionsBloc extends Bloc<SubscriptionsEvent, SubscriptionsState> {
7474
}
7575

7676
@override
77-
Future<void> close() {
78-
_subscriptionPurchaseUpdateSubscription.cancel();
77+
Future<void> close() async {
78+
await _subscriptionPurchaseUpdateSubscription.cancel();
7979
return super.close();
8080
}
8181
}

flutter_news_example/lib/subscriptions/view/manage_subscription_page.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ class ManageSubscriptionView extends StatelessWidget {
5757
color: AppColors.darkAqua,
5858
),
5959
),
60-
onTap: () {
60+
onTap: () async {
6161
// No possibility to revoke subscriptions from the app.
6262
// Navigate the user to "Manage Subscriptions" page instead.
63-
Navigator.maybePop(context);
63+
await Navigator.maybePop(context);
6464
},
6565
),
6666
],

flutter_news_example/lib/user_profile/bloc/user_profile_bloc.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ class UserProfileBloc extends Bloc<UserProfileEvent, UserProfileState> {
9999
}
100100

101101
@override
102-
Future<void> close() {
103-
_userSubscription.cancel();
102+
Future<void> close() async {
103+
await _userSubscription.cancel();
104104
return super.close();
105105
}
106106
}

flutter_news_example/lib/user_profile/view/user_profile_page.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ class _UserProfileViewState extends State<UserProfileView>
176176
Align(
177177
child: AppButton.smallTransparent(
178178
key: const Key('userProfilePage_deleteAccountButton'),
179-
onPressed: () {
180-
showDialog<void>(
179+
onPressed: () async {
180+
await showDialog<void>(
181181
context: context,
182182
builder: (_) =>
183183
const UserProfileDeleteAccountDialog(),

flutter_news_example/packages/analytics_repository/test/analytics_repository_test.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ void main() {
3131
});
3232

3333
group('track', () {
34-
test('tracks event successfully', () {
34+
test('tracks event successfully', () async {
3535
const event = AnalyticsEvent(
3636
'TestEvent',
3737
properties: <String, String>{'test-key': 'mock-id'},
3838
);
3939

40-
analyticsRepository.track(event);
40+
await analyticsRepository.track(event);
4141

4242
verify(
4343
() => firebaseAnalytics.logEvent(
@@ -72,10 +72,10 @@ void main() {
7272
});
7373

7474
group('setUserId', () {
75-
test('sets user identifier successfully', () {
75+
test('sets user identifier successfully', () async {
7676
const userId = 'userId';
7777

78-
analyticsRepository.setUserId(userId);
78+
await analyticsRepository.setUserId(userId);
7979

8080
verify(() => firebaseAnalytics.setUserId(id: userId)).called(1);
8181
});

flutter_news_example/packages/deep_link_client/firebase_deep_link_client/test/firebase_deep_link_client_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ void main() {
2020
).thenAnswer((_) => onLinkStreamController.stream);
2121
});
2222

23-
tearDown(() {
24-
onLinkStreamController.close();
23+
tearDown(() async {
24+
await onLinkStreamController.close();
2525
});
2626

2727
group('FirebaseDeepLinkClient', () {

0 commit comments

Comments
 (0)