How do I use a Instance in an Initializer

I cannot pass the controller or the offsetAnimation instances to Initialize SideBar() SideBarWidget class class SideBarWidget extends StatelessWidget { SideBarWidget({Key? key, required this.controller}) : super(key: key); final AnimationController controller; final Animation<Offset> offsetAnimation = Tween<Offset>(…).animate(…); final sideBar = SideBar( itemList: […], controller: controller , //_The instance member ‘controller’ can’t be accessed in an initializer_ offsetAnimation: offsetAnimation… Read More How do I use a Instance in an Initializer