Skip to content

ChildPageLifecycleWrapper 包裹的widget,with了LifecycleAware,收不到生命周期回调 #28

@weyyan

Description

@weyyan

代码如

PageViewLifecycleWrapper( // Outer PageView

        child: PageView(
          controller: pageController,
          physics: NeverScrollableScrollPhysics(),
          children: [
            FixedChildPageLifecycleWrapper(
              index: 0,
              wantKeepAlive: true,child: AWidget()),
class AWdiget extends StatefulWidget {
  createState() => _State();
}
class _State<T extends StatefulWidget> extends State<T>
    with LifecycleAware, LifecycleMixin<T>,

如果是单独push这个widget是能收到回调的

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions