ImageAnnotation class

@author jd

Inheritance

Constructors

ImageAnnotation({dynamic userInfo, ValueChanged<Annotation>? onTap, bool fixed = false, int yAxisPosition = 0, double? minZoomVisible, double? maxZoomVisible, Offset anchor(Size)?, required Image image, List<num>? positions, Offset offset = Offset.zero})

Properties

anchor → (Offset Function(Size)?)
设置ImageAnnotation的偏移,忽略positions的设置
final
fixed bool
是否滚动
finalinherited
hashCode int
The hash code for this object.
no setterinherited
image Image
图片
final
isInit bool
getter/setter pairinherited
maxZoomVisible double?
大于该缩放级别则隐藏
finalinherited
minZoomVisible double?
小于该缩放级别则隐藏
finalinherited
offset Offset
偏移,可以做细微调整
final
onTap ValueChanged<Annotation>?
标注可以点击
finalinherited
positions List<num>?
两个长度的数组,优先级最高,ImageAnnotation的位置,对应xy轴的value
final
rect Rect?
所在的区域
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
userInfo → dynamic
携带额外信息
finalinherited
yAxisPosition int
跟哪个y轴关联
finalinherited

Methods

draw(Canvas canvas, ChartsState state) → void
init(ChartsState state) → void
初始化 耗时的方法都可以放到这里
inherited
isNeedDraw(ChartsState state) bool
是否需要绘制
inherited
isRange(Offset point) bool
判断point是否在此Annotation范围内
inherited
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

getAssetImage(String asset, {dynamic width, dynamic height}) Future<Image>
获取本地图片 返回ui.Image
getNetImage(String url, {dynamic width, dynamic height}) Future<Image>
获取网络图片 返回ui.Image