eventTriggered method

dynamic eventTriggered()

Implementation

eventTriggered(){
  Timer(const Duration(seconds: 2),(){
    eventChannel.receiveBroadcastStream().listen((datta) {
      if(datta is String){
        if (kDebugMode) {
          print(datta);
        }
      }
    }, onError: (error) {
      if (kDebugMode) {
        print("Error: $error");
      }
    });
  });

}