I want to make the centre widget border colour Basic widget should be have active colour when i slide it Silver widget will be centre so Silver widget should be active then to purple.
while slider the centre widget border colour must be active constantly.what should I do?
I’m not getting the logic how to make it as active colour
2
Answers
at start you must create a contoller for you page view
after that you check current pageIndex from your controller with the index in pageBuilder
if they are same then your condition ……
From what I have understood you want to change border color of the widget containing the plan Image With Marked Area to purple if clicked on the specific plan.
If so,
store the current index selected in the widget state and change the color accordingly.
eg in decoration the color property will have condition:
where currIndex is the index currently selected and planIndex is index of the plan in list (basic:0,silver:1,etc)
like so: