core/core library

Classes

BytesBuilder
Builds a list of bytes, allowing bytes and lists of bytes to be added at the end.
CleanupService
Command<T>
A single command.
CommandRunner<T>
A class for invoking Commands based on raw command-line arguments.
CompressionOptions
Options controlling compression in a WebSocket.
ConfigCleanupResult
A helper class to hold the result of a configuration cleanup operation.
ConfigCreationResult
A helper class to hold the result of a configuration file creation operation.
ConfigService
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.
Datagram
A data packet received by a RawDatagramSocket.
Directory
A reference to a directory (or folder) on the file system.
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.
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:
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.
HttpSession
The HttpRequest.session of an HttpRequest.
HttpStatus
HTTP status codes. Exported in dart:io and dart:html.
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.
NetworkInterface
A NetworkInterface represents an active network interface on the current system. It contains a list of InternetAddresses that are bound to the interface.
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.
Process
The means to execute a program.
ProcessCmd
Process command
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.
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.
RedirectInfo
Redirect information.
ResourceHandle
A wrapper around OS resource handle so it can be passed via Socket as part of SocketMessage.
SameSite
Cookie cross-site availability configuration.
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.
Shell
Multiplatform Shell utility to run a script with multiple commands.
ShellEnvironment
Shell modifiable helpers. should not be modified after being set.
ShellEnvironmentAliases
Shell environment aliases for executable
ShellEnvironmentPaths
Shell environment ordered paths helper. Changes the PATH variable
ShellEnvironmentVars
Shell environment variables helper. Does not affect the PATH variable
ShellLinesController
Basic bi-directionnal shell lines controller.
ShellOptions
Shell options.
SlackService
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.
SplashConfigResult
A helper class to hold the result of updating splash screen configuration.
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.
SystemEncoding
The system encoding is the current code page on Windows and UTF-8 on Linux and Mac.
TlsProtocolVersion
A Transport Layer Security (TLS) version.
UdaraCommand
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.
WhiteLabelService
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.

Enums

HttpClientResponseCompressionState
Enum that specifies the compression state of the byte stream of an HttpClientResponse.

Extensions

ProcessRunProcessExt on Process
Process helper.
ProcessRunProcessResultExt on ProcessResult
run response helper.
ProcessRunProcessResultsExt on List<ProcessResult>
run response helper.
ShellEnvironmentCommonExt on ShellEnvironment
Shell environment extension

Constants

dartChannelBeta → const String
Beta channel.
dartChannelDev → const String
Dev channel.
dartChannelMaster → const String
Master channel.
dartChannelStable → const String
Stable channel.
gzip → const GZipCodec
An instance of the default implementation of the GZipCodec.
systemEncoding → const SystemEncoding
The current system encoding.
zlib → const ZLibCodec
An instance of the default implementation of the ZLibCodec.

Properties

dartChannel String
Current dart platform channel
no setter
dartExecutable String?
Get dart vm either from executable or using the which command
no setter
dartVersion → Version
Current dart platform version
no setter
exitCode int
Get the global exit code for the Dart VM.
getter/setter pair
flutterDartExecutablePath String?
Resolved flutter dart path if found
no setter
flutterExecutablePath String?
Resolved flutter path if found
getter/setter pair
isFlutterSupported bool
true if flutter is supported
no setter
isFlutterSupportedSync bool
true if flutter is supported
no setter
pid int
Returns the PID of the current process.
no setter
platformEnvironment Map<String, String>
Environment without debug VM_OPTIONS and without any user overrides
getter/setter pair
sharedStdIn → SharedStdIn
A shared singleton instance of dart:io's stdin stream.
final
shellEnvironment Map<String, String>
Cached shell environment with user config Same as userEnvironment
getter/setter pair
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
userAppDataPath String
Returns the user data path
no setter
userEnvironment Map<String, String>
Get the user environment
no setter
userHomePath String
Return the user home path.
no setter
userPaths List<String>
Get the list of user paths used to resolve binaries location.
no setter

Functions

