dependencies:
stream_video_flutter: ^1.0.0
# If you use video filters (blur/virtual background), add:
stream_video_filters: ^1.0.01.0.0
Stream Video Flutter 1.0.0 — Migration Guide
This guide summarizes all required changes to upgrade to stream_video_flutter v1.0.0. Follow the checklist and examples to make the update fast and safe.
TL;DR checklist
- Update dependency to
stream_video_flutter: ^1.0.0. - CallKit/Ringing:
- Replace
pushParamswithpushConfigurationwhen creatingStreamVideoPushNotificationManager. - Rename
nameCaller→callerName. - Remove
callerCustomizationCallbackandbackgroundVoipCallHandlerfromStreamVideoPushNotificationManager. - Remove
appNamefrom push config (iOS now uses Product Name). - Rename event APIs:
CallKit*→Ringing*(see details below).
- Replace
- Video filters moved to
stream_video_filters— add dependency and update imports/usages. - Remove deprecated APIs:
StreamVideo.muteVideoWhenInBackground/muteAudioWhenInBackground→StreamVideo.options.muteVideoWhenInBackground/StreamVideo.options.muteAudioWhenInBackground.StreamCallType()→StreamCallType.defaultType().Call.setParticipantPinned()→Call.setParticipantPinnedLocally().- Remove
startRtmpBroadcastsparam fromCall.goLive(). - Remove
localParticipantfromAddReactionOption. - Replace deprecated builder callbacks with variants that do not pass state objects.
1) Update dependencies
Update your pubspec.yaml:
Run:
flutter pub get2) CallKit/Ringing changes
- Replace
pushParamswithpushConfigurationwhen creating the push manager. - Rename
nameCaller→callerName. - Remove the deprecated
callerCustomizationCallbackandbackgroundVoipCallHandlerfromStreamVideoPushNotificationManagerconfiguration. - Remove
appName(iOS now uses the Product Name from build settings). - Rename CallKit-related events and types:
onCallKitEvent→onRingingEventobserveCoreCallKitEvents→observeCoreRingingEventsobserveCallAcceptCallKitEvent→observeCallAcceptRingingEventobserveCallDeclinedCallKitEvent→observeCallDeclinedRingingEventobserveCallEndedCallKitEvent→observeCallEndedRingingEventCallKitEvent→RingingEvent
Example setup (before → after):
// BEFORE
final streamVideoClient = StreamVideo(
apiKey,
user: user,
tokenLoader: tokenLoader,
pushNotificationManagerProvider: StreamVideoPushNotificationManager.create(
iosPushProvider: const StreamVideoPushProvider.apn(name: 'flutter-apn'),
androidPushProvider: const StreamVideoPushProvider.firebase(
name: 'flutter-firebase',
),
pushParams: const StreamVideoPushParams(
appName: kAppName,
ios: IOSParams(iconName: 'IconMask'),
missedCallNotification: NotificationParams(
showNotification: true,
subtitle: 'Missed Call',
callbackText: 'Call Back',
),
),
callerCustomizationCallback: /* removed in 1.0.0 */,
backgroundVoipCallHandler: /* removed in 1.0.0 */,
),
);// AFTER
final streamVideoClient = StreamVideo(
apiKey,
user: user,
tokenLoader: tokenLoader,
pushNotificationManagerProvider: StreamVideoPushNotificationManager.create(
iosPushProvider: const StreamVideoPushProvider.apn(name: 'flutter-apn'),
androidPushProvider: const StreamVideoPushProvider.firebase(
name: 'flutter-firebase',
),
pushConfiguration: const StreamVideoPushConfiguration(
ios: IOSPushConfiguration(iconName: 'IconMask'),
android: AndroidPushConfiguration(
missedCallNotification: MissedCallNotificationParams(
showNotification: true,
subtitle: 'Missed Call',
callbackText: 'Call Back',
),
),
),
),
);Quick find/replace (search your codebase):
onCallKitEvent→onRingingEventobserveCoreCallKitEvents→observeCoreRingingEventsobserveCallAcceptCallKitEvent→observeCallAcceptRingingEventobserveCallDeclinedCallKitEvent→observeCallDeclinedRingingEventobserveCallEndedCallKitEvent→observeCallEndedRingingEventCallKitEvent→RingingEventnameCaller:→callerName:- Remove usages of
callerCustomizationCallbackandbackgroundVoipCallHandleronStreamVideoPushNotificationManager. - Remove
appName:in push configuration.
3) Video filters moved to stream_video_filters
If you use blur/virtual background, add the new package and update imports/usages accordingly.
dependencies:
stream_video_filters: ^1.0.0Update your imports. You may need to add stream_video_filters import in files you use StreamVideoEffectsManager.
4) Removed deprecated APIs and parameters
Apply these replacements:
// BEFORE
final type = StreamCallType(); // default constructor
await call.setParticipantPinned(sessionId: 'id', userId: 'u1', pinned: true);
await call.goLive(startRtmpBroadcasts: true);
final option = AddReactionOption(
call: call,
// localParticipant: /* removed */
);// AFTER
final type = StreamCallType.defaultType();
await call.setParticipantPinnedLocally(sessionId: 'id', userId: 'u1', pinned: true);
// For pinning for everyone, use the appropriate server-permissioned API if needed.
await call.goLive(); // remove startRtmpBroadcasts param
final option = AddReactionOption(
call: call,
);Deprecated UI builder callbacks that used to pass state objects have been removed. Switch to the new callbacks that do not provide state objects (see the 1.0.0 changelog note and linked PR for the list of affected widgets). Review any custom UI relying on those old callbacks and migrate to the new signatures.
🔍 Support
If you encounter any issues during migration, please submit a ticket at support.