1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-10-23 06:53:23 +00:00
comunicmobile/lib/forez/tour/forez_tour_builder.dart

34 lines
1.0 KiB
Dart

import 'package:comunic/forez/tour/join_group_pane.dart';
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
const _JOIN_GROUP_KEY_ID = 1;
List<Widget> buildTour(TourRouteState state) {
if (!state.pubKeys.containsKey(_JOIN_GROUP_KEY_ID))
state.pubKeys[_JOIN_GROUP_KEY_ID] = GlobalKey<JoinGroupPaneBodyState>();
return [
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 essential features!"),
),
JoinGroupPane(
key: state.pubKeys[_JOIN_GROUP_KEY_ID],
onUpdated: () => state.rebuild(),
),
LastTourPane(),
];
}