magic library

Classes

Accepted
The Accepted Rule.
AdvancedFileOutput
Accumulates logs in a buffer to reduce frequent disk, writes while optionally switching to a new log file if it reaches a certain size.
Allow
Allows the navigation to proceed.
AllowAllMiddleware
A simple middleware that always allows navigation.
AndroidOptions
Specific options for Android platform.
AnsiColor
This class handles colorizing of terminal output.
ApiKeyGuard
API Key Guard.
AppBooted
Fired when the application has fully booted and all providers are ready.
AppleOptions
Specific options for Apple platform.
ArRelativeDateTime
ArSaMaDzKwTnRelativeDateTime
AsyncRule
Contract for asynchronous validation rules.
Auth
The Auth Facade.
AuthFailed
Fired when an authentication attempt fails.
AuthInterceptor
Auth Interceptor.
AuthLogin
Fired when a user successfully logs in.
AuthLogout
Fired when a user logs out.
AuthManager
The Auth Manager.
AuthorizeMiddleware
Authorization Middleware.
AuthRestored
Fired when authentication state is restored.
AuthResult
Authentication Result.
AuthServiceProvider
The Auth Service Provider.
AzRelativeDateTime
BackgroundTransformer
The default Transformer for Dio.
BaseEventServiceProvider
The Event Service Provider.
BaseGuard
Base Guard.
BaseOptions
A set of base settings for each Dio(). BaseOptions and Options will be merged into one RequestOptions before sending the requests. See Options.compose.
BasicAuthGuard
Basic Auth Guard.
BearerTokenGuard
Bearer Token Guard.
Bidi
This provides utility methods for working with bidirectional text. All of the methods are static, and are organized into a class primarily to group them together for documentation and discoverability.
BidiFormatter
Bidi stands for Bi-directional text. According to Wikipedia: Bi-directional text is text containing text in both text directionalities, both right-to-left (RTL) and left-to-right (LTR). It generally involves text containing different types of alphabets, but may also refer to boustrophedon, which is changing text directionality in each row.
Block
Blocks the navigation from proceeding.
Blueprint
The Blueprint Class.
BnRelativeDateTime
BroadcastChannel
The Broadcast Channel contract.
BroadcastDriver
The Broadcast Driver contract.
BroadcastEvent
An event received from the broadcast server.
BroadcastInterceptor
The Broadcast Interceptor contract.
BroadcastManager
The Broadcast Manager.
BroadcastPresenceChannel
The Broadcast Presence Channel contract.
BroadcastServiceProvider
Broadcast Service Provider.
Cache
Laravel-style Cache Facade.
CacheFlush
Fired when the entire cache is flushed.
CacheForget
Fired when a single key is removed from the cache.
CacheHit
Fired when a cache lookup returns a stored value (cache hit).
CacheManager
The Cache Manager.
CacheMiss
Fired when a cache lookup returns no stored value (cache miss).
CachePut
Fired when a value is written to the cache.
CacheServiceProvider
Cache Service Provider.
CacheStore
The Cache Store Contract.
CancelToken
Controls cancellation of Dio's requests.
Carbon
The Carbon Class - Laravel-Style Date Wrapper.
CastsAttributes<T>
Contract for class-based custom attribute casts.
ColumnDefinition
Column definition for Blueprint.
Config
The Config Facade.
ConfigRepository
The Configuration Repository.
Confirmed
The Confirmed Rule.
ConsoleLoggerDriver
The Console Logger Driver.
ConsoleOutput
Default implementation of LogOutput.
Crypt
The Encryption Facade.
CsRelativeDateTime
CustomParameterCodec
annotation to define a custom parameter decoder/encoder this is useful when the is encoded/decoded in a non-standard way like base64Url this must be used as an annotation on a field
CustomTransitionPage<T>
Page with custom transition functionality.
DatabaseConnected
Fired when a database connection is established.
DatabaseManager
The Database Manager.
DatabaseServiceProvider
Database Service Provider.
DateFormat
DateFormat is for formatting and parsing dates in a locale-sensitive manner.
DateManager
The Date Manager Service.
DateRange
Represents a date range with start and end dates.
DateTimeFormat
DB
Laravel-style DB Facade.
DefaultLaunchAdapter
Default implementation of the LaunchAdapter using url_launcher.
DeRelativeDateTime
DevelopmentFilter
Prints all logs with level >= Logger.level while in development mode (eg when asserts are evaluated, Flutter calls this debug mode).
Dio
Dio enables you to make HTTP requests easily.
DioMixin
DioNetworkDriver
The Dio-based Network Driver.
Echo
The Echo Facade.
Email
The Email Rule.
EncryptionServiceProvider
EnRelativeDateTime
EnumCast<T extends Enum>
Cast a string-backed enum attribute to/from its Dart Enum value.
Env
The Environment Facade.
ErrorInterceptorHandler
The handler for interceptors to handle error occurred during the request.
EsRelativeDateTime
Event
The Event Facade.
EventDispatcher
The Event Dispatcher.
Factory<T extends Model>
The base Factory class for generating fake model data.
FakeAuthManager
A fake AuthManager for testing.
FakeBroadcastDriver
An in-memory BroadcastDriver that records all operations for assertions.
FakeBroadcastManager
A fake BroadcastManager for testing.
FakeCacheManager
A fake CacheManager for testing.
FakeLogManager
A fake LogManager for testing.
FakeNetworkDriver
A fake network driver for testing.
FakeVaultService
In-memory fake implementation of MagicVaultService for testing.
FaRelativeDateTime
FileOutput
FilePicker
The primary entry point for picking files and directories across platforms.
FileStore
Native File-based Cache Driver (IO Implementation).
FlutterSecureStorage
A class to manage secure storage in a Flutter application across multiple platforms.
FormData
A class to create readable "multipart/form-data" streams. It can be used to submit forms and file uploads to http server.
FormRequest
Laravel-style request object — collapses the "authorize, normalize, validate" ceremony every controller hand-rolls into a single class.
FormValidator
Form Validation Helper.
FrRelativeDateTime
FusedTransformer
A Transformer that has a fast path for decoding UTF8-encoded JSON. If the response is utf8-encoded JSON and no custom decoder is specified in the RequestOptions, this transformer is significantly faster than the default SyncTransformer and the BackgroundTransformer. This improvement is achieved by using a fused Utf8Decoder and JsonDecoder to decode the response, which is faster than decoding the utf8-encoded JSON in two separate steps, since Dart uses a special fast decoder for this case. See https://github.com/dart-lang/sdk/blob/5b2ea0c7a227d91c691d2ff8cbbeb5f7f86afdb9/sdk/lib/_internal/vm/lib/convert_patch.dart#L40
Gate
The Gate Facade.
GateAbilityDefined
Fired when a new ability is defined.
GateAccessChecked
Fired when an ability check is performed (allowed or denied).
GateAccessDenied
Fired when an ability check results in denial.
GateBeforeRegistered
Fired when Gate.before() callback is registered.
GateManager
The Gate Manager.
GateResult
A single resolved ability check outcome, cached by GateManager.
GateServiceProvider
The Gate Service Provider.
GoRoute Get started Configuration Redirection Transition animations Named routes
A route that is displayed visually above the matching parent route using the Navigator.
GoRouteData Type-safe routes
A class to represent a GoRoute in Type-safe routing.
GoRouteInformationParser
Converts between incoming URLs and a RouteMatchList using RouteMatcher.
GoRouteInformationProvider
The RouteInformationProvider created by go_router.
GoRouter Get started Upgrading Configuration Navigation Redirection Web Deep linking Named routes Error handling State restoration
The route configuration for the app.
GoRouterDelegate
GoRouter implementation of RouterDelegate.
GoRouterState
The route state during routing.
Guard
The Guard Contract.
HasValidationErrors
Interface for checking and clearing validation errors.
Headers
The headers class for requests and responses.
HiRelativeDateTime
Http
The HTTP Facade.
HttpClientAdapter
HttpAdapter is a bridge between Dio and HttpClient.
HuRelativeDateTime
HybridPrinter
A decorator for a LogPrinter that allows for the composition of different printers to handle different log messages. Provide it's constructor with a base printer, but include named parameters for any levels that have a different printer:
IdRelativeDateTime
ImagePicker
Provides an easy way to pick an image/video from the image library, or to take a picture/video with the camera.
ImperativeRouteMatch
The route match that represent route pushed through GoRouter.push.
In<T>
Validates that the value is contained in a given whitelist.
InheritedGoRouter
GoRouter implementation of InheritedWidget.
InList<T extends Enum>
Validates that the value matches an entry from an enum list.
Interceptor
Interceptor helps to deal with RequestOptions, Response, and DioException during the lifecycle of a request before it reaches users.
Interceptors
A Queue-Model list for Interceptors.
InterceptorsWrapper
A helper class to create interceptors in ease.
Intl
The Intl class provides a common entry point for internationalization related tasks. An Intl instance can be created for a particular locale and used to create a date format via anIntl.date(). Static methods on this class are also used in message formatting.
IOSOptions
Specific options for iOS platform. Currently there are no specific ios options available, but only shared options from apple options.
ItRelativeDateTime
JaRelativeDateTime
Jiffy
Jiffy is a Flutter (Android, IOS and Web) date time package for parsing, manipulating, querying and formatting dates
JsonAssetLoader
The JSON Asset Loader.
Kernel
The HTTP Kernel - Middleware Registry.
KoRelativeDateTime
Lang
The Lang Facade.
LangDelegate
The Lang Delegate.
Launch
The Launch Facade.
LaunchAdapter
The Launch Adapter contract.
LaunchService
Service for launching URLs, emails, phone calls, and SMS.
LaunchServiceProvider
The Launch Service Provider.
LayoutDefinition
A layout route definition for persistent shells.
LinuxOptions
Specific options for Linux platform. Currently there are no specific linux options available.
ListCast<T>
Cast a list attribute element-by-element through an inner cast.
ListParam<T>
Indicates a param being used as queries or form data, and how does it gets formatted.
LocalDisk
The Local Disk Implementation.
LocaleChanged
Fired when the application locale changes.
LocalizationInterceptor
The Localization Interceptor.
LocalizationServiceProvider
The Localization Service Provider.
Location
A Location maps time instants to the zone in use at that time. Typically, the Location represents the collection of time offsets in use in a geographical area, such as CEST and CET for central Europe.
LocationDatabase
LocationDatabase provides interface to find Locations by their name.
Log
The Log Facade.
LogEvent
LogFilter
An abstract filter of log messages.
LogfmtPrinter
Outputs a logfmt message:
Logger
Use instances of logger to send log messages to the LogPrinter.
LoggerDriver
The Logger Driver interface.
LogInterceptor
LogInterceptor is used to print logs during network requests. It should be the last interceptor added, otherwise modifications by following interceptors will not be logged. This is because the execution of interceptors is in the order of addition.
LogManager
The Log Manager.
LogOutput
Log output receives a OutputEvent from LogPrinter and sends it to the desired destination.
LogPrinter
An abstract handler of log events.
LostData
The response object of ImagePicker.retrieveLostData.
LostDataResponse
The response object of ImagePicker.getLostData.
MacOsOptions
Specific options for macOS platform. Extends AppleOptions and adds the usesDataProtectionKeychain parameter.
Magic
The Magic Facade.
MagicApp
The Application Container.
MagicApplication
The recommended way to bootstrap a Magic application.
MagicAppWidget
A wrapper widget that enables soft app restart.
MagicAppWidgetState
MagicArtisanProvider
Contributes magic:* (and make:* / key:generate) commands to the artisan dispatcher.
MagicBuilder<T>
A simplified builder for ValueListenable objects.
MagicCan
A widget that conditionally renders content based on authorization.
MagicCannot
A widget that renders content only if the user CANNOT perform an action.
MagicController
The Base Controller for Magic MVC.
MagicError
Magic Network Error.
MagicEvent
The base class for all events.
MagicFeedback
The Magic Feedback Engine.
MagicFile
A picked file from the file or image picker.
MagicFileFactory
Factory methods for creating MagicFile from File/XFile on IO platforms.
MagicForm
A Form widget that integrates with Magic's validation system.
MagicFormData
Centralized form data management for Magic framework.
MagicListener<T extends MagicEvent>
The base class for all event listeners.
MagicMiddleware
The Base Middleware for Magic.
MagicNetworkInterceptor
The Magic Network Interceptor contract.
MagicPage<E>
One page, as a MagicPageFetcher reports it.
MagicPageRequest
What a MagicPageFetcher is being asked for.
MagicPaginatedListView<E>
A lazily built list over a MagicPaginator, fetching the next page as the end of the current one comes into view.
MagicPaginator<E>
Accumulates a paginated collection one page at a time.
MagicRequest
Magic Network Request.
MagicResponse
The Magic Network Response wrapper.
MagicResponsiveView<T extends MagicController>
A responsive view that adapts to different screen sizes.
MagicResponsiveViewExtended<T extends MagicController>
Extended responsive view with all Wind breakpoints.
MagicRoute
The Magic Route Facade.
MagicRouter
The Magic Router.
MagicRouterOutlet
A widget that renders nested route content.
MagicSelector<C extends MagicController, T>
Rebuilds one subtree when one part of a controller changes, and leaves it alone the rest of the time.
MagicShellRoute
A layout wrapper widget that receives the child from GoRouter.
MagicStatefulView<T extends MagicController>
A stateful version of MagicView.
MagicStatefulViewState<T extends MagicController, V extends MagicStatefulView<T>>
State for MagicStatefulView.
MagicTinkerIntegration
Glues magic's facade surface into the magic_tinker REPL hooks.
MagicTitle
A widget that applies a temporary title override through TitleManager while mounted. The configured suffix is applied automatically.
MagicVaultService
The Magic Vault Service.
MagicView<T extends MagicController>
The Base View for Magic MVC.
MagicViewRegistry
Registry for custom view builders.
Max
The Max Rule.
MemoryOutput
Buffers OutputEvents.
MicroMoney
Used primarily for currency formatting, this number-like class stores millionths of a currency unit, typically as an Int64.
Migration
The Migration Contract.
Migrator
The Migrator Service.
Min
The Min Rule.
Model
The base Eloquent Model.
ModelCreated
Fired after a new model has been created.
ModelCreating
Fired before a new model is created.
ModelDeleted
Fired after a model has been deleted.
ModelEvent
Base class for all model events.
ModelSaved
Fired after a model has been saved (created or updated).
ModelSaving
Fired before a model is saved (created or updated).
ModelUpdated
Fired after an existing model has been updated.
ModelUpdating
Fired before an existing model is updated.
MultiOutput
Logs simultaneously to multiple LogOutput outputs.
MultipartFile
An upload content that is a part of MultipartRequest. This doesn't need to correspond to a physical file.
NbRelativeDateTime
NetworkDriver
The Network Driver interface.
NetworkServiceProvider
The Network Service Provider.
NlRelativeDateTime
NoTransitionPage<T>
Custom transition page with no transition.
NullBroadcastDriver
A no-op BroadcastDriver for local development and testing environments where no WebSocket server is available.
NumberFormat
Provides the ability to format a number in a locale-specific way.
NumberParserBase<R>
OnEnterResult
The result of an onEnter callback.
Options
The configuration for a single request. BaseOptions and Options will be merged into one RequestOptions before sending the requests. See Options.compose.
Ordinals
OutputEvent
Pick
The Pick Facade.
PickedFile
A PickedFile is a cross-platform, simplified File abstraction.
PlatformFile
The abstract representation of a picked file on the current platform.
PlRelativeDateTime
Policy
Base class for organizing authorization policies.
PopoverController
Controller for programmatic popover control
PrefixPrinter
A decorator for a LogPrinter that allows for the prepending of every line in the log output with a string for the level of that log. For example:
PrettyPrinter
Default implementation of LogPrinter.
ProductionFilter
Prints all logs with level >= Logger.level even in production.
PtRelativeDateTime
QueryBuilder
Laravel-style Query Builder.
QueryExecuted
Fired when a database query is executed.
QueuedInterceptor
Interceptor in queue.
QueuedInterceptorsWrapper
A helper class to create QueuedInterceptor in ease.
RedirectRecord
A record that records the redirection happens during requests, including status code, request method, and the location.
RelativeDateTime
RelativeGoRouteData Type-safe routes
A class to represent a relative GoRoute in Type-safe routing.
Request
The Request Facade.
RequestInterceptorHandler
The handler for interceptors to handle before the request has been sent.
RequestOptions
The internal request option class that is the eventual result after BaseOptions and Options are composed.
Required
The Required Rule.
Response<T>
The Response class contains the payload (could be transformed) that respond from the request, and other information of the response.
ResponseBody
The response wrapper class for adapters.
ResponseInterceptorHandler
The handler for interceptors to handle after respond.
ReverbBroadcastChannel
A BroadcastChannel implementation backed by a StreamController that receives events routed by the ReverbBroadcastDriver.
ReverbBroadcastDriver
A BroadcastDriver that connects to Laravel Reverb (Pusher-compatible) via a pure-Dart WebSocket client.
ReverbBroadcastPresenceChannel
A presence-aware BroadcastChannel that tracks connected members and emits join/leave events.
RouteBase
The base class for GoRoute and ShellRoute.
RouteBuilder
Builds the top-level Navigator for GoRouter.
RouteConfiguration
The route configuration for GoRouter configured by the app.
RouteData
Baseclass for supporting Type-safe routing.
RouteDefinition
A fluent route definition builder.
RouteGroup
A route group definition for shared options.
RouteInformationState<T>
The data class to be stored in RouteInformation.state to be used by GoRouteInformationParser.
RouteMatch
An matched result by matching a GoRoute against a location.
RouteMatchBase
The base class for various route matches.
RouteMatchList
The list of RouteMatchBase objects.
RoutingConfig Configuration
A set of parameters that defines routing in GoRouter.
Rule
The Rule Contract.
RuRelativeDateTime
RxStatus
Immutable status class for reactive state management.
Same
The Same Rule.
Schema
Laravel-style Schema Facade.
Seeder
The base Seeder class.
SelectOption<T>
SelectOption - Data Model for WSelect
ServiceProvider
The Service Provider Contract.
Session
The Session Facade.
SessionStore
In-memory session store backing the Session facade.
Share
SharedPreferences
Wraps NSUserDefaults (on iOS) and SharedPreferences (on Android), providing a persistent store for simple data.
SharedPreferencesAsync
Provides a persistent store for simple data.
SharedPreferencesOptions
Basic options for creating SharedPreferencesAsync classes.
SharedPreferencesWithCache
Provides a persistent store for simple data.
SharedPreferencesWithCacheOptions
Options necessary to create a SharedPreferencesWithCache.
ShareParams
SharePlus
SharePlusLinuxPlugin
The Linux implementation of SharePlatform.
SharePlusWindowsPlugin
The fallback Windows implementation of SharePlatform, for older Windows versions.
ShareResult
The result of a share to determine what action the user has taken.
ShellRoute Configuration
A route that displays a UI shell around the matching child route.
ShellRouteBase
Base class for classes that act as shells for sub-routes, such as ShellRoute and StatefulShellRoute.
ShellRouteContext
Context object used when building the shell and Navigator for a shell route.
ShellRouteData
A class to represent a ShellRoute in Type-safe routing.
ShellRouteMatch
An matched result by matching a ShellRoute against a location.
SimpleMagicController
A simple controller without state mixin.
SimplePrinter
Outputs simple log messages:
SkRelativeDateTime
StackLoggerDriver
The Stack Logger Driver.
StatefulNavigationShell
Widget for managing the state of a StatefulShellRoute.
StatefulNavigationShellState
State for StatefulNavigationShell.
StatefulShellBranch
Representation of a separate branch in a stateful navigation tree, used to configure StatefulShellRoute.
StatefulShellBranchData
Base class for supporting StatefulShellRoute
StatefulShellRoute Configuration
A route that displays a UI shell with separate Navigators for its sub-routes.
StatefulShellRouteData
Base class for supporting StatefulShellRoute
Storage
The Storage Facade.
StorageDisk
The Storage Disk Contract.
StorageManager
The Storage Manager.
StreamOutput
SvRelativeDateTime
SyncTransformer
If you want to custom the transformation of request/response data, you can provide a Transformer by your self, and replace the transformer by setting the Dio.transformer.
TextDirection
Represents directionality of text.
ThRelativeDateTime
TimeZone
A TimeZone represents a single time zone such as CEST or CET.
TitleManager
Manages page titles across routing, widgets, and facades.
Transformer
Transformer allows changes to the request/response data before it is sent/received to/from the server.
TranslationLoader
The Translation Loader Contract.
Translator
The Translator Service.
TrRelativeDateTime
TypedGoRoute<T extends GoRouteData>
A superclass for each typed go route descendant
TypedQueryParameter<T>
Annotation to override the URI name for a route parameter.
TypedRelativeGoRoute<T extends RelativeGoRouteData>
A superclass for each typed relative go route descendant
TypedRoute<T extends RouteData>
A superclass for each typed route descendant
TypedShellRoute<T extends ShellRouteData>
A superclass for each typed shell route descendant
TypedStatefulShellBranch<T extends StatefulShellBranchData>
A superclass for each typed shell route descendant
TypedStatefulShellRoute<T extends StatefulShellRouteData>
A superclass for each typed shell route descendant
TZDateTime
TimeZone aware DateTime.
TzInstant
A TzInstant represents a timezone and an instant in time.
UkRelativeDateTime
Unique
Asynchronously validates that a value is unique by hitting a backend endpoint.
Validator
The Validator Class.
Vault
The Vault Facade.
VaultServiceProvider
WActionHandler
Bridges JSON action definitions to Dart callback handlers in the dynamic module.
WAnchor
The Foundational State Wrapper
WBadge
A Utility-First Badge / Label Component
WBreakpoint
Declarative Breakpoint-Keyed Builder
WButton
The Utility-First Button Component
WCard
A Surface Container for Card-Style Layouts
WCheckbox
A Utility-First Checkbox Component
WDatePicker
WDatePicker - Utility-First Date Picker Component
WDiv
The Fundamental Building Block of Wind
WDynamic
Main widget for rendering dynamic UI from JSON configuration.
WDynamicConfig
Configuration for WindDynamic rendering.
WDynamicController
Controller for external access to WDynamic state.
WDynamicState
Reactive state store for dynamic widget values.
WebOptions
Specific options for web platform.
WFormCheckbox
A Wind-styled checkbox that integrates with Flutter's Form validation.
WFormDatePicker
A Wind-styled date picker that integrates with Flutter's Form validation.
WFormInput
A Wind-styled input that integrates with Flutter's Form validation.
WFormMultiSelect<T>
A Wind-styled multi-select that integrates with Flutter's Form validation.
WFormSelect<T>
A Wind-styled single-select that integrates with Flutter's Form validation.
WIcon
The Utility-First Icon Component
WImage
The Utility-First Image Component
Wind
Wind framework-level facade for debug-tooling integration.
WindAnchorState
The State Snapshot
WindAnchorStateProvider
The State Propagator
WindAnimationWrapper
Wraps a widget in the appropriate animation based on WindAnimationType.
WindCompoundVariant
A Single Compound-Variant Rule for WindRecipe
WindContext
The styling context context
WindowsOptions
Specific options for Windows platform.
WindParser
The Core Parsing Engine
WindParserInterface
Interface for specialized Wind CSS parsers.
WindPerfCounters
Opt-in aggregate counters for Wind's hottest path.
WindPerfResolverImpl
Publishes Wind's aggregate performance counters through the fluttersdk_wind_diagnostics_contracts perf slot.
WindRecipe
A Tailwind-Variants tv() Equivalent for Wind
WindSlotCompoundVariant
A Single Compound-Variant Rule for WindSlotRecipe
WindSlotRecipe
A Tailwind-Variants Multi-Part (slots) Recipe for Wind
WindStyle
The Immutable Style Object
WindTheme
The Theme Provider
WindThemeController
Theme Controller
WindThemeData
Theme Configuration
WInput
The Utility-First Input Component
WKeyboardActions
A Wind-styled wrapper that adds keyboard actions (Done button, navigation) to input fields, especially for iOS numeric keyboards.
WPopover
WPopover - Flexible Popover Component
WRadio<T>
A Utility-First Radio Button Component
WSelect<T>
The Utility-First Select Component
WSpacer
WSpacer - Lightweight Spacing Widget
WSvg
The Utility-First SVG Component
WSwitch
A Utility-First Toggle Switch Component
WTabs
A Utility-First Tabs Component
WText
The Utility-First Text Component
XFile
A CrossFile is a cross-platform, simplified File abstraction.
ZhCnRelativeDateTime
ZhRelativeDateTime

