AcmeSoftwareLLC/clean_framework

How to create a XXXcontroller with TickerProviderStateMixin?

Opened this issue · 2 comments

If I want to create a AnimationController(vsync) or TabController(length, vsync), where should I initialize it in the framework class? It seems that I can't use with TickerProviderStateMixin in the viewModel, presenter, or useCase classes. Have you considered this issue or did I just miss something?

You can create your stateful widget with the state ticker and use the widget in UI's build method.

Treat it as a sub-widget of a stateful widget?

If I have a tabController or an AnimationController and want to call xxxcontroller's methods directly in the parent widget, such as tabController.jumpToTab(), animationController.forward(), can you think of any solutions?

This type of business scenario should be very common.

thanks