_common library

Classes

AnalysisContextCollection
A collection of analysis contexts.
AnsiStyle
A class that provides a way to style strings with ANSI escape codes.
AnyPlatform
BaseModel
BasicAppArgs
BasicCmdAppArgs
BytesBuilder
Builds a list of bytes, allowing bytes and lists of bytes to be added at the end.
Callbacks<T1, T2 extends TCallback<T1>>
Provides a flexible and easy way to manage and execute a set of callbacks.
CollectionMapperEvent
Mapper event for collection types, e.g. Map, List, Set.
Completer<T>
A way to produce Future objects and to complete them later with a value or error.
CompressionOptions
Options controlling compression in a WebSocket.
ConnectionTask<S>
A cancelable connection attempt.
ContentType
A MIME/IANA media type used as the value of the HttpHeaders.contentTypeHeader header.
Representation of a cookie. For cookies received by the server as Cookie header values only name and value properties will be set. When building a cookie for the 'set-cookie' header in the server and when receiving cookies in the client as 'set-cookie' headers all fields can be used.
DartLooseTypeMappers
Datagram
A data packet received by a RawDatagramSocket.
DataRefModel
DataRefModelFieldNames
Debouncer
Usage Example:
DebugLog
A container for debug logs.
Directory
A reference to a directory (or folder) on the file system.
DisposableValue<T>
Manages disposal of DisposableValue instances by tracking values in a map, with disposal and check methods.
DurationFormattedEnglish
A class that formats a Duration into a human-readable string.
Equatable
A base class to facilitate operator == and hashCode overrides.
EquatableConfig
The default configuration for all Equatable instances.
EventSink<T>
A Sink that supports adding errors.
Field
FieldFieldNames
FieldUtils
File
A reference to a file on the file system.
FileLock
Type of lock when requesting a lock on a file.
FileMode
The modes in which a File can be opened.
FileStat
The result of calling the POSIX stat() function on a file system object.
FileSystemCreateEvent
File system event for newly created file system objects.
FileSystemDeleteEvent
File system event for deletion of file system objects.
FileSystemEntity
The common superclass of File, Directory, and Link.
FileSystemEntityType
The type of an entity on the file system, such as a file, directory, or link.
FileSystemEvent
Base event class emitted by FileSystemEntity.watch.
FileSystemModifyEvent
File system event for modifications of file system objects.
FileSystemMoveEvent
File system event for moving of file system objects.
FindFileResult
The result of a findFiles or findGeneratedDartFiles operation.
FirestoreTimestamp
A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are 'smeared' so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.
FunctionQueue
A queue that executes functions in order, one at a time.
Future<T>
The result of an asynchronous computation.
FutureOr<T>
A type representing values that are either Future<T> or T.
Generate
GenerateFieldNames
GenerateForAnnotationTestArgs
GenerateForFilesArgs
GenerateMakeupsArgs
GenerateModel
GenerateModelFieldNames
GenerateScreenAccessArgs
GenerateScreenArgs
GenerateScreenBindings
GenerateScreenBindingsFieldNames
GZipCodec
The GZipCodec encodes raw bytes to GZip compressed bytes and decodes GZip compressed bytes to raw bytes.
HeaderValue
Representation of a header value in the form:
Here
A method to log a message to the console with the file, scope, line and column number passed in as context.
HttpClient
An HTTP client for communicating with an HTTP server.
HttpClientBasicCredentials
Represents credentials for basic authentication.
HttpClientBearerCredentials
Represents credentials for bearer token authentication.
HttpClientCredentials
Represents credentials for authentication in HttpClient.
HttpClientDigestCredentials
Represents credentials for digest authentication.
HttpClientRequest
HTTP request for a client connection.
HttpClientResponse
HTTP response for a client connection.
HttpConnectionInfo
Information about an HttpRequest, HttpResponse, HttpClientRequest, or HttpClientResponse connection.
HttpConnectionsInfo
Summary statistics about an HttpServers current socket connections.
HttpDate
Utility functions for working with dates with HTTP specific date formats.
HttpHeaders
Headers for HTTP requests and responses.
HttpOverrides
This class facilitates overriding HttpClient with a mock implementation. It should be extended by another class in client code with overrides that construct a mock implementation. The implementation in this base class defaults to the actual HttpClient implementation. For example:
HttpRequest
A server-side object that contains the content of and information about an HTTP request.
HttpResponse
An HTTP response, which returns the headers and data from the server to the client in response to an HTTP request.
HttpServer
A server that delivers content, such as web pages, using the HTTP protocol.
HttpService
A service for making HTTP requests.
HttpSession
The HttpRequest.session of an HttpRequest.
HttpStatus
HTTP status codes. Exported in dart:io and dart:html.
Immutable
Used to annotate a class.
InternetAddress
An internet address or a Unix domain address.
InternetAddressType
The type, or address family, of an InternetAddress.
IOOverrides
Facilities for overriding various APIs of dart:io with mock implementations.
IOSink
A combined byte and text output.
References to filesystem links.
LocationUtils
MapperEvent
Mapper event base class.
Model
MultiStreamController<T>
An enhanced stream controller provided by Stream.multi.
NetworkInterface
A NetworkInterface represents an active network interface on the current system. It contains a list of InternetAddresses that are bound to the interface.
NotificationTopic
A method to help manage blocking and unblocking of notification topics for Firebase Cloud Messaging or similar services.
ObjectMapperEvent
Mapper event for non-collection types, e.g. int, String, DateTime.
ObjectPostDestructionChecker
Used to check when an object got destructed.
PhysicalResourceProvider
A dart:io based implementation of ResourceProvider.
Pipe
An anonymous pipe that can be used to send data in a single direction i.e. data written to write can be read using read.
Platform
Information about the environment in which the current program is running.
PostDestructionChecker
Used to check when an object got destructed.
Process
The means to execute a program.
ProcessInfo
Methods for retrieving information about the current process.
ProcessResult
The result of running a non-interactive process started with Process.run or Process.runSync.
ProcessSignal
On Posix systems, ProcessSignal is used to send a specific signal to a child process, see Process.kill.
ProcessStartMode
Modes for running a new process.
Property
PropertyFieldNames
RandomAccessFile
Random access to the data in a file.
RawDatagramSocket
An unbuffered interface to a UDP socket.
RawSecureServerSocket
A server socket providing a stream of low-level RawSecureSockets.
RawSecureSocket
RawSecureSocket provides a secure (SSL or TLS) network connection.
RawServerSocket
A listening socket.
RawSocket
A TCP connection.
RawSocketEvent
Events for the RawDatagramSocket, RawSecureSocket, and RawSocket.
RawSocketOption
The RawSocketOption is used as a parameter to Socket.setRawOption and RawSocket.setRawOption to customize the behaviour of the underlying socket.
RawSynchronousSocket
A low-level class for communicating synchronously over a TCP socket.
RawZLibFilter
The RawZLibFilter class provides a low-level interface to zlib.
ReadPipe
The "read" end of an Pipe created by Pipe.create.
Rec
A record of a location in the code.
RecOptions
RecordUse
Annotates a static method to be recorded.
RedirectInfo
Redirect information.
ReplacePatternsSettings
Required
Used to annotate a named parameter p in a method or function f.
ResourceHandle
A wrapper around OS resource handle so it can be passed via Socket as part of SocketMessage.
SameSite
Cookie cross-site availability configuration.
ScreenCalculator
Calculates the size, orientation and aspect ratio of a screen.
ScreenSize
Represents the size of a screen.
SecureServerSocket
A server socket, providing a stream of high-level Sockets.
SecureSocket
A TCP socket using TLS and SSL.
SecurityContext
The object containing the certificates to trust when making a secure client connection, and the certificate chain and private key to serve from a secure server.
ServerSocket
A listening socket.
Socket
A TCP connection between two sockets.
SocketControlMessage
Control message part of the SocketMessage received by a call to RawSocket.readMessage.
SocketDirection
The SocketDirection is used as a parameter to Socket.close and RawSocket.close to close a socket in the specified direction(s).
SocketMessage
A socket message received by a RawDatagramSocket.
SocketOption
An option for a socket which is configured using Socket.setOption.
Stdin
The standard input stream of the process.
StdioType
The type of object a standard IO stream can be attached to.
Stdout
An IOSink connected to either the standard out or error of the process.
Stream<T>
A source of asynchronous data events.
StreamConsumer<S>
Abstract interface for a "sink" accepting multiple entire streams.
StreamController<T>
A controller with the stream it controls.
StreamIterator<T>
An Iterator-like interface for the values of a Stream.
StreamSink<S>
A object that accepts stream events both synchronously and asynchronously.
StreamSubscription<T>
A subscription on events from a Stream.
StreamTransformer<S, T>
Transforms a Stream.
StreamTransformerBase<S, T>
Base class for implementing StreamTransformer.
StreamView<T>
Stream wrapper that only exposes the Stream interface.
SynchronousStreamController<T>
A stream controller that delivers its events synchronously.
SystemEncoding
The system encoding is the current code page on Windows and UTF-8 on Linux and Mac.
ThisModel<T extends BaseModel>
A class that extends BaseModel and provides a reference to itself.
Timer
A countdown timer that can be configured to fire once or repeatedly.
TlsProtocolVersion
A Transport Layer Security (TLS) version.
TypeCode
TypeCodeMapper
TypeMappers
UseResult
See useResult for more details.
ValidArgsChecker
Provides a mechanism to check if command line args are valid or not.
Version
A version class that can be used to compare versions.
WebSocket
A two-way HTTP communication object for client or server applications.
WebSocketStatus
WebSocket status codes used when closing a WebSocket connection.
WebSocketTransformer
The WebSocketTransformer provides the ability to upgrade a HttpRequest to a WebSocket connection. It supports both upgrading a single HttpRequest and upgrading a stream of HttpRequests.
WritePipe
The "write" end of an Pipe created by Pipe.create.
X509Certificate
X509Certificate represents an SSL certificate, with accessors to get the fields of the certificate.
ZLibCodec
The ZLibCodec encodes raw bytes to ZLib compressed bytes and decodes ZLib compressed bytes to raw bytes.
ZLibDecoder
The ZLibDecoder is used by ZLibCodec and GZipCodec to decompress data.
ZLibEncoder
The ZLibEncoder encoder is used by ZLibCodec and GZipCodec to compress data.
ZLibOption
Exposes ZLib options for input parameters.
Zone
A zone represents an environment that remains stable across asynchronous calls.
ZoneDelegate
An adapted view of the parent zone.
ZoneSpecification
A parameter object with custom zone function handlers for Zone.fork.

