I have created a simple custom theme which has dependency on Magento/blank
Everything in my theme works good except that whenever I add any error/success messages to the messageManager in my custom module and do a redirect to the custom page displaying a form.
It doesn't display those messages.
What I Did
\Magento\Framework\Message\ManagerInterface $messageManager is injected in the constructor
$this->messageManager->addError('Invalid details provided.'); added this in my controler action's execute method
$this->_redirect('myorders/uploadorder/index'); doing a redirect to the page where the form is displayed
What I have already refereed in stack exchange