common_utils2 library

Classes

AccountResolutionResult
Account resolution result
AccountValidationResult
Account validation result
AndroidOptions
Specific options for Android platform.
ApiError
API Error details
ApiResponse<T>
API Response wrapper
AppNotificationChannel
Shared channels included by default in every app. Apps extend this via NotificationConfig.extraChannels.
AsyncDebouncer
Async Debouncer Debouncer for async functions
AsyncError<T>
AsyncState<T>
Loading State Wrapper Represents the state of an asynchronous operation
AsyncSuccess<T>
AsyncThrottler
Async Throttler Throttler for async functions
AuthInterceptor
Auth Interceptor
Bank
Bank model
BankCountry
Bank country model
BankListResult
Bank list result
BankUtils
Bank Utilities Utilities for bank operations using Paystack API
BoundingBox
Bounding Box model
CachedImageWidget
CityListResult
Result wrapper for a list of CountryCity.
ColorUtils
Color Utilities Provides color conversion, manipulation, and generation utilities
CommonHelperFunctions
CommonNotificationService
CommonPricingCalculator
CommonUtilsInitializer
CommonValidators
Validators Comprehensive validation utilities for forms and data
Country
A country entry used across CommonDesigns components.
CountryCity
A city within a state/country.
CountryData
Static country dataset — 194 sovereign states.
CountryHttpClient
Inject your HTTP implementation to enable live API sources.
CountryListResult
Result wrapper for a list of Country.
CountryService
Unified service for country, state, and city data.
CountryState
An administrative state or region within a country.
CurrencyConversionResult
Result of a single currency conversion
CurrencyInfo
CurrencyRegistry
CurrencySwapResult
Result of a two-way swap operation
CurrencyUtils
DateFormats
Common date format patterns
Debouncer
Debouncer Delays function execution until after wait time has elapsed since last invocation
DefaultNotificationHandler
No-op handler — used when an app doesn't supply a custom handler. Foreground messages are shown as local notifications automatically.
DeviceInfoHelper
Device Info Helper
DialCode
A lightweight view of a country used in dial-code pickers.
DisplayManager
DownloadCubit
DownloadItem
DownloadProgressWidget
DownloadsListPage
DownloadState
EncryptionUtils
Encryption & Security Utilities Helper methods for encryption, hashing, and security
ErrorInterceptor
Error Interceptor with Retry Logic
ExchangeRatesResult
Result of a getExchangeRates() call
Failure<T>
Failure result
FileUtils
File Utilities Helper methods for file operations including file picking
FormatUtils
Format Utilities Helper methods for formatting various data types
HiveStorageExample
HiveStorageService
Centralized singleton local storage service using Hive Automatically handles user-specific data isolation
HttpClient
Singleton HTTP Client Service
ImagePreloadService
InAppNotificationController
InAppNotificationOverlay
Wrap your MaterialApp builder with this.
Initial<T>
INotificationHandler
Implement this in each app to handle notification routing and display.
IOSOptions
Specific options for iOS platform. Currently there are no specific ios options available, but only shared options from apple options.
LatLng
Latitude and Longitude model
LazyVideoCubit
LazyVideoState
LinuxOptions
Specific options for Linux platform. Currently there are no specific linux options available.
Loading<T>
LocationService
Location Service Comprehensive location services with permissions, GPS, geocoding, and calculations
LoggerService
Robust Logger Service Comprehensive logging with Talker, Bloc, GoRouter, and remote logging
MacOsOptions
Specific options for macOS platform. Extends AppleOptions and adds the usesDataProtectionKeychain parameter.
MathUtils
Math Utilities Provides common mathematical operations and helpers
MediaContent
MediaFeedItem<T>
MediaFile
Holds a single picked media item — either an image or a video.
MediaGridView<T>
MediaItem<T>
Base class for feed items with media content. Your PostModel, ReelModel, StoryModel should extend this.
MediaListView<T>
MediaResult<T>
Result wrapper — every public method returns this so callers never have to catch; they just check isSuccess.
MediaUtils
Unified media utility for images and videos.
MixedMediaCubit<T>
MixedMediaState<T>
MkLazyVideoCubit
MkLazyVideoState
MkVideoItem<T>
Base class for any item that contains video content. Extend this with your app's model type.
MkVideoPreloadConfig
MkVideoPreloadCubit<T>
MkVideoPreloadState<T>
NetworkConnectivity
Network Connectivity Utility Monitor network status, connection type, and connectivity changes
NetworkStatus
Network status
NotificationBadge
Drop-in badge for any nav icon. Reads from NotificationCubit.
NotificationCentrePage
NotificationChannelDef
Defines one Android notification channel. Channels are permanent once created — users can adjust them in Settings. Never change an existing channel's importance; create a new channel instead.
NotificationConfig
Configuration object passed once at initialization. Create one per app — this is the primary customization surface.
NotificationCubit
NotificationEntry
NotificationPayload
Unified payload wrapping both FCM remote messages and local notifications.
NotificationState
NotificationTokenManager
PerformanceTracker
PermissionResult
Permission Result model
PickedFileInfo
Information about a picked file
PingResult
Ping result
RateLimiter
Rate Limiter Limits function calls to specified number per time period
RegexHelper
Helper methods for regex patterns
RegexPatterns
Regex Patterns Common regex patterns for validation and parsing
ResponsiveBuilder
Responsive Builder Widget
ResponsiveGrid
Responsive Grid
ResponsiveHelper
Comprehensive Responsive Design and Device Utilities Combines responsive design, device detection, and platform utilities
ResponsiveValue<T>
Responsive Value Widget
Result<T>
Result A type-safe wrapper for handling success and failure states
ScreenBreakpoint
Screen Breakpoint Info
SecureDataHelper
Secure Storage Helper (for sensitive data)
SecureStorageService
SecureStorageService
SpeedTestResult
Speed test result
StateListResult
Result wrapper for a list of CountryState.
StorageExample
Example Usage Class Shows how to use StorageService with type-safe methods
StorageKeys
StorageKeys
StorageService
Storage Service Type-safe wrapper around SharedPreferences with support for complex data types
Success<T>
Success result
TalkerObserverWrapper
Throttler
Throttler Ensures function is not called more than once in specified time period
TokenManager
Token Manager Service
TokenRefreshResult
Token refresh result
TopicManager
TypedDebouncer<T>
Typed Debouncer Debouncer that can handle typed callbacks with return values
User
UserRepository
VideoItem<T>
Base class for any item that contains video content. Your app's model (e.g. PostModel, ReelModel, StoryModel) should extend this.
VideoManagerService
VideoPaginationCubit<T>
VideoPreloadConfig
VideoPreloadCubit<T>
VideoPreloadState<T>
VideoUrlBuilder
WebOptions
Specific options for web platform.
WindowsOptions
Specific options for Windows platform.

