Issue
We can define secondaryColor in ThemeData like this:
theme: ThemeData(
primaryColor: Colors.black,
colorScheme: ColorScheme.fromSwatch().copyWith(
secondary: Colors.pinkAccent,
),
How to apply it in the following snippet?
ListTile(
trailing: Icon(
Icons.edit,
color: ... , // secondary color here
),
Solution
Try with this
color: Theme.of(context).colorScheme.secondary
Answered By - Jahidul Islam
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.