Skip to content

Commit 8c3e4b5

Browse files
author
darkhan.nausharipov
committed
toastNotifier todo (apache#25255)
1 parent eda3f16 commit 8c3e4b5

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

learning/tour-of-beam/frontend/lib/auth/notifier.dart

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import 'dart:async';
2121
import 'package:firebase_auth/firebase_auth.dart';
2222
import 'package:firebase_auth_platform_interface/firebase_auth_platform_interface.dart';
2323
import 'package:flutter/material.dart';
24+
import 'package:playground_components/playground_components.dart';
2425

2526
import '../repositories/client/client.dart';
2627

@@ -40,7 +41,12 @@ class AuthNotifier extends ChangeNotifier {
4041
}
4142

4243
Future<void> logIn(AuthProvider authProvider) async {
43-
await FirebaseAuth.instance.signInWithPopup(authProvider);
44+
try {
45+
await FirebaseAuth.instance.signInWithPopup(authProvider);
46+
} on Exception catch (e) {
47+
// TODO(nausharipov) review: why toasts are not shown in ToB?
48+
PlaygroundComponents.toastNotifier.addException(e);
49+
}
4450
}
4551

4652
Future<void> logOut() async {

0 commit comments

Comments
 (0)