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
2 changes: 1 addition & 1 deletion example/lib/rokt_layouts_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class _RoktLayoutsScreenState extends State<RoktLayoutsScreen> {
.identify(identityRequest: identityRequest);

widget.mpInstance?.rokt.selectPlacements(
placementId: _placementIdController.text,
identifier: _placementIdController.text,
attributes: _getAttributesForPlatform());
print('${_getPlatform()} Rokt selectPlacements called');
} catch (e) {
Expand Down
6 changes: 3 additions & 3 deletions lib/mparticle_flutter_sdk.dart
Original file line number Diff line number Diff line change
Expand Up @@ -306,20 +306,20 @@ class Rokt {
static const MethodChannel _channel =
const MethodChannel('mparticle_flutter_sdk');

/// Selects placements with a [placementId], optional [attributes], optional [roktConfig], and optional [fontFilePathMap].
/// Selects placements with a [identifier], optional [attributes], optional [roktConfig], and optional [fontFilePathMap].
///
/// This method calls the Rokt selectPlacements API on each platform:
/// - Web: mParticle.Rokt.selectPlacements()
/// - Android: MParticle.getInstance()?.Rokt().selectPlacements()
/// - iOS: MParticle.sharedInstance().rokt.selectPlacements()
Future<void> selectPlacements({
required String placementId,
required String identifier,
Map<String, dynamic>? attributes,
RoktConfig? roktConfig,
Map<String, String>? fontFilePathMap,
}) async {
var params = {
'placementId': placementId,
'placementId': identifier,
'attributes': attributes,
'config': _roktConfigToMap(config: roktConfig),
'fontFilePathMap': fontFilePathMap,
Expand Down
4 changes: 2 additions & 2 deletions test/mparticle_flutter_sdk_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ void main() {
cacheDurationInSeconds: 100,
cacheAttributes: {'key1': 'value1'}));
await mp.rokt.selectPlacements(
placementId: 'placement1',
identifier: 'placement1',
attributes: {'attr1': 'val1'},
roktConfig: roktConfig,
fontFilePathMap: {'font1': 'path1'});
Expand All @@ -329,7 +329,7 @@ void main() {
test('rokt select placements with placeholders', () async {
mp.attachPlaceholder(id: 1, name: "placeholder1");
await mp.rokt.selectPlacements(
placementId: 'placement1',
identifier: 'placement1',
);

expect(
Expand Down