build method

  1. @override
Widget build()
override

Subclasses should override this function to actually call the appropriate build function (e.g., StatelessWidget.build or State.build) for their widget.

Implementation

@override
Widget build() {
  return AuthStateListener<AuthController>(
    listener: (oldState, newState, controller) {
      for (final action in widget.actions) {
        if (action is AuthStateChangeAction && action.matches(newState)) {
          action.invoke(this, newState);
        }
      }

      return null;
    },
    child: super.build(),
  );
}