Enums

AccessControlFlag
Keychain access control flags that define security conditions for accessing items. These flags can be combined to create complex access control policies.
AndroidBiometricType
Controls which authentication methods are accepted when biometric authentication is used.
BroadcastConnectionState
The possible connection states for a broadcast driver.
CameraDevice
Which camera to use when picking images/videos while source is ImageSource.camera.
CupertinoActivityType
Represents iOS-supported share activity types, such as AirDrop, Messages, Mail, and others.
DioExceptionType
The exception enumeration indicates what type of exception has happened during requests.
FileAccessMode
The file access mode when downloading a file, corresponds to a subset of dart:io::FileMode.
FilePickerStatus
The status of the file picker.
FileType
The type of file that a file picker can select.
ImageSource
Specifies the source where the picked image should come from.
InputType
Input type enum for WInput widget
KeychainAccessibility
KeyChain accessibility attributes as defined here: https://developer.apple.com/documentation/security/ksecattraccessible?language=objc
KeyCipherAlgorithm
Algorithm used to encrypt/wrap the secret key in Android KeyStore.
LaunchMode
The desired mode to launch a URL.
Level
Levels to control logging output. Logging can be enabled to include all levels above certain Level.
ListFormat
Specifies the array format (a single parameter with multiple parameter or multiple parameters with the same name). and the separator for array items.
The type of the navigation.
PaginationMode
How the server addresses the page after this one.
PopoverAlignment
Popover Alignment Options
PusherErrorAction
Pusher error code classification for reconnection strategy.
ResponseType
Indicates which transformation should be applied to the response data.
RetrieveType
The type of the retrieved data in a LostDataResponse.
RouteTransition
Transition types for route animations.
RxStatusType
Reactive Status for state management.
ShareResultStatus
How the user handled the share-sheet
StartOfWeek
StorageCipherAlgorithm
Algorithm used to encrypt stored data.
Unit
WDatePickerMode
Date picker selection mode.
WindAnimationType
Animation types for animate-* classes
WindDisplayType
WindOverflow
Overflow behavior types
WindPositionType
Position types for positioned elements e.g., relative, absolute
WindTextTransform
WKeyboardPlatform
Platform gate for WKeyboardActions toolbar visibility.

