core
library
Classes
AnsiColor
ANSI颜色和样式控制类,用于控制台输出的丰富格式化
ArgParser
A class for taking a list of raw command line arguments and parsing out
options and flags from them.
ArgResults
The results of parsing a series of command line arguments using
ArgParser.parse .
AsyncLogStrategy
异步日志策略
BoolList
A space-efficient list of boolean values.
ByteDataReader
A class for parsing byte arrays.
ByteDataWriter
A class for building byte arrays with a BytesBuffer and a fixed-length
work buffer.
BytesBuffer
A class for concatenating byte arrays efficiently.
BytesBuilder
Builds a list of bytes, allowing bytes and lists of bytes to be added at the
end.
CanonicalizedMap <C , K , V >
A map whose keys are converted to canonical values of type C.
CaseInsensitiveEquality
String equality that's insensitive to differences in ASCII case.
CollectionStyle
An enum of collection styles.
CombinedIterableView <T >
A view of several iterables combined sequentially into a single iterable.
CombinedListView <T >
A view of several lists combined into a single list.
CombinedMapView <K , V >
Returns a new map that represents maps flattened into a single map.
CompressionOptions
Options controlling compression in a WebSocket .
ConnectionTask <S >
A cancelable connection attempt.
ConsoleStrategy
ContentType
A MIME/IANA media type used as the value of the
HttpHeaders.contentTypeHeader header.
Context
An instantiable class for manipulating paths. Unlike the top-level
functions, this lets you explicitly select what platform the paths will use.
Cookie
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.
Crc16
An alias of Crc16Arc.
Crc16A
An alias of Crc16IsoIec144433A.
Crc16Acorn
An alias of Crc16Xmodem.
Crc16Arc
Crc16AugCcitt
An alias of Crc16SpiFujitsu.
Crc16Autosar
An alias of Crc16Ibm3740.
Crc16B
An alias of Crc16IbmSdlc.
Crc16Buypass
An alias of Crc16Umts.
Crc16Ccitt
An alias of Crc16Kermit.
Crc16CcittFalse
An alias of Crc16Ibm3740.
Crc16CcittTrue
An alias of Crc16Kermit.
Crc16Cdma2000
Crc16Cms
Crc16Darc
An alias of Crc16GeniBus.
Crc16Dds110
Crc16DectR
Crc16DectX
Crc16Dnp
Crc16En13757
Crc16Epc
An alias of Crc16GeniBus.
Crc16EpcC1g2
An alias of Crc16GeniBus.
Crc16GeniBus
Crc16Gsm
Crc16Ibm
An alias of Crc16Arc.
Crc16Ibm3740
Crc16IbmSdlc
Crc16ICode
An alias of Crc16GeniBus.
Crc16Iec611582
An alias of Crc16Profibus.
Crc16IsoHdlc
An alias of Crc16IbmSdlc.
Crc16IsoIec144433A
Crc16IsoIec144433B
An alias of Crc16IbmSdlc.
Crc16Kermit
Crc16Lha
An alias of Crc16Arc.
Crc16LJ1200
Crc16Lte
An alias of Crc16Xmodem.
Crc16Maxim
An alias of Crc16MaximDow.
Crc16MaximDow
Crc16Mcrf4xx
Crc16Modbus
Crc16Nrsc5
Crc16OpenSafetyA
Crc16OpenSafetyB
Crc16Profibus
Crc16R
An alias of Crc16DectR.
Crc16Riello
Crc16SpiFujitsu
Crc16T10Dif
Crc16Teledisk
Crc16Tms37157
Crc16Umts
Crc16Usb
Crc16V41Lsb
An alias of Crc16Kermit.
Crc16V41Msb
An alias of Crc16Xmodem.
Crc16Verifone
An alias of Crc16Umts.
Crc16X
An alias of Crc16DectX.
Crc16X25
An alias of Crc16IbmSdlc.
Crc16Xmodem
Crc16Zmodem
An alias of Crc16Xmodem.
Crc24
An alias of Crc24OpenPgp.
Crc24Ble
Crc24FlexRayA
Crc24FlexRayB
Crc24Interlaken
Crc24LteA
Crc24LteB
Crc24OpenPgp
Crc24Os9
Crc32
An alias of Crc32IsoHdlc.
Crc32Aal5
An alias of Crc32Bzip2.
Crc32Adccp
An alias of Crc32IsoHdlc.
Crc32Aixm
Crc32Autosar
Crc32B
An alias of Crc32Bzip2.
Crc32Base91C
An alias of Crc32Iscsi.
Crc32Base91D
Crc32Bzip2
Crc32C
An alias of Crc32Iscsi.
Crc32Castagnoli
An alias of Crc32Iscsi.
Crc32CDRomEdc
Crc32Cksum
Crc32D
An alias of Crc32Base91D.
Crc32DectB
An alias of Crc32Bzip2.
Crc32Interlaken
An alias of Crc32Iscsi.
Crc32Iscsi
Crc32IsoHdlc
Crc32JamCrc
Crc32Mpeg2
Crc32Pkzip
An alias of Crc32IsoHdlc.
Crc32Posix
An alias of Crc32Cksum.
Crc32Q
An alias of Crc32Aixm.
Crc32V42
An alias of Crc32IsoHdlc.
Crc32Xfer
Crc32Xz
An alias of Crc32IsoHdlc.
Crc40Gsm
Crc64
An alias of Crc64Ecma182.
Crc64Ecma182
Crc64GoEcma
An alias of Crc64Xz.
Crc64GoIso
Crc64WE
Crc64Xz
Crc8
An alias of Crc8SMBus.
Crc8Aes
An alias of Crc8Tech3250.
Crc8Autosar
Crc8Bluetooth
Crc8Cdma2000
Crc8Darc
Crc8Dow
An alias of Crc8MaximDow.
Crc8DvbS2
Crc8Ebu
An alias of Crc8Tech3250.
Crc8GsmA
Crc8GsmB
Crc8I4321
Crc8ICode
Crc8Itu
An alias of Crc8I4321.
Crc8Lte
Crc8Maxim
An alias of Crc8MaximDow.
Crc8MaximDow
Crc8MifareMad
Crc8Nrsc5
Crc8OpenSafety
Crc8Rohc
Crc8SaeJ1850
Crc8SMBus
Crc8Tech3250
Crc8Wcdma
Datagram
A data packet received by a RawDatagramSocket .
DateFormats
DeepCollectionEquality
Deep equality on collections.
DefaultEquality <E >
Equality of objects that compares only the natural equality of the objects.
DelegatingIterable <E >
An Iterable that delegates all operations to a base iterable.
DelegatingList <E >
A List that delegates all operations to a base list.
DelegatingMap <K , V >
A Map that delegates all operations to a base map.
DelegatingQueue <E >
A Queue that delegates all operations to a base queue.
DelegatingSet <E >
A Set that delegates all operations to a base set.
DeveloperStrategy
Directory
A reference to a directory (or folder ) on the file system.
Equality <E >
A generic equality relation on objects.
EqualityBy <E , F >
Equality of objects based on derived values.
EqualityMap <K , V >
A Map whose key equality is determined by an Equality object.
EqualitySet <E >
A Set whose key equality is determined by an Equality object.
Equatable
A base class to facilitate operator == and hashCode overrides.
EquatableConfig
The default configuration for all Equatable instances.
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.
Representation of a header value in the form:
HeapPriorityQueue <E >
Heap based priority queue.
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 HttpServer s current socket connections.
HttpDate
Utility functions for working with dates with HTTP specific date
formats.
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.
IdentityEquality <E >
Equality of objects that compares only the identity of the objects.
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.
IterableEquality <E >
Equality on iterables.
IterableZip <T >
Iterable that iterates over lists of values from other iterables.
Link
References to filesystem links.
ListEquality <E >
Equality on lists.
ListSlice <E >
A list view of a range of another list.
Lock
Object providing the implicit lock.
Logger
LogLevel
日志级别
LogRecord
LogStrategy
日志策略
LruMap <K , V >
MapEquality <K , V >
Equality on maps.
MapKeySet <E >
An unmodifiable Set view of the keys of a Map .
MapValueSet <K , V >
Creates a modifiable Set view of the values of a Map .
MultiEquality <E >
Combines several equalities into a single equality.
MultiLock
A multi lock that locks multiple locks at the same time.
NetworkInterface
A NetworkInterface represents an active network interface on the current
system. It contains a list of InternetAddress es that are bound to the
interface.
NonGrowableListMixin <E >
Mixin class that implements a throwing version of all list operations that
change the List's length.
NonGrowableListView <E >
A fixed-length list.
Option
A command-line option.
OptionType
What kinds of values an option accepts.
PathMap <V >
A map whose keys are paths, compared using p.equals and p.hash .
PathSet
A set containing paths, compared using p.equals and p.hash .
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.
PriorityQueue <E >
A priority queue is a priority based work-list of elements.
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.
QueueList <E >
A class that efficiently implements both Queue and List .
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 RawSecureSocket s.
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.
ScalarStyle
An enum of source scalar styles.
SecureServerSocket
A server socket, providing a stream of high-level Socket s.
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.
SetEquality <E >
Equality of sets.
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.
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 .
SourceEdit
A class representing a change on a String , intended to be compatible with
package:analysis_server's SourceEdit .
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.
Style
An enum type describing a "flavor" of path.
SystemEncoding
The system encoding is the current code page on Windows and UTF-8 on Linux
and Mac.
TagDirective
A directive describing a custom tag handle.
TlsProtocolVersion
A Transport Layer Security (TLS) version.
UnionSet <E >
A single set that provides a view of the union over a set of sets.
UnionSetController <E >
A controller that exposes a view of the union of a collection of sets.
UnmodifiableListView <E >
An unmodifiable List view of another List.
UnmodifiableMapMixin <K , V >
Mixin class that implements a throwing version of all map operations that
change the Map.
UnmodifiableMapView <K , V >
View of a Map that disallow modifying the map.
UnmodifiableSetMixin <E >
Mixin class that implements a throwing version of all set operations that
change the Set.
UnmodifiableSetView <E >
An unmodifiable set.
UnorderedIterableEquality <E >
Equality of the elements of two iterables without considering order.
Uuid
uuid for Dart
Author: Yulian Kuncheff
Released under MIT License.
UuidValue
VersionDirective
A directive indicating which version of YAML a document was written to.
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
HttpRequest s.
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.
YamlDocument
A YAML document, complete with metadata.
YamlEditor
An interface for modifying YAML documents while preserving comments
and whitespaces.
YamlList
A read-only List parsed from YAML.
YamlMap
A read-only Map parsed from YAML.
YamlNode
An interface for parsed nodes from a YAML source tree.
YamlScalar
A wrapped scalar value parsed from YAML.
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.
Functions
absolute (String part1 , [String ? part2 , String ? part3 , String ? part4 , String ? part5 , String ? part6 , String ? part7 , String ? part8 , String ? part9 , String ? part10 , String ? part11 , String ? part12 , String ? part13 , String ? part14 , String ? part15 ])
→ String
Returns a new path with the given path parts appended to current .
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
basename (String path )
→ String
Gets the part of path after the last separator.
basenameWithoutExtension (String path )
→ String
Gets the part of path after the last separator, and without any trailing
file extension.
binarySearch <E > (List <E > sortedList , E value , {int compare (E , E )? })
→ int
Returns a position of the value in sortedList, if it is there.
canonicalize (String path )
→ String
Canonicalizes path.
castBytes (List <int > bytes , {bool copy = false })
→ Uint8List
Cast the list of bytes into a typed Uint8List .
compareAsciiLowerCase (String a , String b )
→ int
Compares a and b lexically, converting ASCII letters to lower case.
compareAsciiLowerCaseNatural (String a , String b )
→ int
Compares strings a and b according to lower-case
natural sort ordering .
compareAsciiUpperCase (String a , String b )
→ int
Compares a and b lexically, converting ASCII letters to upper case.
compareAsciiUpperCaseNatural (String a , String b )
→ int
Compares strings a and b according to upper-case
natural sort ordering .
compareNatural (String a , String b )
→ int
Compares strings a and b according to natural sort ordering .
dirname (String path )
→ String
Gets the part of path before the last separator.
equals (String path1 , String path2 )
→ bool
Returns true if path1 points to the same location as path2, and
false otherwise.
equalsIgnoreAsciiCase (String a , String b )
→ bool
Checks if strings a and b differ only on the case of ASCII letters.
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.
extension (String path , [int level = 1 ])
→ String
Gets the file extension of path: the portion of basename from the last
. to the end (including the . itself).
fromUri (Object ? uri )
→ String
Returns the path represented by uri, which may be a String or a Uri .
getCLILockFile ()
→ File
获取项目cli的lock文件
getCLIVersion ()
→ Future <String >
获取CLI的本地版本
getFlutterBinChannel ()
→ Future <String ? >
Get flutter channel. (dev, beta, master, stable)
getFlutterBinVersion ()
→ Future <Version? >
Get flutter version.
getRemoteVersion (String package )
→ Future <String >
获取package的最新版本
getYamlFile ([String name = 'pubspec.yaml' ])
→ Future <File >
获取指定的yaml文件
gitBranch ()
→ Future <String >
gitBuildInfo ()
→ Future <String >
利用git生成类似于"branch_short_yyMMddHHmm"的构建信息
gitCommitCount ()
→ Future <String >
获取git提交次数
gitDate ()
→ Future <String >
gitShort ()
→ Future <String >
groupBy <S , T > (Iterable <S > values , T key (S ) )
→ Map <T , List <S > >
Groups the elements in values by the value returned by key.
hash (String path )
→ int
Returns a hash code for path such that, if equals returns true for two
paths, their hash codes are the same.
hashIgnoreAsciiCase (String string )
→ int
Hash code for a string which is compatible with equalsIgnoreAsciiCase .
insertionSort <E > (List <E > elements , {int compare (E , E )?, int start = 0 , int ? end })
→ void
Sort a list between start (inclusive) and end (exclusive) using
insertion sort.
isAbsolute (String path )
→ bool
Returns true if path is an absolute path and false if it is a
relative path.
isRelative (String path )
→ bool
Returns true if path is a relative path and false if it is absolute.
On POSIX systems, absolute paths start with a / (forward slash). On
Windows, an absolute path starts with \\, or a drive letter followed by
:/ or :\.
isRootRelative (String path )
→ bool
Returns true if path is a root-relative path and false if it's not.
isWithin (String parent , String child )
→ bool
Returns true if child is a path beneath parent, and false otherwise.
join (String part1 , [String ? part2 , String ? part3 , String ? part4 , String ? part5 , String ? part6 , String ? part7 , String ? part8 , String ? part9 , String ? part10 , String ? part11 , String ? part12 , String ? part13 , String ? part14 , String ? part15 , String ? part16 ])
→ String
Joins the given path parts into a single path using the current platform's
separator . Example:
joinAll (Iterable <String > parts )
→ String
Joins the given path parts into a single path using the current platform's
separator . Example:
lastBy <S , T > (Iterable <S > values , T key (S ) )
→ Map <T , S >
Associates the elements in values by the value returned by key.
loadYaml (String yaml , {Uri ? sourceUrl , bool recover = false , ErrorListener? errorListener })
→ dynamic
Loads a single document from a YAML string.
loadYamlDocument (String yaml , {Uri ? sourceUrl , bool recover = false , ErrorListener? errorListener })
→ YamlDocument
Loads a single document from a YAML string as a YamlDocument .
loadYamlDocuments (String yaml , {Uri ? sourceUrl })
→ List <YamlDocument >
Loads a stream of documents from a YAML string.
loadYamlNode (String yaml , {Uri ? sourceUrl , bool recover = false , ErrorListener? errorListener })
→ YamlNode
Loads a single document from a YAML string as a YamlNode .
loadYamlStream (String yaml , {Uri ? sourceUrl })
→ YamlList
Loads a stream of documents from a YAML string.
lowerBound <E > (List <E > sortedList , E value , {int compare (E , E )? })
→ int
Returns the first position in sortedList that does not compare less than
value.
mapMap <K1 , V1 , K2 , V2 > (Map <K1 , V1 > map , {K2 key (K1 , V1 )?, V2 value (K1 , V1 )? })
→ Map <K2 , V2 >
Creates a new map from map with new keys and values.
maxBy <S , T > (Iterable <S > values , T orderBy (S ), {int compare (T , T )? })
→ S?
Returns the element of values for which orderBy returns the maximum
value.
mergeMaps <K , V > (Map <K , V > map1 , Map <K , V > map2 , {V value (V , V )? })
→ Map <K , V >
Returns a new map with all key/value pairs in both map1 and map2.
mergeSort <E > (List <E > elements , {int start = 0 , int ? end , int compare (E , E )? })
→ void
Sorts a list between start (inclusive) and end (exclusive) using the
merge sort algorithm.
minBy <S , T > (Iterable <S > values , T orderBy (S ), {int compare (T , T )? })
→ S?
Returns the element of values for which orderBy returns the minimum
value.
normalize (String path )
→ String
Normalizes path, simplifying it by handling .., and ., and
removing redundant path separators whenever possible.
prettyUri (Object ? uri )
→ String
Returns a terse, human-readable representation of uri.
processCmdToDebugString (ProcessCmd cmd )
→ String
Process command debug string, compat, prefer toDebugString()
processResultToDebugString (ProcessResult result )
→ String
Process result debug string, compat, prefer toDebugString()
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.
readAsBytes (Stream <List <int > > stream , {int ? maxLength , bool copy = false })
→ Future <Uint8List >
Read stream into a typed byte buffer.
readAsString (Stream <List <int > > stream , {Encoding ? encoding })
→ Future <String >
Read stream into a String.
registerAssets (List <String > paths )
→ Future <void >
判断资源目录是否已经注册到pubspec.yaml文件中
registerPackage (String package , [String position = 'dependencies' ])
→ Future <void >
position:
dependencies
dev_dependencies
dependency_overrides
relative (String path , {String ? from })
→ String
Attempts to convert path to an equivalent relative path from the current
directory.
reverse <E > (List <E > elements , [int start = 0 , int ? end ])
→ void
Reverses a list, or a part of a list, in-place.
rootPrefix (String path )
→ String
Returns the root of path, if it's absolute, or the empty string if it's
relative.
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 , 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 , ProcessStartMode ? mode })
→ 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
runPubGet ()
→ Future <bool >
执行"flutter pub get"命令
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 , ShellOptions ? options })
→ List <ProcessResult >
Run one or multiple plain text command(s).
runUpdateCLI ()
→ Future <bool >
执行flutter pub run build_runner build
setExtension (String path , String extension )
→ String
Returns path with the trailing extension set to extension.
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
True if the line is a comment.
shellScriptLineToArguments (String command )
→ List <String >
Convert a string command to arguments. only if not a comment
shellScriptSplitLines (String script , { })
→ List <String >
Convert a script to multiple commands (single line) or comments
shellStreamLines (Stream <List <int > > stream , {Encoding ? encoding })
→ Stream <String >
Basic line streaming. Assuming system encoding
shuffle (List elements , [int start = 0 , int ? end , Random ? random ])
→ void
Shuffles a list randomly.
sleep (Duration duration )
→ void
Sleep for the duration specified in duration.
sliceStream (Stream <List <int > > stream , int sliceLength , {int ? maxLength , bool copy = false })
→ Stream <Uint8List >
Read stream and slice the content into chunks with target/max length of
sliceLength.
split (String path )
→ List <String >
Splits path into its components using the current platform's separator .
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. compat
stronglyConnectedComponents <T > (Map <T , Iterable <T > > graph )
→ List <Set <T > >
Returns the strongly connected components of graph, in topological
order.
toUri (String path )
→ Uri
Returns the URI that represents path.
transitiveClosure <T > (Map <T , Iterable <T > > graph )
→ Map <T , Set <T > >
Returns the transitive closure of graph.
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 a given or current environment
whichSync (String command , {Map <String , String > ? environment , bool includeParentEnvironment = true })
→ String ?
Find the command according to a given or current environment
withoutExtension (String path )
→ String
Removes a trailing extension from the last part of path.
wrapAsYamlNode (Object ? value , {CollectionStyle collectionStyle = CollectionStyle.ANY , ScalarStyle scalarStyle = ScalarStyle.ANY })
→ YamlNode
Wraps value into a YamlNode .