logNavigationEvent<T> method

Future<T?> logNavigationEvent<T>(
  1. String? route, {
  2. Object? arguments,
  3. String? type,
})

Implementation

Future<T?> logNavigationEvent<T>(String? route,
    {Object? arguments, String? type}) async {
  _flutterLoggerController.add(
      MicroAppNavigatorEvent(route: route, arguments: arguments, type: type));

  if (MicroAppPreferences.config.nativeNavigationLogEnabled) {
    return _nativeLoggerService.emit(
        Constants.methodNavigationLog,
        jsonEncode(
            {_route: route, _arguments: arguments.toString(), _type: type}));
  }

  return null;
}