Dev & Prod env
This commit is contained in:
parent
e8315adb1d
commit
aa4909f69f
5 changed files with 18 additions and 2 deletions
|
|
@ -11,3 +11,5 @@ For help getting started with Flutter, view our online
|
||||||
- google-services.json
|
- google-services.json
|
||||||
- Manifest sample
|
- Manifest sample
|
||||||
- private keys in assets
|
- private keys in assets
|
||||||
|
flutter pub pub run intl_translation:extract_to_arb --output-dir=lib/l10n lib/i18n.dart
|
||||||
|
flutter pub pub run intl_translation:generate_from_arb --output-dir=lib/l10n --no-use-deferred-loading lib/i18n.dart lib/l10n/intl_*.arb
|
||||||
|
|
|
||||||
|
|
@ -16,4 +16,4 @@ final Widget appIcon = Image.asset('images/logo-200.png', width: 24.0, height: 2
|
||||||
final Future<SharedPreferences> prefs = SharedPreferences.getInstance();
|
final Future<SharedPreferences> prefs = SharedPreferences.getInstance();
|
||||||
final List<BasicLocation> yourLocations = [];
|
final List<BasicLocation> yourLocations = [];
|
||||||
final GetIt getIt = new GetIt();
|
final GetIt getIt = new GetIt();
|
||||||
final bool isDevelopment = true;
|
bool isDevelopment = false;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ Future<Map<String, dynamic>> loadSecrets() async {
|
||||||
return await SecretLoader(secretPath: 'assets/private-settings.json').load();
|
return await SecretLoader(secretPath: 'assets/private-settings.json').load();
|
||||||
}
|
}
|
||||||
|
|
||||||
void main() {
|
void mainCommon() {
|
||||||
loadSecrets().then((secrets) {
|
loadSecrets().then((secrets) {
|
||||||
globals.gmapKey = secrets['gmapKey'];
|
globals.gmapKey = secrets['gmapKey'];
|
||||||
globals.firesApiKey = secrets['firesApiKey'];
|
globals.firesApiKey = secrets['firesApiKey'];
|
||||||
7
lib/mainDev.dart
Normal file
7
lib/mainDev.dart
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
import 'globals.dart' as globals;
|
||||||
|
import 'mainCommon.dart';
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
globals.isDevelopment = true;
|
||||||
|
mainCommon();
|
||||||
|
}
|
||||||
7
lib/mainProd.dart
Normal file
7
lib/mainProd.dart
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
import 'globals.dart' as globals;
|
||||||
|
import 'mainCommon.dart';
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
globals.isDevelopment = false;
|
||||||
|
mainCommon();
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue