Skip to content

Positional arguments must occur before named arguments. Try moving all of the positional arguments before the named arguments #1237

Closed Answered by ccfiel
ccfiel asked this question in Q&A
Discussion options

You must be logged in to vote

Ok, I was able to solve it by just putting the “nativeAutomation: true” parameter in the bottom.

void main() {
  patrolTest('counter state is the same after going to home and switching apps',
      ($) async {
    // Replace later with your app's main widget
    await $.pumpWidgetAndSettle(
      MaterialApp(
        home: Scaffold(
          appBar: AppBar(title: const Text('app')),
          backgroundColor: Colors.blue,
        ),
      ),
    );

    expect($('app'), findsOneWidget);
    await $.native.pressHome();
  }, nativeAutomation: true);
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ccfiel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant