BloomNativeModule constructor
BloomNativeModule({
- required String name,
- String version = '1.0.0',
- MethodChannel? customMethodChannel,
- 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');
}