For the pastry, put flour and icing sugar in a large bowl and rub in the butter with your fingertips until the mixture resembles fine breadcrumbs.
Add the egg yolk and water and mix until it comes together to form a firm dough. Wrap in cling film and leave to rest in the fridge for about 30 minutes.
Preheat the oven to 200C/400F/Gas 6 (180C fan). Dust the work surface with flour and then roll out the pastry as thinly as you can to a circle - about 5cm/2in larger than your flan tin. Line the tin with pastry. Don’t worry if the pastry breaks a little, it is easy to patch up. Leave to chill in the fridge for 15 minutes.
Prick the base of the pastry with a fork and line the pastry case with a circle of baking parchment or foil and fill with baking beans. Bake the pastry blind for 10 minutes, or until just lightly golden-brown, then remove the paper and beans and return the tart to the oven to cook for a further 5-7 minutes, or until pale golden-brown and dried out.
For the filling, melt the butter in a medium pan over a low heat, then add the chocolate and stir until melted and smooth. Remove from the heat and stir in the sugar and flour. Beat in the eggs, one at a time.
Place the pastry case on a baking tray. Pour the mixture into the pastry case, filling it right to the top and place in the oven. Bake for 10-12 minutes, or until just set around the edges - but it should still be slightly wobbly in the centre.
Remove from the oven and allow to cool. Dust with icing sugar - if liked, you can cut a heart shape out of baking parchment and place on top of the tart before dusting with icing sugar, then remove the paper to make a stenciled effect. Or serve warm with strawberries, a dusting of icing sugar and cream.