Reputation: 3924
I am trying to style a TextField
in Flutter using the InputDecoration
class.
Here is the implementation-
new TextField(
decoration: new InputDecoration(
border: InputBorder.none, // The named parameter border isn't defined
hintText: 'Please enter a search term'
),
);
But this results in a red squiggly line underneath border property with message
The parameter border isn't defined
Rest properties are working fine. Here is the screenshot of same - PS - I'm new to Flutter.
Upvotes: 1
Views: 2016
Reputation: 42343
You're on v0.0.22 of Flutter which is many months old. I found this PR from around the same time which says:
What was called the "divider" is now a configurable border
So my guess is that maybe the version you're using didn't have border
.
You should switch to the beta channel (flutter channel beta
) to try again with more recent code.
Upvotes: 1