I wish I could do this, but it just isn't a viable option for me both from a costing and use case perspective.
Firstly, like the other poster said, WhatsApp would have a field day and because there's no way to sync or backup chats (officially that I'm aware of) from iOS to Android and vice versa, it makes it very tricky to swap all the time.
Secondly, I wouldn't get the true value from carrying two flagships. Sure, it'd be nice to have both to use whichever one would suit my day / activity best, but I wouldnt feel like I was getting my monies worth if one was sitting in a drawer for days on end until I swapped it back out.
I LOVED my iPhone X, and I love my Pixel 2 too. Current battery issue aside.
In an ideal world I guess I would love to have both to pick between. But in that ideal world I'd have to be having them run on two different numbers - so therefore have a use for two lines (as we don't have anything like that TMobile thing over here) and I'd need to be pretty wealthy.
I'm definitely not in that ideal world currently.