getCurrentSession static method

Future<Map<String, dynamic>> getCurrentSession()

Implementation

static Future<Map<String, dynamic>> getCurrentSession() async {
  try {
    models.Session session = await _account.getSession(sessionId: 'current');
    return session.toMap();
  } on AppwriteException catch (e) {
    return {
      'error': true,
      'type': e.type,
      'message': e.message,
      'code': e.code,
    };
  }
}