fix: await firebase init and anonymous auth (#439)

pull/440/head
Jorge Coca 2 years ago committed by GitHub
parent 461471b01f
commit 43ceb0db32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,5 +1,3 @@
import 'dart:async';
import 'package:authentication_repository/authentication_repository.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:leaderboard_repository/leaderboard_repository.dart';
@ -17,11 +15,8 @@ void main() {
final authenticationRepository = AuthenticationRepository(firebaseAuth);
final pinballAudioPlayer = PinballAudioPlayer();
final platformHelper = PlatformHelper();
unawaited(
Firebase.initializeApp().then(
(_) => authenticationRepository.authenticateAnonymously(),
),
);
await Firebase.initializeApp();
await authenticationRepository.authenticateAnonymously();
return App(
authenticationRepository: authenticationRepository,
leaderboardRepository: leaderboardRepository,

Loading…
Cancel
Save