mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-11-26 22:34:54 +00:00
Refactor application package structure and update Firebase iOS bundle IDs for different environments.
This commit is contained in:
@ -17,8 +17,7 @@ import 'package:syncrow_app/firebase_options_staging.dart' as staging;
|
||||
/// );
|
||||
/// ```
|
||||
class DefaultFirebaseOptions {
|
||||
static FirebaseOptions get currentPlatform {
|
||||
const flavor = String.fromEnvironment('flavor');
|
||||
static FirebaseOptions currentPlatform(String flavor) {
|
||||
if (kIsWeb) {
|
||||
throw UnsupportedError(
|
||||
'DefaultFirebaseOptions have not been configured for web - '
|
||||
@ -30,12 +29,13 @@ class DefaultFirebaseOptions {
|
||||
return dev.DefaultFirebaseOptions.currentPlatform;
|
||||
case 'staging':
|
||||
return staging.DefaultFirebaseOptions.currentPlatform;
|
||||
case 'prod':
|
||||
case 'production':
|
||||
return prod.DefaultFirebaseOptions.currentPlatform;
|
||||
default:
|
||||
throw UnsupportedError(
|
||||
'DefaultFirebaseOptions are not supported for this flavor.',
|
||||
);
|
||||
throw UnsupportedError(
|
||||
'DefaultFirebaseOptions have not been configured for web - '
|
||||
'you can reconfigure this by running the FlutterFire CLI again.',
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user