In a medium bowl beat the sugar, eggs, egg yolk and flour together.
In a medium saucepan bring coconut milk and coconut flakes to a simmer over medium heat. Slowly whisk milk mixture into the egg mixture, whisking non-stop.
Return to the saucepan and cook, stirring constantly, until the mixture thickens and comes to a boil. Remove from heat and mix in the vanilla extract.
Transfer custard into a medium bowl and cover with plastic wrap directly onto surface to prevent the formation of skin. Let it cool completely and transfer filling to crust. Cover and chill overnight.
For topping:
Toast coconut in oven until lightly browned, stirring occasionally. Let it cool completely.
With a mixer beat cream and sugar in a bowl until peaks form. Spread whipped cream evenly over the filling and sprinkle with toasted coconut.