File tree Expand file tree Collapse file tree 2 files changed +365
-131
lines changed
Expand file tree Collapse file tree 2 files changed +365
-131
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,17 @@ class Utils {
3333 OptimizelySegmentOption .resetCache: "resetCache" ,
3434 };
3535
36- static Map <String , dynamic > convertToTypedMap (Map <String , dynamic > map) {
36+ /// Converts a map to platform-specific typed format
37+ ///
38+ /// On iOS, returns a typed map with type information for proper native conversion.
39+ /// On Android, returns the original primitive map.
40+ ///
41+ /// The [forceIOSFormat] parameter is used for testing purposes only to test
42+ /// iOS format conversion without running on actual iOS platform.
43+ static Map <String , dynamic > convertToTypedMap (
44+ Map <String , dynamic > map, {
45+ bool forceIOSFormat = false ,
46+ }) {
3747 if (map.isEmpty) {
3848 return map;
3949 }
@@ -50,7 +60,7 @@ class Utils {
5060 }
5161 }
5262
53- if (Platform .isIOS) {
63+ if (Platform .isIOS || forceIOSFormat ) {
5464 return typedMap;
5565 }
5666 return primitiveMap;
You can’t perform that action at this time.
0 commit comments