0

I get "1 positional argument(s) expected, but 0 found. (Documentation) Try adding the missing arguments" error. What am I missing?

SizedBox(height: 16.0),
                Text(
                  child: Text(_outputText),
                  style: TextStyle(
                    fontSize: 20.0,
                  ),
                ),
1
  • 1
    Bro... Text widget doesn't have a child parameter. If you see the documentation, it needs a required string. In this case, your widget should be the following (considering your "_outputText" has a String type): Text(_outputText, style: TextStyle(fontSize: 20.0)) Commented Jan 5, 2023 at 20:07

1 Answer 1

1

Text widget doesnt have child params, it takes positional argument as string , the format will be

Text(
  _outputText,
  style: TextStyle(
    fontSize: 20.0,
  ),
),

More about Text

Sign up to request clarification or add additional context in comments.

2 Comments

That was quick, thank you. It worked
Glad to help, I will remand checking attached link for more

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.