1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-22 12:59:21 +00:00
comunicmobile/lib/forez/main_forez_dev.dart

40 lines
1.0 KiB
Dart
Raw Normal View History

2021-04-23 10:13:39 +00:00
import 'dart:io';
2021-04-23 16:46:35 +00:00
import 'package:comunic/forez/tour/forez_tour_builder.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,
appName: "#Forez",
2021-04-23 10:28:50 +00:00
appQuickDescription: tr("Events organisation in Forez plain"),
2021-04-23 16:11:17 +00:00
toursEntriesBuilder: buildTour,
2021-04-23 10:13:39 +00:00
));
HttpOverrides.global = new MyHttpOverride();
subMain();
}