mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-11-26 19:54:54 +00:00
Added env files and the read base url using the dotenv package
This commit is contained in:
@ -2,6 +2,7 @@ import 'dart:async';
|
||||
import 'package:firebase_core/firebase_core.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||
import 'package:syncrow_app/firebase_options.dart';
|
||||
import 'package:syncrow_app/services/locator.dart';
|
||||
import 'package:syncrow_app/utils/bloc_observer.dart';
|
||||
@ -15,9 +16,8 @@ void main() {
|
||||
//to catch all the errors in the app and send them to firebase
|
||||
runZonedGuarded(() async {
|
||||
//to load the environment variables
|
||||
// const environment =
|
||||
// String.fromEnvironment('FLAVOR', defaultValue: 'production');
|
||||
// await dotenv.load(fileName: '.env.$environment');
|
||||
const environment = String.fromEnvironment('FLAVOR', defaultValue: 'production');
|
||||
await dotenv.load(fileName: '.env.$environment');
|
||||
|
||||
// //this is to make the app work with the self-signed certificate
|
||||
// HttpOverrides.global = MyHttpOverrides();
|
||||
|
||||
Reference in New Issue
Block a user