Need to modify its source code:
The object OpenOfflineManager: MapMethodHandler {
Override fun with (map: AMap) : MapMethodHandler {
Return this
}
Override fun onMethodCall (methodCall: methodCall, methodResult: MethodChannel. Result) {
}
/* override fun onMethodCall (p0: MethodCall? P1: MethodChannel. The Result?) {
AMapBasePlugin. The registrar. The activity (). StartActivity (
Intent (AMapBasePlugin. The registrar. The activity (),
OfflineMapActivity: : class. Java)
)
} */
}
And... Flutter \. Pub - cache \ hosted \ pub flutter - IO. Cn \ amap_base - 0.3.5 \ android \ SRC \ main \ kotlin \ me \ yohom \ amapbase \ search \ SearchHandlers kt
Also need to modify the source code:
The object DistanceSearchHandler: SearchMethodHandler {
Override fun onMethodCall (call: MethodCall, result: MethodChannel. Result) {
/* val search=DistanceSearch (AMapBasePlugin. The registrar. The context ())
Search. SetDistanceSearchListener {
DistanceResult, I - & gt; Search. SetDistanceSearchListener (null)
If (I==1000) {
Val list=distanceResult. DistanceResults. Map {
It. Short. ToInt ()
}
result? . Success (list)
} else {
result? The error (" measuring failure code==& gt; $I ", null, null)
}
}
Val origins=call. Argument
- > (" origin ")!!!!!
Val target=call. Argument