AIImageData class

AI识别图片数据的统一数据结构

Constructors

AIImageData({Uint8List? bytes, String? filePath, required int size, required ImageDataSource source})
AIImageData.fromBytes(Uint8List bytes)
从iOS的二进制数据创建
factory
AIImageData.fromFilePath(String filePath, int size)
从Android的文件路径创建
factory

Properties

bytes → Uint8List?
图片数据(二进制)
final
filePath → String?
图片文件路径(Android)
final
hashCode → int
The hash code for this object.
no setterinherited
isDirectlyUsable → bool
是否可以直接使用(iOS的二进制数据)
no setter
needsFileRead → bool
是否需要从文件读取(Android)
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
size → int
数据大小
final
source → ImageDataSource
数据类型来源
final

Methods

getDisplayableData() → Future<Uint8List>
获取可用于显示的数据 如果是二进制数据直接返回,如果是文件路径则读取文件
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