Preheat your oven to 350°F (175°C) and prepare a 9x13 inch baking pan by greasing it and lining the bottom with parchment paper.
In a large mixing bowl, combine the flour, granulated sugar, shredded coconut, baking powder, baking soda, and salt. Whisk until thoroughly mixed.
In a separate bowl, whisk together the coconut milk, vegetable oil, eggs, lime zest, lime juice, and vanilla extract until smooth.
Gradually pour the wet mixture into the dry ingredients and stir gently until just combined, being careful not to overmix.
Transfer the batter into the prepared baking pan, spreading it out evenly. Bake for 30-35 minutes until a toothpick inserted into the center comes out clean. Let it cool in the pan for about 10 minutes before transferring to a wire rack to cool completely.
For the frosting, beat the softened butter with an electric mixer on medium speed until creamy. Gradually add the powdered sugar, mixing on low speed until combined. Then add the coconut milk, lime zest, and lime juice. Increase speed to high and beat until light and fluffy.
Once the cake is completely cool, spread the lime coconut frosting evenly over the top of the cake.
Sprinkle toasted coconut flakes generously over the frosted cake.
Slice the cake into generous pieces and serve.
Notes
Serve chilled or at room temperature, and consider garnishing with fresh lime wedges.