In a mixing bowl, whisk together the flour, sugar, baking soda, and salt. Add the water, oil, vanilla, and vinegar and whisk until smooth. Fold through the coconut flakes.
Grease two 8-inch cake pans and divide the batter between the two.
Bake the cakes for 30-35 minutes or until a skewer comes out clean.
Let the cakes cool completely before frosting.
To make the frosting, beat the cream cheese until smooth and creamy. Slowly add in the powdered sugar until combined. Add the cream and coconut extract and beat until stiff peaks form.
Notes
TO STORE: Place the cake in an airtight container in the refrigerator for up to 2 weeks. TO FREEZE: Wrap unfrosted cake slices in plastic wrap, store them in a freezer-safe container, and freeze for up to 6 months. Variations
Make it vegan. Use dairy-free cream cheese.
Coconut buttercream frosting. Swap the cream cheese for unsalted butter.
Coconut sheet cake. Bake the cake in a 9x13-inch pan and bake for 40 minutes.
Coconut cupcakes. Pour the batter into lined cupcake tins and bake for 18-20 minutes.
Coconut bundt cake. Bake the cake in a 10-cup bundt cake pan and bake for 50 minutes or until a toothpick inserted comes out clean.