onCustomShareUrl property

CustomShareUrlCallback? get onCustomShareUrl

The callback of custom share url.

Implementation

CustomShareUrlCallback? get onCustomShareUrl => _onCustomShareUrl;
set onCustomShareUrl (CustomShareUrlCallback? newValue)

Implementation

set onCustomShareUrl(CustomShareUrlCallback? newValue) {
  FWLoggerUtil.log(
      "set onCustomShareUrl: ${newValue != null ? "not null" : "null"}");
  final updated = _onCustomShareUrl != newValue;
  _onCustomShareUrl = newValue;
  final nativeMethodName =
      FireworkSDKNativeMethodName.setCustomShareUrlEnabled.name;
  final enabled = newValue != null;
  FWMethodChannelUtil.getFirewokSDKChannel()
      .invokeMethod(nativeMethodName, enabled)
      .then((_) {
    if (updated) {
      FWEventBus.getInstance().fire(
        FWEvent(
          eventName: FWEventName.customShareUrlCallbackUpdated,
        ),
      );
    }
  });
}