1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-19 08:15:16 +00:00

Attempt to auto-configure push notifications to remove one tour pane

This commit is contained in:
2021-04-26 10:49:33 +02:00
parent 5da8a64d3d
commit 8a581d158a
6 changed files with 67 additions and 28 deletions

View File

@ -14,6 +14,7 @@ class PresentationPane extends StatelessWidget {
final Function(BuildContext) onActionTap;
final bool canGoNext;
final Future<bool> Function(BuildContext) onTapNext;
final bool visible;
const PresentationPane({
Key key,
@ -26,6 +27,7 @@ class PresentationPane extends StatelessWidget {
this.onActionTap,
this.canGoNext = true,
this.onTapNext,
this.visible = true,
}) : assert(icon != null || iconWidget != null),
assert(title != null),
assert(text != null || child != null),

View File

@ -17,6 +17,7 @@ class TourNotificationsPane extends PresentationPane {
pushNotificationsKey,
@required Function() onConfigured,
@required Function() onChanged,
@required bool visible,
}) : assert(pushNotificationsKey != null),
super(
icon: Icons.notifications,
@ -28,5 +29,6 @@ class TourNotificationsPane extends PresentationPane {
),
canGoNext: pushNotificationsKey?.currentState?.canSubmit ?? false,
onTapNext: (c) => pushNotificationsKey.currentState.submit(),
visible: visible,
);
}