Mixins

Authenticatable
The Authenticatable Mixin.
HasTimestamps
The Timestamps Concern.
InteractsWithPersistence
The Persistence Concern.
MagicStateMixin<T>
State mixin for reactive data management.
OptionsMixin
The mixin class for options that provides common attributes.
ResourceController
Contract for controllers that expose Laravel-style resource routes.
ValidatesRequests
The ValidatesRequests Mixin.

Extensions

GoRouterHelper on BuildContext
Dart extension to add navigation function to a BuildContext object, e.g. context.go('/');
MagicFileIOExtensions on MagicFile
IO-specific extensions for MagicFile.
MagicResponsiveContext on BuildContext
Helper extension to check current breakpoint from Wind.
MagicShellContext on BuildContext
Extension to access the shell from context.
ToCarbon on DateTime
Extension to convert DateTime to Carbon.
WindContextExtension on BuildContext
Wind Context Extensions

Constants

borderRadius → const Map<String, double>
Default border radius values for Wind theme
borderWidths → const Map<String, double>
Default border width values for Wind theme
colors → const Map<String, dynamic>
containers → const Map<String, int>
fontFamilies → const Map<String, String>
Default font family configurations for Wind theme.
fontSizes → const Map<String, double>
fontWeights → const Map<String, FontWeight>
kTypeImage → const String
Denotes that an image is being picked.
kTypeVideo → const String
Denotes that a video is being picked.
leading → const Map<String, double>
maxTime → const int
Maximum value for time instants.
minTime → const int
Minimum value for time instants.
screens → const Map<String, int>
tracking → const Map<String, double>
tzDataDefaultFilename → const String
File name of the Time Zone default database.
windPxUnit → const double
The pixel unit used for sizing calculations.
windRemUnit → const int
The REM unit used for sizing calculations.