Enums

CelestialRadius
DistanceUnit
HttpClientResponseCompressionState
Enum that specifies the compression state of the byte stream of an HttpClientResponse.
StringCaseType
Enum for different string case types.

Mixins

EquatableMixin
A mixin that helps implement equality without needing to explicitly override operator == and hashCode.
TypeMessageMixin
A mixin that provides a message property.

Extensions

BodyJsonOnResponseExtension on Response
CalculateBestCentereOnLocationPackageExtension on LocationUtils
CalculateGeometricCentereOnLocationPackageExtension on LocationUtils
CalculateHavershire3DDistanceOnLocationPackageExtension on LocationUtils
CalculateZoomToFitOnLocationPackageExtension on LocationUtils
CalculatorOnScreenSizeExtension on ScreenSize
ConvertOnStringCaseTypeExtension on StringCaseType
DataRefModelExtension on DataRefModel
FirstWhereOrNullOnIterableExtension on Iterable<T>
FirstWhereOrNullOnListExtension on List<T>
FirstWhereOrNullOnMapExtension on Map<K, V>
FirstWhereOrNullOnSetExtension on Set<T>
FutureExtensions on Future<T>
Convenience methods on futures.
FutureIterable on Iterable<Future<T>>
FutureRecord2 on (Future<T1>, Future<T2>)
Parallel operations on a record of futures.
FutureRecord3 on (Future<T1>, Future<T2>, Future<T3>)
Parallel operations on a record of futures.
FutureRecord4 on (Future<T1>, Future<T2>, Future<T3>, Future<T4>)
Parallel operations on a record of futures.
FutureRecord5 on (Future<T1>, Future<T2>, Future<T3>, Future<T4>, Future<T5>)
Parallel operations on a record of futures.
FutureRecord6 on (Future<T1>, Future<T2>, Future<T3>, Future<T4>, Future<T5>, Future<T6>)
Parallel operations on a record of futures.
FutureRecord7 on (Future<T1>, Future<T2>, Future<T3>, Future<T4>, Future<T5>, Future<T6>, Future<T7>)
Parallel operations on a record of futures.
FutureRecord8 on (Future<T1>, Future<T2>, Future<T3>, Future<T4>, Future<T5>, Future<T6>, Future<T7>, Future<T8>)
Parallel operations on a record of futures.
FutureRecord9 on (Future<T1>, Future<T2>, Future<T3>, Future<T4>, Future<T5>, Future<T6>, Future<T7>, Future<T8>, Future<T9>)
Parallel operations on a record of futures.
GenericTypeOnIterableExtension on Iterable<T>
GenericTypeOnMapExtension on Map<K, V>
JoinWithLastSeparatorOnIterableExtension on Iterable
LNullIfEmptyOnListExtension on List<T>
MapIOnIterableExtension on Iterable<A>
MapIOnListExtension on List<A>
MapIOnMapExtension on Map<A1, A2>
MapIOnSetExtension on Set<A>
MapKeysAndValyesOnMapExtension on Map<K1, V1>
MapWithDefaultOnMapExtension on Map<K, V>
MaybeAddToIterableExtension on Iterable<T>
MaybeAddToListExtension on List<T>
MaybeAddToMapExtension on Map<T1, T2>
MaybeAddToSetExtension on Set<T>
MiscOnStringExtension on String
NonNullKeysOnMapExtension on Map<K?, V>
NonNullsOnMapExtension on Map<K?, V?>
NonNullValuesOnMapExtension on Map<K, V?>
NullIfEmptyOnIterableExtension on Iterable<T>
NullIfEmptyOnMapExtension on Map<T1, T2>
NullIfEmptyOnQueueExtension on Queue<T>
NullIfEmptyOnSetExtension on Set<T>
NullIfEmptyOnStringExtension on String
ParseDurationOnStringExtension on String
PrepOnStringExtension on String
ReplaceAllPatternsOnStringExtension on String
ReplaceDataOnStringExtension on String
ResponseHandleExceptionsOnFutureExtension on Future<Response>
SecondToNinthElementOnIterableExtension on Iterable<T>
SetNestedValueOnMapExtension on Map
StringCaseConversionsOnStringExtension on String
TakeLastOnIterableExtension on Iterable<String>
ToClassOnTFieldRecordExtension on TFieldRecord
ToFutureOnStreamExtension on Stream<T>
ToMapOnIterableExtension on Iterable<MapEntry<K, V>>
ToTrimmedOrNullOnObjectExtension on Object
TryMergeOnIterableExtension on Iterable<Iterable<T>?>
TryOrNullOnFunctionExtension on Function
TryReduceOnIterableExtension on Iterable<T>
UniqueOnMapEntryIterableExtension on Iterable<MapEntry<K, V>>
UtilsOnDateTimeExtension on DateTime
ValueOfOnEnumExtension on Iterable<T>
WithAnsiStyleOnStringExtension on String

