Might work on other recovery's which has file manger
1. Reboot your phone in twrp recovery.
2. Goto Advanced->File Manager
3. From root partition goto Data->Data-> com.whatsapp -> shared_prefs
4. Seach for com.whatsapp_preferences.xml file in the folder.
5. Click the file and copy it into you phone directory so u can edit the file using computer.
6. Enable MTP or boot into system and connect device to computer.
7. Open the xml file as text file and add following line anywhere in between <map> and </map>.
<boolean name="dark_mode" value="true" />
8. Save the changes and reboot back into recovery.
9. from file manager in twrp replace the modified file with old file.
10. Reboot into system and open WhatsApp. Goto settings->theme or theme option might be in Chats ,select dark. Restart WhatsApp
Voila! U have dark mode.
If your device is rooted then use File manger with root support and edit the xml file from step 3 and goto step 10.
Method worked on my moto g5 plus running PE10.
Please leave a comment about ur device if it worked or not.
If u want to tip me donate to my paypal link in profile.