1In a small bowl, mix flour, brown sugar, baking powder, cinnamon, nutmeg, and salt.
2In another bowl, beat the egg with oil until frothy and well combined.
3Add dry ingredients to wet ingredients and mix gently until just combined.
4Fold in grated carrot and, if desired, raisins or nuts.
5Pour batter into a small greased ramekin or heatproof dish suitable for air fryer.
6Preheat air fryer to 160°C (320°F) for 3 minutes.
7Place dish in air fryer basket and bake at 160°C (320°F) for 15 minutes. Check doneness by inserting a knife into center – it should come out clean.
8Let cake cool for a few minutes, then turn out onto a plate. Dust with powdered sugar if desired and serve warm.