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

38 lines
943 B
Dart
Raw Normal View History

2021-04-23 10:13:39 +00:00
import 'dart:io';
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 10:13:39 +00:00
));
HttpOverrides.global = new MyHttpOverride();
subMain();
}