listenCustomizedLifecycle static method

Future listenCustomizedLifecycle(
  1. MethodCall call
)

Implementation

static Future<dynamic> listenCustomizedLifecycle(MethodCall call) async {
  switch (call.method) {
    case 'onStart':
      mlCustomizedViewSetting?.customizedLifeCycleListener
          ?.call(CustomizedViewEvent.onStart);
      break;
    case 'onResume':
      mlCustomizedViewSetting?.customizedLifeCycleListener
          ?.call(CustomizedViewEvent.onResume);
      break;
    case 'onPause':
      mlCustomizedViewSetting?.customizedLifeCycleListener
          ?.call(CustomizedViewEvent.onPause);
      break;
    case 'onDestroy':
      mlCustomizedViewSetting?.customizedLifeCycleListener
          ?.call(CustomizedViewEvent.onDestroy);
      mlCustomizedViewSetting = null;
      break;
    case 'onStop':
      mlCustomizedViewSetting?.customizedLifeCycleListener
          ?.call(CustomizedViewEvent.onStop);
      break;
  }
}