onClick method

Future<bool?> onClick()

Implementation

Future<bool?> onClick() async {
  if (url != null && onclick == null) {
    String? bc;
    try {
      Uri? uri = URI.parse(url!);
      bc = uri?.queryParameters['breadcrumb'];
    } catch (e) {
      Log().debug('$e');
    }
    return EventManager.of(this)?.broadcastEvent(
        this,
        Event(EventTypes.open,
            bubbles: true,
            parameters: {'url': url, 'breadcrumb': bc ?? title}));
  }
  if (onclick == null) return true;
  return await EventHandler(this).execute(_onclick);
}