Even though I added dependency correctly, it is unable to find the Patrol class inside the dependencies. The correct implementation is shown in this link: https://pub.dev/packages/patrol
The Patrol class has been renamed to NativeAutomator.
Patrol
NativeAutomator