1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-25 06:19:22 +00:00
comunicmobile/lib/forez/main_forez_dev.dart

48 lines
1.4 KiB
Dart
Raw Normal View History

2021-04-23 10:13:39 +00:00
import 'dart:io';
2021-04-24 08:14:56 +00:00
import 'package:comunic/forez/helpers/forez_group_helper.dart';
2021-04-23 16:46:35 +00:00
import 'package:comunic/forez/tour/forez_tour_builder.dart';
2021-04-24 07:16:29 +00:00
import 'package:comunic/forez/ui/routes/forez_route.dart';
2021-04-23 10:13:39 +00:00
import 'package:comunic/main.dart';
import 'package:comunic/models/config.dart';
2021-04-23 10:28:50 +00:00
import 'package:comunic/utils/intl_utils.dart';
2021-04-23 10:24:35 +00:00
import 'package:flutter/material.dart';
2021-04-23 10:13:39 +00:00
/// Forez development configuration
///
/// @author Pierre Hubert
/// Fix HTTPS issue
class MyHttpOverride extends HttpOverrides {
@override
HttpClient createHttpClient(SecurityContext context) {
return super.createHttpClient(context)
..badCertificateCallback = (cert, host, port) {
return host == "devweb.local"; // Forcefully trust local website
};
}
}
void main() {
Config.set(Config(
apiServerName: "192.168.1.9:3000",
apiServerUri: "/",
apiServerSecure: false,
clientName: "ForezFlutter",
2021-04-23 10:24:35 +00:00
splashBackgroundColor: Colors.green.shade900,
2021-04-24 06:57:20 +00:00
primaryColor: Colors.green,
primaryColorDark: Colors.green.shade900,
2021-04-23 10:24:35 +00:00
appName: "#Forez",
2021-04-23 10:28:50 +00:00
appQuickDescription: tr("Events organisation in Forez plain"),
2021-04-25 14:24:42 +00:00
unreadConversationColor: Colors.green.shade900,
2021-04-25 14:35:50 +00:00
defaultConversationColor: Colors.green.shade900,
2021-04-23 16:11:17 +00:00
toursEntriesBuilder: buildTour,
2021-04-24 08:14:56 +00:00
additionalLoading: () => ForezGroupHelper.refreshInfo(),
2021-04-24 07:46:53 +00:00
mainRouteBuilder: (c, k) => ForezRoute(key: k),
2021-04-23 10:13:39 +00:00
));
HttpOverrides.global = new MyHttpOverride();
subMain();
}