Which of the following lines of code should be placed in Line 3 to :

  • Find the textField and addButton by the keys “addField” and “addButton” resectively
  • Initialize the flutter driver
void main() {
 group( 'Todo App' , (){
   late FlutterDriver driver;
     /* Line 3 */
     test('add a Todo',() async {
     await driver.tap(textField);
     await driver.enterText('Do homework' );
     await driver.tap(addButton);
     expect(await driver.getText(find.text('Do homework')), 'Do homework')
   });
 });
}

final {textField,addButton}=find.byValueKeys( 'addField', 'addField')
driver = await FlutterDriver.connect();
driver = await FlutterDriver();
final textField = driver.find('addField');
final addButton = driver.find ('addField');
final textField = find.byValueKey('addField');
final addButton = find.byValueKey('addField');
setUpAll(() async {
  driver = await FlutterDriver.connect();
});

Both A and C

Correct Option - c

To get all Infosys Certified Flutter Developer Exam questions Join Group https://bit.ly/infy_premium_group

We're passionate about offering best placement materials and courses!! A one stop place for Placement Materials. We daily post Offcampus updates and Placement Materials.

Qtr No. 213, New Town Yehlanka Indore 454775

admin@prepflix.in