Constants

alwaysThrows → const _AlwaysThrows
Used to annotate a function f. Indicates that f always throws an exception. Any functions that override f, in class inheritance, are also expected to conform to this contract.
awaitNotRequired → const _AwaitNotRequired
Used to annotate a Future-returning function (including constructors, getters, methods, and operators), or a Future-typed field (including top-level, instance, and static) f. Indicates that the Future value that f returns does not need to be awaited. Any methods that override f in class inheritance, are also expected to conform to this contract.
CAMEL_CASE → const String
A key representing camel case.
CAMEL_CASE_EXAMPLE → const String
Camel case example.
checked → const _Checked
Used to annotate a parameter of an instance method that overrides another method.
CONTENT_TYPE_APPLICATION_JSON → const Map<String, String>
doNotStore → const _DoNotStore
Used to annotate a method, getter, top-level function, or top-level getter to indicate that the value obtained by invoking it should not be stored in a field or top-level variable. The annotation can also be applied to a class to implicitly annotate all of the valid members of the class, or applied to a library to annotate all of the valid members of the library, including classes. If a value returned by an element marked as doNotStore is returned from a function or getter, that function or getter should be similarly annotated.
doNotSubmit → const _DoNotSubmit
Used to annotate an optional parameter, method, getter or top-level getter or function that is not intended to be accessed in checked-in code, but might be ephemerally used during development or local testing.
experimental → const _Experimental
Used to annotate a library, or any declaration that is part of the public interface of a library (such as top-level members, class members, and function parameters) to indicate that the annotated API is experimental and may be removed or changed at any-time without updating the version of the containing package, despite the fact that it would otherwise be a breaking change.
factory → const _Factory
Used to annotate an instance or static method m. Indicates that m must either be abstract or must return a newly allocated object or null. In addition, every method that either implements or overrides m is implicitly annotated with this same annotation.
gzip → const GZipCodec
An instance of the default implementation of the GZipCodec.
immutable → const Immutable
Used to annotate a class C. Indicates that C and all subtypes of C must be immutable.
internal → const _Internal
Used to annotate a declaration which should only be used from within the package in which it is declared, and which should not be exposed from said package's public API.
isTest → const _IsTest
Used to annotate a test framework function that runs a single test.
isTestGroup → const _IsTestGroup
Used to annotate a test framework function that runs a group of tests.
literal → const _Literal
Used to annotate a const constructor c. Indicates that any invocation of the constructor must use the keyword const unless one or more of the arguments to the constructor is not a compile-time constant.
LOWER_DOT_CASE → const String
A key representing lower dot case.
LOWER_DOT_CASE_EXAMPLE → const String
Lower dot case example.
LOWER_KEBAB_CASE → const String
A key representing lower kebab case.
LOWER_KEBAB_CASE_EXAMPLE → const String
Lower kebab case example.
LOWER_SNAKE_CASE → const String
A key representing lower snake case.
LOWER_SNAKE_CASE_EXAMPLE → const String
Lower snake case example.
MIN_MOBILE_ASPECT_RATIO → const double
The smallest of the following common aspect ratios for mobile phones (4.0 / 3.0)
mustBeConst → const _MustBeConst
Used to annotate a parameter which should be constant.
mustBeOverridden → const _MustBeOverridden
Used to annotate an instance member m declared on a class or mixin C. Indicates that every concrete subclass of C must directly override m.
mustCallSuper → const _MustCallSuper
Used to annotate an instance member (method, getter, setter, operator, or field) m. Indicates that every invocation of a member that overrides m must also invoke m. In addition, every method that overrides m is implicitly annotated with this same annotation.
nonVirtual → const _NonVirtual
Used to annotate an instance member (method, getter, setter, operator, or field) m in a class C or mixin M. Indicates that m should not be overridden in any classes that extend or mixin C or M.
optionalTypeArgs → const _OptionalTypeArgs
Used to annotate a class, mixin, extension, function, method, or typedef declaration C. Indicates that any type arguments declared on C are to be treated as optional.
PASCAL_CASE → const String
A key representing pascal case.
PASCAL_CASE_EXAMPLE → const String
Pascal case example.
PATH_CASE → const String
A key representing path case.
PATH_CASE_EXAMPLE → const String
Path case example.
protected → const _Protected
Used to annotate an instance member in a class or mixin which is meant to be visible only within the declaring library, and to other instance members of the class or mixin, and their subtypes.
redeclare → const _Redeclare
Used to annotate an instance member of an extension type that redeclares a member from a superinterface.
reopen → const _Reopen
Annotation for intentionally loosening restrictions on subtyping that would otherwise cause lint warnings to be produced by the implicit_reopen lint.
required → const Required
Used to annotate a named parameter p in a method or function f. Indicates that every invocation of f must include an argument corresponding to p, despite the fact that p would otherwise be an optional parameter.
sealed → const _Sealed
Annotation marking a class as not allowed as a super-type outside of the current package.
systemEncoding → const SystemEncoding
The current system encoding.
T_CAMEL_CASE_STRING → const String
T_LOWER_CASE_STRING → const String
T_LOWER_KEBAB_CASE_STRING → const String
T_LOWER_SNAKE_CASE_STRING → const String
T_PASCAL_CASE_STRING → const String
T_SEARCHABLE_STRING → const String
T_UPPER_CASE_STRING → const String
T_UPPER_KEBAB_CASE_STRING → const String
T_UPPER_SNAKE_CASE_STRING → const String
UPPER_DOT_CASE → const String
A key representing upper dot case.
UPPER_DOT_CASE_EXAMPLE → const String
Upper dot case example.
UPPER_KEBAB_CASE → const String
A key representing upper kebab case.
UPPER_KEBAB_CASE_EXAMPLE → const String
Upper kebab case example.
UPPER_SNAKE_CASE → const String
A key representing upper snake case.
UPPER_SNAKE_CASE_EXAMPLE → const String
Upper snake case example.
useResult → const UseResult
Used to annotate a method, field, or getter within a class, mixin, or extension, or a or top-level getter, variable or function to indicate that the value obtained by invoking it should be used. A value is considered used if it is assigned to a variable, passed to a function, or used as the target of an invocation, or invoked (if the result is itself a function).
virtual → const _Virtual
Used to annotate a field that is allowed to be overridden in Strong Mode.
visibleForOverriding → const _VisibleForOverriding
Used to annotate an instance member that was made public so that it could be overridden but that is not intended to be referenced from outside the defining library.
visibleForTesting → const _VisibleForTesting
Used to annotate a declaration that was made public, so that it is more visible than otherwise necessary, to make code testable.
zlib → const ZLibCodec
An instance of the default implementation of the ZLibCodec.

