instance property
FlutterAudioToolkitPlatform
get
instance
The default instance of FlutterAudioToolkitPlatform to use.
Defaults to MethodChannelFlutterAudioToolkit.
Implementation
static FlutterAudioToolkitPlatform get instance {
if (_instance == null) {
// Late import to avoid circular dependencies
// This will be set by the method channel implementation
throw UnimplementedError('Platform implementation not set');
}
return _instance!;
}
set
instance
(FlutterAudioToolkitPlatform instance)
Platform-specific implementations should set this with their own platform-specific class that extends FlutterAudioToolkitPlatform when they register themselves.
Implementation
static set instance(FlutterAudioToolkitPlatform instance) {
PlatformInterface.verifyToken(instance, _token);
_instance = instance;
}