1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-12-28 13:58:51 +00:00
comunicmobile/lib/ui/widgets/tour/tour_notifications_pane.dart

34 lines
1.1 KiB
Dart
Raw Normal View History

2021-04-23 12:05:06 +00:00
import 'package:comunic/ui/routes/push_notifications_route.dart';
import 'package:comunic/ui/widgets/tour/presentation_pane.dart';
import 'package:comunic/utils/intl_utils.dart';
import 'package:flutter/material.dart';
/// Tour notifications pane
///
/// Invite the user to configure push notifications for its device
///
/// @author Pierre Hubert
class TourNotificationsPane extends PresentationPane {
TourNotificationsPane({
Key? key,
required
2021-04-23 12:05:06 +00:00
GlobalKey<PushNotificationsConfigurationWidgetState>
pushNotificationsKey,
required Function() onConfigured,
required Function() onChanged,
required bool visible,
2022-03-11 15:36:42 +00:00
}) : super(
2021-04-23 12:05:06 +00:00
icon: Icons.notifications,
title: tr("Push notifications")!,
2021-04-23 12:05:06 +00:00
child: (c) => PushNotificationsConfigurationWidget(
key: pushNotificationsKey,
onConfigured: onConfigured,
onChanged: onChanged,
),
2022-03-11 15:21:35 +00:00
canGoNext: pushNotificationsKey.currentState?.canSubmit ?? false,
onTapNext: (c) => pushNotificationsKey.currentState!.submit(),
visible: visible,
2021-04-23 12:05:06 +00:00
);
}