mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-22 12:59:21 +00:00
40 lines
1.0 KiB
Dart
40 lines
1.0 KiB
Dart
import 'dart:io';
|
|
|
|
import 'package:comunic/forez/tour/forez_tour_builder.dart';
|
|
import 'package:comunic/main.dart';
|
|
import 'package:comunic/models/config.dart';
|
|
import 'package:comunic/utils/intl_utils.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
/// 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",
|
|
splashBackgroundColor: Colors.green.shade900,
|
|
appName: "#Forez",
|
|
appQuickDescription: tr("Events organisation in Forez plain"),
|
|
toursEntriesBuilder: buildTour,
|
|
));
|
|
|
|
HttpOverrides.global = new MyHttpOverride();
|
|
|
|
subMain();
|
|
}
|