updateColors method

Future<bool> updateColors (
  1. List<Color> colors,
  2. {List<int> indexs}
)

更新colors

android更新colors的时候,必须带上indexs

Implementation

Future<bool> updateColors(List<Color> colors, {List<int> indexs}) async {
  if (null == colors) {
    return false;
  }

  this.colors = colors;

  if (null != indexs) {
    this.indexs = indexs;
  }

  return await BMFMapDispatcherFactory.instance
      .getOverlayDispatcher()
      .updateOverlayMemberDispatch(this.getMethodChannel(), {
    'id': this.getId(),
    'member': 'colors',
    'value': colors?.map((color) => color.value.toRadixString(16))?.toList(),
    'indexs': indexs?.map((index) => index)?.toList(),
  });
}