1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-22 04:49:21 +00:00

Split api configuration & main function of the application

This commit is contained in:
Pierre HUBERT 2019-06-24 18:05:30 +02:00
parent 5f4fc50e4c
commit 9520a266ff
2 changed files with 18 additions and 12 deletions

View File

@ -1,6 +1,5 @@
import 'package:comunic/helpers/account_helper.dart';
import 'package:comunic/helpers/database/database_helper.dart';
import 'package:comunic/models/config.dart';
import 'package:comunic/ui/routes/home_route.dart';
import 'package:comunic/ui/routes/login_route.dart';
import 'package:comunic/utils/ui_utils.dart';
@ -10,17 +9,7 @@ import 'package:flutter/material.dart';
///
/// @author Pierre HUBERT
void main() {
/// Initialize application configuration
///
// TODO : Adapt to production
Config.set(Config(
apiServerName: "devweb.local",
apiServerUri: "/comunic/api/",
apiServerSecure: false,
serviceName: "ComunicFlutter",
serviceToken: "G9sZCBmb3IgVWJ1bnR1CkNvbW1lbnRbbmVdPeCkieCkrOCkq"));
void subMain() {
// Connect to database
DatabaseHelper.open();

17
lib/main_dev.dart Normal file
View File

@ -0,0 +1,17 @@
import 'package:comunic/main.dart';
import 'package:comunic/models/config.dart';
/// Dev (internal) build configuration for the project
///
/// @author Pierre HUBERT
void main() {
Config.set(Config(
apiServerName: "devweb.local",
apiServerUri: "/comunic/api/",
apiServerSecure: false,
serviceName: "ComunicFlutter",
serviceToken: "G9sZCBmb3IgVWJ1bnR1CkNvbW1lbnRbbmVdPeCkieCkrOCkq"));
subMain();
}