blocs/blocs library
Core BLoC exports for the Supa Architecture package.
This library provides BLoC pattern implementations for:
- Authentication: Managing user authentication flows and state
- Error Handling: Centralized error reporting and crash analytics
- Push Notifications: Firebase Cloud Messaging integration
- Tenant: Multi-tenant application management
Classes
- AppUserSwitchEmailEvent
- Toggles the user's email notification preference.
- AppUserSwitchNotificationEvent
- Toggles the user's push notification preference.
- AuthenticationBloc
- Manages user authentication flows and state transitions.
- AuthenticationErrorEvent
- Reports an authentication error.
- AuthenticationErrorState
- State representing an authentication error.
- AuthenticationEvent
- Base class for all authentication-related events.
- AuthenticationInitializeEvent
- Initializes the authentication flow and resets to the login screen.
- AuthenticationInitialState
- Initial state before any authentication has been attempted.
- AuthenticationLogoutState
- State indicating the user has logged out.
- AuthenticationProcessingEvent
- Indicates that an authentication action is currently being processed.
- AuthenticationProcessingState
- State indicating an authentication operation is in progress.
- AuthenticationState
- Base class for all authentication states.
- CaptureException
- Manually captures and reports an exception.
- DidMountedCheckInitialMessage
- Event to check for notifications that launched the app.
- DidReceivedNotificationEvent
- Event triggered when a push notification is received in the foreground.
- DidResetNotificationEvent
- Event to reset notification state to initial.
- DidUserOpenedNotificationEvent
- Event triggered when user taps on a notification.
- ErrorCaptured
- State indicating an error has been successfully captured and reported.
- ErrorHandlingBloc
- Bloc that handles error capturing and reporting to Firebase Crashlytics and Sentry.
- ErrorHandlingEvent
- Base class for all error handling events.
- ErrorHandlingFailed
- State indicating error capture or reporting failed.
- ErrorHandlingInitial
- Initial state before error handling has been initialized.
- ErrorHandlingInitialized
- State indicating error handling systems have been configured.
- ErrorHandlingState
- Base class for all error handling states.
- InitializeErrorHandling
- Initializes error handling and crash reporting systems.
- LoginWithAppleEvent
- Triggers Apple ID sign-in flow.
- LoginWithGoogleEvent
- Triggers Google OAuth sign-in flow.
- LoginWithMicrosoftEvent
- Triggers Microsoft OAuth (Azure AD) sign-in flow.
- LoginWithMultipleTenantsEvent
- Transitions to tenant selection when user has multiple tenant access.
- LoginWithPasswordEvent
- Triggers email and password authentication.
- LoginWithSavedLoginEvent
- Triggers biometric authentication using saved credentials.
- LoginWithSelectedTenantEvent
- Completes authentication by selecting a specific tenant.
- NotificationData
- Base notification data that is shared between different notification states
- PushNotificationBloc
- Manages Firebase Cloud Messaging push notifications.
- PushNotificationError
- Push notification error state
- PushNotificationEvent
- Base class for all push notification events.
- PushNotificationInitial
- Push notification initial state
- PushNotificationOpened
- Push notification opened state
- PushNotificationPayload
- Contains the data payload from a Firebase Cloud Messaging notification.
- PushNotificationReceived
- Push notification received state
- PushNotificationState
- Push notification state
- TenantBloc
- A BLoC (Business Logic Component) class for managing tenant state.
- TenantEvent
- Abstract class representing tenant-related events.
- TenantInitial
- Represents the initial state of the tenant management.
- TenantInitialEvent
- Event to initialize the tenant state.
- TenantLoaded
- Represents the state when tenants have been loaded.
- TenantLoadedEvent
- Event to indicate that tenants have been loaded.
- TenantLoading
- Represents the state when tenant data is being loaded.
- TenantLoadingEvent
- Event to trigger tenant loading state.
- TenantState
- An abstract class representing the states of tenant management.
- UpdateAppUserProfileEvent
- Updates the current user's profile information.
- UserAuthenticatedState
- State representing a successfully authenticated user.
- UserAuthenticatedWithMultipleTenantsState
- State when user is authenticated but has access to multiple tenants.
- UserAuthenticatedWithSelectedTenantState
- Fully authenticated state with both user and tenant information.
- UserLogoutEvent
- Triggers user logout and clears the current session.
- UsingSavedAuthenticationEvent
- Restores a previously saved authentication session.
Enums
- AuthenticationAction
- Represents the different authentication actions that can be performed.
Extensions
- RemoteMessageExtension on RemoteMessage
-
Extension methods for convenient access to
RemoteMessagedata.