I have the following text widget
Text(
todo.todoText!,
style: TextStyle(
fontSize: 16,
color: (isDark) ? Colors.white : Colors.black87,
decoration: todo.isDone ? TextDecoration.lineThrough : null),
decorationColor: (isDark) ? Colors.white : Colors.black87 // error
)
This is the error I get:
The named parameter ‘decorationColor’ isn’t defined. Try correcting the name to an existing named parameter’s name, or defining a named parameter with the name ‘decorationColor’
As far as the official docs goes

There is indeed a named parameter called decorationColor.
I’m using Flutter 3.16.9
Flutter 3.16.9 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 41456452f2 (4 months ago) • 2024-01-25 10:06:23 -0800
Engine • revision f40e976bed
Tools • Dart 3.2.6 • DevTools 2.28.5
Please help me out 🙂
>Solution :
Yes, it’s a syntax error:
You have closed the Parantheses-bracket of TextStyle object while giving more parameters like decorationColor.
decoration: todo.isDone ? TextDecoration.lineThrough : null),
To
decoration: todo.isDone ? TextDecoration.lineThrough : null,