publish method

  1. @override
Future<void> publish(
  1. String channel,
  2. dynamic data
)
override

Publish data to channel

Implementation

@override
Future<void> publish(String channel, dynamic data) async {
  if (!_isConnected) {
    throw StateError('Firebase not connected');
  }

  // Production: await _database.ref(channel).set(data);

  if (kDebugMode) {
    debugPrint('Published to Firebase channel $channel: $data');
  }
}