In the following code, I'm getting inspection warning with 'prefer const literals as parameters of constructors on @immutable classes' and it's annoying. What should I do to make it go away?
Container(
margin: const EdgeInsets.all(20),
width: double.infinity,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TextField(
decoration: InputDecoration(
border: OutlineInputBorder(),
hintText: 'Enter a search term'),
),
Text("these are the search results", textAlign: TextAlign.left),
],
),
)
I have tried to make every constructor call 'const' with no avail.
Container(
margin: const EdgeInsets.all(20),
width: double.infinity,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const TextField(
decoration: const InputDecoration(
border: const OutlineInputBorder(),
hintText: 'Enter a search term'),
),
const Text("these are the search results", textAlign: TextAlign.left),
],
),
),