I would like to get the selected shipping method from the checkout page it looks like this one :
I just want to get the selected shipping method like above image shown : Shipping Table Rates so that I can get the shipping code method.
I have some clue to get it using \Magento\Checkout\Api\Data\ShippingInformationInterfaceFactory
but when I add this to my block class I got this error :
Fatal error: Uncaught TypeError: Argument 3 passed to Fabelio\Checkout\Block\ExpectedDelivery::__construct() must be an instance of Magento\Checkout\Api\Data\ShippingInformationInterfaceFactory
Is this the correct way to getting the shipping method from checkout page ?
var/generation/
directory.