FileReader class
文件读取器
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
readAsStream(
String filePath) → Stream< List< int> > - 流式读取大文件
-
readBytes(
String filePath) → Future< List< int> > - 读取二进制文件
-
readInChunks(
String filePath, int chunkSize, dynamic onChunk(List< int> )) → Future<void> - 分块读取大文件
-
readJson(
String filePath) → Future< Map< String, dynamic> > - 读取JSON文件
-
readJsonAs<
T> (String filePath, T fromJson(Map< String, dynamic> )) → Future<T> - 读取JSON文件(泛型)
-
readText(
String filePath) → Future< String> - 读取文本文件
-
readTextWithEncoding(
String filePath, Encoding encoding) → Future< String> - 读取文本文件(指定编码)