Skip to main content

Widget Views

Consultation Widget View

The SDK also provides a Consultation Widget View, which allows you to integrate the consultation widget interface directly into your hierarchy.

Api Reference

@MainActor
public static func consultationWidgetView() async throws -> some View

This method asynchronously returns a SwiftUI view that represents the consultation widget.

Possible Errors

Framework not initialized or user not authenticated

MeetingDoctorsError.illegalStateException(reason: .userNotLoged)

Example Implementation

To create and present the consultation widget, use the following example:

do {
let widget = try await MeetingDoctors.consultationWidgetView()
// Handle success
} catch {
// Handle error
}

 

Videocall Widget View

The SDK also provides a Videocall Widget View, which allows you to integrate the videocall widget interface directly into your hierarchy.

Api Reference

@MainActor
public static func videocallWidgetView() async throws -> some View

This method asynchronously returns a SwiftUI view that represents the videocall widget.

Possible Errors

Framework not initialized or user not authenticated

MeetingDoctorsError.illegalStateException(reason: .userNotLoged)

Example Implementation

To create and present the videocall widget, use the following example:

do {
let widget = try await MeetingDoctors.videocallWidgetView()
// Handle success
} catch {
// Handle error
}

Rehabilitation Widget View

The SDK also provides a Rehabilitation Widget View, which allows you to integrate the rehabilitation widget interface directly into your hierarchy.

Api Reference

@MainActor
public static func rehabilitationWidgetView() async throws -> some View

This method asynchronously returns a SwiftUI view that represents the rehabilitation widget.

Possible Errors

Framework not initialized or user not authenticated

MeetingDoctorsError.illegalStateException(reason: .userNotLoged)

Example Implementation

To create and present the rehabilitation widget, use the following example:

do {
let widget = try await MeetingDoctors.rehabilitationWidgetView()
// Handle success
} catch {
// Handle error
}

Wellness Widget View

The SDK also provides a Wellness Widget View, which allows you to integrate the wellness widget interface directly into your hierarchy.

Api Reference

@MainActor
public static func wellnessWidgetView() async throws -> some View

This method asynchronously returns a SwiftUI view that represents the wellness widget.

Possible Errors

Framework not initialized or user not authenticated

MeetingDoctorsError.illegalStateException(reason: .userNotLoged)

Example Implementation

To create and present the wellness widget, use the following example:

do {
let widget = try await MeetingDoctors.wellnessWidgetView()
// Handle success
} catch {
// Handle error
}

Appointments Widget View

The SDK also provides a Appointments Widget View, which allows you to integrate the appointments widget interface directly into your hierarchy.

Api Reference

@MainActor
public static func appointmentsWidgetView() async throws -> some View

This method asynchronously returns a SwiftUI view that represents the appointments widget.

Possible Errors

Framework not initialized or user not authenticated

MeetingDoctorsError.illegalStateException(reason: .userNotLoged)

Example Implementation

To create and present the consultation widget, use the following example:

do {
let widget = try await MeetingDoctors.appointmentsWidgetView()
// Handle success
} catch {
// Handle error
}