removed launch_app

This commit is contained in:
Vadim 2023-03-26 17:45:18 +03:00
parent 2c92474f85
commit b88636db15
5 changed files with 17 additions and 20 deletions

View file

@ -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

View file

@ -1,3 +1,3 @@
include: package:flutter_lints/flutter.yaml
analyzer:
exclude: [lib/launch_app.dart]
exclude: [lib/main_prod.dart]

View file

@ -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<void> launchApp(Environment env) async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
runApp(Application(env));
}

View file

@ -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<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
runApp(const Application(Environment.dev()));
}

View file

@ -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<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
runApp(const Application(Environment.prod()));
}