PlatformResolver<T> constructor
PlatformResolver<T> ({})
Implementation
PlatformResolver({
this.nativeResolver,
this.androidResolver,
this.iOSResolver,
this.chromeExtensionResolver,
this.fuschiaResolver,
this.linuxResolver,
this.macOSResolver,
this.webResolver,
this.windowsResolver,
this.defaultResolver,
Set<Platforms>? supportedPlatforms,
}) {
supportedPlatforms ??= Platform.instance.supportedPlatforms;
if (supportedPlatforms.contains(Platforms.android)) {
assert(_android != null, 'Missing android resolver');
}
if (supportedPlatforms.contains(Platforms.chromeExtension)) {
assert(_chromeExtension != null, 'Missing chrome extension resolver');
}
if (supportedPlatforms.contains(Platforms.fuschia)) {
assert(_fuschia != null, 'Missing fuschia resolver');
}
if (supportedPlatforms.contains(Platforms.iOS)) {
assert(_iOS != null, 'Missing iOS resolver');
}
if (supportedPlatforms.contains(Platforms.linux)) {
assert(_linux != null, 'Missing linux resolver');
}
if (supportedPlatforms.contains(Platforms.macOS)) {
assert(_macOS != null, 'Missing macOS resolver');
}
if (supportedPlatforms.contains(Platforms.web)) {
assert(_web != null, 'Missing web resolver');
}
if (supportedPlatforms.contains(Platforms.windows)) {
assert(_windows != null, 'Missing windows resolver');
}
}