selectActionItemDialog method

void selectActionItemDialog(
  1. dynamic context
)

Implementation

void selectActionItemDialog(BuildContext context) {
  showAdaptiveDialog(
    context: context,
    builder: (context) {
      return AlertDialog.adaptive(
        title: Text(L10n.of(context).addActionWidget),
        content: SelectActionItem(
          onShareEventSelected: () async {
            Navigator.pop(context);
            if (ref.read(newsStateProvider).newsPostSpaceId == null) {
              EasyLoading.showToast(L10n.of(context).pleaseFirstSelectASpace);
              return;
            }
            final notifier = ref.read(newsStateProvider.notifier);
            await notifier.selectEventToShare(context);
          },
        ),
      );
    },
  );
}