argumentsToString(List<String> arguments) String
Convert multiple arguments to string than can be used in a terminal
argumentToString(String argument) String
Helper to run a process and connect the input/output for verbosity
executableArgumentsToString(String executable, List<String>? arguments) String
Convenient way to display a command
exit(int code) → Never
Exit the Dart VM process immediately with the given exit code.
getFlutterBinChannel() Future<String?>
Get flutter channel. (dev, beta, master, stable)
getFlutterBinVersion() Future<Version?>
Get flutter version.
processCmdToDebugString(ProcessCmd cmd) String
Process command debug string
processResultToDebugString(ProcessResult result) String
Process result debug string
prompt(String? text, {Stream<List<int>>? stdin}) Future<String>
Get text
promptConfirm(String? text, {Stream<List<int>>? stdin}) Future<bool>
Confirm action
promptTerminate() Future
Terminate a prompt session.
run(String script, {bool throwOnError = true, String? workingDirectory, Map<String, String>? environment, bool includeParentEnvironment = true, bool? runInShell, Encoding stdoutEncoding = systemEncoding, Encoding stderrEncoding = systemEncoding, Stream<List<int>>? stdin, StreamSink<List<int>>? stdout, StreamSink<List<int>>? stderr, bool verbose = true, bool? commandVerbose, bool? commentVerbose, ShellOptions? options, ShellOnProcessCallback? onProcess}) Future<List<ProcessResult>>
Run one or multiple plain text command(s).
runExecutableArguments(String executable, List<String> arguments, {String? workingDirectory, Map<String, String>? environment, bool includeParentEnvironment = true, bool? runInShell, Encoding? stdoutEncoding = systemEncoding, Encoding? stderrEncoding = systemEncoding, Stream<List<int>>? stdin, StreamSink<List<int>>? stdout, StreamSink<List<int>>? stderr, bool? verbose, bool? commandVerbose, bool? noStdoutResult, bool? noStderrResult, ShellOnProcessCallback? onProcess}) Future<ProcessResult>
if commandVerbose or verbose is true, display the command. if verbose is true, stream stdout & stdin
runExecutableArgumentsSync(String executable, List<String> arguments, {String? workingDirectory, Map<String, String>? environment, bool includeParentEnvironment = true, bool? runInShell, Encoding? stdoutEncoding = systemEncoding, Encoding? stderrEncoding = systemEncoding, StreamSink<List<int>>? stdout, StreamSink<List<int>>? stderr, bool? verbose, bool? commandVerbose}) ProcessResult
if commandVerbose or verbose is true, display the command. if verbose is true, stream stdout & stdin
runSync(String script, {bool throwOnError = true, String? workingDirectory, Map<String, String>? environment, bool includeParentEnvironment = true, bool? runInShell, Encoding stdoutEncoding = systemEncoding, Encoding stderrEncoding = systemEncoding, StreamSink<List<int>>? stdout, StreamSink<List<int>>? stderr, bool verbose = true, bool? commandVerbose, bool? commentVerbose, ShellOptions? options}) List<ProcessResult>
Run one or multiple plain text command(s).
shellArgument(String argument) String
Use to safely enclose an argument if needed
shellArguments(List<String> arguments) String
Convert multiple arguments to string than can be used in a terminal
shellExecutableArguments(String executable, List<String> arguments) String
Convert executable + arguments to a single script line
shellStreamLines(Stream<List<int>> stream, {Encoding? encoding}) Stream<String>
Basic line streaming. Assuming system encoding
sleep(Duration duration) → void
Sleep for the duration specified in duration.
stdioType(dynamic object) StdioType
Whether a stream is attached to a file, pipe, terminal, or something else.
stringToArguments(String command) List<String>
Convert a string command to arguments.
userLoadEnv({Map<String, String>? vars, List<String>? paths, Map<String, String>? aliases}) → void
Only specify the vars to override and the paths to add
userLoadEnvFile(String path) → void
Update userPaths and userEnvironment
which(String command, {Map<String, String>? environment, bool includeParentEnvironment = true}) Future<String?>
Find the command according to the paths or env variables (PATH)
whichSync(String command, {Map<String, String>? environment, bool includeParentEnvironment = true}) String?
Find the command according to the paths or env variables (PATH)

Typedefs

BadCertificateCallback = bool Function(X509Certificate cr, String host, int port)
ShellOnProcessCallback = void Function(Process process)
Shell on process callback

Exceptions / Errors

BuildException
CertificateException
An exception that happens in the handshake phase of establishing a secure network connection, when looking up or verifying a certificate.
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.
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
ShellException
Exception thrown in exitCode != 0 and throwOnError is true
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
TlsException
A secure networking exception caused by a failure in the TLS/SSL protocol.
UsageException
WebSocketException