AdViewChannel constructor

AdViewChannel(
  1. String prefix,
  2. Future handler(
    1. MethodCall call
    )
)

Listens on <prefix>_<id> with handler, under a fresh id.

Implementation

AdViewChannel(
  String prefix,
  Future<dynamic> Function(MethodCall call) handler,
) : id = _nextId++ {
  methodChannel = MethodChannel('${prefix}_$id')
    ..setMethodCallHandler(handler);
}