How to get text of the child element?

Hi Team,
I am using appium flutter driver, can someone please tell me how can I get text from the child element?

My current code is:
await driver.execute(‘flutter:waitFor’, find.byValueKey(line_graph));

    btn = find.descendant({
        of: find.byValueKey('line_graph'),
        matching: find.byValueKey('test'),
        matchRoot: false,
        firstMatchOnly: true,
    await driver.execute('flutter:waitFor', btn);
    const firstdate: string = await driver.getElementText(btn);



strong textCode of key:

@Aleksei Can you please provide some thoughts on the same?

It is probably the error message itself is confusing, but I assume what is really happening the retrieved element text equals to null and thus the above error is thrown:

never used flutter :frowning:

Did you mean there is something wrong in my automation script code?

Can you please tag someone who use flutter and can provide any thoughts on the same? That would be really helpful. Thanks :slight_smile:

I don’t know for sure. Maybe the located element is not the one that is actually needed or a race condition happens there