To call the quote total inside a custom shipping method
On the collect function
public function collect(
\Magento\Quote\Model\Quote\Address\Total $total
)
{
parent::collect($quote, $shippingAssignment, $total);
$orderTotal = $total->getSubtotal();
}
Thank you.