releaseAmapObjectPool function

void releaseAmapObjectPool()

释放所有amap_map_fluttify插件创建的原生对象

Implementation

void releaseAmapObjectPool() {
  final isCurrentPlugin = (Ref it) => it?.tag__ == 'amap_map_fluttify';
  kNativeObjectPool
      .where(isCurrentPlugin)
      .release_batch()
      .then((_) => kNativeObjectPool.removeWhere(isCurrentPlugin));
}