updateSession method

Implementation

@override
Future<IAMPASSAuthenticationSession?> updateSession(
    IAMPASSAuthenticationSession session) async {
  String encodedSession = jsonEncode(session.toJson());
  Map<String, String> args = {"session": encodedSession};

  final result =
      await methodChannel.invokeMethod<String>('UpdateSession', args);

  if (result != null) {
    // The result is a json encoded AuthenticationSession
    Map<String, dynamic> valueMap = jsonDecode(result);

    IAMPASSAuthenticationSession? s =
        IAMPASSAuthenticationSession.fromJson(valueMap);
    return s;
  }
  return null;
}