Properties

commentAnnotationRegExp RegExp
final
currentScriptDir String
no setter
exitCode int
Get the global exit code for the Dart VM.
getter/setter pair
langFileCommentStarters Map<String, String>
final
let → T? Function<T>(dynamic input)
Alias for letOrNull.
final
letAs → T? Function<T>(dynamic input)
Alias for letAsOrNull.
final
letAsJMap Map<String, dynamic>? Function(dynamic input)
Alias for letAsJMapOrNull.
final
letBool bool? Function(dynamic input)
Alias for letBoolOrNull.
final
letDateTime DateTime? Function(dynamic input)
Alias for letDateTimeOrNull.
final
letDouble double? Function(dynamic input)
Alias for letDoubleOrNull.
final
letDuration Duration? Function(dynamic input)
Alias for letDurationOrNull.
final
letFirestoreTimestamp FirestoreTimestamp? Function(dynamic input)
Alias for letFirestoreTimestampOrNull.
final
letInt int? Function(dynamic input)
Alias for letIntOrNull.
final
letIterable Iterable<T>? Function<T>(dynamic input, {bool filterNulls = false, dynamic nullFallback})
Alias for letIterableOrNull.
final
letList List<T>? Function<T>(dynamic input, {bool filterNulls = false, T? nullFallback})
Alias for letListOrNull.
final
letMap Map<K, V>? Function<K, V>(dynamic input, {bool filterNulls = false, dynamic nullFallback})
Alias for letMapOrNull.
final
letNum num? Function(dynamic input)
Alias for letNumOrNull.
final
letSet Set<T>? Function<T>(dynamic input, {bool filterNulls = false, T? nullFallback})
Alias for letSetOrNull.
final
letUri Uri? Function(dynamic input)
Alias for letUriOrNull.
final
minMobileAspectRatio double
The smallest of the following common aspect ratios for mobile phones (4.0 / 3.0)
no setter
pid int
Returns the PID of the current process.
no setter
prepRegExp RegExp
final
stderr Stdout
The standard output stream of errors written by this program.
no setter
stdin Stdin
The standard input stream of data read by this program.
no setter
stdout Stdout
The standard output stream of data written by this program.
no setter

Functions

