updateAlign method
- int alignX,
- int alignY
更新Text 文字覆盖对齐方式
alignX 文字覆盖物水平对齐方式 ALIGN_LEFT | ALIGN_RIGHT | ALIGN_CENTER_HORIZONTAL alignY 文字覆盖物水平对齐方式 ALIGN_LEFT | ALIGN_RIGHT | ALIGN_CENTER_HORIZONTAL
Implementation
Future<bool> updateAlign(int alignX, int alignY) async {
if (alignX != BMFHorizontalAlign.ALIGN_CENTER_HORIZONTAL &&
alignX != BMFHorizontalAlign.ALIGN_LEFT &&
alignX != BMFHorizontalAlign.ALIGN_RIGHT) {
return false;
}
if (alignY != BMFVerticalAlign.ALIGN_BOTTOM &&
alignY != BMFVerticalAlign.ALIGN_CENTER_VERTICAL &&
alignY != BMFVerticalAlign.ALIGN_TOP) {
return false;
}
bool ret = await BMFMapDispatcherFactory.instance.overlayDispatcher
.updateTextMember(this.methodChannel, {
'id': this.Id,
'member': 'align',
'alignX': alignX,
'alignY': alignY
});
if (ret) {
this.alignX = alignX;
this.alignY = alignY;
}
return ret;
}