moveToCurrentLocationActionWithoutSearchPOI method

Future<TIMCoordinate?> moveToCurrentLocationActionWithoutSearchPOI({
  1. required void moveMapCenter(
    1. TIMCoordinate coordinate
    ),
})

Implementation

Future<TIMCoordinate?> moveToCurrentLocationActionWithoutSearchPOI({
  required void Function(TIMCoordinate coordinate) moveMapCenter,
}) async {
  final TIMCoordinate? location = await LocationUtils.getAddressByFlutter();
  if(location != null){
    moveMapCenter(location);
    return location;
  }
  return null;
}