analyzeAnnotatedClasses({required String filePath, required AnalysisContextCollection collection, RegExp? classNamePattern, RegExp? methodNamePattern, RegExp? memberNamePattern, Set<String>? classAnnotations, Set<String>? methodAnnotations, Set<String>? memberAnnotations, FutureOr<void> onAnnotatedClass(String classAnnotationName, String className)?, FutureOr<void> onClassAnnotationField(String fieldName, DartObject fieldValue)?, FutureOr<void> onAnnotatedMethod(String methodAnnotationName, String methodName, String methodType)?, FutureOr<void> onMethodAnnotationField(String fieldName, DartObject fieldValue)?, FutureOr<void> onAnnotatedMember(String memberAnnotationName, String memberName, String memberType)?, FutureOr<void> onMemberAnnotationField(String fieldName, DartObject fieldValue)?}) Future<void>
Analyzes all classes in a Dart file and calls the provided functions on a class, method, or member annotation.
analyzeAnnotatedEnums({required String filePath, required AnalysisContextCollection collection, RegExp? enumNamePattern, Set<String>? enumAnnotations, FutureOr<void> onAnnotatedEnum(String enumAnnotationName, String enumName)?}) Future<void>
Analyzes all enums in a Dart file.
analyzeModelFromFile({required AnalysisContextCollection collection, required String inputFilePath, Future<GenerateModel> generate(String classAnnotationName, String annotatedClassName, GenerateModel annotation)?}) Future<GenerateModel?>
analyzeModels({String? fallbackDartSdkPath, required Set<String> rootDirPaths, Set<String> subDirPaths = const {}, void onAnnotation(String filePath, GenerateModel annotation)?}) Future<void>
basicCmdAppHelper<T extends ValidArgsChecker>({required String appTitle, required List<String> arguments, required ArgParser parser, required T onResults(ArgParser, ArgResults), required Future<void> action(ArgParser, ArgResults, T)}) Future<void>
A helper for creating a basic command-line app.
castAsOrNull<T>(dynamic input) → T?
Similar to letAsOrNull, but uses a try-catch block internally.
clearFile(String filePath) Future<void>
Clears the contents of the file located at filePath.
combinedOrderedStringId(List<String> ids) String
Generates an ordered ID from a list of unordered IDs, that can be used to identify the list of IDs.
combinePathSets(List<Set<String>> pathSets) Set<String>
Combines multiple pathSets into a single set, returning all possible combinations.
convertToStringCaseType(String value, StringCaseType? stringCaseType) String
Converts a string to a specific case type.
createAnalysisContextCollection(Set<String> paths, String? fallbackDartSdkPath) AnalysisContextCollection
Creates an AnalysisContextCollection from a set of paths. This is used to analyze Dart files. The fallbackDartSdkPath is used if the DART_SDK environment variable is not set.
csvToMap(String input) Map<int, List<String>>
Converts a CSV string to a map.
dayAgo(DateTime date, String tr(String), String locale) String
Returns a string representing the day ago from the given date. Requires a translation function tr to translate the string into the given locale.
debugLog(dynamic message, [Symbol? group, Rec? rec]) → void
⚪️ Logs a message to the console.
debugLogAlert(dynamic message, [Symbol? group, Rec? rec]) → void
🟠 Logs an alert message to the console.
debugLogError(dynamic message, [Symbol? group, Rec? rec]) → void
🔴 Logs an error message to the console.
debugLogIgnore(dynamic message, [Symbol? group, Rec? rec]) → void
🟡 Logs an ignore message to the console.
debugLogInfo(dynamic message, [Symbol? group, Rec? rec]) → void
🟣 Logs an info message to the console.
debugLogMessage(dynamic message, [Symbol? group, Rec? rec]) → void
🟤 Logs a debug message to the console.
debugLogStart(dynamic message, [Symbol? group, Rec? rec]) → void
🔵 Logs a start message to the console.
debugLogStop(dynamic message, [Symbol? group, Rec? rec]) → void
⚫ Logs a stop message to the console.
debugLogSuccess(dynamic message, [Symbol? group, Rec? rec]) → void
🟢 Logs a success message to the console.
decomposeCollectionTypeCode(String typeCode) Iterable<List<String>>
Decomposes a complex typeCode into its constituent parts in preparation for being processed by the builder.
deleteFile(String filePath) Future<void>
Deletes the file located at filePath.
deleteGeneratedDartFile(String filePath, {void onDelete(String filePath)?, Set<String> pathPatterns = const {}}) Future<void>
Deletes the .g.dart file at filePath.
deleteGeneratedDartFiles(String dirPath, {void onDelete(String filePath)?, Set<String> pathPatterns = const {}}) Future<void>
Deletes all the .g.dart files form dirPath and its sub-directories.
exit(int code) → Never
Exit the Dart VM process immediately with the given exit code.
expandFlattenedJson(Map input, {String separator = '.'}) Map
Expands a flattened JSON map, e.g. {'a.b': 1} to {a.b: 1, b: 1}.
expandJson(Map input, {String separator = '.'}) Map
Expands a Json map, e.g. {'a': {'b': 1}} to {a.b: 1, b: 1}.
extractScopes(String source, String opening, String closing) Iterable<String>
Extracts nested scopes from a source string based on opening and closing delimiters.
fileExists(String filePath) Future<bool>
Returns true if the file located at filePath exists.
filterMappersByType(TTypeMappers mappers, String type) TTypeMappers
Searches mappers for mappers that match the given type and returns them.
findFileByName(String fileName, String directoryPath) Future<File?>
Finds a file with the given fileName in the directory located at directoryPath. Returns null if the directory does not exist or if the
findFiles(String rootDirPath, {Set<String> extensions = const {}, Set<String> pathPatterns = const {}, Future<bool> onFileFound(String dirPath, String folderName, String filePath)?}) Future<List<FindFileResult>>
Finds all the dart files in rootDirPath and its sub-directories.
findGeneratedDartFiles(String rootDirPath, {Set<String> pathPatterns = const {}, Future<bool> onFileFound(String dirPath, String folderName, String filePath)?}) Future<List<FindFileResult>>
Finds all the generated dart files in rootDirPath and its sub-directories.
fixDartFile(String filePath) Future<void>
Applies fixes to the dart file at filePath.
flattenJson(Map input, {String separator = '.'}) Map
Flattens a nested JSON object into a single-level map with string keys.
fmtDartFile(String filePath) Future<void>
Formats the dart file at filePath.
generateDirectives({Set<String> rootDirPaths = const {}, Set<String> subDirPaths = const {}, Set<String> pathPatterns = const {}}) Future<void>
generateDirectivesApp(List<String> arguments) Future<void>
generateDirectivesHandler(int startIndex, List<String> lines, String filePath) Future<bool>
Handles the case where the code is annotated with @GenerateDirectives.
generateExports({required String templateFilePath, required Set<String> rootDirPaths, Set<String> subDirPaths = const {}, Set<String> pathPatterns = const {}}) Future<void>
generateExportsApp(List<String> arguments) Future<void>
A command line app for generating exports.
generateForAnnotationTest({String? fallbackDartSdkPath, Set<String> rootDirPaths = const {}, Set<String> subDirPaths = const {}, Set<String> pathPatterns = const {}}) Future<void>
generateForAnnotationTestApp(List<String> arguments) Future<void>
generateForFiles({Set<String> rootDirPaths = const {}, Set<String> subDirPaths = const {}, Set<String> pathPatterns = const {}}) Future<void>
generateForFilesTestApp(List<String> arguments) Future<void>
generateFromTemplates({String? fallbackDartSdkPath, required Set<String> rootDirPaths, Set<String> subDirPaths = const {}, required Future<void> generateForFile(AnalysisContextCollection collection, String filePath, Map<String, String> templates, String? output), required Set<String> templateFilePaths, String begType = '', Set<String> pathPatterns = const {}, bool deleteGeneratedFiles = false, void onDelete(String filePath)?, String? output}) Future<void>
A helper for generating code from templates.
generateLicenseHeaders({Set<String> rootDirPaths = const {}, Set<String> subDirPaths = const {}, Set<String> pathPatterns = const {}, required String templateFilePath}) Future<void>
generateLicenseHeadersApp(List<String> arguments) Future<void>
A command line app for generating license headers.
generateMakeups({String? fallbackDartSdkPath, required Set<String> rootPaths, Set<String> subDirPaths = const {}, Set<String> pathDirPatterns = const {}, required String? outputDirPath, required String classTemplateFilePath, required String builderTemplateFilePath, required String generatedThemeTemplateFilePath, required String generateTemplateFilePath}) Future<void>
generateMakeupsApp(List<String> arguments) Future<void>
A command line app for generating makeups.
generateModel({required String inputFilePath, required Map<String, String> templates, required GenerateModel annotation, required String annotatedClassName, String? output, bool dryRun = false}) Future<GenerateModel>
generateModels({String? fallbackDartSdkPath, required Set<String> rootDirPaths, Set<String> subDirPaths = const {}, Set<String> pathPatterns = const {}, required Set<String> templateFilePaths, String? output}) Future<void>
generateModelsApp(List<String> arguments) Future<void>
A command line app for generating models.
generatePreps({Set<String> rootDirPaths = const {}, Set<String> subDirPaths = const {}, Set<String> pathPatterns = const {}, List<String? Function(String, String?)> prepMappers = const []}) Future<void>
generatePrepsApp(List<String> arguments) Future<void>
A command line app for generating preps.
generateScreen({String? fallbackDartSdkPath, required String outputDirPath, required String screenName, required String controllerTemplateFilePath, required String screenTemplateFilePath, required String viewTemplateFilePath, required String bindingsTemplateFilePath, String path = '', bool isAccessibleOnlyIfLoggedIn = false, bool isAccessibleOnlyIfLoggedInAndVerified = false, bool isAccessibleOnlyIfLoggedOut = false, bool isRedirectable = false, Map<String, String> internalParameters = const {}, Set<String> queryParameters = const {}, String makeup = '', String title = '', Set<String> partFileDirs = const {}}) Future<void>
generateScreenAccess({required String templateFilePath, required String outputFilePath, Set<String> rootDirPaths = const {}, Set<String> subDirPaths = const {}, Set<String> pathPatterns = const {}, Set<String> screenClassNames = const {}}) Future<void>
generateScreenAccessApp(List<String> arguments) Future<void>
A command line app for generating screen access.
generateScreenBindings({String? fallbackDartSdkPath, required String templateFilePath, required Set<String> rootDirPaths, Set<String> subDirPaths = const {}, Set<String> pathPatterns = const {}}) Future<Set<String>>
Note: Returns all the annotated screen class names.
generateScreenBindingsApp(List<String> arguments) Future<void>
A command line app for generating screen bindings.
generateScreensApp(List<String> arguments) Future<void>
A command line app for generating screens.
generateTypeUtils({String? fallbackDartSdkPath, required Set<String> rootDirPaths, Set<String> subDirPaths = const {}, Set<String> pathPatterns = const {}, required String templateFilePath}) Future<void>
generateTypeUtilsApp(List<String> arguments) Future<void>
getBaseName(String path) String
Returns the base name of a given file path.
getDesktopPath() String
Gets the current Operating System's Desktop path.
getDirPath(String path) String
Returns the directory path of a given file path.
getFileNameWithoutExtension(String filePath) String
Converts the given filePath to a consistent, local path format.
getFirstDate(Iterable<DateTime>? dates) DateTime?
Returns the first date in the list of dates.
getLastDate(Iterable<DateTime>? dates) DateTime?
Returns the last date in the list of dates.
getPackageLibPath(String package) Future<String?>
Returns the path of the lib directory of package or null if the package is not found.
getSetDifference<T>(Set<T> before, Set<T> after) Set<T>
Returns the difference between two sets.
getSourcePath(String filePath) String?
Returns the associated source Dart file path of a generated Dart file or null if not a Dart file (the file path without the ".g" if present).
getXyzGenDefaultTemplate(String templateName) Future<String>
Returns the content of the default template file with the given templateName.
getXyzGenDefaultTemplateFilePath(String templateName) Future<String>
Returns the path of the default template file with the given templateName.
getXyzGenLibPath() Future<String>
Returns the full path of the xyz_gen\lib directory.
handleCommentAnnotations({required String filePath, required Map<String, Future<bool> Function(int, List<String>, String)> annotationHandlers, required Set<String> annotationsToDelete}) Future<void>
isDartFilePath(String filePath) bool
Whether filePath ends with ".dart".
isGeneratedDartFilePath(String filePath) bool
Whether filePath ends with ".g.dart".
isMatchingFileName(String filePath, String begType, String endType) → ({String fileName, bool status})
Checks if the file name extracted from filePath matches the specified beginning type begType and ending type endType.
isNullable<T>() bool
Returns true if T is nullable.
isPrivateFileName(String filePath) bool
Checks if the provided filePath is a private file (starts with an underscore).
isSameDay(DateTime date1, DateTime date2) bool
Checks if two dates are on the same day.
isSameMonth(DateTime date1, DateTime date2) bool
Checks if two dates are on the same month.
isSameWeek(DateTime date1, DateTime date2) bool
Checks if two dates are on the same week.
isSourceDartFilePath(String filePath) bool
Whether filePath ends with ".dart" and does not end with ".g.dart".
jsonDecode(String source, {Object? reviver(Object? key, Object? value)?}) → dynamic
Parses the string and returns the resulting Json object.
jsonEncode(Object? object, {Object? toEncodable(Object? nonEncodable)?}) String
Converts object to a JSON string.
letAsJMapOrNull(dynamic input) Map<String, dynamic>?
Let's you cast input to a Map<String, dynamic> type if possible, or returns null if the cast cannot be performed.
letAsOrNull<T>(dynamic input) → T?
Let's you cast input to a T type if possible, or returns null if the cast cannot be performed.
letBoolOrNull(dynamic input) bool?
Let's you convert input to a bool type if possible, or returns null if the conversion cannot be performed.
letDateTimeOrNull(dynamic input) DateTime?
Let's you convert input to a DateTime type if possible, or returns null if the conversion cannot be performed.
letDoubleOrNull(dynamic input) double?
Let's you convert input to a double type if possible, or returns null if the conversion cannot be performed.
letDurationOrNull(dynamic input) Duration?
Let's you convert input to a Duration type if possible, or returns null if the conversion cannot be performed.
letFirestoreTimestampOrNull(dynamic input) FirestoreTimestamp?
Let's you convert input to a FirestoreTimestamp type if possible, or returns null if the conversion cannot be performed.
letIntOrNull(dynamic input) int?
Let's you convert input to an int type if possible, or returns null if the conversion cannot be performed.
letIterableFromCommaSeparatedString(String input) Iterable<String>
Let's you convert input to an Iterable of Strings if possible, or returns null if the conversion cannot be performed.
letIterableOrNull<T>(dynamic input, {bool filterNulls = false, dynamic nullFallback}) Iterable<T>?
Let's you convert input to an Iterable type if possible, or returns null if the conversion cannot be performed.
letListOrNull<T>(dynamic input, {bool filterNulls = false, T? nullFallback}) List<T>?
Let's you convert input to a List type if possible, or returns null if the conversion cannot be performed.
letMapOrNull<K, V>(dynamic input, {bool filterNulls = false, dynamic nullFallback}) Map<K, V>?
Let's you convert input to a Map type if possible, or returns null if the conversion cannot be performed.
letNumOrNull(dynamic input) num?
Let's you convert input to a num type if possible, or returns null if the conversion cannot be performed.
letOrNull<T>(dynamic input) → T?
Let's you convert input to a T type if possible, or returns null if the conversion cannot be performed.
letSetOrNull<T>(dynamic input, {bool filterNulls = false, T? nullFallback}) Set<T>?
Let's you convert input to a Set type if possible, or returns null if the conversion cannot be performed.
letUriOrNull(dynamic input) Uri?
Let's you convert input to a Uri type if possible, or returns null if the conversion cannot be performed.
listFilePaths(String dirPath, {bool recursive = true}) Future<List<String>?>
Lists the file paths of the files in the directory located at dirPath. Set recursive to true to list the file paths of the files in the sub-directories as well.
mapToCsv(Map input) String
Converts a map to a CSV string.
mapToJson<T1, T2>(Map<T1, T2> input, {Set<Type> typesAllowed = const {}, String? keyConverter(dynamic)?}) Json
Converts a map to a Json map by recursively converting its keys and values to Json compatible types.
mapWithFromMappers({required TypeMappers typeMappers, required String fieldName, required String typeCode}) String
mapWithToMappers({required TypeMappers typeMappers, required String fieldName, required String typeCode}) String
matchesAnyExtension(String filePath, Set<String> extensions, {bool caseSensitive = true}) bool
Checks if the provided filePath matches any of the specified extensions.
matchesAnyExtensions(String filePath, Set<String> extensions, {bool caseSensitive = true}) bool
Whether filePath ends with extension.
matchesAnyPathPattern(String path, Set<String> pathPatterns) bool
Checks if the provided path matches any of the specified pathPatterns.
maybeAddToIterable<T>(Iterable<T>? source, Iterable<T>? add) Iterable<T>?
Adds add to source if both are not null.
maybeAddToList<T>(List<T>? source, List<T>? add) List<T>?
Adds add to source if both are not null.
maybeAddToMap<T1, T2>(Map<T1, T2>? source, Map<T1, T2>? add) Map<T1, T2>?
Adds add to source if both are not null.
maybeAddToSet<T>(Set<T>? source, Set<T>? add) Set<T>?
Adds add to source if both are not null.
mergeDataDeep(dynamic a, dynamic b, [dynamic elseFilter(dynamic)?]) → dynamic
Merges two data structures deeply.
mergeDataDeepIncludeCallsToJson(dynamic a, dynamic b) → dynamic
Merges two data structures deeply and tries to perform toJson on objects.
mergeDataDeepIncludeCallsToMap(dynamic a, dynamic b) → dynamic
Merges two data structures deeply and tries to perform toMap on objects.
mergeIterables(dynamic a, dynamic b) Iterable
Merges two iterables into one iterable.
mergeListsSetsOrQueues(Iterable a, Iterable b) Iterable
Merges two Iterables into one. Supported Iterable types are List, Set, and Queue.
mergeMapsDeep<K, V>(List<Map<K, V>> maps) Map<K, V>
Merges all maps deeply.
newTypeMappers(TTypeMappers input) TTypeMappers
nullFilteredList<T>(Iterable input) List<T>
Converts input to a List with non-null elements if T is non-null.
nullFilteredMap<K, V>(Map input) Map<K, V>
Converts input to a Map with non-null keys and values if K and V are non-null.
nullFilteredSet<T>(Iterable input) Set<T>
Converts input to a Set with non-null elements if T is non-null.
nullIfEmpty<T>(T value) → T?
Returns null if value is empty, otherwise returns value.
pathContainsComponent(String path, Set<String> components) bool
Checks if the provided path contains any of the specified components. This operation is case-insensitive.
pollingStream<T>(Future<T> callback(), Duration interval) Stream<T>
Creates a Stream that polls a callback at a specified interval.
printBlack(Object? message) → void
Prints the message in black using AnsiStyle.
printBlue(Object? message) → void
Prints the message in blue using AnsiStyle.
printCyan(Object? message) → void
Prints the message in cyan using AnsiStyle.
printGreen(Object? message) → void
Prints the message in green using AnsiStyle.
printLightBlack(Object? message) → void
Prints the message in light black using AnsiStyle.
printLightBlue(Object? message) → void
Prints the message in light blue using AnsiStyle.
printLightCyan(Object? message) → void
Prints the message in light cyan using AnsiStyle.
printLightGreen(Object? message) → void
Prints the message in light green using AnsiStyle.
printLightPurple(Object? message) → void
Prints the message in light purple using AnsiStyle.
printLightRed(Object? message) → void
Prints the message in light red using AnsiStyle.
printLightWhite(Object? message) → void
Prints the message in light white using AnsiStyle.
printLightYellow(Object? message) → void
Prints the message in light yellow using AnsiStyle.
printPurple(Object? message) → void
Prints the message in purple using AnsiStyle.
printRed(Object? message) → void
Prints the message in red using AnsiStyle.
printUsage(String appTitle, ArgParser parser) → void
Prints the usage information for the given parser.
printWhite(Object? message) → void
Prints the message in white using AnsiStyle.
printYellow(Object? message) → void
Prints the message in yellow using AnsiStyle.
readFile(String filePath) Future<String?>
Reads the contents of the file located at filePath as a String.
readFileAsLines(String filePath) Future<List<String>?>
Reads the contents of the file located at filePath as a list of lines.
readSnippetsFromMarkdownFile(String filePath, {String lang = '[^\\n]+'}) Future<List<String>>
Reads all code snippets from a markdown file.
recursiveReplace(Map input, {ReplacePatternsSettings settings = const ReplacePatternsSettings()}) Map
Performs recursive replacement of string values within a map using placeholders defined by the map's own key-value pairs. It supports nested structures (maps and lists) and replaces placeholders in strings with corresponding values.
replaceData(String input, Map<Pattern, dynamic> data) String
Replaces the keys of data in input with the corresponding values.
replacePatterns(String input, Map data, {ReplacePatternsSettings settings = const ReplacePatternsSettings()}) String
Replaces placeholders in a string with corresponding values from a provided map, supporting default values and custom delimiters.
runZoned<R>(R body(), {Map<Object?, Object?>? zoneValues, ZoneSpecification? zoneSpecification, Function? onError}) → R
Runs body in its own zone.
runZonedGuarded<R>(R body(), void onError(Object error, StackTrace stack), {Map<Object?, Object?>? zoneValues, ZoneSpecification? zoneSpecification}) → R?
Runs body in its own error zone.
scheduleMicrotask(void callback()) → void
Runs a function asynchronously.
sleep(Duration duration) → void
Sleep for the duration specified in duration.
sortDates(List<DateTime> dates) List<DateTime>
Checks if two dates are on the same year.
sourceAndGeneratedDartFileExists(String filePath, [Set<String> pathPatterns = const {}]) Future<bool>
Whether the source and generated Dart files exist for filePath.
splitArg(dynamic input, [Pattern separator = '&']) Iterable<String>?
Splits the given input string by the given separator and trims each part.
stdioType(dynamic object) StdioType
Whether a stream is attached to a file, pipe, terminal, or something else.
streamToFuture<T>(Stream<T> stream) Future<T>
Waits for the first value from the Stream and returns it as a Future.
timeAgo(DateTime date, String tr(String), String locale) String
Returns a string representing the time ago from the given date. Requires a translation function tr to translate the string into the given locale.
toGenericTypeCode(String typeCode) String
Expands some non-generic Dart collection types to their generic forms (e.g. Map to Map<dynamic, dynamic>). It processes types separated by "|" and skips over collections that already specify types.
toLocalSystemPathFormat(String path) String
Replaces all forward slashes in path with the local path separator.
toUnixSystemPathFormat(String path) String
Replaces all backslashes in path with forward slashes.
toWindowsSystemPathFormat(String path) String
Replaces all forward slashes in path with backslashes.
trimmedOrNull(Object? input) String?
Converts the input to a string if it's not null and trims it or returns null if the result is empty.
tryToJson(dynamic object) → dynamic
Tries to convert an object to a json map by calling its toJson method if it exists.
tryToMap(dynamic object) → dynamic
Tries to convert an object to a map by calling its toMap method if it exists.
typeEquality<T1, T2>() bool
Returns true if T1 and T2 are the same type.
unawaited(Future<void>? future) → void
Explicitly ignores a future.
uniqueEntries<K, V>(Iterable<MapEntry<K, V>> entries) List<MapEntry<K, V>>
uniqueKeys<K, V>(Iterable<MapEntry<K, V>> entries) List<MapEntry<K, V>>
uniqueValues<K, V>(Iterable<MapEntry<K, V>> entries) List<MapEntry<K, V>>
writeFile(String filePath, String content, {bool append = false}) Future<void>
Writes the given content to the file located at filePath. Set append to true to append the content to the file instead of overwriting it.