Enums

ApiErrorType
API Error types
ConnectionQuality
Connection quality enum
ConnectionType
Connection type enum
CountrySource
Selects where CountryService loads country data from.
DeviceType
Device Type enum
DownloadStatus
DownloadType
FilePickerType
File Picker Type enum for file picking operations
FileType
File Type enum for existing file operations
KeychainAccessibility
KeyChain accessibility attributes as defined here: https://developer.apple.com/documentation/security/ksecattraccessible?language=objc
LoaderState
MediaType
OrderStatus
PasswordStrength
Password strength enum
ScreenType
Screen Type enum
TokenRefreshStatus

Extensions

ColorExtension on Color
Extension on Color
ConnectionQualityExtension on ConnectionQuality
Extension on ConnectionQuality
ConnectionTypeExtension on ConnectionType
Extension on ConnectionType
DateTimeExtensions on DateTime
Extension on DateTime to provide various formatting options and utilities
DownloadItemPatterns on DownloadItem
Adds pattern-matching-related methods to DownloadItem.
DownloadStatePatterns on DownloadState
Adds pattern-matching-related methods to DownloadState.
DurationTimeExtension on Duration
FilePickerTypeExtension on FilePickerType
Extension on FilePickerType
FileTypeExtension on FileType
Extension on FileType
ImageSourceName on ImageSource
LazyVideoStatePatterns on LazyVideoState
Adds pattern-matching-related methods to LazyVideoState.
ListExtensions on List<T>
List Extensions Provides useful extensions for List manipulation and operations
MapExtensions on Map<K, V>
Map Extensions
MediaTypeLabel on MediaType
MixedMediaStatePatterns on MixedMediaState<T>
Adds pattern-matching-related methods to MixedMediaState.
MkLazyVideoStatePatterns on MkLazyVideoState
Adds pattern-matching-related methods to MkLazyVideoState.
MkVideoPreloadStatePatterns on MkVideoPreloadState<T>
Adds pattern-matching-related methods to MkVideoPreloadState.
NotificationEntryPatterns on NotificationEntry
Adds pattern-matching-related methods to NotificationEntry.
NotificationStatePatterns on NotificationState
Adds pattern-matching-related methods to NotificationState.
NumExtensions on num
Number Extensions Provides useful extensions for num, int, and double types
NumListExtensions on List<num>
Extension for List
NumTimeExtension on T
Extension on num to create Duration objects from numeric values
PasswordStrengthExtension on PasswordStrength
Extension on PasswordStrength
StringExtensions on String
String Extensions Provides useful extensions for String manipulation
StringListExtensions on List<String>
Extension for List
TextStyleExtensions on TextStyle
VideoPreloadStatePatterns on VideoPreloadState<T>
Adds pattern-matching-related methods to VideoPreloadState.

Functions

asyncStateExamples() → void
bankUtilsExamples() → void
Usage Examples
debouncerExamples() → void
Usage Examples
networkConnectivityExamples() → void
Usage Examples
rateLimiterExamples() → void
resultExamples() → void
Usage Examples
throttlerExamples() → void

Exceptions / Errors

BankUtilsException
Bank Utils Exception
CommonFirebaseAuthException
CommonFirebaseException
CommonFormatExceptions
CountryServiceException
Thrown by CountryService when a required resource or configuration is missing, or when a network request fails.
HttpClientNotInitializedException
Exception thrown when HttpClient is used without initialization
LocationException
Location Exception