diff --git a/README.md b/README.md index 210adb9..89ed428 100644 --- a/README.md +++ b/README.md @@ -49,9 +49,7 @@ The list of features that the old lightmeter app has and that have to be impleme ## Build -``` -flutter build apk --flavor dev --dart-define cameraPreviewAspectRatio=2/3 -t lib/main_dev.dart -``` +As part of this project is private, you will be able to run this app from the _main_dev.dart_ file (i.e. --flavor dev). Also to avoid fatal errors the _main_prod.dart_ file is excluded from analysis. ## Contribution diff --git a/analysis_options.yaml b/analysis_options.yaml index 6f0d37d..fb80863 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,3 +1,3 @@ include: package:flutter_lints/flutter.yaml analyzer: - exclude: [lib/launch_app.dart] \ No newline at end of file + exclude: [lib/main_prod.dart] \ No newline at end of file diff --git a/lib/launch_app.dart b/lib/launch_app.dart deleted file mode 100644 index 69dfcb7..0000000 --- a/lib/launch_app.dart +++ /dev/null @@ -1,12 +0,0 @@ -import 'package:firebase_core/firebase_core.dart'; -import 'package:flutter/material.dart'; -import 'package:lightmeter/firebase_options.dart'; - -import 'application.dart'; -import 'environment.dart'; - -Future launchApp(Environment env) async { - WidgetsFlutterBinding.ensureInitialized(); - await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform); - runApp(Application(env)); -} diff --git a/lib/main_dev.dart b/lib/main_dev.dart index fb3d8e3..e74e87b 100644 --- a/lib/main_dev.dart +++ b/lib/main_dev.dart @@ -1,5 +1,9 @@ +import 'package:flutter/material.dart'; import 'package:lightmeter/environment.dart'; -import 'launch_app.dart'; +import 'application.dart'; -void main() => launchApp(const Environment.dev()); +Future main() async { + WidgetsFlutterBinding.ensureInitialized(); + runApp(const Application(Environment.dev())); +} diff --git a/lib/main_prod.dart b/lib/main_prod.dart index a1839f6..aefaa2f 100644 --- a/lib/main_prod.dart +++ b/lib/main_prod.dart @@ -1,5 +1,12 @@ +import 'package:firebase_core/firebase_core.dart'; +import 'package:flutter/material.dart'; import 'package:lightmeter/environment.dart'; -import 'launch_app.dart'; +import 'application.dart'; +import 'firebase_options.dart'; -void main() => launchApp(const Environment.prod()); +Future main() async { + WidgetsFlutterBinding.ensureInitialized(); + await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform); + runApp(const Application(Environment.prod())); +}