build method

  1. @override
({int current, int previous}) build()

Implementation

@override
({int current, int previous}) build() {
  // If the landing page is disposed, the async provider should be invalidated.
  // This is done to prevent the app from continuously showing the loading indicator.
  // The async provider is set to true when the user is logging in or registering.
  // For registration, the async provider is set to false when the user is registered.
  // For login, the async provider is invalidated with the call below because
  // the login form disposes before the async provider can be set to false.
  ref.onDispose(() => ref.invalidate(isInAsyncProvider));
  return (previous: 0, current: 0);
}