register static method

void register(
  1. BuildContext context,
  2. RxState state
)

Hàm tiện ích để đăng ký state với RxLifecycle

Implementation

static void register(BuildContext context, RxState state) {
  final _RxLifecycleState? lifecycle =
      context.findAncestorStateOfType<_RxLifecycleState>();
  lifecycle?._registerState(state);
}