BloomNativeModule constructor

BloomNativeModule({
  1. required String name,
  2. String version = '1.0.0',
  3. MethodChannel? customMethodChannel,
  4. EventChannel? customEventChannel,
})

Creates a BloomNativeModule instance.

Automatically configures underlying MethodChannel ('dev.bloom.modules/$name') and EventChannel ('dev.bloom.modules/$name/events') unless custom channels are provided.

Implementation

BloomNativeModule({
  required this.name,
  this.version = '1.0.0',
  MethodChannel? customMethodChannel,
  EventChannel? customEventChannel,
}) {
  _methodChannel = customMethodChannel ?? MethodChannel('dev.bloom.modules/$name');
  _eventChannel = customEventChannel ?? EventChannel('dev.bloom.modules/$name/events');
}