Skip to content

Commit

Permalink
toastNotifier todo (apache#25255)
Browse files Browse the repository at this point in the history
  • Loading branch information
darkhan.nausharipov committed Feb 9, 2023
1 parent eda3f16 commit 8c3e4b5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion learning/tour-of-beam/frontend/lib/auth/notifier.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import 'dart:async';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:firebase_auth_platform_interface/firebase_auth_platform_interface.dart';
import 'package:flutter/material.dart';
import 'package:playground_components/playground_components.dart';

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

Expand All @@ -40,7 +41,12 @@ class AuthNotifier extends ChangeNotifier {
}

Future<void> logIn(AuthProvider authProvider) async {
await FirebaseAuth.instance.signInWithPopup(authProvider);
try {
await FirebaseAuth.instance.signInWithPopup(authProvider);
} on Exception catch (e) {
// TODO(nausharipov) review: why toasts are not shown in ToB?
PlaygroundComponents.toastNotifier.addException(e);
}
}

Future<void> logOut() async {
Expand Down

0 comments on commit 8c3e4b5

Please sign in to comment.