mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-21 20:39:22 +00:00
Split api configuration & main function of the application
This commit is contained in:
parent
5f4fc50e4c
commit
9520a266ff
@ -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
17
lib/main_dev.dart
Normal 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();
|
||||
}
|
Loading…
Reference in New Issue
Block a user