Hello,
You need to use x:key in your Resources part, such as:
<FlyoutPage.Resources>
<pages:MainViewPageFlyout x:key="a_key" x:Name="FlyoutPage" />
You can refer to Xamarin.Forms resource dictionaries for a full explanation on how to use the attribute on your resources, and you could find this:
With the exception of implicit styles, each resource in resource dictionary must have a unique string key that's defined with the x:Key attribute.
That's the reason why the error occurs.
Best Regards,
Alec Liu.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.