flutter_tester was throwing a bad_weak_ptr while setting up the engine because the PlatformViewTest was held in a unique_ptr