mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 16:25:17 +00:00
Start to build specific Forez tour
This commit is contained in:
21
lib/forez/forez_tour_builder.dart
Normal file
21
lib/forez/forez_tour_builder.dart
Normal file
@ -0,0 +1,21 @@
|
||||
import 'package:comunic/ui/routes/tour_route.dart';
|
||||
import 'package:comunic/ui/widgets/tour/first_pane.dart';
|
||||
import 'package:comunic/ui/widgets/tour/last_pane.dart';
|
||||
import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// Forez tour builder
|
||||
///
|
||||
/// Handles the presentation tour for the Forez flavor application
|
||||
///
|
||||
/// @author Pierre Hubert
|
||||
|
||||
List<Widget> buildTour(TourRouteState state) => [
|
||||
FirstTourPane(
|
||||
msgOne: tr(
|
||||
"Welcome to #Forez, the central application dedicated to events planning in the Forez plain!"),
|
||||
msgTwo: tr(
|
||||
"Let's configure the application and present you some features!"),
|
||||
),
|
||||
LastTourPane(),
|
||||
];
|
39
lib/forez/main_forez_dev.dart
Normal file
39
lib/forez/main_forez_dev.dart
Normal file
@ -0,0 +1,39 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:comunic/forez/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();
|
||||
}
|
Reference in New Issue
Block a user