Skip to content

Commit

Permalink
fix: added missing sdk for flutter onboarding session replay (#26680)
Browse files Browse the repository at this point in the history
  • Loading branch information
marandaneto authored Dec 5, 2024
1 parent 7cf87c8 commit 6559227
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 4 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions frontend/src/scenes/experiments/ExperimentCodeSnippets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ export function FlutterSnippet({ flagKey, variant }: SnippetProps): JSX.Element
<>
<CodeSnippet language={Language.Dart} wrap>
{`if (${clientSuffix}${flagFunction}('${flagKey}')${variantSuffix}) {
// Do something differently for this user
// Do something differently for this user
} else {
// It's a good idea to let control variant always be the default behaviour,
// so if something goes wrong with flag evaluation, you don't break your app.
// It's a good idea to let control variant always be the default behaviour,
// so if something goes wrong with flag evaluation, you don't break your app.
}
`}
</CodeSnippet>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/scenes/feature-flags/FeatureFlagSnippets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ export function FlutterSnippet({ flagKey, multivariant, payload }: FeatureFlagSn
return (
<CodeSnippet language={Language.Dart} wrap>
{`if (${clientSuffix}${flagFunction}('${flagKey}')${variantSuffix}) {
// do something
// do something
}
`}
</CodeSnippet>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
VueInstructions,
WebflowInstructions,
} from '.'
import { FlutterInstructions } from './flutter'
import { RNInstructions } from './react-native'

export const SessionReplaySDKInstructions: SDKInstructionsMap = {
Expand All @@ -43,6 +44,7 @@ export const SessionReplaySDKInstructions: SDKInstructionsMap = {
[SDKKey.IOS]: iOSInstructions,
[SDKKey.ANDROID]: AndroidInstructions,
[SDKKey.REACT_NATIVE]: RNInstructions,
[SDKKey.FLUTTER]: FlutterInstructions,
}

export function AdvertiseMobileReplay({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { SDKInstructionsMap, SDKKey } from '~/types'

import { FlutterInstructions } from '../session-replay/flutter'
import {
AndroidInstructions,
AngularInstructions,
Expand Down Expand Up @@ -36,4 +37,5 @@ export const WebAnalyticsSDKInstructions: SDKInstructionsMap = {
[SDKKey.WEBFLOW]: WebflowInstructions,
[SDKKey.ANDROID]: AndroidInstructions,
[SDKKey.REACT_NATIVE]: WebAnalyticsRNInstructions,
[SDKKey.FLUTTER]: FlutterInstructions,
}

0 comments on commit 6559227

Please sign in to comment.