Properties

defaultAppConfig Map<String, dynamic>
Framework Default Configuration.
no setter
defaultAuthConfig Map<String, dynamic>
Authentication Configuration.
final
defaultBroadcastingConfig Map<String, dynamic>
Broadcasting Configuration.
final
defaultCacheConfig Map<String, dynamic>
Default Cache Configuration.
getter/setter pair
defaultDatabaseConfig Map<String, dynamic>
Database configuration for the Magic framework.
getter/setter pair
defaultFilesystemsConfig Map<String, dynamic>
Default Filesystems Configuration.
getter/setter pair
defaultLocalizationConfig Map<String, dynamic>
Default Localization Configuration.
final
defaultLoggingConfig Map<String, dynamic>
Logging Configuration Defaults.
getter/setter pair
defaultNetworkConfig Map<String, dynamic>
Network Configuration
getter/setter pair
defaultRoutingConfig Map<String, dynamic>
Routing Default Configuration.
no setter
defaultViewConfig Map<String, dynamic>
Default View Configuration (UI Styles).
getter/setter pair
local Location
Local Location
no setter
timeZoneDatabase LocationDatabase
Global TimeZone database
no setter
UTC Location
UTC Location
no setter

Functions

applyOpacity(Color color, double opacity) Color
Applies opacity to a Color.
carbonNow([String? timezone]) Carbon
Global helper to get current date/time.
carbonParse(dynamic value) Carbon
Global helper to parse a date.
carbonToday() Carbon
Global helper to get today's date at start of day.
computeEffectiveAlignment({required PopoverAlignment requested, required Offset triggerPosition, required Size triggerSize, required Size popoverSize, required Size screenSize, required Offset offset}) PopoverAlignment
Computes effective alignment by flipping when overflow would occur.
computeHorizontalClamp({required PopoverAlignment alignment, required Offset triggerPosition, required Size triggerSize, required double popoverWidth, required Size screenSize, required Offset offset, double margin = 8}) double
Computes a horizontal correction (dx) that pulls the overlay back inside the viewport when the resolved alignment would still place part of it off-screen after computeEffectiveAlignment has already swapped the anchored side.
defaultDioExceptionReadableStringBuilder(DioException e) String
The default implementation of building a readable string of DioException.
eloquentModelCaster(Object? value) String?
Pretty-printer for Model instances.
env<T>(String key, [T? defaultValue]) → T
Get an environment variable value.
error(String field) String?
Top-level helper, mirrors Laravel's $errors->first('field').
getLocation(String locationName) Location
Find Location by its name.
hexToColor(String code) Color
Color Utility: Hex Parser
initializeDatabase(List<int> rawData) → void
Initialize Time zone database.
invertMaterialColor(MaterialColor color) MaterialColor
Color Utility: Inverter
old(String field, [String? fallback]) String?
Top-level helper, mirrors Laravel's old().
parseColorOpacity(String colorClass) → ({String colorPart, double? opacity})
Parses a color class with optional opacity modifier.
setLocalLocation(Location location) → void
Set local Location
toBeginningOfSentenceCase<T extends String?>(T input, [String? locale]) → T
Convert a string to beginning of sentence case, in a way appropriate to the locale.
trans(String key, [Map<String, dynamic>? replace]) String
Translate a key with optional replacements.
wColor(BuildContext context, String colorName, {int shade = 500, String? darkColorName, int darkShade = 500}) Color?
Global Color Resolver
wFontSize(BuildContext context, String sizeName) double?
Returns a font size by name.
wFontWeight(BuildContext context, String weightName) FontWeight?
Returns a font weight by name.
wrapWithAnimation({required Widget child, WindAnimationType? animationType, Duration? duration, Curve? curve}) Widget
Helper function to wrap a widget with animation if animationType is set.
wScreen(BuildContext context, String name) int?
Returns the pixel value for a breakpoint name.
wScreenCurrent(BuildContext context) String
Returns the current active breakpoint name.
wScreenIs(BuildContext context, String name) bool
Checks if the current screen width is at least the given breakpoint.
wSpacing(BuildContext context, num multiplier) double
Returns a spacing value based on the multiplier.
wStyle(BuildContext context, String className) WindStyle
Style Parser Helper

