setDelta method

  1. @override
Future<bool> setDelta({
  1. required String directive,
  2. required String mid,
  3. required Map<String, dynamic>? delta,
})
override

Implementation

@override
Future<bool> setDelta({
  required String directive,
  required String mid,
  required Map<String, dynamic>? delta,
}) async {
  if (!kIsWeb) {
    if (Platform.isWindows) {
      logger.info('It is not web environment, FirebaseRealtime.setDelta() is not supported.');
      return false;
    }
  } else {
    logger.warning('===========skpark temporary stop : firebase realtime has bug.===========');
    return false;
  }

  await initialize();

  Map<String, dynamic> input = makeData(directive: directive, mid: mid, delta: delta);
  logger.finest('setDelta = ${input.toString()}');

  try {
    await _db!.child('hycop_delta').child(mid).set(input);
    logger.finest("hycop_delta sample data created");
    return true;
  } catch (e) {
    logger.severe("hycop_delta SET DB ERROR : $e");
    return false;
  }
}