MPFlutterWechatAppDelegate constructor

MPFlutterWechatAppDelegate({
  1. void onLaunch(
    1. Map query,
    2. JSObject launchOptions
    )?,
  2. void onEnter(
    1. Map query,
    2. JSObject launchOptions
    )?,
  3. void onShow()?,
  4. void onHide()?,
  5. Map onSaveExitState()?,
  6. Map onShareAppMessage(
    1. JSObject
    )?,
  7. void onShareAppMessageAsync(
    1. JSObject,
    2. dynamic (
      1. Map
      )
    )?,
  8. Map onShareTimeline(
    1. JSObject
    )?,
  9. void onShareTimelineAsync(
    1. JSObject,
    2. dynamic (
      1. Map
      )
    )?,
  10. Map onAddToFavorites(
    1. JSObject
    )?,
  11. void onAddToFavoritesAsync(
    1. JSObject,
    2. dynamic (
      1. Map
      )
    )?,
})

Implementation

MPFlutterWechatAppDelegate({
  this.onLaunch,
  this.onEnter,
  this.onShow,
  this.onHide,
  this.onSaveExitState,
  this.onShareAppMessage,
  this.onShareAppMessageAsync,
  this.onShareTimeline,
  this.onShareTimelineAsync,
  this.onAddToFavorites,
  this.onAddToFavoritesAsync,
}) {
  if (kIsMPFlutter) {
    try {
      _addCallbackListenner();
      _readyToLaunch();
    } catch (e) {
      print(e);
    }
  }
}