navigateTo method
Implementation
@override
Future<void> navigateTo(BuildContext context, ActionModel action,
{Map<String, dynamic>? parameters}) async {
if (action is PostActionModel) {
var accessState = AccessBloc.getState(context);
if (accessState is LoggedIn) {
String name = action.app.documentID;
openSelectionDialog(
action.app, context, "${action.app.documentID}/_addpagetofeed",
title: 'Add page to feed $name',
options: ['Only Me', 'My followers', 'Public'],
onSelection: (int choice) {
switch (choice) {
case 0:
executePostIt(
context, action, accessState, PostAccessibleByGroup.me);
break;
case 1:
executePostIt(context, action, accessState,
PostAccessibleByGroup.followers);
break;
case 2:
executePostIt(
context, action, accessState, PostAccessibleByGroup.public);
break;
}
});
}
}
}