getAccountInfo method

  1. @override
Future<void> getAccountInfo(
  1. String userId,
  2. Map<String, dynamic> userData
)
override

Implementation

@override
Future<void> getAccountInfo(String userId, Map<String, dynamic> userData) async {
  logger.finest('getAccountInfo($userId)');
  var getUserData = await HycopFactory.dataBase!
      .getData('hycop_users', 'user=$userId')
      .catchError((error, stackTrace) => throw HycopUtils.getHycopException(
          error: error, defaultMessage: 'not exist account(userId:$userId) !!!'));
  if (getUserData.isEmpty) {
    logger.severe('getData error !!!');
    throw const HycopException(message: 'getData failed !!!');
  }
  if (getUserData['isRemoved'] == true) {
    logger.severe('removed user !!!');
    throw HycopUtils.getHycopException(defaultMessage: 'removed user !!!');
  }
  userData.addAll(getUserData);
  logger.finest('getAccountInfo success ($userData)');
}