Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@

This package relies heavily on the [`daily_flutter`](https://pub.dev/packages/daily_flutter) package. Please refer to the [daily_flutter pub.dev page](https://pub.dev/packages/daily_flutter) for the most up-to-date version constraints and platform requirements.

**iOS:** Requires iOS 13.0 or higher due to the `daily_flutter` dependency.
**Android:** Requires SDK version 24 or higher due to the `daily_flutter` dependency.

### Web

- No special requirements. The Vapi Web SDK is loaded under the hood via [jsdelivr](https://www.jsdelivr.com/), and a specific version is hardcoded to ensure compatibility with this Flutter package. For more details, see `lib/src/platform/web/vapi_web_client.dart`.
Expand Down Expand Up @@ -37,6 +40,12 @@ Then, follow the platform-specific setup instructions for `permission_handler`:

### iOS

**Important:** This package requires iOS 13.0 or higher due to the `daily_flutter` dependency. Make sure to set the iOS deployment target in your Podfile:

```ruby
platform :ios, '13.0'
```

According to the permission_handler instructions above, add the permission flags for microphone.

Also add this to your Info.plist:
Expand Down Expand Up @@ -77,6 +86,16 @@ Add the necessary permissions to your AndroidManifest.xml:

Add the permission flags for microphone according to the permission_handler instructions above.

**Important:** This package requires Android SDK version 24 or higher due to the `daily_flutter` dependency. Make sure to set the minimum SDK version in your build.gradle.kts:

```kotlin
android {
defaultConfig {
minSdk = 24
}
}
```

---

### Web
Expand Down
5 changes: 3 additions & 2 deletions lib/src/platform/mobile/vapi_mobile_call.dart
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,9 @@ class VapiMobileCall implements VapiCall {
final String webCallUrl;

/// ID of the assistant handling this call
/// May be null when using inline assistant configuration
@override
final String assistantId;
final String? assistantId;

/// Assistant configuration overrides for this call
@override
Expand Down Expand Up @@ -165,7 +166,7 @@ class VapiMobileCall implements VapiCall {
final transport = VapiCallTransport.fromJson(
apiResponse['transport'] as Map<String, dynamic>);
final webCallUrl = apiResponse['webCallUrl'] as String;
final assistantId = apiResponse['assistantId'] as String;
final assistantId = apiResponse['assistantId'] as String?;
final assistantOverrides = Map<String, dynamic>.from(
apiResponse['assistantOverrides'] as Map<String, dynamic>);

Expand Down
5 changes: 3 additions & 2 deletions lib/src/platform/web/vapi_web_call.dart
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,9 @@ class VapiWebCall implements VapiCall {
final String webCallUrl;

/// ID of the assistant handling this call.
/// May be null when using inline assistant configuration.
@override
final String assistantId;
final String? assistantId;

/// Assistant configuration overrides for this call.
@override
Expand Down Expand Up @@ -156,7 +157,7 @@ class VapiWebCall implements VapiCall {
final transportTmp = Map<String, dynamic>.from(callData['transport']);
final transport = VapiCallTransport.fromJson(transportTmp);
final webCallUrl = callData['webCallUrl'];
final assistantId = callData['assistantId'];
final assistantId = callData['assistantId'] as String?;
final assistantOverrides =
Map<String, dynamic>.from(callData['assistantOverrides']);

Expand Down
3 changes: 2 additions & 1 deletion lib/src/vapi_call_interface.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ abstract interface class VapiCall {
String get id;

/// ID of the assistant handling this call.
String get assistantId;
/// May be null when using inline assistant configuration.
String? get assistantId;

/// Assistant configuration overrides for this call.
Map<String, dynamic> get assistantOverrides;
Expand Down
Loading