registerAMapHarmonyView function
void
registerAMapHarmonyView()
Import only from an OHOS Flutter entry point.
Implementation
void registerAMapHarmonyView() {
amapViewFactory = (parameters, onCreated) => CustomPaint(
foregroundPainter: _ClearMapPainter(),
child: OhosView(
viewType: amapViewType,
layoutDirection: TextDirection.ltr,
creationParams: parameters,
creationParamsCodec: const StandardMessageCodec(),
onPlatformViewCreated: onCreated,
gestureRecognizers: {
Factory<OneSequenceGestureRecognizer>(() => EagerGestureRecognizer()),
},
),
);
}