start method

  1. @override
Future<void> start()
override

Implementation

@override
Future<void> start() async {
  realTimeKey = null;
  await initialize();
  logger.finest('FirebaseRealtime start()');
  //if (_listenTimer != null) return;
  logger.finest('FirebaseRealtime start...()');
  //_listenTimer = Timer.periodic(const Duration(milliseconds: 100), (timer) {
  if (_isListenComplete) {
    _isListenComplete = false;
    logger.finest('listener restart $lastUpdateTimeStr');
    _deltaStream?.cancel();
    _deltaStream = _db!
        .child('hycop_delta')
        .orderByChild('updateTime')
        .startAfter(lastUpdateTimeStr)
        .onValue
        .listen((event) => _listenCallback(event, ''));
  }
  //});
}