Skip to content

Commit 0700aba

Browse files
authored
Merge pull request #21 from VapiAI/gabe/fix-assistantless-call
Update min requirements for SDK usage
2 parents 2fd2090 + bf2eb30 commit 0700aba

4 files changed

Lines changed: 27 additions & 5 deletions

File tree

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99

1010
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.
1111

12+
**iOS:** Requires iOS 13.0 or higher due to the `daily_flutter` dependency.
13+
**Android:** Requires SDK version 24 or higher due to the `daily_flutter` dependency.
14+
1215
### Web
1316

1417
- 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`.
@@ -37,6 +40,12 @@ Then, follow the platform-specific setup instructions for `permission_handler`:
3740

3841
### iOS
3942

43+
**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:
44+
45+
```ruby
46+
platform :ios, '13.0'
47+
```
48+
4049
According to the permission_handler instructions above, add the permission flags for microphone.
4150

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

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

89+
**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:
90+
91+
```kotlin
92+
android {
93+
defaultConfig {
94+
minSdk = 24
95+
}
96+
}
97+
```
98+
8099
---
81100

82101
### Web

lib/src/platform/mobile/vapi_mobile_call.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,9 @@ class VapiMobileCall implements VapiCall {
119119
final String webCallUrl;
120120

121121
/// ID of the assistant handling this call
122+
/// May be null when using inline assistant configuration
122123
@override
123-
final String assistantId;
124+
final String? assistantId;
124125

125126
/// Assistant configuration overrides for this call
126127
@override
@@ -165,7 +166,7 @@ class VapiMobileCall implements VapiCall {
165166
final transport = VapiCallTransport.fromJson(
166167
apiResponse['transport'] as Map<String, dynamic>);
167168
final webCallUrl = apiResponse['webCallUrl'] as String;
168-
final assistantId = apiResponse['assistantId'] as String;
169+
final assistantId = apiResponse['assistantId'] as String?;
169170
final assistantOverrides = Map<String, dynamic>.from(
170171
apiResponse['assistantOverrides'] as Map<String, dynamic>);
171172

lib/src/platform/web/vapi_web_call.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,9 @@ class VapiWebCall implements VapiCall {
8383
final String webCallUrl;
8484

8585
/// ID of the assistant handling this call.
86+
/// May be null when using inline assistant configuration.
8687
@override
87-
final String assistantId;
88+
final String? assistantId;
8889

8990
/// Assistant configuration overrides for this call.
9091
@override
@@ -156,7 +157,7 @@ class VapiWebCall implements VapiCall {
156157
final transportTmp = Map<String, dynamic>.from(callData['transport']);
157158
final transport = VapiCallTransport.fromJson(transportTmp);
158159
final webCallUrl = callData['webCallUrl'];
159-
final assistantId = callData['assistantId'];
160+
final assistantId = callData['assistantId'] as String?;
160161
final assistantOverrides =
161162
Map<String, dynamic>.from(callData['assistantOverrides']);
162163

lib/src/vapi_call_interface.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ abstract interface class VapiCall {
1919
String get id;
2020

2121
/// ID of the assistant handling this call.
22-
String get assistantId;
22+
/// May be null when using inline assistant configuration.
23+
String? get assistantId;
2324

2425
/// Assistant configuration overrides for this call.
2526
Map<String, dynamic> get assistantOverrides;

0 commit comments

Comments
 (0)