connect static method
Future<Onvif>
connect({
- required dynamic host,
- required dynamic username,
- required dynamic password,
- LogOptions logOptions = const LogOptions(LogLevel.error, stackTraceLevel: LogLevel.off),
- LoggyPrinter printer = const PrettyPrinter(showColors: false),
- Dio? dio,
- bool overrideSpecificationAuthentication = false,
Implementation
static Future<Onvif> connect({
/// The host name or IP address of the Onvif device
required host,
/// The username to use for authentication
required username,
/// The password to use for authentication
required password,
/// The log options to use for logging
LogOptions logOptions = const LogOptions(
LogLevel.error,
stackTraceLevel: LogLevel.off,
),
/// The printer to use for logging formatting
LoggyPrinter printer = const PrettyPrinter(
showColors: false,
),
/// The dio instance to use for making http requests
Dio? dio,
/// Whether to override the authentication specified in the Onvif specification
bool overrideSpecificationAuthentication = false,
}) async {
final onvif = Onvif(
authInfo: AuthInfo(
host: host,
username: username,
password: password,
),
logOptions: logOptions,
printer: printer,
dio: dio,
overrideSpecificationAuthentication: overrideSpecificationAuthentication,
);
await onvif.initialize();
return onvif;
}