Typedefs

BadCertificateCallback = bool Function(X509Certificate cr, String host, int port)
ControllerCallback = void Function()
Type of a stream controller's onListen, onPause and onResume callbacks.
ControllerCancelCallback = FutureOr<void> Function()
Type of stream controller onCancel callbacks.
CreatePeriodicTimerHandler = Timer Function(Zone self, ZoneDelegate parent, Zone zone, Duration period, void f(Timer timer))
The type of a custom Zone.createPeriodicTimer implementation function.
CreateTimerHandler = Timer Function(Zone self, ZoneDelegate parent, Zone zone, Duration duration, void f())
The type of a custom Zone.createTimer implementation function.
DataRef = DataRefModel
ErrorCallbackHandler = AsyncError? Function(Zone self, ZoneDelegate parent, Zone zone, Object error, StackTrace? stackTrace)
The type of a custom Zone.errorCallback implementation function.
ForkHandler = Zone Function(Zone self, ZoneDelegate parent, Zone zone, ZoneSpecification? specification, Map<Object?, Object?>? zoneValues)
The type of a custom Zone.fork implementation function.
FTranslate = String Function(String input, Map args)
HandleUncaughtErrorHandler = void Function(Zone self, ZoneDelegate parent, Zone zone, Object error, StackTrace stackTrace)
The type of a custom Zone.handleUncaughtError implementation function.
Json = Map<String, dynamic>
A type alias for a Json map.
PrintHandler = void Function(Zone self, ZoneDelegate parent, Zone zone, String line)
The type of a custom Zone.print implementation function.
RegisterBinaryCallbackHandler = ZoneBinaryCallback<R, T1, T2> Function<R, T1, T2>(Zone self, ZoneDelegate parent, Zone zone, R f(T1 arg1, T2 arg2))
The type of a custom Zone.registerBinaryCallback implementation function.
RegisterCallbackHandler = ZoneCallback<R> Function<R>(Zone self, ZoneDelegate parent, Zone zone, R f())
The type of a custom Zone.registerCallback implementation function.
RegisterUnaryCallbackHandler = ZoneUnaryCallback<R, T> Function<R, T>(Zone self, ZoneDelegate parent, Zone zone, R f(T arg))
The type of a custom Zone.registerUnaryCallback implementation function.
RunBinaryHandler = R Function<R, T1, T2>(Zone self, ZoneDelegate parent, Zone zone, R f(T1 arg1, T2 arg2), T1 arg1, T2 arg2)
The type of a custom Zone.runBinary implementation function.
RunHandler = R Function<R>(Zone self, ZoneDelegate parent, Zone zone, R f())
The type of a custom Zone.run implementation function.
RunUnaryHandler = R Function<R, T>(Zone self, ZoneDelegate parent, Zone zone, R f(T arg), T arg)
The type of a custom Zone.runUnary implementation function.
ScheduleMicrotaskHandler = void Function(Zone self, ZoneDelegate parent, Zone zone, void f())
The type of a custom Zone.scheduleMicrotask implementation function.
TCallback<T> = Future Function(dynamic callbackKey, T param)
TFieldRecord = ({List<String>? fieldPath, String? fieldType, bool? nullable})
A record representing a field. Similar to Field.
THttpFunctionResult = ({Response? response, bool success})
TLocationComponents = ({double altitude, double latitude, double longitude})
TStdField = ({String fieldName, String fieldType, bool? nullable})
TTypeMappers = Map<String, String Function(MapperEvent)>
ZoneBinaryCallback<R, T1, T2> = R Function(T1, T2)
ZoneCallback<R> = R Function()
ZoneUnaryCallback<R, T> = R Function(T)

Exceptions / Errors

AsyncError
An error and a stack trace.
CertificateException
An exception that happens in the handshake phase of establishing a secure network connection, when looking up or verifying a certificate.
DeferredLoadException
Thrown when a deferred library fails to load.
FileSystemException
Exception thrown when a file operation fails.
HandshakeException
An exception that happens in the handshake phase of establishing a secure network connection.
HttpException
IOException
Base class for all IO related exceptions.
OSError
An Exception holding information about an error from the operating system.
ParallelWaitError<V, E>
Error thrown when waiting for multiple futures, when some have errors.
PathAccessException
Exception thrown when a file operation fails because the necessary access rights are not available.
PathExistsException
Exception thrown when a file operation fails because the target path already exists.
PathNotFoundException
Exception thrown when a file operation fails because a file or directory does not exist.
ProcessException
RedirectException
SignalException
SocketException
Exception thrown when a socket operation fails.
StdinException
Exception thrown by some operations of Stdin
StdoutException
Exception thrown by some operations of Stdout
TimeoutException
Thrown when a scheduled timeout happens while waiting for an async result.
TlsException
A secure networking exception caused by a failure in the TLS/SSL protocol.
WebSocketException