Skip to content

Commit

Permalink
refactor(firebase): change default options platform to web (chrome)
Browse files Browse the repository at this point in the history
Reason for that is that windows (and linux) are not supported by flutter fire plugin:
FirebaseExtended/flutterfire_desktop#41
  • Loading branch information
sdresselmann committed Aug 1, 2022
1 parent 4c1b364 commit eb03862
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 2 additions & 4 deletions lib/firebase_options.dart
Expand Up @@ -66,8 +66,7 @@ class DefaultFirebaseOptions {
messagingSenderId: '1090356891582',
projectId: 'lifting-progress-tracker',
storageBucket: 'lifting-progress-tracker.appspot.com',
iosClientId:
'1090356891582-itlmdg551rp2ph041iq6smcsheppu1m0.apps.googleusercontent.com',
iosClientId: '1090356891582-itlmdg551rp2ph041iq6smcsheppu1m0.apps.googleusercontent.com',
iosBundleId: 'com.example.liftingProgressTracker',
);

Expand All @@ -77,8 +76,7 @@ class DefaultFirebaseOptions {
messagingSenderId: '1090356891582',
projectId: 'lifting-progress-tracker',
storageBucket: 'lifting-progress-tracker.appspot.com',
iosClientId:
'1090356891582-itlmdg551rp2ph041iq6smcsheppu1m0.apps.googleusercontent.com',
iosClientId: '1090356891582-itlmdg551rp2ph041iq6smcsheppu1m0.apps.googleusercontent.com',
iosBundleId: 'com.example.liftingProgressTracker',
);
}
8 changes: 7 additions & 1 deletion lib/main.dart
@@ -1,5 +1,7 @@
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:lifting_progress_tracker/constants/routes.dart';
import 'package:lifting_progress_tracker/firebase_options.dart';
import 'package:lifting_progress_tracker/pages/calendar.dart';
import 'package:lifting_progress_tracker/pages/exercise.dart';
import 'package:lifting_progress_tracker/pages/home.dart';
Expand All @@ -9,7 +11,11 @@ import 'package:lifting_progress_tracker/pages/training_period.dart';
import 'package:lifting_progress_tracker/pages/training_plan.dart';
import 'package:lifting_progress_tracker/pages/training_plan_list.dart';

void main() {
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(
options: DefaultFirebaseOptions.web,
);
runApp(const MyApp());
}

Expand Down

0 comments on commit eb03862

Please sign in to comment.