Melt the butter in a medium-sized saucepan over medium-high heat.
Whisk the rice flour, salt, and pepper into one cup of cold milk. Whisk this mixture into the melted butter. Continue stirring as you add the cream or remaining milk and until the mixture thickens.
Assembling the Dish
Preheat oven to 425°F.
Butter the bottom and sides of a 1 ½-quart (1.4 L) casserole dish or baking pan.
Layer one-third of the sliced potatoes into the buttered dish. Cover with half of the chopped onions. Pour one-third of the sauce over this.Layer on another third of potatoes, remaining onions, and one-third of sauce.Add remaining potatoes, pouring remaining sauce over all.
Top with shredded cheese.
Sprinkle generously with smoked paprika.
Bake 45 minutes to an hour, or until potatoes feel soft when gently poked with a knife.
The important secret to this recipe is in the sauce. The flavourful creaminess is achieved by stirring rice flour and generous amounts of salt and pepper into cold milk and then into melted butter before cooking it.
You can use either all (2 cups) plant based milk or half (1 cup) milk and half (1 cup) heavy cream.
Don't slice your potatoes ahead planning to soak them in water. Have everything set up to slice the potatoes just before assembling and baking.