delete static method

Future<void> delete(
  1. BuildContext context,
  2. Post post
)

Implementation

static Future<void> delete(BuildContext context, Post post) async {
  PostDelete modal = PostDelete(post: post);
  await showModal(context, modal);
  if (modal.button.actionStatus == ActionStatus.completed) {
    // ignore: use_build_context_synchronously
    await timerDialog(context, dialog("post.deleted"));
  }
  // TODO error case
}