RangersApplogFlutterPlugin class
Properties
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
Static Methods
-
getAbSdkVersion()
→ Future<String?>
-
get ab_sdk_version
@returns ab_sdk_version
Usage:
String value = await RangersApplogFlutterPlugin.getAbSdkVersion();
-
getABTestConfigValueForKey(String key, dynamic defaultValue)
→ Future
-
get the abConfigValue of the corresponding
key
@param key String
@returns corresponding abConfigValue
Usage:
String value = await RangersApplogFlutterPlugin.getABTestConfigValueForKey('ab_test_key');
-
getAllAbTestConfig()
→ Future<Map?>
-
get all ab config
This method will not trigger exposure.
Note: Only avaliable on iOS!
Usage example:
Map<dynamic, dynamic> d = await RangersApplogFlutterPlugin.getAllAbTestConfig();
-
getDeviceId()
→ Future<String?>
-
get device_id
@returns device_id
Usage:
String value = await RangersApplogFlutterPlugin.getDeviceId();
-
initRangersAppLog(String appid, String channel, bool enableAb, bool enableEncrypt, bool enableLog, String? host)
→ void
-
Init SDK,expected to be called as early as possible.
Note: You can also choose to init SDK in native side (say, using Java or Objective-C). If so, this method is not expected to be called.
@param appid String AppID of Rangers.
@param channel String.
@host private report URL. e.g. https://myprivateurl.com/ Pass
null
if you dont know what this is.
Usage:(replace 123456 with your appid)
RangersApplogFlutterPlugin.initRangersAppLog('123456','test_channel', true, true, false, null);
-
onEventV3(String eventName, Map<String, dynamic>? params)
→ void
-
track events
@param eventName String
@param params Map<String, dynamic> event properties
Usage:
RangersApplogFlutterPlugin.onEventV3('flutter_start',{'key1':'value1','key2':'value2'});
-
profileAppend(Map<String, dynamic> profileDict)
→ void
-
-
profileIncrement(Map<String, dynamic> profileDict)
→ void
-
-
profileSet(Map<String, dynamic> profileDict)
→ void
-
-
profileSetOnce(Map<String, dynamic> profileDict)
→ void
-
-
profileUnset(String key)
→ void
-
-
receiveABTestConfigStream()
→ Stream<void>
-
Sets up a broadcast stream for receiving ABTestConfig events.
May receive multiple events.
You can get the latest ABTestConfig by getABTestConfigValueForKey.
-
receiveABVidsChangeStream()
→ Stream<void>
-
Sets up a broadcast stream for receiving ABVidsChange events.
Triggered when ABTest is exposed
-
-
custom header info
@param params Map<String, dynamic> header信息.
Usage:
RangersApplogFlutterPlugin.setHeaderInfo({'key1':'value1','key2':'value2'});
-
setUserUniqueId(String? userUniqueID)
→ void
-
set user_unique_id
@param userUniqueID String Pass the userID you want to log in. Pass
null
to log out.
Usage:
RangersApplogFlutterPlugin.setUserUniqueId('123');