A controller class for managing the state of the FlexSidebar widget.
This includes properties for the current index, pinned state, and animation curve.
An extension on the Icon widget to provide a copyWith method.
This allows creating a new Icon instance with modified properties
while keeping the rest of the properties unchanged.