AndroidContentProvider constructor
AndroidContentProvider(
- String authority
Creates a communication interface with native Android ContentProvider.
Implementation
AndroidContentProvider(this.authority)
: _methodChannel = MethodChannel(
'$_channelPrefix/ContentProvider/$authority',
_pluginMethodCodec,
) {
assert(() {
if (_debugSetUp) {
throw StateError(
"AndroidContentProvider has already been created in this isolate. "
"Each AndroidContentProvider must have a unique entrypoint and be created only once in it. "
"Make sure you followed the installation intructions from README.");
}
return _debugSetUp = true;
}());
WidgetsFlutterBinding.ensureInitialized();
_methodChannel.setMethodCallHandler(_handleMethodCall);
}