Typedefs

AbilityCallback = Function
Ability callback type.
BeforeCallback = bool? Function(Model user, String ability)
Callback signature for "before" checks (super admin bypass).
CacheRecord = ({String key, String operation, dynamic value})
A recorded cache operation entry.
CreateOptionBuilder = Widget Function(BuildContext context, String query, VoidCallback onCreate)
Signature for building the "create option" button.
DateDisplayFormat = String Function(DateTime date)
Signature for custom display format function.
DateTimeFormatter = String Function(DateTime time)
DefaultTransformer = SyncTransformer
DioError = DioException
DioError describes the exception info when a request failed.
DioErrorType = DioExceptionType
Deprecated in favor of DioExceptionType and will be removed in future major versions.
DioExceptionReadableStringBuilder = String Function(DioException e)
The readable string builder's signature of DioException.readableStringBuilder.
DioMediaType = MediaType
The type (alias) for specifying the content-type of the MultipartFile.
EmptyStateBuilder = Widget Function(BuildContext context, String query)
Signature for building the empty state.
ExitCallback = FutureOr<bool> Function(BuildContext context, GoRouterState state)
Signature for function used in RouteBase.onExit.
FakeLogEntry = ({dynamic context, String level, String message})
A single captured log entry.
FakeRequestHandler = MagicResponse Function(MagicRequest request)
Callback signature for dynamic request handling.
GoExceptionHandler = void Function(BuildContext context, GoRouterState state, GoRouter router)
The function signature of GoRouter.onException.
GoRouterBuilderWithNav = Widget Function(BuildContext context, Widget child)
Signature of a go router builder function with navigator.
GoRouterPageBuilder = Page Function(BuildContext context, GoRouterState state)
The page builder for GoRoute.
GoRouterRedirect = FutureOr<String?> Function(BuildContext context, GoRouterState state)
The signature of the redirect callback.
GoRouterWidgetBuilder = Widget Function(BuildContext context, GoRouterState state)
The widget builder for GoRoute.
HeaderForEachCallback = void Function(String name, List<String> values)
The signature that iterates header fields.
ImageErrorBuilder = Widget Function(BuildContext context, Object error, StackTrace? stackTrace)
Signature for building a custom error widget.
ImageLoadingBuilder = Widget Function(BuildContext context, Widget child, ImageChunkEvent? loadingProgress)
Signature for building a custom loading widget.
InterceptorErrorCallback = void Function(DioException error, ErrorInterceptorHandler handler)
The signature of Interceptor.onError.
InterceptorSendCallback = void Function(RequestOptions options, RequestInterceptorHandler handler)
The signature of Interceptor.onRequest.
InterceptorSuccessCallback = void Function(Response response, ResponseInterceptorHandler handler)
The signature of Interceptor.onResponse.
JsonDecodeCallback = FutureOr Function(String)
The callback definition for decoding a JSON string.
JsonEncodeCallback = FutureOr<String> Function(Object)
The callback definition for encoding a JSON object.
LoadingBuilder = Widget Function(BuildContext context)
Signature for building the loading indicator.
LogCallback = void Function(LogEvent event)
MagicPageFetcher<E> = Future<MagicPage<E>> Function(MagicPageRequest request)
Fetches one page.
MagicPaginatedItemBuilder<E> = Widget Function(BuildContext context, E item, int index)
Builds one row of a MagicPaginatedListView.
MultiSelectTriggerBuilder<T> = Widget Function(BuildContext context, List<SelectOption<T>> selectedOptions, bool isOpen)
Signature for building a custom trigger widget for multi-select WSelect.
The function signature for navigation callbacks in _OnEnterHandler.
Signature for functions used to build Navigators
OnEnter = FutureOr<OnEnterResult> Function(BuildContext context, GoRouterState currentState, GoRouterState nextState, GoRouter goRouter)
The signature for the top-level onEnter callback.
OnEnterThenCallback = FutureOr<void> Function()
Signature for callbacks invoked after an OnEnterResult is resolved.
OutputCallback = void Function(OutputEvent event)
ParserExceptionHandler = RouteMatchList Function(BuildContext context, RouteMatchList routeMatchList)
The function signature of GoRouteInformationParser.onParserException.
PopoverContentBuilder = Widget Function(BuildContext context, VoidCallback close)
Builder for the popover content.
PopoverTriggerBuilder = Widget Function(BuildContext context, bool isOpen, bool isHovering)
Builder for the trigger widget.
PopPageWithRouteMatchCallback = bool Function(Route route, dynamic result, RouteMatchBase match)
Signature for a function that takes in a route to be popped with the result and returns a boolean decision on whether the pop is successful.
ProgressCallback = void Function(int count, int total)
The type of a progress listening callback when sending or receiving data.
QueryParameterDecoder<T> = T Function(String value)
Signature for custom query parameter decoding functions.
QueryParameterEncoder<T> = String Function(T value)
Signature of custom query parameter encoding.
RequestEncoder = FutureOr<List<int>> Function(String request, RequestOptions options)
The type of a request encoding callback.
ResponseDecoder = FutureOr<String?> Function(List<int> responseBytes, RequestOptions options, ResponseBody responseBody)
The type of a response decoding callback.
RouteInfoState = RouteInformationState
Type alias for route information state with dynamic type parameter.
RouteMatchVisitor = bool Function(RouteMatchBase)
The function signature for RouteMatchList.visitRouteMatches
SelectedChipBuilder<T> = Widget Function(BuildContext context, SelectOption<T> option, VoidCallback onRemove)
Signature for building a selected chip/tag in multi-select mode.
SelectItemBuilder<T> = Widget Function(BuildContext context, SelectOption<T> option, bool isSelected, bool isHovered)
Signature for building a custom item widget for WSelect.
SelectTriggerBuilder<T> = Widget Function(BuildContext context, SelectOption<T>? selectedOption, bool isOpen)
Signature for building a custom trigger widget for WSelect.
ShellNavigationContainerBuilder = Widget Function(BuildContext context, StatefulNavigationShell navigationShell, List<Widget> children)
Builder for a custom container for the branch Navigators of a StatefulShellRoute.
ShellRouteBuilder = Widget Function(BuildContext context, GoRouterState state, Widget child)
The widget builder for ShellRoute.
ShellRoutePageBuilder = Page Function(BuildContext context, GoRouterState state, Widget child)
The page builder for ShellRoute.
StatefulShellRouteBuilder = Widget Function(BuildContext context, GoRouterState state, StatefulNavigationShell navigationShell)
The widget builder for StatefulShellRoute.
StatefulShellRoutePageBuilder = Page Function(BuildContext context, GoRouterState state, StatefulNavigationShell navigationShell)
The page builder for StatefulShellRoute.
UniqueResolver = Future<bool> Function(String endpoint, String field, dynamic value)
Resolver signature for async uniqueness lookups.
ValidateStatus = bool Function(int? status)
The type of a response status code validate callback.
VaultOperation = ({String key, String operation})
A record of a vault operation for test assertions.
WWidgetBuilder = Widget Function(Map<String, dynamic> props, List<Widget> children)
Builder function for custom widget types.

Exceptions / Errors

AuthorizationException
Thrown when a FormRequest.authorize check (or a controller authorize() call) denies the current actor.
BlockedInitialNavigationException
Raised when Block is returned from onEnter but there is no prior route configuration to restore (e.g., an initial deep link was blocked).
DioException
DioException describes the exception info when a request failed.
GoError
Thrown when GoRouter is used incorrectly.
GoException
Thrown when GoRouter can not handle a user request.
IllegalCharacterInFileNameException
An exception that is thrown when a file name contains characters that are not allowed for the underlying platform.
JiffyException
LocationNotFoundException
MagicVaultException
Exception thrown when a Vault operation fails.
MassAssignmentException
Thrown by Model.fill when strict mode is enabled and a non-fillable attribute is supplied.
NotNullableError<T>
A TypeError thrown by _checkNotNullable.
StrayRequestException
Thrown when a stray request is made while FakeNetworkDriver.preventStrayRequests is enabled.
TimeZoneInitException
ValidationException
The Validation Exception.