@@ -162,43 +162,43 @@ class SensorsAnalyticsFlutterPlugin {
162162 /// profileUnset
163163 /// 删除一个用户属性.
164164 ///
165- /// @param profilePropertity String 用户属性.
165+ /// @param profileProperty String 用户属性.
166166 ///
167167 /// 使用示例:
168168 /// SensorsAnalyticsFlutterPlugin.profileUnset('key1');
169169 ///
170- static void profileUnset (String profilePropertity ){
171- List <dynamic > params = [profilePropertity ];
170+ static void profileUnset (String profileProperty ){
171+ List <dynamic > params = [profileProperty ];
172172 _channel.invokeMethod ('profileUnset' ,params);
173173 }
174174
175175 ///
176176 /// profileIncrement
177177 /// 给一个数值类型的Profile增加一个数值. 只能对数值型属性进行操作,若该属性未设置,则添加属性并设置默认值为0
178178 ///
179- /// @param profilePropertity String 用户属性.
179+ /// @param profileProperty String 用户属性.
180180 /// @param number 增加的数值,可以为负数
181181 ///
182182 /// 使用示例:
183183 /// SensorsAnalyticsFlutterPlugin.profileIncrement('age',10);
184184 ///
185- static void profileIncrement (String profilePropertity , num number) {
186- List <dynamic > params = [profilePropertity ,number];
185+ static void profileIncrement (String profileProperty , num number) {
186+ List <dynamic > params = [profileProperty ,number];
187187 _channel.invokeMethod ('profileIncrement' ,params);
188188 }
189189
190190 ///
191191 /// profileAppend
192192 /// 给一个 List 类型的 Profile 增加一些值
193193 ///
194- /// @param profilePropertity String 用户属性.
194+ /// @param profileProperty String 用户属性.
195195 /// @param content List<String> 增加的值,List 中元素必须为 String
196196 ///
197197 /// 使用示例:
198198 /// SensorsAnalyticsFlutterPlugin.profileAppend('address',['Beijing','Shanghai'] );
199199 ///
200- static void profileAppend (String profilePropertity , List <String > content) {
201- List <dynamic > params = [profilePropertity ,content];
200+ static void profileAppend (String profileProperty , List <String > content) {
201+ List <dynamic > params = [profileProperty ,content];
202202 _channel.invokeMethod ('profileAppend' ,params);
203203 }
204204
@@ -223,6 +223,44 @@ class SensorsAnalyticsFlutterPlugin {
223223 ///
224224 static void clearKeychainData () {
225225 _channel.invokeMethod ('clearKeychainData' );
226- }
226+ }
227227
228+ ///
229+ /// registerSuperProperties
230+ /// 设置公共属性
231+ ///
232+ /// @param superProperties Map<String,dynamic> 公共属性.
233+ ///
234+ /// 使用示例:
235+ /// SensorsAnalyticsFlutterPlugin.registerSuperProperties({'key1':'value1','key2':'value2'});
236+ ///
237+ static void registerSuperProperties (Map <String ,dynamic > superProperties){
238+ List <dynamic > params = [superProperties];
239+ _channel.invokeMethod ('registerSuperProperties' ,params);
240+ }
241+
242+ ///
243+ /// unregisterSuperProperty
244+ /// 删除一个指定的公共属性.
245+ ///
246+ /// @param superProperty String 公共属性.
247+ ///
248+ /// 使用示例:
249+ /// SensorsAnalyticsFlutterPlugin.unregisterSuperProperty('key1');
250+ ///
251+ static void unregisterSuperProperty (String superProperty){
252+ List <dynamic > params = [superProperty];
253+ _channel.invokeMethod ('unregisterSuperProperty' ,params);
254+ }
255+
256+ ///
257+ /// clearSuperProperties
258+ /// 删除本地存储的所有公共属性
259+ ///
260+ /// 使用示例:
261+ /// SensorsAnalyticsFlutterPlugin.clearSuperProperties();
262+ ///
263+ static void clearSuperProperties () {
264+ _channel.invokeMethod ('clearSuperProperties' );
265+ }
228266}
0 commit comments