startFeature method
Future<void>
startFeature(
- String accessToken,
- AuthmeFeature feature, {
- int requestCode = 1001,
- bool needConfirm = true,
- bool isResultPageDisplayable = true,
- bool isResultEditable = true,
- bool isFraudIntroEnable = true,
})
Implementation
Future<void> startFeature(
String accessToken,
AuthmeFeature feature, {
int requestCode = 1001,
bool needConfirm = true,
bool isResultPageDisplayable = true,
bool isResultEditable = true,
bool isFraudIntroEnable = true,
}) async {
if (Platform.isAndroid) {
refreshToken(accessToken);
}
try {
await _channel.invokeMethod('startFeature', {
'token': accessToken,
'feature': feature.rawValue,
'requestCode': requestCode,
'config': {
'needConfirm': needConfirm,
'isResultPageDisplayable': isResultPageDisplayable,
'isResultEditable': isResultEditable,
'isFraudIntroEnable': isFraudIntroEnable,
}
});
} on PlatformException catch (_) {
rethrow;
}
}