You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
722 B
24 lines
722 B
import 'package:core/models/common.dart';
|
|
import 'package:flutter/foundation.dart';
|
|
import 'package:flutter_app_environment/flutter_app_environment.dart';
|
|
|
|
import 'package:core/services/application.initial.dart';
|
|
|
|
class FlutterApplicationInitialService extends ApplicationInitialService {
|
|
@override
|
|
Future<Application> initialApp() async {
|
|
var envType = EnvironmentType.development;
|
|
if (kReleaseMode) {
|
|
envType = EnvironmentType.production;
|
|
} else if (kProfileMode) {
|
|
envType = EnvironmentType.test;
|
|
}
|
|
|
|
await Environment.initFromJson<Application>(
|
|
environmentType: envType,
|
|
fromJson: Application.fromJson,
|
|
);
|
|
|
|
return Environment<Application>.instance().config;
|
|
}
|
|
}
|